@font-face { font-family: Inter; src: url(../vendor/fonts/inter-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Inter; src: url(../vendor/fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+1E00-1E9F; }

:root {
  --brand: #0f766e; --brand-ink: #fff; --brand-soft: color-mix(in srgb, var(--brand) 11%, var(--surface));
  --bg: #f4f3ef; --surface: #fff; --surface-2: #faf9f6; --line: #e4e2da; --ink: #1d2422; --ink-2: #57605c; --ink-3: #7d8581;
  --accent: #c2570c; --red: #b42318; --red-soft: #fdecea; --amber: #a15c07; --amber-soft: #fdf1dc; --green: #157347; --green-soft: #e3f4ea;
  --blue: #1d5fa8; --blue-soft: #e4eefa; --violet: #6d3fc0; --violet-soft: #efe9fb; --gray-soft: #eeede8;
  --radius: 12px; --shadow: 0 1px 2px rgba(29, 36, 34, .05), 0 6px 20px rgba(29, 36, 34, .05); --side: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="sand"]) {
    --bg: #131716; --surface: #1b201e; --surface-2: #202624; --line: #2f3633; --ink: #eceeec; --ink-2: #aab2ae; --ink-3: #87908c;
    --red: #f4877c; --red-soft: #3a1f1c; --amber: #eeb35c; --amber-soft: #38291266; --green: #6fd19b; --green-soft: #17322466;
    --blue: #8dbcf0; --blue-soft: #1b2c4266; --violet: #bda4f2; --violet-soft: #2a214266; --gray-soft: #2a302d; --accent: #f0925a;
    --brand-soft: color-mix(in srgb, var(--brand) 26%, var(--surface));
  }
}
:root[data-theme="sand"] {
  --bg: #ece1cd; --surface: #fbf6ec; --surface-2: #f4ebda; --line: #dccfb6; --ink: #33291c; --ink-2: #62543d; --ink-3: #85755c;
  --gray-soft: #eadfc9; --amber-soft: #f6e6c4; --green-soft: #e0ecd3; --blue-soft: #e0e8ee; --violet-soft: #ebe2ef; --red-soft: #f6e0d6;
}
:root[data-theme="dark"] {
  --bg: #131716; --surface: #1b201e; --surface-2: #202624; --line: #2f3633; --ink: #eceeec; --ink-2: #aab2ae; --ink-3: #87908c;
  --red: #f4877c; --red-soft: #3a1f1c; --amber: #eeb35c; --amber-soft: #38291266; --green: #6fd19b; --green-soft: #17322466;
  --blue: #8dbcf0; --blue-soft: #1b2c4266; --violet: #bda4f2; --violet-soft: #2a214266; --gray-soft: #2a302d; --accent: #f0925a;
  --brand-soft: color-mix(in srgb, var(--brand) 26%, var(--surface));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; color-scheme: light dark; } /* Platz für den Scrollbalken ist immer reserviert, sonst springt der Inhalt je Seite */
:root[data-theme="light"], :root[data-theme="sand"] { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; }
@view-transition { navigation: auto; } /* Beim Seitenwechsel bleibt die Seitenleiste ruhig stehen */
.side { view-transition-name: side; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(*) { animation-duration: .1s; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 Inter, system-ui, 'Segoe UI', sans-serif; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 650; letter-spacing: -.012em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .7em; } p:last-child { margin-bottom: 0; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
small { font-size: .82em; } .ico { flex: none; display: block; }
.muted { color: var(--ink-2); } .pad { padding: 14px 16px; } .nowrap { white-space: nowrap; } .mono { font-variant-numeric: tabular-nums; }

/* Rahmen */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); padding: 14px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; font-weight: 700; font-size: 1.04rem; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand:has(.brand-logos) { justify-content: center; }
.brand-logos { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; max-width: 100%; overflow: visible !important; white-space: normal !important; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.logo-plate { display: inline-flex; align-items: center; max-width: 100%; padding: 5px 9px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.logo-plate img { display: block; height: calc(42px * var(--logo, 1)); width: auto; max-width: 100%; object-fit: contain; }
.logo-second img { height: calc(42px * var(--logo2, 1)); }
.ag-card { margin-bottom: 16px; padding: 16px 20px; }
.ag-head { display: flex; align-items: center; gap: 16px; }
.ag-head .grow { min-width: 0; } .ag-head b { display: block; font-size: 1.05rem; } .ag-head .hint { margin: 3px 0 0; }
.ag-contact { margin-top: 12px; }
.ag-contact summary { display: inline-flex; list-style: none; cursor: pointer; } .ag-contact summary::-webkit-details-marker { display: none; }
.ag-contact form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ag-contact[open] summary { display: none; } .ag-contact[open] form { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 520px) { .ag-head { flex-direction: column; align-items: flex-start; gap: 10px; } }
.top-logo { display: none; flex: none; } .top-logo img { height: min(calc(30px * var(--logo, 1)), 44px); max-width: 130px; }
.logo-admin { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.logo-admin input[type=range] { width: 100%; min-height: 0; padding: 0; border: 0; background: none; accent-color: var(--brand); }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: grid; gap: 2px; } .nav-foot { margin-top: auto; }
/* Hauptmenü mit Untermenü: Gruppe aufklappen, Unterpunkte eingerückt mit Linie */
.nav-group > summary { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; color: var(--ink-2); font-weight: 550; white-space: nowrap; cursor: pointer; list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--surface-2, color-mix(in srgb, var(--ink) 5%, transparent)); color: var(--ink); }
.nav-group > summary.on { color: var(--brand); }
.nav-caret { margin-left: auto; display: inline-flex; transition: transform .15s; opacity: .7; }
.nav-group[open] > summary .nav-caret { transform: rotate(180deg); }
.nav-sub { display: grid; gap: 1px; margin: 2px 0 6px 21px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav .nav-sub a { padding: 6px 10px; font-weight: 500; font-size: .92rem; }
.nav .nav-sub a.on { font-weight: 650; }
.nav-sub-h { padding: 8px 10px 2px; font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3, var(--ink-2)); }
.nav-sub-h:first-child { padding-top: 2px; }
.print-frame { position: fixed; left: -10000px; top: 0; width: 210mm; height: 297mm; border: 0; visibility: hidden; }
.bill-lh-inline { margin-top: 6px; } .bill-lh-inline label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .92rem; }
.bill-lh-inline select { width: auto; min-width: 160px; padding-top: 5px; padding-bottom: 5px; }
.nav-sub-sep { height: 1px; margin: 6px 10px; background: var(--line); }
@media (min-width: 821px) { .shell .side-dup { display: none; } .shell .bill-top { justify-content: flex-end; } }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; color: var(--ink-2); font-weight: 550; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav a.on { background: var(--brand-soft); color: var(--brand); }
.nav a .nav-count { margin-left: auto; }
.inbox-chan { display: block; color: var(--brand); font-weight: 600; font-size: .82rem; }
.nav-cta { margin: 0 2px 12px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 26px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.top-back { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font-size: .86rem; font-weight: 600; }
.top-back:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 35; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.to-top[hidden] { display: none; }
.to-top:hover { border-color: var(--brand); color: var(--brand); }
body:has(.sticky-foot) .to-top { bottom: 86px; }
@media (max-width: 820px) { .to-top { right: 14px; bottom: 84px; } body:has(.sticky-foot) .to-top { bottom: 148px; } }
@media (max-width: 640px) { .top-back { padding: 6px; } .top-back span { display: none; } }
@media print { .to-top, .top-back { display: none !important; } }
.top h1 { font-size: 1.18rem; flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.25; overflow-wrap: anywhere; }
.top h1.is-long { cursor: pointer; } .top h1.is-open { display: block; -webkit-line-clamp: unset; line-clamp: none; } /* langer Titel: zwei Zeilen, Klick zeigt alles */
.content { padding: 8px 26px 40px; max-width: 1280px; width: 100%; margin: 0 auto; }
.iconbtn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { background: var(--surface); color: var(--ink); } .iconbtn:has(.avatar) { border-radius: 50%; }
.dot { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.pop-wrap { position: relative; }
.popover { position: absolute; right: 0; top: 46px; width: min(340px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 50; }
.popover-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.menu a, .menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px 14px; background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; }
.notif { display: grid; gap: 1px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: .9rem; }
.notif:hover { background: var(--surface-2); text-decoration: none; } .notif span { color: var(--ink-2); } .notif small { color: var(--ink-3); }
.notif { position: relative; }
.notif.read b { font-weight: 500; color: var(--ink-2); }
.notif.unread { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.notif-new { display: inline-block; justify-self: start; margin-bottom: 2px; padding: 0 7px; border-radius: 99px; background: var(--brand); color: var(--brand-ink) !important; font-size: .7rem; font-weight: 650; }
.list-row.unread { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); box-shadow: inset 3px 0 0 var(--brand); }
.list-row .notif-new { display: inline-block; width: auto; }
.banner { padding: 8px 26px; font-size: .9rem; background: var(--amber-soft); color: var(--amber); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.banner form { margin-left: auto; }
.banner-sa form + form { margin-left: 0; }
.banner-sa select { width: auto; max-width: min(320px, 100%); min-height: 32px; padding: 3px 28px 3px 8px; font-size: .86rem; color: var(--ink); background-color: var(--surface); }
@media (max-width: 640px) { .banner-sa form { margin-left: 0; } .banner-sa form:first-of-type, .banner-sa select { width: 100%; max-width: none; } }
.bottom { display: none; }

/* Bausteine */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-body { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; } .stack-sm { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { display: block; padding: 14px 18px; color: var(--ink); }
.kpi:hover { text-decoration: none; border-color: var(--brand); }
.kpi.kpi-on { border-color: var(--brand); background: var(--brand-soft); }
#neu, #open, #wait, #neu-vergeben, #fertigmelden, #abnahme { scroll-margin-top: calc(var(--head, 60px) + 14px); }
html:has(#fertigmelden) { scroll-behavior: smooth; }
.kpi b { display: block; font-size: 1.75rem; font-weight: 680; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--ink-2); font-size: .88rem; } .kpi.alert b { color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 15px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 14.5px/1.2 inherit; font-family: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; background: var(--surface-2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 86%, #000); }
.btn-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.btn-danger:hover { background: var(--red-soft); }
.flow-steps { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 9px 14px; list-style: none; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.flow-steps li { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-3); }
.flow-steps li:last-child { flex: 0 1 auto; }
.flow-steps li:not(:last-child)::after { content: ''; flex: 1 1 16px; min-width: 12px; height: 2px; border-radius: 2px; background: var(--line); }
.flow-steps li.done:not(:last-child)::after { background: var(--brand); }
.flow-steps li > span { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-weight: 650; font-size: .85rem; }
.flow-steps li > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; min-width: 0; }
.flow-steps b { font-size: .9rem; color: inherit; } .flow-steps small { color: var(--ink-3); } .flow-steps a { color: inherit; }
.flow-steps li.now { color: var(--ink); } .flow-steps li.now > span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.flow-steps li.done { color: var(--ink-2); } .flow-steps li.done > span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.project-head > form { margin-left: auto; }
.locked-view form[method=post]:not([data-keep]), .locked-view .chat-form, .locked-view [data-edit-photo], .locked-view .sticky-foot, .locked-view [data-screenshot] { display: none; }
.locked-view .next-actions form[data-keep] { display: contents; }
.locked-note { background: var(--amber-soft); } .locked-note > span:first-child { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ag-mark { display: inline-flex; align-items: center; height: 22px; max-width: 120px; margin-left: 8px; padding: 1px 5px; overflow: hidden; vertical-align: middle; white-space: nowrap; text-overflow: ellipsis; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #333; font-size: .72rem; font-weight: 600; }
.ag-mark img { display: block; height: 18px; width: auto; max-width: 100%; object-fit: contain; }
.tenant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.tenant-tile { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.tenant-tile:hover { border-color: var(--brand); }
.tenant-tile.hot { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.tenant-tile.here { box-shadow: inset 3px 0 0 var(--brand); }
.tenant-text { display: grid; min-width: 0; } .tenant-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; } .tenant-text small { color: var(--ink-2); }
.tenant-tile.hot small { color: var(--ink); font-weight: 600; }
.logo-chip { flex: none; display: grid; place-items: center; width: 44px; height: 32px; padding: 2px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.logo-chip img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.tenant-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: .72rem; text-align: center; }
.auth-card .tenant-grid { grid-template-columns: minmax(0, 1fr); }
.tenant-switch { margin: 0 6px 12px; } .tenant-switch span { font-size: .78rem; } .tenant-switch select { min-height: 36px; padding-top: 4px; padding-bottom: 4px; font-size: .88rem; }
.menu-switch .tenant-switch { margin: 8px 12px 6px; } .menu-switch:empty { display: none; }
@media (min-width: 821px) { .menu-switch { display: none; } }
.next-actions { display: flex; flex-wrap: wrap; gap: 8px; } .next-actions form { display: contents; }
.next-step { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 16px; border-radius: 10px; background: var(--brand-soft); }
.callout-danger { margin-bottom: 12px; background: var(--red-soft); border-color: var(--red); color: var(--ink); }
.btn-two { display: grid; justify-items: center; gap: 1px; height: auto; padding-top: 8px; padding-bottom: 8px; white-space: normal; } .btn-two small { font-weight: 500; opacity: .85; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-sm { min-height: 33px; padding: 5px 11px; font-size: 13.5px; }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 16px; } .btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge-gray { background: var(--gray-soft); color: var(--ink-2); } .badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: var(--amber-soft); color: var(--amber); } .badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); } .badge-violet { background: var(--violet-soft); color: var(--violet); }
.trade { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; } .trade i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

.field { display: grid; gap: 5px; min-width: 0; } .field > span, .label { font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.input, input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=time], input[type=number], input[type=tel], input[type=search], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; }
textarea { min-height: 90px; resize: vertical; } input[type=color] { width: 46px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; cursor: pointer; } .check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.hint { font-size: .84rem; color: var(--ink-3); }

.flash-wrap { position: fixed; z-index: 200; top: 14px; right: 16px; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.flash { padding: 10px 14px; border-radius: 10px; font-weight: 500; font-size: .94rem; }
.flash-wrap .flash { position: relative; padding-right: 36px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); color: var(--ink); animation: toast-in .22s ease-out; transition: opacity .25s, transform .25s; }
.flash-wrap .flash-warn { border-left-color: #d9920f; } .flash-wrap .flash-error { border-left-color: var(--red); }
.flash-wrap .flash.leaving { opacity: 0; transform: translateX(16px); }
.flash-x { position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); cursor: pointer; }
.flash-x:hover { background: var(--gray-soft); color: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* Dialoge */
.modal-back { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 13, .55); animation: fade-in .14s ease-out; }
.modal { width: min(440px, 100%); padding: 20px; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); display: grid; gap: 16px; }
.modal-text { margin: 0; font-size: 1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.btn-danger-solid { background: #c62828; border-color: #c62828; color: #fff; } .btn-danger-solid:hover { background: #a91f1f; }
.modal.viewer { width: min(1100px, 100%); height: min(88dvh, 900px); padding: 0; gap: 0; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.viewer-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); } .viewer-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .viewer-head .spacer { flex: 1; }
.viewer-body { min-height: 0; display: flex; align-items: center; justify-content: center; background: #15191a; } .viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; } .viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
@keyframes fade-in { from { opacity: 0; } }
.flash-ok { background: var(--green-soft); color: var(--green); } .flash-warn { background: var(--amber-soft); color: var(--amber); } .flash-error { background: var(--red-soft); color: var(--red); }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr[data-href]:hover, .list-row:hover { background: var(--surface-2); }
form.list-row { flex-wrap: wrap; } form.list-row .btn { margin-left: auto; }
/* Tabelle wird zur Kartenliste, sobald IHR Platz nicht reicht. Die Seitenleiste zählt damit mit. */
:has(> .table-stack) { container-type: inline-size; }
@container (max-width: 760px) {
  .table-stack thead { display: none; } .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 10px 16px; border-bottom: 1px solid var(--line); } .table-stack tr:last-child { border-bottom: 0; } .table-stack td { padding: 2px 0; border: 0; }
}
.list-row { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--ink); }
.list-row:last-child { border-bottom: 0; } .list-row:hover { text-decoration: none; }
.list-row .grow { flex: 1; min-width: 0; } .list-row .grow > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 6px; border-radius: 3px; background: var(--gray-soft); overflow: hidden; } .progress i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.empty { padding: 34px 20px; text-align: center; color: var(--ink-2); } .empty .ico { margin: 0 auto 8px; color: var(--ink-3); }
.pager { display: flex; gap: 10px; justify-content: center; align-items: center; padding: 14px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; scrollbar-width: none; }
.tabs a { padding: 9px 14px; color: var(--ink-2); font-weight: 550; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; } .tabs a.on { color: var(--brand); border-color: var(--brand); }
.project-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.project-head > span { flex: 1 1 200px; min-width: 0; }
.status-select { width: auto; min-height: 34px; padding: 4px 30px 4px 12px; border-radius: 99px; font-weight: 600; font-size: .88rem; }
.tabs-wrap { container-type: inline-size; }
/* Zu wenig Platz: alle Reiter bleiben sichtbar, statt seitlich aus dem Bild zu laufen */
@container (max-width: 640px) {
  .tabs { flex-wrap: wrap; gap: 4px; padding: 4px; overflow: visible; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
  .tabs a { flex: 1 1 30%; margin: 0; padding: 7px 6px; border: 0; border-radius: 7px; text-align: center; }
  .tabs a.on { background: var(--brand-soft); }
}
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 7px 14px; margin: 0; } .dl dt { color: var(--ink-3); font-size: .88rem; } .dl dd { margin: 0; overflow-wrap: anywhere; }
.rich { overflow-wrap: anywhere; } .rich ul, .rich ol { margin: .3em 0; padding-left: 1.4em; } .rich blockquote { margin: .4em 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--ink-2); }
.callout { padding: 12px 16px; border-radius: 10px; background: var(--brand-soft); } .callout-warn { background: var(--amber-soft); } .callout-red { background: var(--red-soft); }

/* Editor */
.rte { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.rte:focus-within { border-color: var(--brand); }
.rte-bar { display: flex; gap: 1px; padding: 4px; border-bottom: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.rte-bar button { min-width: 32px; height: 30px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); cursor: pointer; font: 600 13.5px inherit; font-family: inherit; }
.rte-bar button:hover { background: var(--gray-soft); color: var(--ink); }
.rte-area { min-height: 110px; max-height: 340px; overflow: auto; padding: 10px 12px; outline: none; }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--ink-3); }
.rte textarea { display: none; }

/* Dateien */
.dropzone { position: relative; display: grid; justify-items: center; gap: 4px; padding: 22px; text-align: center; border: 2px dashed var(--line); border-radius: 12px; color: var(--ink-2); cursor: pointer; }
.dropzone.over, .dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-sm { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 12px 14px; text-align: left; border-width: 1.5px; }
.dropzone-sm span { display: grid; gap: 1px; min-width: 0; } .dropzone-sm small { color: var(--ink-3); }
.report-files { display: grid; justify-items: start; gap: 8px; } .report-files .dropzone { justify-self: stretch; }
.report-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.dz-status { font-size: .86rem; color: var(--brand); } .dz-status.err { color: var(--red); }
.file-tree { display: grid; gap: 12px; min-width: 0; }
.file-group-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: .86rem; font-weight: 650; color: var(--ink-2); }
.folder-box { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.folder-box summary { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; overflow-wrap: anywhere; list-style: none; border-radius: 10px; }
.folder-box summary::-webkit-details-marker { display: none; }
.folder-box summary:hover { background: var(--surface-2); }
.folder-box[open] > summary { border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; margin-bottom: 8px; }
.folder-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.folder-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.folder-txt b { font-weight: 650; }
.folder-toggle { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; font-size: .85rem; font-weight: 600; color: var(--ink-2); background: var(--surface); }
.folder-toggle svg { transition: transform .2s; }
.folder-box[open] > summary .folder-toggle svg { transform: rotate(180deg); }
.folder-box .when-open, .folder-box[open] > summary .when-closed { display: none; }
.folder-box[open] > summary .when-open { display: inline; }
@media (max-width: 560px) { .folder-toggle span { display: none !important; } .folder-toggle { padding: 6px; } }
.folder-inner { display: grid; gap: 12px; padding: 4px 12px 12px; }
.dz-more { margin-top: 8px; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.file { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.file-thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; flex: none; overflow: hidden; background: var(--gray-soft); color: var(--ink-3); }
.file-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .15s; }
.file-thumb:hover img { transform: scale(1.03); }
.file-badge { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 6px; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 600; }
.file-info { display: grid; align-content: start; gap: 1px; padding: 8px 10px 4px; font-size: .84rem; min-width: 0; flex: 1; }
.file-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; min-height: 2.5em; line-height: 1.25; overflow: hidden; overflow-wrap: anywhere; color: var(--ink); font-weight: 550; }
.file-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
.file-actions { display: flex; justify-content: flex-end; gap: 4px; min-height: 36px; padding: 0 8px 6px; }
.file-actions form { display: block; }
.file-actions button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink-2); cursor: pointer; }
.file-actions button:hover { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.folder-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 4px 0 8px; }

.folder-title { display: flex; align-items: center; gap: 9px; font-size: 1.05rem; font-weight: 650; color: var(--brand); }
.trade-folder { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.progress-lg { height: 10px; border-radius: 5px; }
.trade-list { display: grid; container-type: inline-size; }
.trade-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--ink); }
a.trade-row:hover { background: var(--surface-2); text-decoration: none; }
.trade-row.mine { background: var(--brand-soft); }
.trade-row .trade { grid-column: 1; grid-row: 1; }
.tr-status { grid-column: 2; grid-row: 1; justify-self: end; }
.tr-status form { margin: 0; }
.tr-main { grid-column: 1; grid-row: 2; min-width: 0; font-size: .9rem; color: var(--ink-2); }
.trade-row .trade { min-width: 0; }
.tr-reason { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 5px 9px; border-radius: 7px; background: var(--red-soft); color: var(--ink); font-size: .84rem; overflow-wrap: anywhere; }
.tr-reason > span:first-child { min-width: 0; flex: 1 1 200px; }
.tr-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.missing-trades { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.missing-list { display: flex; flex-wrap: wrap; gap: 6px; }

.tr-time { grid-column: 2; grid-row: 2; justify-self: end; text-align: right; white-space: nowrap; }
/* Ist die Liste selbst breit genug, stehen alle Angaben in bündigen Spalten */
@container (min-width: 640px) {
  .trade-row { grid-template-columns: 190px minmax(0, 1fr) 175px 135px; padding: 11px 20px; }
  .trade-row .trade, .tr-main, .tr-time, .tr-status { grid-row: 1; } .tr-reason { grid-row: 2; }
  .trade-row .trade { grid-column: 1; } .tr-main { grid-column: 2; font-size: inherit; color: var(--ink); } .tr-time { grid-column: 3; justify-self: start; text-align: left; } .tr-status { grid-column: 4; }
}
.cd { display: inline-grid; line-height: 1.25; font-variant-numeric: tabular-nums; }
.cd-left { min-height: 20px; } .cd b { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; font-weight: 600; font-size: .8rem; color: var(--green); }
.cd-t { display: inline-flex; align-items: baseline; justify-content: center; min-width: 30px; padding: 1px 4px; border-radius: 5px; background: color-mix(in srgb, currentColor 13%, transparent); }
.cd-t i { margin-left: 1px; font-style: normal; font-size: .66rem; font-weight: 500; opacity: .75; }
.cd em { margin-right: 2px; font-style: normal; font-size: .74rem; }
.cd small { color: var(--ink-3); font-size: .76rem; }
.cd.cd-soon b { color: var(--amber); } .cd.cd-urgent b, .cd.cd-late b { color: var(--red); }
.cd-done { color: var(--green); font-weight: 600; font-size: .9rem; } .cd-none { color: var(--ink-3); font-size: .86rem; }
.cd-big .cd b { font-size: .86rem; } .cd-big .cd { grid-auto-flow: column; gap: 8px; align-items: baseline; }
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; } .choice legend { margin-bottom: 6px; }

/* Foto-Editor */
.pe { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 13, .6); animation: fade-in .14s ease-out; }
.pe-dialog { display: flex; flex-direction: column; width: min(1180px, 100%); height: min(90dvh, 860px); border-radius: 14px; overflow: hidden; background: #15191a; color: #e8eceb; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.pe-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; background: #1f2526; border-bottom: 1px solid #333b3c; }
.pe-group { display: flex; align-items: center; gap: 3px; }
.pe-group button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #d6dcda; cursor: pointer; font: 700 16px Inter, sans-serif; }
.pe-group button:hover { background: #333b3c; }
.pe-group button.on { background: var(--brand); color: #fff; }
.pe-group .pe-color, .pe-menu .pe-color { width: 24px; height: 24px; margin: 0 2px; border: 2px solid #555f60; border-radius: 50%; cursor: pointer; padding: 0; }
.pe-group .pe-color.on { outline: 2px solid #fff; outline-offset: 1px; }
.pe-sym-check { color: #4ade80 !important; } .pe-sym-cross { color: #f87171 !important; } .pe-sym-warn { color: #fbbf24 !important; } .pe-sym-ask { color: #60a5fa !important; }
.pe .btn:not(.btn-primary) { background: #333b3c; border-color: #333b3c; color: #e8eceb; }
.pe-stage { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
.pe-stage canvas { max-width: 100%; max-height: 100%; touch-action: none; background: #000; box-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
.pe-input { position: absolute; z-index: 2; width: 240px !important; min-height: 34px !important; background: #fff !important; color: #111 !important; border: 2px solid var(--brand) !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Projektformular */
.form-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section:first-child { padding-top: 0; border-top: 0; }
.form-section h3 { font-size: .98rem; color: var(--brand); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
fieldset.form-section { margin: 0; padding-right: 0; padding-bottom: 0; padding-left: 0; border-right: 0; border-bottom: 0; border-left: 0; min-width: 0; }
.form-section .hint { margin: -6px 0 0; }
.form-city { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr); gap: 12px 16px; }
/* Nebeneinander, solange Platz ist. Richtet sich nach der freien Breite, nicht nach dem Fenster. */
.page-split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.page-split > :first-child { flex: 999 1 440px; min-width: 0; }
.page-split > :only-child { max-width: 880px; }
.page-split > :nth-child(2) { flex: 1 1 360px; min-width: 0; }
.page-split .list-row { flex-wrap: wrap; } .page-split .list-row .grow { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.trade-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.user-trades { flex: 1 1 100%; min-width: 0; } .user-trades summary { cursor: pointer; font-size: .84rem; color: var(--ink-2); overflow-wrap: anywhere; }
.user-trades form { margin-top: 8px; } .user-trades .btn { margin-left: 0; }
.page-split .trade-pick span { padding: 5px 11px; font-size: .84rem; }
.trade-pick { position: relative; cursor: pointer; }
.trade-pick input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.trade-pick span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: .9rem; font-weight: 500; }
.trade-pick:hover span { border-color: var(--brand); color: var(--ink); }
.trade-pick input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.trade-pick input:checked + span::before { content: '✓'; }
.trade-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.form-address { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 16px; }
.a-street { grid-column: span 4; } .a-no, .a-top { grid-column: span 1; } .a-zip { grid-column: span 1; } .a-city { grid-column: span 5; }

/* Listenseite */
.list-tools { display: grid; gap: 12px; }
.tool-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 220px; }
.search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 38px; }
.tool-select { width: auto; min-width: 170px; }
.seg { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.seg label { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-weight: 550; white-space: nowrap; cursor: pointer; }
.seg label:hover { color: var(--ink); }
.seg input { position: absolute; opacity: 0; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.seg label:has(input:checked) { color: var(--brand); border-bottom-color: var(--brand); }
.seg .n { min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--gray-soft); color: var(--ink-2); font-size: .76rem; font-weight: 600; text-align: center; }
.seg label:has(input:checked) .n { background: var(--brand-soft); color: var(--brand); }
.seg-wrap { container-type: inline-size; }
/* Zu wenig Platz: alle Filter bleiben sichtbar, statt seitlich aus dem Bild zu laufen */
@container (max-width: 780px) {
  .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; overflow: visible; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
  .seg label { justify-content: space-between; min-width: 0; margin: 0; padding: 7px 9px; border: 0; border-radius: 7px; cursor: pointer; }
  .seg label:has(input:checked) { background: var(--brand-soft); }
  .seg label:has(input:checked) .n { background: var(--surface); }
}
@container (max-width: 479px) { .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.seg .n.n-alert, .seg label:has(input:checked) .n.n-alert { background: var(--red-soft); color: var(--red); }
#live-results { transition: opacity .12s; } #live-results.loading { opacity: .55; }
.result-info { margin: 0 0 8px 2px; font-size: .86rem; color: var(--ink-3); }
.project-table thead th { background: var(--surface-2); text-transform: none; }
.project-table thead th:first-child { border-top-left-radius: var(--radius); } .project-table thead th:last-child { border-top-right-radius: var(--radius); }
.project-table tbody tr[data-href] { cursor: pointer; }
.project-table .p-title { display: block; font-weight: 600; color: var(--ink); }
.project-table .p-sub { display: block; font-size: .8rem; color: var(--ink-3); }
.mini-progress { display: grid; gap: 3px; width: 120px; font-size: .78rem; color: var(--ink-2); }
.mini-progress .progress { height: 5px; }
.status-cell { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.project-table th:last-child { text-align: right; }

.chat-readonly { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; }

/* Sicherheit und Hersteller */
.site-info { display: grid; gap: 9px; margin-top: 12px; padding: 12px 4px 2px; border-top: 1px solid var(--line); font-size: .82rem; }
.sec-status { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.sec-status:hover { text-decoration: none; background: var(--surface-2); }
.sec-status b, .sec-status small { display: block; white-space: nowrap; } .sec-status b { font-size: .86rem; font-weight: 650; } .sec-status small { color: var(--ink-3); font-size: .74rem; }
.sec-ok .ico { color: var(--green); } .sec-warn .ico { color: #d9920f; } .sec-fail .ico { color: var(--red); }
.sec-status.sec-warn { border-color: color-mix(in srgb, #d9920f 45%, var(--line)); } .sec-status.sec-fail { border-color: var(--red); } .sec-status.sec-ok { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.site-version { padding: 0 4px; color: var(--ink-2); }
.site-maker { display: grid; gap: 6px; padding: 0 4px; }
.maker-label { color: var(--ink-3); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.maker-logo { display: block; width: 150px; padding: 8px 10px; background: #fff; border-radius: 8px; } .maker-logo img { display: block; width: 100%; height: auto; }
.site-maker address { font-style: normal; line-height: 1.45; color: var(--ink-2); } .site-maker address b { color: var(--ink); } .site-maker address a { color: inherit; }
.sec-head { display: flex; align-items: center; gap: 14px; }
.check-row .spacer { flex: 1; }
.secure-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .secure-list li { display: flex; gap: 9px; align-items: flex-start; } .secure-list .ico { color: var(--green); margin-top: 2px; }
.version { padding: 8px 0; border-bottom: 1px solid var(--line); } .version:last-child { border-bottom: 0; } .version ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.theme-form { display: grid; gap: 12px; padding: 12px 14px 14px; }
.theme-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: 10px; background: var(--gray-soft); }
.theme-seg label { position: relative; cursor: pointer; }
.theme-seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.theme-seg span { display: block; padding: 6px 4px; border-radius: 7px; color: var(--ink-2); font-size: .86rem; font-weight: 550; text-align: center; }
.theme-seg label:hover span { color: var(--ink); }
.theme-seg input:checked + span { background: var(--ink); color: var(--surface); font-weight: 600; } /* unabhängig von der Akzentfarbe immer gut lesbar */
.theme-seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.theme-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 2px; }
.swatch-grid { display: grid; grid-template-columns: repeat(5, 30px); justify-content: start; gap: 14px 22px; padding: 2px 4px; }
.theme-form .swatch-grid { grid-template-columns: repeat(5, 26px); justify-content: space-between; gap: 12px 0; }
.swatch-grid .swatch span { width: 100%; aspect-ratio: 1; height: auto; border: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.swatch-grid .swatch { display: block; }
.card .theme-seg { max-width: 380px; }
.theme-float { position: fixed; left: 14px; bottom: 14px; z-index: 40; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); }
.theme-float .popover { top: auto; bottom: 46px; left: 0; right: auto; }
.swatch { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); }
.swatch input:checked + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.quick-texts { display: flex; flex-wrap: wrap; gap: 6px; }
.field-low { align-self: end; }
.field-chips { display: grid; gap: 8px; align-content: start; min-width: 0; }
.quick-chip { padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font: 500 13.5px inherit; font-family: inherit; cursor: pointer; }
.quick-chip:hover { border-color: var(--brand); color: var(--ink); }
.quick-chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.picks:empty { display: none; }
.picks-lg .pick { width: 112px; height: 84px; }
.picks-lg .pick button { width: 24px; height: 24px; line-height: 24px; font-size: 12px; }
.pick { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--gray-soft); color: var(--ink-2); font-size: .78rem; }
.pick img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pick button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; line-height: 20px; cursor: pointer; }
.dropzone .picks { position: relative; z-index: 1; pointer-events: none; justify-content: center; margin-top: 6px; }
.file-type { display: grid; justify-items: center; gap: 2px; color: var(--ink-3); } .file-type b { font-size: .74rem; letter-spacing: .04em; }
.file-thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

.chat-files .pick { width: 54px; height: 54px; }
.chat-actions { flex-wrap: nowrap; } .chat-actions .row { flex-wrap: nowrap; min-width: 0; } .chat-actions button[type=submit] { flex: none; }

.type-cards { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.type-cards legend { margin-bottom: 6px; }
.type-card { position: relative; cursor: pointer; }
.type-card input { position: absolute; opacity: 0; }
.type-card span { display: grid; gap: 2px; padding: 12px 14px; height: 100%; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); }
.type-card b { color: var(--ink); } .type-card small { color: var(--ink-3); }
.type-card input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.type-card input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.fb-row { display: grid; gap: 4px; padding: 12px 20px; border-bottom: 1px solid var(--line); } .fb-row:last-child { border-bottom: 0; }
.fb-reply { margin-top: 6px; padding: 9px 12px; border-left: 3px solid var(--brand); border-radius: 6px; background: var(--surface-2); }

.pe-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #1f2526; border-bottom: 1px solid #333b3c; }
.pe-title { margin-right: auto; font-size: .95rem; font-weight: 650; white-space: nowrap; }
.pe-actions { display: flex; flex: none; gap: 8px; }
.pe-actions .btn { white-space: nowrap; }
.pe-actions .btn svg { width: 16px; height: 16px; display: none; }
.pe-props { flex-wrap: nowrap; gap: 18px; min-height: 46px; padding: 6px 12px; background: #1a1f20; overflow-x: auto; scrollbar-width: none; }
.pe-props > * { flex: none; }
.pe-textonly { display: none !important; }
.pe-mode-text .pe-textonly { display: inline-flex !important; }
.pe-mode-text .pe-lineonly { display: none; }
.pe-mode-erase .pe-colors { display: none; }
.pe-body { flex: 1; min-height: 0; display: flex; }
.pe-rail { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 54px; padding: 8px 0; overflow-y: auto; scrollbar-width: none; background: #1f2526; border-right: 1px solid #333b3c; }
.pe-rail .pe-group { flex-direction: column; gap: 2px; }
.pe-div { flex: none; width: 26px; height: 1px; background: #333b3c; }
@media (min-width: 641px) and (max-height: 760px) { .pe-rail { width: 94px; } .pe-rail .pe-group { display: grid; grid-template-columns: repeat(2, 38px); } .pe-div { width: 78px; } }
.pe-field { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: #aab2ae; }
.pe-field input[type=range] { width: 84px; min-height: 0; padding: 0; border: 0; background: none; accent-color: var(--brand); }
.pe-field input[type=number] { width: 66px; min-height: 30px; padding: 3px 7px; background: #2a3132; border-color: #3a4344; color: #e8eceb; }
.pe-field select { width: auto; min-height: 30px; padding: 3px 7px; background: #2a3132; border-color: #3a4344; color: #e8eceb; }
.pe-props .pe-group button { width: 32px; height: 32px; }
.pe-props .pe-group .pe-color { width: 22px; height: 22px; }
.pe-hint { margin: 0; padding: 5px 12px; font-size: .78rem; color: #98a29f; text-align: center; }
.pe-menu { position: fixed; z-index: 3; width: 248px; max-height: calc(100dvh - 16px); overflow-y: auto; padding: 5px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 32px rgba(0, 0, 0, .45); }
.pe-menu > button { display: flex; justify-content: space-between; gap: 14px; width: 100%; padding: 6px 10px; border: 0; border-radius: 6px; background: none; color: inherit; font: 500 13.5px Inter, sans-serif; text-align: left; cursor: pointer; }
.pe-menu > button:hover:not(:disabled) { background: var(--brand); color: var(--brand-ink); }
.pe-menu > button:hover:not(:disabled) kbd { color: inherit; opacity: .8; }
.pe-menu > button:disabled { color: var(--ink-3); opacity: .55; cursor: default; }
.pe-menu kbd { font: 500 11.5px Inter, sans-serif; color: var(--ink-3); }
.pe-menu hr { margin: 4px 2px; border: 0; border-top: 1px solid var(--line); }
.pe-menu-row { display: flex; gap: 4px; padding: 7px 8px 4px; margin-top: 4px; border-top: 1px solid var(--line); }
.pe-menu-row .pe-color { width: 22px; height: 22px; padding: 0; border: 2px solid var(--line); border-radius: 50%; cursor: pointer; }
.pe-menu-row .pe-sym { flex: 1; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: none; font: 700 15px Inter, sans-serif; cursor: pointer; }
.pe-menu-row .pe-sym:hover { background: var(--surface-2); }

.shot-live { position: fixed; inset: 0; z-index: 190; background: rgba(0, 0, 0, .18); cursor: crosshair; touch-action: none; user-select: none; }
.shot-live .shot-sel { position: fixed; }
.shot-hint { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); cursor: default; white-space: nowrap; }
.shot-sel { position: absolute; border: 2px solid var(--brand); background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); pointer-events: none; }

/* Vergabe */
.assign-line { display: grid; gap: 8px; padding-bottom: 8px; }
.assign-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 170px 40px; gap: 8px; align-items: end; }
.assign-fields .field { min-width: 0; } .assign-fields .iconbtn { margin-bottom: 2px; }
.assign-fields select, .assign-fields input { height: 42px; min-height: 42px; }
#assign-lines { container-type: inline-size; }
/* Neben der Seitenleiste: Gewerk und Firma nebeneinander, das Datum darunter, damit nichts abgeschnitten wird */
@container (min-width: 440px) and (max-width: 720px) {
  .assign-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assign-fields .f-date { grid-column: 1; }
  .assign-fields .iconbtn { grid-column: 2; justify-self: start; }
}
/* Überschriften nur über der ersten Zeile, untereinander bekommt jedes Feld seine eigene */
@media (min-width: 521px) { .assign-line:not(:first-child) .assign-fields .field > span { display: none; } }
.order-card { display: flex; gap: 14px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--ink); flex-wrap: wrap; }
.order-card:last-child { border-bottom: 0; } .order-card:hover { background: var(--surface-2); text-decoration: none; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; color: var(--ink-3); font-size: .92rem; } .timeline li.done { color: var(--ink); } .timeline li.done .ico { color: var(--green); }

/* Chat */
.chat { display: grid; grid-template-columns: 260px minmax(0, 1fr); height: min(72dvh, 760px); min-height: 340px; overflow: hidden; }
.chat-list { border-right: 1px solid var(--line); overflow: auto; }
.chat-list a { display: flex; gap: 10px; align-items: center; padding: 10px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.chat-list a:hover { background: var(--surface-2); text-decoration: none; } .chat-list a.on { background: var(--brand-soft); }
.chat-list .grow { flex: 1; min-width: 0; } .chat-list b, .chat-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chat-list b { font-weight: 600; font-size: .93rem; } .chat-list small { color: var(--ink-3); }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; text-align: center; line-height: 20px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { padding: 11px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.chat-messages { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.msg { display: flex; gap: 9px; max-width: 82%; } .msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-body { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; min-width: 0; }
.msg.mine .msg-body { background: var(--brand-soft); border-color: transparent; }
.msg-head { font-size: .8rem; } .msg-head span, .msg-time { color: var(--ink-3); } .msg-time { font-size: .74rem; margin-top: 2px; }
.chat-img img { display: block; max-width: 220px; max-height: 180px; border-radius: 8px; margin-top: 6px; } .chat-file { display: block; font-size: .9rem; margin-top: 5px; }
.chat-form { border-top: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 8px; }
.chat-form .rte-area { min-height: 54px; max-height: 150px; }
.chat-files { font-size: .84rem; color: var(--ink-2); }

/* Scan */
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; counter-reset: s; flex-wrap: wrap; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 99px; color: var(--ink-3); font-weight: 550; font-size: .92rem; background: var(--surface); border: 1px solid var(--line); }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--gray-soft); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.steps li.on { color: var(--brand); border-color: var(--brand); } .steps li.on::before { background: var(--brand); color: #fff; }
.steps li.done { color: var(--ink); } .steps li.done::before { content: '✓'; background: var(--green-soft); color: var(--green); }
.scan-drop { position: relative; padding: 56px 24px; display: grid; justify-items: center; gap: 10px; text-align: center; border: 2px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: 16px; background: var(--surface); }
.scan-drop.over { background: var(--brand-soft); border-color: var(--brand); } .scan-drop h2 { font-size: 1.3rem; }
.scan-icon { width: 62px; height: 62px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.file-btn { position: relative; overflow: hidden; } .file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.ocr-progress { height: 10px; border-radius: 5px; background: var(--gray-soft); overflow: hidden; } .ocr-progress i { display: block; width: 0; height: 100%; background: var(--brand); transition: width .25s; }
#ocr-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .9rem; color: var(--ink-2); } #ocr-log li.ok::before { content: '✓ '; color: var(--green); font-weight: 700; }
.assign-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.doc-view { position: sticky; top: 68px; max-height: calc(100dvh - 84px); display: flex; flex-direction: column; overflow: hidden; padding: 10px; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--line); }
.doc-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; border-radius: 4px; }
.doc-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.doc-scroll.zoomed { cursor: grab; }
.doc-scroll.panning { cursor: grabbing; user-select: none; }
.doc-page { position: relative; line-height: 0; background: #fff; box-shadow: var(--shadow); width: 100%; margin: 0 auto; }
.doc-foot { margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.doc-tools { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-zoom { display: inline-flex; }
.doc-zoom .btn { border-radius: 0; min-width: 34px; justify-content: center; }
.doc-zoom .btn + .btn { margin-left: -1px; }
.doc-zoom .btn:first-child { border-radius: 8px 0 0 8px; }
.doc-zoom .btn:last-child { border-radius: 0 8px 8px 0; }
#zoom-fit { min-width: 62px; font-variant-numeric: tabular-nums; }
.doc-canvas { width: 100%; height: auto; display: block; }
.doc-box { position: absolute; padding: 0; border: 1px solid rgba(90, 100, 96, .35); border-radius: 3px; background: rgba(120, 130, 125, .08); cursor: pointer; }
.doc-box.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 22%, transparent); }
.doc-box.hot, .doc-box:hover { outline: 2px solid var(--accent); background: rgba(194, 87, 12, .2); }
.cands { list-style: none; margin: 0; padding: 0; }
.cand { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; padding: 9px 16px; border-bottom: 1px solid var(--line); align-items: end; }
.cand:last-child { border-bottom: 0; } .cand.mapped { box-shadow: inset 3px 0 0 var(--brand); } .cand.ignored { opacity: .55; }
.cand-meta { display: flex; gap: 6px; min-height: 18px; margin-bottom: 3px; font-size: .78rem; color: var(--ink-3); flex-wrap: wrap; align-items: center; }
.cand-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.tag { padding: 0 6px; border-radius: 5px; background: var(--gray-soft); font-weight: 600; font-size: .73rem; } .tag-learn { background: var(--brand-soft); color: var(--brand); } .tag-warn { background: var(--amber-soft); color: var(--amber); }
details.more summary { padding: 11px 16px; cursor: pointer; font-weight: 600; color: var(--ink-2); border-top: 1px solid var(--line); }
.sticky-foot { position: sticky; bottom: 0; display: flex; gap: 10px; justify-content: flex-end; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }

/* Hilfe */
.help-item { border-bottom: 1px solid var(--line); } .help-item:last-child { border-bottom: 0; } .help-item summary { padding: 12px 20px; cursor: pointer; font-weight: 600; } .help-item div { padding: 0 20px 14px; color: var(--ink-2); }
.check-row { display: flex; gap: 10px; align-items: center; padding: 9px 20px; border-bottom: 1px solid var(--line); } .check-row:last-child { border-bottom: 0; } .check-row small { margin-left: auto; color: var(--ink-3); text-align: right; }
.state { width: 10px; height: 10px; border-radius: 50%; flex: none; } .state-ok { background: var(--green); } .state-warn { background: #d9920f; } .state-fail { background: var(--red); }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; }
.qr { width: 190px; background: #fff; border-radius: 8px; } .qr svg { display: block; width: 100%; height: auto; }
.code { font-family: Consolas, ui-monospace, monospace; background: var(--gray-soft); padding: 3px 7px; border-radius: 6px; overflow-wrap: anywhere; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.subnav a { padding: 6px 13px; border-radius: 99px; color: var(--ink-2); font-weight: 550; background: var(--surface); border: 1px solid var(--line); }
.subnav a:hover { text-decoration: none; color: var(--ink); } .subnav a.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Anmeldung */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 20px 16px; }
.auth-card { width: min(410px, 100%); } .auth-card .card-body { padding: 26px; }
.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; font-weight: 700; font-size: 1.15rem; margin-bottom: 18px; color: var(--ink); }

/* Startseite */
.pub { --brand: #0f766e; }
.auth-legal { text-align: center; margin: 14px 0 0; font-size: .85rem; } .auth-legal a { color: var(--ink-3); }
.demo-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .demo-roles form { display: contents; }
.demo-role { padding: 15px 16px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; display: grid; gap: 3px; }
.demo-role:hover { border-color: var(--brand); } .demo-role b { font-weight: 650; } .demo-role span { color: var(--ink-2); font-size: .88rem; }
.section { max-width: 1140px; margin: 0 auto; padding: 30px 20px; } .section > h2 { font-size: 1.6rem; margin-bottom: 18px; letter-spacing: -.02em; }

@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } .demo-roles { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 960px) { .assign-grid { grid-template-columns: minmax(0, 1fr); } .doc-view { position: static; max-height: 60dvh; } .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 22px; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); } .side { display: none; }
  .top-logo { display: inline-flex; }
  .top { padding: 8px 16px; } .content { padding: 6px 16px 96px; } .banner { padding: 8px 16px; }
  .bottom { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom a { display: grid; justify-items: center; gap: 1px; padding: 7px 2px 6px; color: var(--ink-3); font-size: 11px; font-weight: 550; } .bottom a:hover { text-decoration: none; } .bottom a.on { color: var(--brand); }
  .bottom a { position: relative; } .bottom a .nav-count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; line-height: 17px; padding: 0 4px; font-size: 10.5px; }
  .bottom a.cta .ico { background: var(--brand); color: #fff; border-radius: 9px; padding: 3px; width: 28px; height: 28px; margin-top: -3px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .chat { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100dvh - 190px); min-height: 460px; }
  .chat-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .chat-list a { flex: 0 1 auto; max-width: 100%; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; }
  .chat-list a.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
  .chat-list .avatar, .chat-list small { display: none; }
  .chat-list .grow { flex: 0 1 auto; }
  .chat-head { padding: 6px 14px; font-weight: 500; } .chat-head-name { display: none; } .chat-head small { font-size: 12px; }
  .msg { max-width: 94%; } .perm-grid { grid-template-columns: minmax(0, 1fr); }
  .sticky-foot { bottom: 56px; }
}
@media (max-width: 520px) { .cand { grid-template-columns: minmax(0, 1fr); } .assign-fields { grid-template-columns: minmax(0, 1fr) 40px; } .assign-fields .field:not(.f-date) { grid-column: 1 / -1; } .assign-line + .assign-line { padding-top: 10px; border-top: 1px solid var(--line); } .content a.btn { white-space: normal; } .dl { grid-template-columns: minmax(0, 1fr); gap: 1px; } .dl dd { margin-bottom: 8px; } .files { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 820px) {
  .pe { padding: 8px; }
  .pe-dialog { height: 100%; }
  .pe-hint { display: none; }
}
@media (max-width: 640px) {
  .pe-title { display: none; }
  .pe-history { margin-right: auto; }
  .pe-body { flex-direction: column-reverse; }
  .pe-rail { flex-direction: row; width: auto; padding: 5px 8px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-top: 1px solid #333b3c; }
  .pe-rail .pe-group { flex-direction: row; }
  .pe-rail button { flex: none; }
  .pe-div { width: 1px; height: 24px; margin: 0 5px; }
  .pe-field > span { display: none; }
  .pe-stage { padding: 6px; }
  .pe-props { flex-wrap: wrap; gap: 6px 10px; }
  .pe-field:has(select) { flex: 1 1 110px; } .pe-field select { width: 100%; }
  .pe-rail { flex-wrap: wrap; justify-content: center; gap: 2px 6px; overflow: visible; }
  .pe-rail .pe-group button { width: 36px; height: 36px; }
  .pe-div { display: none; }
}
@media (max-width: 1000px) {
  /* Schritte kompakt in einer Reihe, damit das Formular nicht nach unten rutscht */
  .flow-steps { gap: 4px; padding: 8px 6px; }
  .flow-steps li, .flow-steps li:last-child { flex: 1 1 0; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
  .flow-steps li:not(:last-child)::after { display: none; }
  .flow-steps li > div { justify-content: center; }
  .flow-steps li > span { width: 24px; height: 24px; }
  .flow-steps b { font-size: .76rem; line-height: 1.2; font-weight: 600; } .flow-steps small { display: none; }
}
@media (max-width: 640px) {
  .next-actions { width: 100%; flex-direction: column; } .next-step .btn { width: 100%; justify-content: center; }
  .assign-fields:has([data-remove][hidden]) .f-date { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .pe-actions .btn[data-act=close] span { display: none; }
  .pe-actions .btn[data-act=close] svg { display: block; }
}
@media (max-width: 640px) {
  .type-cards { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-address { grid-template-columns: repeat(2, minmax(0, 1fr)); } .a-street, .a-city { grid-column: 1 / -1; } .a-no, .a-top { grid-column: span 1; } .a-zip { grid-column: 1 / -1; } .pe { padding: 0; } .pe-dialog { width: 100%; height: 100dvh; border-radius: 0; } .flash-wrap { top: 8px; right: 16px; } }
.more-link { display: block; padding: 12px; text-align: center; color: var(--ink-2); font-size: .88rem; font-weight: 550; }
.notif-wrap { border-bottom: 1px solid var(--line); } .notif-wrap .notif { border-bottom: 0; } .notif-wrap:has(.notif.unread) { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); box-shadow: inset 3px 0 0 var(--brand); } .notif-wrap .notif.unread { background: none; box-shadow: none; }
.notif-wrap .list-row { border-bottom: 0; } .notif-wrap .list-row.unread { background: none; box-shadow: none; } .notif-wrap:has(.list-row.unread) { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); box-shadow: inset 3px 0 0 var(--brand); } .card > .notif-wrap:last-child { border-bottom: 0; }
.notif-actions { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: -2px 0 0; padding: 0 14px 10px; }
.card .notif-actions { padding: 0 20px 12px; margin-top: -6px; } .card .notif-reply { padding: 0 20px 14px; }
.notif-answer { display: inline-flex; align-items: center; min-height: 30px; padding: 3px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font: 600 .82rem Inter, system-ui, sans-serif; cursor: pointer; }
.notif-answer:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.notif-reply { display: grid; gap: 8px; padding: 0 14px 12px; } .notif-reply textarea { min-height: 62px; }
/* Das iPhone gibt Datumsfeldern eine eigene Mindestbreite und mittigen Text, deshalb liefen sie aus dem Formular */
input[type=date], input[type=datetime-local], input[type=time] { min-width: 0; max-width: 100%; }
@supports (-webkit-touch-callout: none) {
  input[type=date], input[type=datetime-local], input[type=time] { display: block; -webkit-appearance: none; appearance: none; }
  input[type=date]::-webkit-date-and-time-value, input[type=datetime-local]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { min-height: 1.5em; text-align: left; }
}
.mail-look { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; align-items: start; }
.mail-preview { display: block; width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 10px; background: #eef0f3; }
.mail-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 6px 16px; font-size: .88rem; color: var(--ink-2); }
/* Wer hat vergeben: feste Spalten, damit Namen und Fortschritt untereinander stehen */
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.who .avatar { width: 28px; height: 28px; font-size: 10.5px; }
.who-text { display: grid; min-width: 0; line-height: 1.25; } .who-text small { color: var(--ink-3); font-size: .72rem; } .who-text b { color: var(--ink); font-size: .84rem; font-weight: 550; overflow-wrap: anywhere; }
.who-col { flex: 0 0 180px; min-width: 0; } .row-end { flex: 0 0 120px; min-width: 0; }
.tr-who { display: block; margin-top: 1px; color: var(--ink-3); font-size: .78rem; }
@media (max-width: 640px) { .list-cols { flex-wrap: wrap; } .list-cols .grow { flex: 1 1 calc(100% - 134px); } .who-col { order: 3; flex: 1 1 100%; } }
/* Fenster halten den Bildlauf fest, die Seite dahinter bleibt stehen */
html:has(.modal-back), html:has(.pe), html:has(.shot-live), html:has(.popover:not([hidden])) { overflow: hidden; }
.side, .popover, .tabs, .seg, .rte-area, .chat-list, .chat-messages, .doc-view, .modal-back, .modal, .viewer-body, .viewer-pages, .pe, .pe-rail, .pe-props, .pe-menu, .update-files, .bottom-scroll { overscroll-behavior: contain; }
.modal-back { touch-action: none; } .modal { touch-action: pan-y pinch-zoom; }
.modal { max-height: calc(100dvh - 32px); overflow: auto; }
.modal.viewer { overflow: hidden; }
/* Betreiber-Leiste und Kopfzeile bleiben beim Scrollen stehen */
.head-stick { position: sticky; top: 0; z-index: 30; }
.head-stick .top { position: relative; top: auto; z-index: auto; }
.head-stick .banner { background: color-mix(in srgb, var(--amber) 14%, var(--bg)); }
.who-toggle button { display: inline-flex; align-items: center; gap: 7px; padding: 2px 0; border: 0; background: none; color: var(--ink-2); font: 500 .82rem Inter, system-ui, sans-serif; cursor: pointer; }
.who-toggle button:hover { color: var(--ink); }
.switch { position: relative; display: inline-block; width: 30px; height: 17px; border-radius: 99px; background: var(--line); transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--brand); } .switch.on::after { left: 15px; }
/* Listen sortieren */
.sort-th { display: inline-flex; gap: 3px; color: inherit; white-space: nowrap; } .sort-th:hover { color: var(--ink); text-decoration: none; } .sort-th.on { color: var(--brand); }
.sort-hint { opacity: .45; }
.sort-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 8px; color: var(--ink-2); font-size: .84rem; }
.sort-bar select { width: auto; min-height: 32px; padding: 3px 26px 3px 8px; font-size: .84rem; }
body .sort-phone { display: none; } .stack > .sort-bar, .content > .sort-bar { margin-bottom: 8px; }
@media (max-width: 820px) { body .sort-phone { display: flex; padding: 8px 12px; border-bottom: 1px solid var(--line); } .sort-bar select { font-size: 16px; } }
/* Datei wird gezogen: Felder leuchten, das Feld unter der Maus wird eindeutig */
.file-drag .dropzone, .file-drag .scan-drop { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.over, .scan-drop.over { border-style: solid; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }
.dropzone.over::after, .scan-drop.over::after { content: 'Hier loslassen'; position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: var(--brand); color: var(--brand-ink); font-size: 1.05rem; font-weight: 650; pointer-events: none; }
/* Einklappbare Karte mit Pfeil rechts */
.fold > summary { cursor: pointer; list-style: none; flex-wrap: nowrap; } .fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ''; flex: none; width: 10px; height: 10px; margin: 0 4px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(-45deg); transition: transform .15s; }
.fold[open] > summary::after { transform: rotate(45deg); }
.fold:not([open]) > summary { border-bottom: 0; }
/* Fertigmeldung für den Prüfer */
.report-card { border-color: var(--brand); } .report-card > .card-head { background: var(--brand-soft); border-radius: var(--radius) var(--radius) 0 0; }
.report-note { padding: 12px 14px; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; background: var(--surface-2); } .report-note small { display: block; margin-bottom: 4px; color: var(--ink-3); font-weight: 600; }
.chat-new { margin-bottom: 12px; } .chat-new > summary { list-style: none; } .chat-new > summary::-webkit-details-marker { display: none; } .chat-new > form { margin-top: 8px; }
.inbox-tools { margin-bottom: 12px; }
.chat.chat-one { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
@media (max-width: 820px) { .chat.chat-one { height: calc(100dvh - var(--head, 54px) - 118px - env(safe-area-inset-bottom)); } }
/* Update einspielen */
.update-steps { list-style: none; display: grid; gap: 7px; margin: 0; padding: 0; color: var(--ink-3); font-size: .92rem; }
.update-steps li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 9px; }
.update-steps li::before { content: ''; flex: none; display: grid; place-items: center; width: 18px; height: 18px; border: 2px solid var(--line); border-radius: 50%; font-size: 11px; font-weight: 700; }
.update-steps li.now { color: var(--ink); font-weight: 600; } .update-steps li.now::before { border-color: var(--brand); border-top-color: transparent; animation: spin .8s linear infinite; }
.update-steps li.done { color: var(--ink-2); } .update-steps li.done::before { content: '✓'; border-color: transparent; background: var(--green-soft); color: var(--green); }
.update-steps li.fail { color: var(--red); font-weight: 600; } .update-steps li.fail::before { content: '✕'; border-color: transparent; background: var(--red-soft); color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.update-more summary { cursor: pointer; color: var(--ink-2); font-size: .86rem; }
.update-files { max-height: 220px; margin: 6px 0 0; padding: 8px 10px; overflow: auto; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font: .8rem/1.5 Consolas, ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Handy und Touch */
@media not (pointer: coarse) { .touch-only { display: none !important; } }
@media (pointer: coarse) {
  .mouse-only { display: none !important; }
  a, button, label, summary, input, select, textarea { touch-action: manipulation; }
  .btn-sm { min-height: 40px; padding-left: 13px; padding-right: 13px; }
  .rte-bar button { min-width: 38px; height: 38px; }
  .file-actions { min-height: 44px; } .file-actions button { width: 38px; height: 38px; }
  .check input { width: 20px; height: 20px; margin-top: 1px; }
  .flash-x { top: 3px; right: 3px; width: 34px; height: 34px; }
  .subnav a { padding: 8px 14px; } .quick-chip { padding: 8px 13px; } .menu a, .menu button { padding: 12px 14px; }
  .pick button { width: 28px; height: 28px; line-height: 28px; }
}
@media (min-width: 641px) { .only-phone { display: none !important; } }
.menu a.phone-menu { display: none; }
@media (max-width: 820px) {
  /* Unter 16 Pixel zoomt das iPhone beim Antippen ins Feld */
  .input, input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=time], input[type=number], input[type=tel], input[type=search], select, select.status-select, textarea, .rte-area { font-size: 16px; }
  .menu a.phone-menu { display: flex; }
  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .sticky-foot { bottom: calc(56px + env(safe-area-inset-bottom)); }
  .bottom form { display: contents; }
  body:has(.sticky-foot) .to-top { display: none; } /* Der Knopf läge sonst über „Projekt anlegen“ */
  .bottom button { display: grid; justify-items: center; gap: 1px; padding: 7px 2px 6px; border: 0; background: none; color: var(--ink-3); font: 550 11px Inter, system-ui, sans-serif; }
  .bottom-scroll { grid-auto-columns: 92px; overflow-x: auto; scrollbar-width: none; } .bottom-scroll a { white-space: nowrap; }
  .chat { height: calc(100dvh - var(--head, 54px) - 72px - env(safe-area-inset-bottom)); min-height: 340px; scroll-margin-top: calc(var(--head, 54px) + 6px); }
  .chat-list { flex-wrap: nowrap; flex: none; overflow-x: auto; scrollbar-width: none; }
  .chat-list a { flex: none; max-width: 80%; }
}
@media (max-width: 640px) {
  .hide-phone { display: none !important; }
  .top { gap: 4px; min-height: 54px; padding: 6px 12px; }
  .top h1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 1rem; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
  .top-logo { padding: 3px 6px; } .top-logo img { height: 26px; max-width: 72px; }
  .top:has(.top-back) .top-logo { display: none; } /* Der Zurück-Knopf braucht den Platz, sonst bleibt vom Titel nichts */
  .top:has(#bell-pop) .pop-wrap:has(#theme-pop) { display: none; } /* Das Farbschema steht am Handy in „Mein Profil“ */
  .top .pop-wrap { position: static; }
  .top .popover { left: 12px; right: 12px; top: calc(100% - 2px); width: auto; max-height: calc(100dvh - 150px); }
  .banner { padding: 5px 12px; font-size: .82rem; }
  .content { padding-left: 12px; padding-right: 12px; }
  .card-body { padding: 14px; } .card-head { padding: 12px 14px; } .list-row, .fb-row { padding: 12px 14px; } .check-row { padding: 9px 14px; }
  .list-row .grow > * { overflow-wrap: anywhere; white-space: normal; }
  .project-head { flex-wrap: nowrap; gap: 10px; margin-bottom: 10px; font-size: .92rem; } .project-head > span.muted { flex: 1 1 0; } .project-head > span:not(.muted) { flex: none; } .project-head > form { flex: none; margin-left: 0; } select.status-select { max-width: 150px; }
  .modal-back:has(.viewer) { padding: 0; } .modal.viewer { max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .pub .theme-float { display: none; }
  input[type=date], input[type=datetime-local], input[type=time] { height: 42px; }
  /* Ablauf als eine ruhige Reihe statt zweizeiliger Knöpfe */
  .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 14px; }
  .steps li { position: relative; flex-direction: column; gap: 4px; min-width: 0; padding: 0; border: 0; background: none; font-size: .78rem; text-align: center; }
  .steps li::before { position: relative; z-index: 1; width: 26px; height: 26px; }
  .steps li:not(:last-child)::after { content: ''; position: absolute; top: 12px; left: calc(50% + 17px); right: calc(-50% + 17px); height: 2px; border-radius: 2px; background: var(--line); }
  .steps li.done:not(:last-child)::after { background: var(--brand); }
  .scan-drop { padding: 26px 16px; }
  .banner-sa { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; } .banner-sa > span { grid-column: 1 / -1; }
  .chat-form { grid-template-columns: minmax(0, 1fr); padding: 8px 10px; } .chat-actions .file-btn { min-width: 40px; padding: 5px; gap: 0; font-size: 0; } .chat-form .rte-bar, .chat-form [data-screenshot] { display: none; }
  .chat-actions .check { align-items: center; font-size: .86rem; white-space: nowrap; }
}
@media (max-width: 520px) { .pub-top nav .btn-ghost { display: none; } }
.viewer-body:has(.viewer-pages) { display: block; overflow: auto; }
.viewer-pages { display: grid; gap: 8px; padding: 6px; color: #e8eceb; } .viewer-pages canvas { display: block; width: 100%; height: auto; background: #fff; }
@media print { .side, .top, .bottom, .banner { display: none !important; } .shell { display: block; } }

/* Rechnungen und Angebote */
.bill-top { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.bill-top .tabs-wrap { flex: 1 1 100%; min-width: 0; } .bill-new { margin-left: auto; } .bill-top .tabs { margin-bottom: 0; }
.bill-new { padding-bottom: 6px; }
.bill-subtabs { margin-top: 4px; }
.bill-kpis .kpi b { font-size: 1.35rem; }
.bill-filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 16px 0; }
.bill-filter .seg { flex: 1 1 auto; border-bottom: 0; } .bill-filter input[type=search] { width: min(280px, 100%); }
.table td.num, .table th.num { text-align: right; }
.bill-table form { display: inline; }
.bill-list-act { text-align: right; } .bill-list-act .iconbtn { display: inline-grid; vertical-align: middle; margin-right: 4px; }
/* Drucker immer an derselben Stelle: der Platz für „Bezahlt“ bleibt frei, auch wenn der Knopf fehlt */
.bill-list-act > form, .bill-list-act > .bill-list-slot { display: inline-block; width: 86px; text-align: right; vertical-align: middle; }
.bill-locked { display: grid; gap: 16px; max-width: 980px; }
.bill-hero .card-body { padding: 28px; display: grid; gap: 14px; justify-items: start; }
.bill-hero h2 { font-size: 1.6rem; letter-spacing: -.02em; }
.bill-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 650; font-size: .88rem; margin: 0; }
.bill-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.bill-feat { display: flex; gap: 12px; padding: 16px 18px; } .bill-feat h3 { margin-bottom: 3px; } .bill-feat p { margin: 0; font-size: .92rem; }
.bill-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.bill-edit-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.bill-rows { display: grid; gap: 8px; }
/* Alle Felder im Beleg gleich hoch, auch Auswahl und Datum */
.bill-edit input:not([type=checkbox]):not([type=radio]):not([type=color]), .bill-edit select, .bill-settle input { height: 40px; min-height: 40px; box-sizing: border-box; }
/* Positionen als kompakte Zeilen */
.bill-items { container-type: inline-size; }
.bill-items { --w-unit: 66px; --w-disc: 66px; --w-tax: 68px; --w-opt: 36px; }
.bill-head, .bill-row { display: grid; grid-template-columns: 22px 28px minmax(170px, 1fr) 66px var(--w-unit) 92px var(--w-disc) var(--w-tax) 98px var(--w-opt) 64px; column-gap: 8px; align-items: center; }
.bill-head { position: sticky; top: var(--head, 64px); z-index: 4; padding: 10px 8px 8px; margin-top: -4px; background: var(--surface); border-bottom: 2px solid var(--line); box-shadow: 0 -8px 0 var(--surface); font-size: .76rem; font-weight: 650; color: var(--ink-3); }
.bill-head > span { padding: 0 0 0 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bill-head > span.r { padding: 0 9px 0 0; } /* wie der Innenabstand der Felder */
.bill-head > span:first-child, .bill-head > span:nth-child(2) { padding: 0; } .bill-head > span:nth-child(9) { padding: 0; } .bill-head > span:nth-child(10) { padding: 0; text-align: center; }
.bill-head .r { text-align: right; }
.bill-h-title { display: flex; gap: 4px; } .bill-h-sku { flex: none; width: 82px; }
.bill-c-title .bill-sku { flex: none; width: 82px; font-size: .86rem; font-weight: 400; color: var(--ink-2); }
.bill-rows { display: grid; gap: 0; }
.bill-row { padding: 4px 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.bill-row:hover { background: var(--surface-2); }
.bill-items.is-striped .bill-row-item.is-alt { background: color-mix(in srgb, var(--stripe, var(--brand)) 8%, var(--surface)); }
.bill-items.is-striped .bill-row-item.is-alt:hover { background: color-mix(in srgb, var(--stripe, var(--brand)) 13%, var(--surface)); }
.bill-row input:not([type=checkbox]), .bill-row select { height: 34px !important; min-height: 34px !important; padding: 4px 8px; }
.bill-cell { display: block; margin: 0; } .bill-cell > span { display: none; }
.bill-cell input[data-f=qty], .bill-cell input[data-f=price], .bill-cell input[data-f=discount] { text-align: right; }
.bill-grip { display: grid; place-items: center; width: 22px; height: 30px; color: var(--ink-3); cursor: grab; border-radius: 6px; }
.bill-grip:hover { background: var(--gray-soft); color: var(--ink); }
.bill-pos { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: .86rem; }
.bill-c-title { display: flex; gap: 4px; min-width: 0; } .bill-c-title input { flex: 1; min-width: 0; font-weight: 600; }
.bill-desc-btn { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-3); cursor: pointer; }
.bill-desc-btn.has { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); } .bill-desc-btn[aria-expanded=true] { color: #fff; background: var(--brand); border-color: var(--brand); }
.bill-c-total { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bill-opt { display: flex; justify-content: center; cursor: pointer; } .bill-opt span { display: none; } .bill-opt input { width: 18px; height: 18px; }
.bill-row > .bill-row-act { grid-column: -2 / -1; grid-row: 1; display: flex; gap: 2px; justify-content: flex-end; } .bill-row-act .iconbtn { width: 30px; height: 30px; }
.bill-desc-box { grid-column: 3 / -1; padding: 4px 0 8px; }
.bill-kind { grid-column: 2 / 3; font-size: .72rem; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; writing-mode: horizontal-tb; }
.bill-row-line .bill-kind, .bill-row-page .bill-kind, .bill-row-subtotal .bill-kind { grid-column: 2 / 4; } .bill-row-text .bill-kind { grid-column: 2 / 3; align-self: start; padding-top: 10px; }
.bill-c-wide { grid-column: 4 / -2; min-width: 0; padding: 4px 0; }
.bill-row-text .bill-c-wide { grid-column: 3 / -2; }
.bill-c-sub { grid-column: 4 / 9; } .bill-c-sub input { font-weight: 600; text-align: right; }
.bill-row-subtotal .bill-c-total { grid-column: 9 / 10; }
.bill-row-subtotal, .bill-row-text, .bill-row-line, .bill-row-page { background: var(--surface-2); }
.bill-row-line hr { border: 0; border-top: 2px solid var(--ink-3); margin: 0; }
.bill-pagebreak { text-align: center; font-size: .8rem; color: var(--brand); border-top: 2px dashed var(--brand); padding-top: 3px; }
.bill-row.is-optional { background: repeating-linear-gradient(-45deg, transparent 0 8px, var(--surface-2) 8px 16px); } .bill-row.is-optional .bill-title, .bill-row.is-optional [data-total] { color: var(--ink-3); }
.bill-row.dragging { opacity: .45; } .bill-row.drop-before { box-shadow: inset 0 3px 0 var(--brand); } .bill-row.drop-after { box-shadow: inset 0 -3px 0 var(--brand); }
@container (max-width: 860px) {
  .bill-head { display: none; }
  .bill-row { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 10px 8px; row-gap: 6px; }
  .bill-pos { display: none; }
  .bill-grip { grid-column: 1; grid-row: 1; }
  .bill-c-title { grid-column: 1 / -2; grid-row: 1; margin-left: 28px; } .bill-c-title .bill-sku { width: 70px; }
  .bill-row > .bill-row-act { grid-column: -2 / -1; grid-row: 1; }
  .bill-cell > span { display: block; font-size: .72rem; color: var(--ink-3); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bill-c-total { grid-column: 1 / 3; text-align: left; }
  .bill-opt { grid-column: 3 / -1; justify-content: flex-start; gap: 6px; align-items: center; } .bill-opt span { display: inline; font-size: .84rem; }
  .bill-desc-box, .bill-c-wide, .bill-row-text .bill-c-wide { grid-column: 1 / -1; }
  .bill-kind, .bill-row-text .bill-kind, .bill-row-line .bill-kind, .bill-row-page .bill-kind, .bill-row-subtotal .bill-kind { grid-column: 1 / -2; grid-row: 1; margin-left: 28px; padding-top: 0; }
  .bill-c-sub { grid-column: 1 / 4; } .bill-row-subtotal .bill-c-total { grid-column: 4 / -1; text-align: right; }
}
.bill-add { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.bill-search { position: relative; flex: 1 1 260px; }
.bill-search-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 320px; overflow: auto; overscroll-behavior: contain; }
.bill-search-list button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 14px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-bottom: 1px solid var(--line); }
.bill-search-list button:hover { background: var(--surface-2); }
.bill-search-list.up { top: auto; bottom: calc(100% + 4px); }
.bill-search-list { right: auto; width: max(100%, min(560px, 92vw)); } .bill-search-list button > span:last-child { white-space: nowrap; flex: none; }
/* Viele Positionen: die Liste scrollt in sich, Kopfzeile, Artikelsuche und Speicherleiste bleiben sichtbar */
.bill-rows.is-scroll { max-height: max(360px, calc(100vh - 330px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; margin-right: -6px; padding-right: 6px; }
.bill-sums { margin-left: auto; width: min(360px, 100%); display: grid; gap: 4px; padding-top: 8px; font-variant-numeric: tabular-nums; }
.bill-sums > div, .bill-sums [data-sum-taxes] > div { display: flex; justify-content: space-between; gap: 12px; }
.bill-sums [data-sum-taxes] { display: grid; gap: 4px; justify-content: stretch; }
.bill-sums [data-sum-taxes]:empty { display: none; }
/* Offene Posten, Mahnwesen, Statistik */
.bill-aging { display: grid; gap: 8px; }
.bill-aging-row, .bill-bar-row { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 120px; gap: 12px; align-items: center; }
.bill-bar-row { padding: 8px 18px; border-bottom: 1px solid var(--line); } .bill-bar-row:last-child { border-bottom: 0; } .bill-bar-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-aging-row i, .bill-bar-row i { height: 10px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; display: block; }
.bill-aging-row b, .bill-bar-row b { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bill-aging-row.late b { background: var(--red); } .bill-aging-row strong, .bill-bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.bill-op .card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.bill-send-inline { position: relative; display: inline-block; } .bill-send-inline summary { list-style: none; cursor: pointer; display: inline-grid; } .bill-send-inline summary::-webkit-details-marker { display: none; }
.bill-send-inline[open] form { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; width: 280px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); text-align: left; }
.list-row .bill-send-inline, .list-row form { flex: none; }
.bill-summary { cursor: pointer; list-style: none; display: flex; gap: 12px; align-items: baseline; } .bill-summary::-webkit-details-marker { display: none; }
.bill-chart { width: 100%; height: auto; display: block; } .bill-chart .grid { stroke: var(--line); stroke-width: 1; } .bill-chart .axis { fill: var(--ink-3); font-size: 11px; }
.bill-chart .cur { fill: var(--brand); } .bill-chart .prev { fill: var(--gray-soft); stroke: var(--line); }
.bill-legend { display: inline-flex; gap: 6px; align-items: center; font-size: .84rem; color: var(--ink-2); } .bill-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.bill-legend i.cur { background: var(--brand); } .bill-legend i.prev { background: var(--gray-soft); border: 1px solid var(--line); }
.bill-month-table { margin-top: 14px; font-size: .84rem; } .bill-month-table th, .bill-month-table td { padding: 6px 6px; }
.bill-kpis em { font-style: normal; font-weight: 650; } .bill-kpis em.up { color: var(--green); } .bill-kpis em.down { color: var(--red); }
.bill-offer-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .bill-offer-stats b { display: block; font-size: 1.3rem; } .bill-offer-stats span { color: var(--ink-2); font-size: .88rem; }
.only-print { display: none; }
@media print { .no-print, .bill-top, .flash-wrap, .theme-float { display: none !important; } .only-print { display: block; } .card { box-shadow: none; break-inside: avoid; } }
@media (max-width: 640px) { .bill-aging-row, .bill-bar-row { grid-template-columns: minmax(0, 1fr) 90px; } .bill-aging-row i, .bill-bar-row i { grid-column: 1 / -1; grid-row: 2; } .bill-month-table { display: none; } }
/* Rechnungsbereich mit eigenem Zugang */
.bill-solo { background: var(--bg); }
/* Rechnungsprogramm allein: Seitenleiste mit Gruppen wie im Portal */
.bill-side-name { display: grid; line-height: 1.2; min-width: 0; } .bill-side-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bill-side-name small { color: var(--ink-3); font-weight: 500; font-size: .78rem; }
.bill-side-nav .nav-sub-h { padding-left: 11px; }
.bill-side-nav a { padding-top: 7px; padding-bottom: 7px; }
.nav-foot form { display: contents; }
.nav-btn { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: inherit; font-weight: 550; cursor: pointer; text-align: left; }
.nav-btn:hover { background: var(--surface-2); color: var(--ink); }
.bill-side-foot { margin-top: 12px; padding: 10px 11px 0; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .78rem; line-height: 1.6; overflow-wrap: anywhere; } .bill-side-foot a { color: inherit; }
.bill-top-brand { display: none; text-decoration: none; }
.bill-top-out { display: contents; }
@media (max-width: 820px) { .bill-top-brand { display: inline-flex; } }
.bill-solo-top { position: sticky; top: 0; z-index: 30; display: flex; gap: 12px; align-items: center; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.bill-solo-brand { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; } .bill-solo-brand b { display: block; } .bill-solo-brand small { display: block; color: var(--ink-3); font-size: .78rem; }
.bill-solo-user { color: var(--ink-3); font-size: .86rem; }
.bill-solo-main { max-width: 1240px; margin: 0 auto; padding: 18px 20px 40px; }
.bill-solo-title { font-size: 1.4rem; margin: 4px 0 12px; }
.bill-solo-foot { text-align: center; color: var(--ink-3); font-size: .84rem; padding: 20px; } .bill-solo-foot a { color: inherit; }
.bill-readonly { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
@media (max-width: 640px) { .bill-solo-top { padding: 8px 12px; } .bill-solo-main { padding: 12px 12px 40px; } }
.bill-period { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.bill-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bill-chips a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-2); font-size: .88rem; } .bill-chips a.on { background: var(--brand); border-color: var(--brand); color: #fff; } .bill-chips a:hover { text-decoration: none; border-color: var(--brand); }
.bill-chips select { width: auto; min-height: 34px; border-radius: 99px; }
.bill-ear-title { font-size: 1.25rem; } .bill-ear-title small { font-size: .85rem; font-weight: 400; }
.bill-exp-result { display: block; padding: 9px 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.bill-receipt-drop input[type=file] { padding: 18px; border: 2px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.bill-warn { color: var(--red); font-weight: 600; }
.bill-sum-intern { color: var(--ink-3); font-size: .9rem; } .bill-sum-intern:first-of-type { margin-top: 6px; }
.bill-markups summary { cursor: pointer; list-style: none; display: flex; gap: 12px; align-items: center; } .bill-markups summary::-webkit-details-marker { display: none; }
.bill-markup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.bill-calc { padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.bill-sum-gross { border-top: 2px solid var(--ink); padding-top: 6px; font-size: 1.08rem; }
.bill-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 64px 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.bill-show .bill-preview { padding: 0; overflow: hidden; position: sticky; top: calc(var(--head, 70px) + 12px); }
.bill-preview iframe { display: block; width: 100%; height: min(82vh, 1000px); border: 0; background: #525659; }
.bill-no { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 1.3rem; }
.bill-amount { text-align: right; } .bill-amount b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; } .bill-amount small { display: block; }
.bill-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 4px 0; font-size: .92rem; } .bill-facts dt { color: var(--ink-3); } .bill-facts dd { margin: 0; }
details.bill-contact > summary { list-style: none; cursor: pointer; }
details.bill-contact > summary::-webkit-details-marker { display: none; }
details.bill-contact > summary .grow b { display: flex; align-items: center; gap: 6px; }
details.bill-contact .fold-chev { flex: none; color: var(--ink-3); display: grid; transition: transform .15s; }
details.bill-contact[open] .fold-chev { transform: rotate(180deg); }
details.bill-contact[open] > form { border-bottom: 1px solid var(--line); background: var(--surface-2); }
/* Spalten im Beleg-Editor ein- und ausblenden: die Spur wird schmal, der Inhalt bleibt an seinem Platz im Raster */
.bill-items.hide-unit { --w-unit: 0px; } .bill-items.hide-disc { --w-disc: 0px; } .bill-items.hide-tax { --w-tax: 0px; } .bill-items.hide-opt { --w-opt: 0px; }
.bill-items.hide-sku .bill-sku, .bill-items.hide-sku .bill-h-sku { display: none; }
.bill-items.hide-unit :is(.bill-cell:has([data-f=unit]), .h-unit), .bill-items.hide-disc :is(.bill-cell:has([data-f=discount]), .h-disc),
.bill-items.hide-tax :is(.bill-cell:has([data-f=tax_rate]), .h-tax), .bill-items.hide-opt :is(.bill-row-item > .bill-opt, .h-opt) { visibility: hidden; overflow: hidden; min-width: 0; }
@container (max-width: 860px) {
  .bill-items.hide-unit .bill-cell:has([data-f=unit]), .bill-items.hide-disc .bill-cell:has([data-f=discount]), .bill-items.hide-tax .bill-cell:has([data-f=tax_rate]), .bill-items.hide-opt .bill-row-item > .bill-opt { display: none; }
}
.bill-cols-btn { margin-left: auto; }
.bill-cols-menu { position: fixed; z-index: 60; min-width: 230px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-lg, 0 12px 32px rgba(0,0,0,.18)); }
.bill-cols-menu b { display: block; padding: 6px 10px 4px; font-size: .78rem; color: var(--ink-3); font-weight: 650; }
.bill-cols-menu label { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: .9rem; }
.bill-cols-menu label:hover { background: var(--surface-2); }
.bill-cols-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.bill-swatches { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 6px; }
.bill-swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); background: color-mix(in srgb, var(--sw) 35%, var(--surface)); cursor: pointer; padding: 0; }
.bill-swatches button[aria-pressed=true] { box-shadow: 0 0 0 2px var(--ink); }
.bill-cols-menu small { display: block; padding: 6px 10px 4px; color: var(--ink-3); font-size: .76rem; max-width: 240px; }
.bill-paid-note { display: flex; gap: 8px; align-items: center; color: var(--ink-2); border-top: 1px solid var(--line); margin: 0; }
.bill-pay { display: grid; grid-template-columns: 150px 140px minmax(0, 1fr) auto; gap: 10px; align-items: start; border-top: 1px solid var(--line); }
.bill-settings { max-width: 880px; }
.bill-series { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; font-size: .88rem; }
.bill-series a { display: inline-flex; flex-direction: column; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); line-height: 1.3; }
.bill-series a small { color: var(--ink-3); } .bill-series a.on { border-color: var(--brand); background: var(--brand-soft); } .bill-series a:hover { text-decoration: none; border-color: var(--brand); }
.bill-settle { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; } .bill-settle .field { width: 230px; }
.bill-checks { display: grid; gap: 8px; }
/* Vorlagen für das Briefbild als kleine Blätter */
.bill-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bill-style { display: grid; gap: 6px; justify-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: center; font-size: .9rem; }
.bill-style:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.bill-style input { position: absolute; opacity: 0; pointer-events: none; }
.bill-style:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.bill-style-pic { position: relative; width: 74px; height: 100px; background: #fff; border: 1px solid #d0d5db; border-radius: 3px; overflow: hidden; }
.bill-style-pic i { position: absolute; display: block; background: #c9ced5; border-radius: 1px; }
.bill-style-pic i:nth-child(1) { left: 8px; top: 9px; width: 26px; height: 5px; background: #0f766e; }
.bill-style-pic i:nth-child(2) { left: 8px; top: 28px; width: 24px; height: 12px; }
.bill-style-pic i:nth-child(3) { left: 8px; top: 50px; width: 58px; height: 6px; background: #0f766e; }
.bill-style-pic i:nth-child(4) { left: 8px; top: 60px; width: 58px; height: 22px; background: repeating-linear-gradient(#c9ced5 0 2px, transparent 2px 5px); }
.bill-style-modern::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: #0f766e; }
.bill-style-clean i:nth-child(1) { background: #1f2328; }
.bill-style-clean i:nth-child(3) { height: 1px; top: 55px; background: #1f2328; }
.bill-style-centered i:nth-child(1) { left: 24px; width: 26px; }

.bill-logo { padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; width: fit-content; } .bill-logo img { display: block; max-height: 70px; max-width: 260px; }
.bill-import { display: inline; } .bill-import label { cursor: pointer; }
.bill-sa-add { display: grid; grid-template-columns: minmax(0, 1.4fr) 160px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
@media (max-width: 1100px) {
  .bill-grid { grid-template-columns: minmax(0, 1fr); }
  .bill-pay, .bill-sa-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bill-show .bill-preview { position: static; }
}
@media (max-width: 640px) {
  .bill-pay, .bill-sa-add { grid-template-columns: minmax(0, 1fr); }
  .bill-preview iframe { height: 70vh; }
}

/* Virtueller Rundgang */
.tour-chip { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 2px 8px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); font-size: .78rem; font-weight: 600; cursor: pointer; vertical-align: middle; line-height: 1.5; white-space: nowrap; }
.tour-chip:hover, .tour-chip:focus-visible { background: color-mix(in srgb, var(--brand) 20%, transparent); outline: none; }
.file-info .tour-chip { margin: 4px 0 0; align-self: flex-start; }
.project-head .tour-chip { font-size: .85rem; padding: 4px 10px; }
.project-head > .tour-chip { flex: none; }

/* Rundgang-Fenster: Größe an der Ecke ziehen oder ganzer Bildschirm */
.modal.tour-modal { position: relative; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
.tour-grip { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; touch-action: none; z-index: 2; border-bottom-right-radius: 14px;
  background: linear-gradient(135deg, transparent 0 45%, var(--ink-3) 45% 52%, transparent 52% 65%, var(--ink-3) 65% 72%, transparent 72%); opacity: .8; }
.tour-grip:hover { opacity: 1; }
.tour-modal.resizing iframe { pointer-events: none; }
.tour-modal.resizing { user-select: none; }
.modal-back.tour-max-back { padding: 0; }
.modal.tour-modal.tour-max { width: 100vw !important; height: 100dvh !important; max-width: none; max-height: none; border-radius: 0; }
.tour-max .tour-grip { display: none; }
@media (pointer: coarse) { .tour-grip { display: none; } }
@media (max-width: 640px) { [data-tour-max] { display: none; } }

/* 360°-Zeichen in eigener Spalte, immer an derselben Stelle */
.tour-col { flex: 0 0 76px; display: flex; justify-content: flex-start; }
.tour-col .tour-chip, .tour-td .tour-chip { margin-left: 0; }
.tour-th, .tour-td { width: 76px; }
@media (max-width: 640px) { .tour-col { flex: 0 0 auto; order: 2; } .tour-col:empty { display: none; } }
/* Nicht erreichbar: durchgestrichen, nicht anklickbar */
.tour-chip.tour-off { cursor: not-allowed; color: var(--ink-3); border-color: var(--line); background: transparent; position: relative; }
.tour-chip.tour-off > span { text-decoration: line-through; }
.tour-chip.tour-off svg { opacity: .6; }
.tour-chip.tour-off::after { content: ""; position: absolute; left: 6px; width: 19px; top: 50%; border-top: 1.5px solid currentColor; transform: rotate(-45deg); pointer-events: none; }
@media (max-width: 640px) { .tour-td:empty { display: none; } }

/* Textvorlagen bei der Vergabe */
.tpl-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 8px; }
.tpl-lead { font-size: .82rem; color: var(--ink-3); margin-right: 2px; }
.tpl-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-chip i { font-style: normal; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--brand); margin-right: 5px; }
.tpl-row .grow { display: grid; gap: 2px; min-width: 0; }
.tpl-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-group-head { padding: 10px 16px 4px; font-size: .8rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }

/* Ganzen Ordner löschen */
.folder-del { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.folder-del:hover { color: var(--danger, #b42318); border-color: color-mix(in srgb, var(--danger, #b42318) 45%, var(--line)); }

/* Upload nur für ein Gewerk: eingeklappt, erst auf Klick */
.trade-upload > summary { list-style: none; display: inline-flex; width: auto; }
.trade-upload > summary::-webkit-details-marker { display: none; }
.trade-upload[open] > summary { margin-bottom: 8px; }
.trade-upload-in { display: grid; gap: 8px; }

/* Firmenbereiche bei den Dateien: einklappbar, mit Überschrift */
.firm-intro { margin: 18px 2px 2px; }
.firm-intro h2 { font-size: 1.05rem; margin: 0 0 2px; }
.firm-intro p { margin: 0; font-size: .9rem; }
.firm-folder > summary.firm-sum { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.firm-folder > summary.firm-sum::-webkit-details-marker { display: none; }
.firm-folder:not([open]) > summary.firm-sum { border-bottom: 0; }
.firm-folder > summary.firm-sum:hover { background: var(--surface-2); }
.firm-name { color: var(--brand); font-size: 1.02rem; }
.firm-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.firm-folder .folder-toggle svg { transition: transform .2s; }
.firm-folder[open] > summary .folder-toggle svg { transform: rotate(180deg); }
.firm-folder .when-open, .firm-folder[open] > summary .when-closed { display: none; }
.firm-folder[open] > summary .when-open { display: inline; }
@media (max-width: 640px) { .firm-badges { display: none; } .firm-folder .folder-toggle span { display: none !important; } .firm-folder .folder-toggle { padding: 6px; } }

/* Leistungsverzeichnis und Lohn/Sonstiges im Beleg-Editor */
.bill-split-box { grid-column: 3 / -2; display: none; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0 6px; font-size: .84rem; }
.bill-edit.is-split .bill-split-box { display: flex; }
.bill-split-box label { display: inline-flex; align-items: center; gap: 6px; }
.bill-split-box label span { color: var(--ink-3); font-size: .78rem; font-weight: 600; }
.bill-split-box input { width: 96px; text-align: right; }
.bill-edit.is-split [data-f=price][readonly] { background: var(--surface-2); color: var(--ink-2); }
.bill-row-group { background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.bill-oz, .bill-pos { font-variant-numeric: tabular-nums; }
.bill-edit.has-groups .bill-pos { font-size: .72rem; white-space: nowrap; overflow: visible; }
.bill-oz { grid-column: 2 / 3; font-weight: 700; color: var(--brand); font-size: .8rem; }
.bill-c-group { grid-column: 3 / 9; display: flex; gap: 8px; min-width: 0; }
.bill-c-group select { flex: 0 0 140px; }
.bill-c-group input { flex: 1; min-width: 0; font-weight: 650; }
.bill-row-group .bill-c-total { grid-column: 9 / 10; }
.bill-sum-wage { color: var(--ink-2); font-size: .9rem; }
.check-block { align-items: flex-start; gap: 10px; }
.check-block > span { display: grid; gap: 3px; }
.check-block small { font-size: .84rem; line-height: 1.45; }
@media (max-width: 820px) {
  .bill-split-box { grid-column: 1 / -1; }
  .bill-c-group { grid-column: 1 / -2; flex-wrap: wrap; } .bill-c-group select { flex: 1 1 100%; }
  .bill-row-group .bill-c-total { grid-column: 4 / -1; text-align: right; }
  .bill-oz { grid-column: 1 / -2; grid-row: 1; margin-left: 28px; }
}

/* Ausschreibung einlesen; breitere Spalte für Ordnungszahlen */
.lv-import > summary { cursor: pointer; list-style: none; }
.lv-import > summary::-webkit-details-marker { display: none; }
.lv-import h3 { display: flex; align-items: center; gap: 8px; }
.lv-import:not([open]) > summary { border-bottom: 0; }
@media (min-width: 821px) {
  .bill-edit.has-groups .bill-head, .bill-edit.has-groups .bill-row { grid-template-columns: 22px 82px minmax(150px, 1fr) 66px var(--w-unit) 92px var(--w-disc) var(--w-tax) 98px var(--w-opt) 64px; }
  .bill-edit.has-groups .bill-pos, .bill-edit.has-groups .bill-oz { font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Im Leistungsverzeichnis keine Artikelnummer, damit die Bezeichnung Platz hat */
.bill-edit.has-groups .bill-sku, .bill-edit.has-groups .bill-h-sku { display: none; }

/* Lohn und Sonstiges als eigene Spalten in derselben Zeile, vor dem Einheitspreis */
.bill-head .h-wage, .bill-head .h-other, .bill-head .only-split { display: none; }
@media (min-width: 821px) {
  .bill-edit.is-split .bill-head, .bill-edit.is-split .bill-row { grid-template-columns: 22px 28px minmax(150px, 1fr) 48px 84px 70px 72px 80px 56px 90px 30px 60px; column-gap: 6px; }
  .bill-edit.is-split.has-groups .bill-head, .bill-edit.is-split.has-groups .bill-row { grid-template-columns: 22px 92px minmax(150px, 1fr) 48px 84px 70px 72px 80px 56px 90px 30px 60px; }
  .bill-edit.is-split .bill-row [data-f=unit] { padding-left: 6px; padding-right: 4px; font-size: .9rem; }
  .bill-edit.is-split .bill-head .h-wage, .bill-edit.is-split .bill-head .h-other { display: block; order: 1; }
  .bill-edit.is-split .bill-head .h-disc, .bill-edit.is-split .bill-head .no-split { display: none; }
  .bill-edit.is-split .bill-head .only-split { display: inline; }
  .bill-edit.is-split .bill-head .h-price, .bill-edit.is-split .bill-head .h-tax, .bill-edit.is-split .bill-head .h-total, .bill-edit.is-split .bill-head .h-opt, .bill-edit.is-split .bill-head .h-act { order: 2; }
  .bill-edit.is-split .bill-head .h-wage, .bill-edit.is-split .bill-head .h-other { padding: 0 9px 0 0; }
  .bill-edit.is-split .bill-split-box { display: contents; }
  .bill-edit.is-split .bill-split-box > span { display: none; }
  .bill-edit.is-split .bill-split-box > label { order: 1; display: block; }
  .bill-edit.is-split .bill-split-box > label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bill-edit.is-split .bill-split-box input { width: 100%; }
  .bill-edit.is-split .bill-row .bill-cell:has([data-f=discount]) { display: none; }
  .bill-edit.is-split .bill-row .bill-cell:has([data-f=price]), .bill-edit.is-split .bill-row .bill-cell:has([data-f=tax_rate]), .bill-edit.is-split .bill-row-item > .bill-c-total, .bill-edit.is-split .bill-row .bill-opt { order: 2; }
  .bill-edit.is-split .bill-row .bill-desc-box { order: 3; }
  .bill-edit.is-split .bill-c-group { grid-column: 3 / 10; }
  .bill-edit.is-split .bill-row-group .bill-c-total, .bill-edit.is-split .bill-row-subtotal .bill-c-total { grid-column: 10 / 11; }
  .bill-edit.is-split .bill-c-sub { grid-column: 4 / 10; }
}

/* Zeilen aus der Ausschreibung und eingeklappte Freitexte */
.bill-row.is-locked input[readonly] { background: var(--surface-2); color: var(--ink); border-style: dashed; cursor: default; }
.bill-row.is-locked select:disabled { opacity: 1; background: var(--surface-2); }
.bill-lock { color: var(--ink-3); cursor: help; }
.bill-locked-text { padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-size: .9rem; max-height: 320px; overflow: auto; }
.bill-fold { min-width: 0; }
.bill-fold > summary { cursor: pointer; list-style: none; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-fold > summary::-webkit-details-marker { display: none; }
.bill-fold > summary::before { content: "▸"; display: inline-block; margin-right: 8px; color: var(--ink-3); transition: transform .15s; }
.bill-fold[open] > summary { margin-bottom: 6px; white-space: normal; }
.bill-fold[open] > summary::before { transform: rotate(90deg); }
.bill-row-text:has(.bill-fold:not([open])) { padding-top: 2px; padding-bottom: 2px; }
.bill-row-text:has(.bill-fold) .bill-kind { align-self: center; padding-top: 0; }

/* Im Leistungsverzeichnis keine USt je Position: gerechnet wird mit dem Standardsatz, die USt steht unten bei der Summe */
.bill-edit.is-lv .bill-row .bill-cell:has([data-f=tax_rate]), .bill-edit.is-lv .bill-head .h-tax { display: none; }
@media (min-width: 821px) {
  .bill-edit.is-lv .bill-head, .bill-edit.is-lv .bill-row { grid-template-columns: 22px 82px minmax(170px, 1fr) 66px 80px 92px 66px 98px 36px 64px; }
  .bill-edit.is-lv .bill-c-group { grid-column: 3 / 8; } .bill-edit.is-lv .bill-row-group .bill-c-total, .bill-edit.is-lv .bill-row-subtotal .bill-c-total { grid-column: 8 / 9; }
  .bill-edit.is-lv .bill-c-sub { grid-column: 4 / 8; }
  .bill-edit.is-lv.is-split .bill-head, .bill-edit.is-lv.is-split .bill-row { grid-template-columns: 22px 92px minmax(170px, 1fr) 48px 84px 74px 76px 80px 92px 30px 60px; }
  .bill-edit.is-lv.is-split .bill-c-group { grid-column: 3 / 9; } .bill-edit.is-lv.is-split .bill-row-group .bill-c-total, .bill-edit.is-lv.is-split .bill-row-subtotal .bill-c-total { grid-column: 9 / 10; }
  .bill-edit.is-lv.is-split .bill-c-sub { grid-column: 4 / 9; }
}

/* Zusatzmodul in den Einstellungen */
.addon-list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.addon-card .card-head { gap: 12px; }

.addon-card.is-on { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.sa-addons > div { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }

/* Betreiber › Rechnungsmodul: Zusatzmodule als eigene Zeile unter jeder Adresse */
.sa-addon-row td { padding-top: 0 !important; border-top: 0 !important; }
tr:has(+ .sa-addon-row) td { border-bottom: 0 !important; }
tr:has(+ .sa-addon-row) select { min-width: 150px; }
.sa-addon-grid { display: grid; grid-template-columns: 150px repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.sa-addon-lead { display: grid; align-content: center; gap: 2px; font-size: .78rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.sa-addon-lead small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.sa-addon { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.sa-addon.on { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.sa-addon .check { margin: 0; white-space: nowrap; }
.sa-addon-until { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.sa-addon-until span { font-size: .8rem; color: var(--ink-3); }
.sa-addon-until input { width: 150px; }
@media (max-width: 1100px) { .sa-addon-grid { grid-template-columns: minmax(0, 1fr); } }

/* Betreiber › Rechnungsmodul: Aktionen in einer Reihe, Modulkästchen immer gleich aufgebaut */
tr:has(+ .sa-addon-row) > td { vertical-align: middle; }
.sa-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.sa-row-actions form { margin: 0; }
.sa-addon { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; }
.sa-addon .check { white-space: normal; }
.sa-addon-until { display: grid; grid-template-columns: auto minmax(0, 1fr); width: 100%; }
.sa-addon-until input { width: 100%; }
.sa-addon .badge { justify-self: start; }
.sa-addon-row > td { padding-bottom: 16px !important; }

/* Betreiber › Rechnungsmodul: Zusatzmodule anbieten oder ausschalten */
.sa-offer-mods { display: grid; gap: 10px; margin-top: 6px; }
.sa-offer-head { display: grid; gap: 2px; }
.sa-offer-mod { display: grid; grid-template-columns: 230px minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.sa-offer-mod.is-off { opacity: .75; border-style: dashed; }
.sa-offer-mod .switch-row { display: flex; align-items: center; gap: 10px; margin: 0; align-self: center; cursor: pointer; }
.sa-offer-mod .switch-row span { display: grid; gap: 1px; }
.sa-offer-mod .field { margin: 0; }
@media (max-width: 900px) { .sa-offer-mod { grid-template-columns: minmax(0, 1fr); } }

/* Rechte je Benutzer eines Auftragnehmers */
.right-picks { display: grid; gap: 8px; }
.right-picks .check, .check-stack { align-items: flex-start; }
.right-picks .check span, .check-stack span { display: grid; gap: 1px; }

/* Einrichtungsphase: Wer beim Freigeben eine Einladung bekommt */
.setup-on { border-color: color-mix(in srgb, var(--amber, #d97706) 55%, var(--line)); }
.setup-list { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.setup-list li { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.setup-list small { margin-left: 6px; }

/* Schmale Fenster und Handy: Menü-Knopf oben links, die Seitenleiste fährt von links herein */
.menu-btn { display: none; }
.top-logo { gap: 6px; align-items: center; }
.top-logo .logo-plate { display: inline-flex; }
.side-back { position: fixed; inset: 0; z-index: 59; background: #0007; border: 0; padding: 0; }
@media (max-width: 820px) {
  .menu-btn { display: inline-grid; margin-left: -6px; }
  html.side-open .side { display: flex; position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: 100dvh; box-shadow: 0 0 40px #0006; animation: side-in .22s ease-out; }
  html.side-open { overflow: hidden; }
}
@keyframes side-in { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { html.side-open .side { animation: none; } }

/* Firma nur ansehen: Felder gesperrt, aber gut lesbar */
fieldset.view-only { border: 0; margin: 0; min-width: 0; }
fieldset.view-only[disabled] input:not([type=checkbox]):not([type=radio]), fieldset.view-only[disabled] textarea { opacity: 1; color: var(--ink); }
fieldset.view-only[disabled] .trade-pick, fieldset.view-only[disabled] .trade-pick input { cursor: default; }
fieldset.view-only[disabled] .trade-pick:not(:has(input:checked)) { opacity: .45; }
.user-rights-text { display: block; width: 100%; padding-left: 40px; }

/* Projektkopf: Das Status-Schild bleibt klein, auch wenn die Adresse fehlt */
.project-head > .badge { flex: none; margin-left: auto; }

/* Rundgang-Fenster: Überschrift kürzt sich, die Knöpfe bleiben immer sichtbar. Schmal: Überschrift in eigener Zeile */
.tour-modal { container-type: inline-size; }
.viewer-head b { min-width: 0; flex: 0 1 auto; }
.viewer-head > .btn, .viewer-head > .iconbtn { flex: none; }
@container (max-width: 620px) {
  .tour-modal .viewer-head { flex-wrap: wrap; row-gap: 6px; }
  .tour-modal .viewer-head b { flex: 1 1 100%; }
  .tour-modal .viewer-head .spacer { display: none; }
  .tour-modal .viewer-head > [data-tour-max] { margin-left: auto; }
}

/* Rundgang-Fenster sehr schmal: kurze Knopfnamen, damit alles in eine Zeile passt */
.viewer-head .vh-short { display: none; }
@container (max-width: 470px) {
  .tour-modal .viewer-head .vh-long { display: none; }
  .tour-modal .viewer-head .vh-short { display: inline; }
  .tour-modal .viewer-head { padding-left: 12px; gap: 6px; }
}

/* Der Kopf richtet sich nach der Fensterbreite, nicht nach der Länge der Überschrift */
.modal.viewer { grid-template-columns: minmax(0, 1fr); }
.viewer-head { min-width: 0; }

/* Datei-Karten: Inhalt bleibt in der Kartenbreite, auch der Rundgang-Knopf am Handy */
.file-info { grid-template-columns: minmax(0, 1fr); }
.file-info .tour-chip { max-width: 100%; min-width: 0; overflow: hidden; }
.file-info .tour-chip > span { overflow: hidden; text-overflow: ellipsis; }
.file-info .tour-chip svg { flex: none; }

/* Beleg bearbeiten: aufklappbare Bereiche mit Zusammenfassung in der Kopfzeile */
details.fold-card > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; user-select: none; }
details.fold-card > summary::-webkit-details-marker { display: none; }
details.fold-card > summary h3 { flex: none; margin: 0; }
details.fold-card .fold-sum { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: .88rem; }
details.fold-card[open] .fold-sum { visibility: hidden; }
details.fold-card .fold-chev { flex: none; display: grid; place-items: center; color: var(--ink-3); transition: transform .15s; }
details.fold-card[open] .fold-chev { transform: rotate(180deg); }
details.fold-card:not([open]) > summary { border-bottom: 0; }
details.fold-card > summary:hover .fold-chev, details.fold-card > summary:focus-visible .fold-chev { color: var(--brand); }

/* Statistik des Auftraggebers */
.st-kpis .kpi b { font-size: 1.45rem; }
.st-note, .st-foot { font-size: .86rem; margin: 0; } .st-foot { padding: 10px 16px 14px; }
.st-scroll { overflow-x: auto; }
.st-table th.num, .st-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-table td { padding-top: 9px; padding-bottom: 9px; }
.st-table td small { display: block; font-size: .78rem; }
.st-table th.sortable { cursor: pointer; user-select: none; } .st-table th.sortable:hover { color: var(--ink); }
.st-table th[aria-sort="ascending"]::after { content: " ↑"; } .st-table th[aria-sort="descending"]::after { content: " ↓"; }
.st-table .avatar.sm { vertical-align: middle; }
.st-table td.st-name { white-space: nowrap; } .st-who { display: inline-flex; gap: 9px; align-items: center; } .st-table td.st-name a { font-weight: 600; } .st-table td.num small { white-space: nowrap; }
.st-table th, .st-table td { padding-left: 12px; padding-right: 12px; }
.st-pct { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.st-pct i { width: 52px; height: 8px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; display: block; }
.st-pct b { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.st-pct.mid b { background: var(--amber); } .st-pct.bad b { background: var(--red); } .st-pct.bad { color: var(--red); }
.st-inline { display: inline-flex; align-items: center; gap: 8px; } .st-inline i { width: 70px; height: 8px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; display: block; }
.st-inline i b { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.st-late { color: var(--red); font-weight: 600; }
.st-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.st-item:hover { background: var(--surface-2); text-decoration: none; } .st-item:last-child { border-bottom: 0; } .st-item > span:last-child { text-align: right; white-space: nowrap; }
@media (max-width: 860px) { .st-pct i, .st-inline i { width: 40px; } }
@media print { .st-filter form, .subnav { display: none !important; } .st-scroll { overflow: visible; } .st-table { font-size: 11px; } .st-table th, .st-table td { padding: 5px 6px; } }
@media (max-width: 860px) { .st-table td.st-name, .st-table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); } }

/* Administration › Sicherung */
.bk-page .card-head h2 { font-size: 1.05rem; }
.bk-before { border-top: 1px solid var(--line); }
.bk-step { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.bk-step > small { display: block; }
.bk-remove { border-top: 1px solid var(--line); padding-top: 12px; }
.bk-list { display: grid; gap: 2px; max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.bk-list label.check { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bk-list label.check:last-child { border-bottom: 0; } .bk-list small { display: block; } .bk-all { position: sticky; top: -6px; background: var(--surface); z-index: 1; }

/* Blatt zur Wohnungsrücknahme, fürs Handy gemacht */
.rn { max-width: 860px; margin: 0 auto; }
.rn .card-head h2 { font-size: 1.05rem; }
.rn-zip { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.rn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rn-chip { position: relative; cursor: pointer; }
.rn-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rn-chip span { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: .9rem; user-select: none; }
.rn-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.rn-chip input:checked + span::before { content: "✕"; margin-right: 6px; font-size: .78rem; }
.rn-chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.rn-room { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.rn-room.has { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--brand-soft); }
.rn-quick { display: grid; gap: 6px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.rn-firm select { width: 100%; }
.rn-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.rn-photo { display: grid; gap: 4px; font-size: .82rem; } .rn-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.rn-sig { position: relative; } .rn-sig canvas { display: block; width: 100%; height: 180px; border: 1px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; }
.rn-sig [data-rn-sig-clear] { position: absolute; right: 6px; top: 6px; }
.rn-sig-old { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .rn-sig-old img { max-width: 260px; max-height: 110px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.rn-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.rn-del { margin: 12px 0 24px; text-align: right; }
.rn-open { margin-top: 16px; }
@media (max-width: 860px) { .rn-bar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); } .rn-bar .btn { flex: 1 1 auto; } .rn-bar .spacer { display: none; } }
.rn-yn { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .rn-yn > span { font-weight: 600; font-size: .9rem; }
.rn-yn .rn-chip input:checked + span::before { content: none; } .rn-yn .rn-chip span { min-width: 64px; justify-content: center; }
.rn-sub { margin-top: 4px; } .rn-auto { flex: 1 1 100%; order: 9; text-align: center; }
.rn-auto.bad { color: var(--red); }
.rn-zuschlag { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; } .rn-zuschlag input { width: 22px; height: 22px; margin-top: 0; }
.rn-zuschlag:has(input:checked) { border-color: #c62828; background: color-mix(in srgb, #c62828 10%, var(--surface)); color: #c62828; }
.inbox-sub { font-size: 1rem; margin: 18px 2px 8px; color: var(--ink-2); }
.rn-state, .rn-wait { display: flex; gap: 12px; align-items: flex-start; } .rn-wait { color: inherit; } .rn-wait:hover { text-decoration: none; filter: brightness(.98); }
.st-item .badge { margin-left: 6px; vertical-align: 1px; } .rn-for-me { background: var(--violet-soft); } .rn-return summary { list-style: none; display: inline-flex; } .rn-return summary::-webkit-details-marker { display: none; }
.rn-pdf { background: var(--surface-2); border-radius: 10px; padding: 10px; min-height: 120px; } .rn-pdf canvas { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); } .rn-pdf canvas + canvas { margin-top: 10px; }
.rn-sig-hint { color: var(--red); font-weight: 600; margin: 0; }
.rn-return-card > summary { cursor: pointer; list-style: none; } .rn-return-card > summary::-webkit-details-marker { display: none; } .rn-return-card > summary h2 { display: flex; align-items: center; gap: 8px; }
.rn-ready { border-color: var(--brand); } .rn-ready-row { flex-wrap: wrap; gap: 10px; } .rn-ready-row > .grow { flex: 1 1 260px; } .rn-ready-row .row { gap: 8px; flex-wrap: wrap; }
.rn-chip-ok { display: inline-flex; align-items: center; gap: 3px; color: var(--green); font-weight: 600; white-space: nowrap; vertical-align: bottom; }
.rn-ready-more > summary { padding: 10px 16px; cursor: pointer; color: var(--brand); font-weight: 600; border-top: 1px solid var(--line); }
.rn-more { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--violet); font-weight: 600; }
.bell-readall { display: flex; width: 100%; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.bell-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 2px 0; color: var(--brand); font: 600 .8rem Inter, system-ui, sans-serif; cursor: pointer; text-decoration: none; }
.bell-link:hover { text-decoration: underline; } .bell-link[hidden] { display: none; }
#bell-pop .popover-head > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Protokoll: Filter, Details alt → neu, Fehlversuche */
.log-filter { margin-bottom: 12px; }
.log-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 12px; align-items: end; }
.log-filter-grid .field { margin: 0; }
.log-filter-btns { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; }
.log-detail { margin-top: 4px; font-size: .88em; }
.log-detail summary { cursor: pointer; color: var(--brand); width: max-content; }
.log-detail ul { margin: 6px 0 2px; padding-left: 18px; color: var(--ink-2); }
.log-detail li { overflow-wrap: anywhere; }
tr.log-bad td:nth-child(2) { color: var(--red); }

/* Hinweis Zwei-Faktor-Anmeldung */
.tip-2fa { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tip-2fa > .grow { flex: 1 1 260px; }
.tip-2fa-btns { display: flex; gap: 8px; align-items: center; }
.tip-2fa-btns form { margin: 0; }

/* Rücknahme-Blatt ohne Netz */
.rn-auto.offline { color: var(--amber); font-weight: 600; }
.rn-offline { display: flex; gap: 10px; align-items: flex-start; }
.rn-offline ul { margin: 6px 0 0; padding-left: 18px; }

/* Bauzeitplan: Balken je Gewerk, Tage als Spalten, links die Gewerke fest */
.gantt-scroll { overflow-x: auto; border-top: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.gantt { --dw: 34px; --lab: 190px; display: grid; min-width: calc(var(--lab) + var(--days) * var(--dw)); font-size: 13px; }
.g-row { display: grid; grid-template-columns: var(--lab) calc(var(--days) * var(--dw)); border-bottom: 1px solid var(--line); min-height: 44px; }
.g-lab { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); display: flex; gap: 8px; align-items: center; padding: 6px 10px; min-width: 0; }
.g-lab i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.g-lab i.none { background: transparent; border: 2px dashed var(--ink-3); }
.g-lab span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.g-lab b, .g-lab small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-lab small { color: var(--ink-3); }
.g-track { display: grid; grid-template-columns: repeat(var(--days), var(--dw)); grid-template-rows: 1fr; position: relative; }
.g-track > i { grid-row: 1; }
.g-track > i.we { background: var(--surface-2); }
.g-track > i.mon { border-left: 1px solid var(--line); }
.g-track > i.today { background: var(--brand-soft); box-shadow: inset 2px 0 0 var(--brand); }
.g-weeks, .g-days { min-height: 0; position: sticky; top: 0; }
.g-weeks .g-track b { grid-row: 1; padding: 6px 6px 2px; font-size: 12px; white-space: nowrap; overflow: hidden; border-left: 1px solid var(--line); }
.g-weeks .g-track b small { color: var(--ink-3); font-weight: 400; }
.g-days .g-track span { grid-row: 1; text-align: center; font-size: 11px; color: var(--ink-3); padding: 2px 0 4px; line-height: 1.2; }
.g-days .g-track span b { color: var(--ink-2); font-size: 12px; }
.g-days .g-track span.we { background: var(--surface-2); }
.g-days .g-track span.today { background: var(--brand); color: var(--brand-ink); border-radius: 6px 6px 0 0; }
.g-days .g-track span.today b { color: var(--brand-ink); }
.g-bar { grid-row: 1; align-self: center; z-index: 1; height: 26px; margin: 0 2px; border-radius: 7px; background: var(--bar); color: #fff; font-size: 12px; font-weight: 600;
  padding: 0 8px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; text-shadow: 0 1px 1px rgba(0,0,0,.25);
  box-shadow: 0 1px 2px rgba(0,0,0,.15); }
a.g-bar:hover { filter: brightness(1.08); }
.g-bar.pending { background: repeating-linear-gradient(135deg, var(--bar) 0 8px, color-mix(in srgb, var(--bar) 70%, #fff) 8px 16px); outline: 2px dashed var(--amber); outline-offset: 1px; }
.g-due { grid-row: 1; align-self: center; justify-self: center; z-index: 1; font-style: normal; color: var(--ink); font-size: 14px; }
.g-row.other .g-bar { opacity: .45; }
.g-row.own .g-lab { box-shadow: inset 3px 0 0 var(--brand); }
.g-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 14px; margin: 0; font-size: 12px; border-bottom: 1px solid var(--line); }
.g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.g-legend em { font-style: normal; color: var(--ink); }
.lg-bar { width: 22px; height: 10px; border-radius: 4px; background: var(--brand); display: inline-block; --bar: var(--brand); }
.lg-bar.pending { background: repeating-linear-gradient(135deg, var(--brand) 0 5px, color-mix(in srgb, var(--brand) 60%, #fff) 5px 10px); outline: 1px dashed var(--amber); }
.lg-today { width: 10px; height: 10px; background: var(--brand-soft); box-shadow: inset 2px 0 0 var(--brand); display: inline-block; }
.sched-list { display: flex; flex-direction: column; }
.sched-item { display: grid; grid-template-columns: 170px 1fr auto; gap: 10px 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); align-items: center; }
.sched-item:last-child { border-bottom: 0; }
.sched-item.past { opacity: .6; }
.sched-item.own { background: var(--brand-soft); }
.sched-date { display: flex; flex-direction: column; }
.sched-date small, .sched-new { color: var(--ink-3); font-size: 12px; }
.sched-new { color: var(--amber); font-weight: 600; }
.sched-act { display: flex; gap: 4px; align-items: center; }
.sched-act form { margin: 0; }
@media (max-width: 640px) {
  .gantt { --dw: 30px; --lab: 118px; }
  .g-lab { padding: 6px 8px; }
  .sched-item { grid-template-columns: 1fr auto; }
  .sched-what { grid-column: 1 / -1; grid-row: 2; }
}
a.sched-link { color: inherit; text-decoration: none; }
a.sched-link:hover { background: var(--surface-2); }
a.sched-link.own:hover { background: var(--brand-soft); }

/* Leerstand */
.vac-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--gray-soft); color: var(--ink-2); white-space: nowrap; }
.vac-chip.run { background: var(--blue-soft); color: var(--blue); }
.vac-chip.bad { background: var(--amber-soft); color: var(--amber); }
.vac-hero { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; align-items: center; padding: 20px 22px; background: linear-gradient(135deg, var(--brand-soft), var(--surface)); }
.vac-hero .big { font-size: 46px; font-weight: 800; line-height: 1; color: var(--brand); letter-spacing: -1px; }
.vac-hero .big small { font-size: 18px; font-weight: 700; letter-spacing: 0; }
.vac-hero p { margin: 0; }
.vac-hero .gain { font-size: 18px; font-weight: 700; }
.vac-hero .gain.up { color: var(--green); }
.vac-hero .gain.down { color: var(--red); }
.vac-set { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 14px; align-items: end; }
.vac-set .field { margin: 0; }
.vac-days { font-weight: 700; white-space: nowrap; }
.vac-days.bad { color: var(--amber); }
@media (max-width: 560px) { .vac-hero { grid-template-columns: 1fr; } .vac-hero .big { font-size: 40px; } }
.bill-chart .vac-before { stroke: var(--accent); stroke-width: 2; }
/* Kurze Einsätze: Bezeichnung rechts neben dem Balken */
.g-bar.short { overflow: visible; padding: 0; position: relative; }
.g-bar.short em { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ink); text-shadow: none;
  background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 0 3px; border-radius: 4px; pointer-events: none; }
.bill-legend i.vac-line { width: 18px; height: 0; border-top: 2px dashed var(--accent); background: none; display: inline-block; vertical-align: middle; }

/* Bauzeitplan bearbeiten: ziehen, Rand ziehen, Menü */
.g-edit .g-track { cursor: crosshair; }
.g-edit .g-bar[data-bar] { cursor: grab; user-select: none; -webkit-user-drag: none; touch-action: pan-x pan-y; }
.g-edit .g-bar[data-bar]::before, .g-edit .g-bar[data-bar]::after { content: ''; position: absolute; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: rgba(255,255,255,.55); opacity: 0; transition: opacity .12s; }
.g-edit .g-bar[data-bar] { position: relative; }
.g-edit .g-bar[data-bar]::before { left: 3px; } .g-edit .g-bar[data-bar]::after { right: 3px; }
.g-edit .g-bar[data-bar]:hover::before, .g-edit .g-bar[data-bar]:hover::after { opacity: 1; }
.g-bar.dragging { cursor: grabbing; opacity: .85; box-shadow: 0 6px 16px rgba(0,0,0,.25); z-index: 3; }
.g-bar.dragging[data-tip]:not([data-tip=""])::after { content: attr(data-tip); opacity: 1; position: absolute; top: -26px; left: 0; bottom: auto; width: auto; white-space: nowrap;
  background: var(--ink); color: var(--surface); font-size: 11px; padding: 3px 7px; border-radius: 6px; text-shadow: none; }
.g-ghost { background: color-mix(in srgb, var(--brand) 25%, transparent); border: 2px dashed var(--brand); color: var(--ink); text-shadow: none; font-size: 11px; justify-content: center; pointer-events: none; }
.sched-menu { position: fixed; z-index: 160; min-width: 230px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.22); display: flex; flex-direction: column; }
.sched-menu button { text-align: left; background: none; border: 0; padding: 8px 12px; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; }
.sched-menu button:hover, .sched-menu button:focus-visible { background: var(--brand-soft); outline: none; }
.sched-menu button.danger { color: var(--red); }
.sched-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.sched-modal { width: min(480px, 100%); }
.sched-modal .field { margin: 0; }
.sched-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -6px; }
.sched-modal .modal-actions { display: flex; gap: 8px; align-items: center; }
.sched-modal .spacer { flex: 1; }
.g-help { margin: 0; padding: 8px 14px 0; font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.g-help-touch { display: none; }
@media (hover: none), (pointer: coarse) { .g-help-mouse { display: none; } .g-help-touch { display: inline; } }
.tr-plan { display: flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 12px; margin-top: 2px; font-weight: 400; }

/* Vergabe: Gewerk ändern */
.trade-row .tr-status { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.tr-edit { grid-column: 1 / -1; margin: 8px 0 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: grid; gap: 10px; }
.tr-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; align-items: end; }
.tr-edit .field { margin: 0; }
.tr-fixed { margin: 6px 0 0; }
.tr-fixed small { display: block; }
.tr-edit-del { margin: 0; }
.trade-row.flash-row { animation: row-flash 2.4s ease-out; }
@keyframes row-flash { from { background: var(--brand-soft); } to { background: transparent; } }
.nav-foot .sa-site { margin-bottom: 2px; justify-content: center; }
.sched-head-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sched-head-btns form { margin: 0; }

/* Vergabe: Termin für alle */
.due-all { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.due-all form { margin: 0; }
.due-all-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.due-all-form .field { margin: 0; }
.due-all-form .check { margin-bottom: 8px; }
.tr-plan.bad { color: var(--amber); font-weight: 600; }

/* Führung durchs Programm */
.gd-back { position: fixed; inset: 0; z-index: 170; }
.gd-back.dim { background: rgba(10, 14, 13, .55); }
.gd-hole { position: fixed; z-index: 171; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(10, 14, 13, .55), 0 0 0 3px var(--brand), 0 0 18px 4px color-mix(in srgb, var(--brand) 60%, transparent);
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; animation: gd-pulse 1.8s ease-in-out infinite; }
@keyframes gd-pulse { 50% { box-shadow: 0 0 0 9999px rgba(10, 14, 13, .55), 0 0 0 3px var(--brand), 0 0 28px 10px color-mix(in srgb, var(--brand) 45%, transparent); } }
.gd-card { position: fixed; z-index: 172; width: min(360px, calc(100vw - 24px)); padding: 16px 18px 14px; border-radius: 14px; background: var(--surface); color: var(--ink);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35); display: grid; gap: 10px; transition: left .25s ease, top .25s ease; }
.gd-card h3 { margin: 2px 0 4px; font-size: 1.08rem; }
.gd-card p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.gd-count { color: var(--brand); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.gd-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.gd-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.gd-dots i.done { background: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.gd-dots i.on { background: var(--brand); width: 18px; border-radius: 4px; }
.gd-foot { display: flex; gap: 6px; align-items: center; }
.gd-sp { flex: 1; }
.gd-arrow { position: absolute; width: 16px; height: 16px; background: var(--surface); transform: rotate(45deg); }
.gd-arrow.below { top: -8px; } .gd-arrow.above { bottom: -8px; } .gd-arrow.right { left: -8px; } .gd-arrow.left { right: -8px; }
.guide-callout { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.guide-callout .grow { flex: 1 1 240px; }
@media (prefers-reduced-motion: reduce) { .gd-hole, .gd-card { transition: none; animation: none; } }

/* Bildergalerie in der Großansicht */
.modal.viewer.gallery { width: min(1400px, 100%); height: min(92dvh, 980px); grid-template-rows: auto minmax(0, 1fr) auto; }
.gallery-body { position: relative; padding: 12px 64px; }
.gallery-body img { animation: fade-in .2s ease-out; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .55); color: #fff; font-size: 30px; line-height: 1; display: grid; place-items: center; cursor: pointer; padding: 0 0 4px; }
.gallery-arrow:hover, .gallery-arrow:focus-visible { background: var(--brand); border-color: var(--brand); }
.gallery-arrow.prev { left: 10px; } .gallery-arrow.next { right: 10px; }
.gallery-text { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); font-size: .95rem; line-height: 1.45; text-align: center; color: var(--ink-2); }
.viewer-head [data-g-count] { flex: none; font-size: .88rem; }
@media (max-width: 700px) {
  .gallery-body { padding: 0 0 68px; }
  .gallery-arrow { top: auto; bottom: 12px; transform: none; width: 44px; height: 44px; }
  .gallery-text { font-size: .85rem; padding: 8px 12px; }
}

/* Spracheingabe */
.card-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.voice-btn { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.voice-btn.on, .voice-fab.on { background: #c62828; border-color: #c62828; color: #fff; animation: voice-pulse 1.2s ease-in-out infinite; }
.voice-fab { position: fixed; right: 16px; bottom: calc(168px + env(safe-area-inset-bottom)); z-index: 60; width: 60px; height: 60px; border-radius: 99px; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.voice-fab[hidden], .voice-btn[hidden] { display: none; }
.voice-fab.dragging { cursor: grabbing; opacity: .85; transform: scale(1.08); transition: none; }
@keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, .45); } 50% { box-shadow: 0 0 0 12px rgba(198, 40, 40, 0); } }
.voice-panel { position: fixed; left: 50%; bottom: calc(240px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; width: min(560px, calc(100% - 32px)); padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .25); display: grid; gap: 6px; }
.voice-head { display: flex; align-items: center; gap: 8px; } .voice-head b { flex: 1; }
.voice-dot { width: 10px; height: 10px; border-radius: 99px; background: var(--ink-2); }
.voice-panel.on .voice-dot { background: #c62828; animation: voice-pulse 1.2s ease-in-out infinite; }
.voice-panel.done .voice-dot { background: var(--brand); }
.voice-said { margin: 0; font-size: .95rem; color: var(--ink-2); max-height: 7.5em; overflow: auto; }
.voice-out { display: grid; gap: 6px; justify-items: start; } .voice-out p { margin: 0; font-size: .9rem; }
.voice-ok { color: var(--brand); font-weight: 600; } .voice-miss { color: #b45309; }
.voice-hit { animation: voice-hit 2.4s ease-out; border-radius: 10px; }
.voice-target input, .voice-target textarea, .voice-target select, input.voice-target, textarea.voice-target { border-color: #c62828; box-shadow: 0 0 0 3px rgba(198, 40, 40, .18); }
@keyframes voice-hit { 0%, 40% { background: color-mix(in srgb, var(--brand) 18%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); } 100% { background: transparent; box-shadow: 0 0 0 4px transparent; } }
@media (min-width: 901px) { .voice-fab { bottom: 120px; right: 28px; } .voice-panel { bottom: 120px; } .voice-fab.voice-fab-phone { display: none; } }
.kb-open .voice-fab { bottom: calc(var(--kb) + 12px); }
.kb-open .voice-panel { bottom: calc(var(--kb) + 84px); }
@media (max-width: 900px) { .card-head .voice-btn { display: none; } }
.voice-log { position: fixed; left: 8px; right: 8px; top: 8px; z-index: 90; max-height: 34vh; overflow: auto; margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .82); color: #d7f5ec; font: 11px/1.4 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; pointer-events: none; }

.voice-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 700px) { .voice-add { grid-template-columns: 1fr; } }
