/* Haustechnik – Oberfläche „Leitstand / Unterwegs“
   Zwei Farbwelten (data-theme="lavendel" | "salbei"), Schriften lokal gehostet (DSGVO). */

@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/dm-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage-grotesque-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage-grotesque-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }

/* ---------- Tokens ---------- */
:root, [data-theme="lavendel"] {
  --bg:        oklch(0.975 0.008 75);
  --surface:   oklch(1 0 0);
  --ink:       oklch(0.24 0.03 285);
  --ink-soft:  oklch(0.47 0.03 285);
  --line:      oklch(0.91 0.012 285);
  --line-soft: oklch(0.955 0.008 285);
  --p-50:      oklch(0.97 0.015 295);
  --p-100:     oklch(0.95 0.025 295);
  --p-200:     oklch(0.88 0.06 295);
  --p-700:     oklch(0.42 0.14 295);
  --a-100:     oklch(0.95 0.03 55);
  --a-200:     oklch(0.92 0.05 50);
  --a-700:     oklch(0.45 0.12 45);
  --action:    var(--ink);
  --action-hover: var(--p-700);
  --display: "Instrument Serif", Georgia, serif;
  --display-weight: 400;
  --display-track: -.005em;
}
[data-theme="salbei"] {
  --bg:        oklch(0.965 0.015 85);
  --surface:   oklch(0.995 0.004 85);
  --ink:       oklch(0.26 0.03 150);
  --ink-soft:  oklch(0.46 0.03 150);
  --line:      oklch(0.90 0.02 120);
  --line-soft: oklch(0.945 0.015 110);
  --p-50:      oklch(0.96 0.02 145);
  --p-100:     oklch(0.935 0.03 145);
  --p-200:     oklch(0.90 0.045 145);
  --p-700:     oklch(0.38 0.08 150);
  --a-100:     oklch(0.945 0.03 75);
  --a-200:     oklch(0.91 0.045 75);
  --a-700:     oklch(0.44 0.08 60);
  --action:    var(--p-700);
  --action-hover: oklch(0.32 0.08 150);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --display-weight: 800;
  --display-track: -.02em;
}
:root {
  --red-100:  oklch(0.93 0.04 25);
  --red-700:  oklch(0.45 0.14 28);
  --mint-100: oklch(0.93 0.04 160);
  --mint-700: oklch(0.40 0.09 160);
  --sky-100:  oklch(0.92 0.04 240);
  --sky-700:  oklch(0.42 0.1 240);
  --on-action: oklch(0.985 0.005 90);
  --r-xl: 22px; --r: 14px; --r-sm: 10px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rail: 88px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); }
a { color: var(--p-700); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2.5px solid var(--p-700); outline-offset: 3px; border-radius: 8px; }
h1 { font: var(--display-weight) clamp(30px, 3.6vw, 44px)/1.04 var(--display); letter-spacing: var(--display-track); margin: 2px 0 0; }
h1 em { color: var(--p-700); }
h2 { font: 600 17px/1.25 var(--sans); margin: 0 0 14px; display: flex; align-items: center; gap: .45rem; }
h2 small { font-weight: 400; color: var(--ink-soft); }
h3 { font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 18px 0 10px; }
p { margin: 0 0 .75rem; }
small, .small { font-size: .84rem; }
.muted { color: var(--ink-soft); }
.hot { color: var(--red-700); font-weight: 600; }
.center { text-align: center; }
.mt { margin-top: 1.5rem; }
.eyebrow { font-size: 13px; color: var(--ink-soft); letter-spacing: .02em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; background: var(--line-soft); padding: .1em .4em; border-radius: 5px; }
code.wrap { display: block; word-break: break-all; padding: .55rem .7rem; }
.ic { flex: none; vertical-align: -0.2em; }

/* ---------- Rahmen: Rail + Kopf ---------- */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 0;
  background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto;
}
.rail .logo { width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: var(--p-200); display: grid; place-items: center; margin-bottom: 14px; }
.rail a { width: 72px; padding: 9px 0 7px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-soft); font: 600 10.5px/1.15 var(--sans); text-align: center; position: relative; }
.rail a:hover { background: var(--p-50); color: var(--ink); text-decoration: none; }
.rail a.active { background: var(--p-100); color: var(--p-700); }
.rail .pill-dot { position: absolute; top: 6px; right: 14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red-700); color: #fff; font: 700 10.5px/18px var(--sans); box-shadow: 0 0 0 2px var(--surface); }
.rail .me { margin-top: auto; width: 42px; height: 42px; border-radius: 50%; background: var(--a-200); color: var(--a-700); font: 700 13px var(--sans); display: grid; place-items: center; }
.rail .me:hover { text-decoration: none; box-shadow: 0 0 0 3px var(--a-100); }
.rail-foot { font-size: 10px; color: var(--ink-soft); margin-top: 6px; }

.topbar { display: none; }
.main { margin-left: var(--rail); padding: 26px clamp(18px, 3vw, 42px) 56px; max-width: calc(1500px + var(--rail)); }
.main-full { margin-left: 0; max-width: none; }
.bottomnav { display: none; }
.app-tools { display: flex; gap: 10px; align-items: center; }
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); min-width: 260px; }
.search input { border: 0; background: transparent; padding: 0; min-height: 0; width: 100%; font: inherit; color: var(--ink); outline: none; margin: 0; }
.search:focus-within { border-color: var(--p-700); box-shadow: 0 0 0 3px var(--p-100); }

/* ---------- Bausteine ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px 22px; margin-bottom: 18px; }
.card > h2:first-child { margin-top: 0; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cols > * { min-width: 0; }
.cols-ticket { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.cards-grid .card { margin: 0; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.pagehead p { margin: 4px 0 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.stack > * + * { margin-top: .8rem; }
.narrow { max-width: 680px; }
.note { background: var(--a-100); border: 1px solid transparent; border-radius: var(--r); padding: .75rem .95rem; color: var(--ink); }
.empty { padding: 1.6rem 1rem; text-align: center; color: var(--ink-soft); background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--r-xl); }
.card .empty { border: 0; padding: 1rem 0; background: none; }

/* Schaltflächen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .45rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 .92rem/1.2 var(--sans); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform .25s var(--spring), background .15s, border-color .15s;
}
.btn:hover { background: var(--p-50); border-color: var(--p-200); text-decoration: none; }
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--action); border-color: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.btn-danger { background: var(--red-700); border-color: var(--red-700); color: #fff; }
.btn-danger:hover { background: oklch(0.38 0.13 28); border-color: oklch(0.38 0.13 28); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--p-700); }
.btn-ghost:hover { background: var(--p-50); border-color: transparent; }
.btn-soft { background: var(--p-100); border-color: transparent; color: var(--p-700); }
.btn-small { min-height: 34px; padding: .2rem .75rem; font-size: .84rem; }
.btn-lg { min-height: 52px; font-size: 1rem; padding: .6rem 1.5rem; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: .2rem .35rem; color: var(--p-700); cursor: pointer; font: 600 .84rem var(--sans); display: inline-flex; align-items: center; gap: .25rem; border-radius: 8px; }
.linkbtn:hover { background: var(--p-50); }
.linkbtn.danger { color: var(--red-700); }
form.inline { display: inline; }
.iconbtn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--ink-soft); }
.iconbtn:hover { background: var(--line-soft); text-decoration: none; }

/* Formulare */
label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink-soft); }
label > input, label > select, label > textarea { margin-top: .35rem; }
input, select, textarea {
  width: 100%; font: 400 1rem/1.35 var(--sans); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .8rem; min-height: 46px;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23707080' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.2rem; }
textarea { resize: vertical; min-height: 84px; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--p-700); vertical-align: middle; flex: none; }
input[type="color"] { padding: 2px; width: 56px; height: 40px; }
input[type="file"] { padding: .45rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--p-700); box-shadow: 0 0 0 3px var(--p-100); }
label.check { display: flex; align-items: center; gap: .6rem; font-weight: 500; color: var(--ink); min-height: 32px; }
fieldset { border: 0; border-top: 1px solid var(--line-soft); padding: 1.1rem 0 0; margin: 1.1rem 0 0; }
legend { font: var(--display-weight) 22px/1 var(--display); letter-spacing: var(--display-track); padding: 0 .5rem 0 0; color: var(--ink); }
.grid2, .grid3 { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.field-error { color: var(--red-700); font-size: .84rem; margin-top: .25rem; }
.form-actions { display: flex; gap: .6rem; align-items: center; padding-top: .5rem; }
.w-num { width: 90px; }
.copyrow { display: flex; gap: .4rem; align-items: center; margin-top: .35rem; }
.copyrow input { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; background: var(--line-soft); }

/* Meldungen */
.flash { padding: .8rem 1rem; border-radius: var(--r); margin-bottom: 1rem; font-size: .93rem; animation: flash-in .35s var(--ease); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.flash-ok { background: var(--mint-100); color: var(--mint-700); }
.flash-error { background: var(--red-100); color: var(--red-700); }
.flash-warn { background: var(--a-100); color: var(--a-700); }
.checks { list-style: none; padding: 0; margin: 0 0 .75rem; }
.checks li { padding: .35rem 0 .35rem 1.6rem; position: relative; font-size: .9rem; }
.checks li::before { position: absolute; left: 0; font-weight: 700; }
.chk-ok::before { content: "✓"; color: var(--mint-700); }
.chk-err::before { content: "✕"; color: var(--red-700); }
.chk-warn::before { content: "!"; color: var(--a-700); }

/* Badges & Tags (Statusfarben kommen aus den Einstellungen) */
.badge { --c: oklch(0.47 0.03 285); display: inline-block; font: 600 11.5px/1.65 var(--sans); padding: 0 .6rem; border-radius: 999px; color: color-mix(in oklch, var(--c) 82%, black); background: color-mix(in oklch, var(--c) 13%, white); white-space: nowrap; }
.badge-danger { --c: oklch(0.45 0.14 28); }
.badge-soft { --c: oklch(0.5 0.02 285); }
.badges { display: flex; gap: .35rem; flex-wrap: wrap; margin: .4rem 0; }
.tag { font: 600 11.5px var(--sans); padding: 4px 10px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.tag.r { background: var(--red-100); color: var(--red-700); }
.tag.a { background: var(--a-200); color: var(--a-700); }
.tag.p { background: var(--p-100); color: var(--p-700); }
.tag.m { background: var(--mint-100); color: var(--mint-700); }
.mark { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mark.r { background: var(--red-700); } .mark.a { background: var(--a-700); } .mark.p { background: var(--p-700); }
.av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 11px var(--sans); background: var(--a-200); color: var(--a-700); flex: none; }
.av.p { background: var(--p-200); color: var(--p-700); }
.av.m { background: var(--mint-100); color: var(--mint-700); }

/* ---------- Leitstand ---------- */
.pulse { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.pulse .chip { display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); transition: transform .25s var(--spring), border-color .15s; }
.pulse a.chip:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--p-200); }
.pulse .chip b { font: var(--display-weight) 26px/1 var(--display); color: var(--ink); }
.pulse .chip.warn { background: var(--red-100); border-color: transparent; color: var(--red-700); }
.pulse .chip.warn b { color: var(--red-700); }
.pulse .chip.peach { background: var(--a-100); border-color: transparent; color: var(--a-700); }
.pulse .chip.peach b { color: var(--a-700); }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, 1fr); gap: 18px; align-items: start; }
.lead-grid .card { margin-bottom: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-h h2 { margin: 0; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--line-soft); border-radius: 999px; padding: 4px; gap: 2px; }
.seg a, .seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; font: 600 13px var(--sans); color: var(--ink-soft); }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg .on, .seg [aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px oklch(0.24 0.03 285 / .12); }

.house { position: relative; padding-top: 34px; }
.roof { position: absolute; left: 8%; right: 8%; top: 0; height: 40px; background: var(--p-200); clip-path: polygon(6% 100%, 50% 0, 94% 100%); }
.floors { display: flex; flex-direction: column; gap: 8px; position: relative; }
.floor { display: grid; grid-template-columns: 58px 1fr; gap: 10px; }
.floor-label { font: 600 12px/1.1 var(--sans); color: var(--ink-soft); display: flex; align-items: center; justify-content: flex-end; text-align: right; letter-spacing: .03em; }
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.unit {
  position: relative; min-height: 76px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--p-50); color: var(--ink); text-align: left; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 2px;
  transition: transform .3s var(--spring), background .2s, border-color .2s; font: inherit;
}
.unit:hover { transform: translateY(-3px); border-color: var(--p-200); }
.unit[aria-pressed="true"] { background: var(--ink); color: var(--on-action); border-color: var(--ink); }
.unit .u-name { font-weight: 600; font-size: 14px; }
.unit .u-sub { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit[aria-pressed="true"] .u-sub { color: oklch(0.86 0.02 285); }
.unit .marks { display: flex; gap: 4px; flex-wrap: wrap; min-height: 10px; }
.unit[aria-pressed="true"] .mark { box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px oklch(1 0 0 / .4); }
.unit.common { background: repeating-linear-gradient(-45deg, var(--surface) 0 8px, var(--line-soft) 8px 16px); }
.unit.common[aria-pressed="true"] { background: var(--ink); }
.unit.whole { min-height: 44px; flex-direction: row; align-items: center; justify-content: space-between; }
.ground { height: 10px; margin: 10px 0 0 68px; border-radius: 6px; background: linear-gradient(in oklch 90deg, var(--a-200), var(--p-200)); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.file-h { display: flex; gap: 14px; align-items: flex-start; }
.badge-big { flex: none; min-width: 54px; height: 54px; padding: 0 8px; border-radius: 16px; background: var(--p-100); color: var(--p-700); display: grid; place-items: center; font: var(--display-weight) 22px var(--display); }
.file-h h3 { font: var(--display-weight) 28px/1.1 var(--display); letter-spacing: var(--display-track); margin: 0; text-transform: none; color: var(--ink); }
.file-h p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13.5px; }
.people { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.person { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--bg); font-size: 13px; }
.open-item { display: grid; grid-template-columns: 6px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px 12px 0; border-radius: var(--r); background: var(--bg); margin-bottom: 8px; overflow: hidden; color: var(--ink); }
a.open-item:hover { text-decoration: none; background: var(--p-50); }
.open-item .stripe { align-self: stretch; }
.stripe.r { background: var(--red-700); } .stripe.a { background: var(--a-700); } .stripe.p { background: var(--p-700); } .stripe.m { background: var(--mint-700); }
.open-item b { display: block; font-size: 14px; }
.open-item small { color: var(--ink-soft); }
.years { position: relative; padding-left: 22px; }
.years::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.yev { position: relative; padding: 2px 0 14px; display: block; color: var(--ink); }
a.yev:hover { text-decoration: none; }
a.yev:hover p { color: var(--p-700); }
.yev::before { content: ""; position: absolute; left: -21px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--p-200); }
.yev.done::before { background: var(--mint-700); border-color: var(--mint-700); }
.yev time { font-size: 12px; color: var(--ink-soft); }
.yev p { margin: 1px 0 0; font-size: 14px; }
.yev .who { font-size: 12.5px; color: var(--ink-soft); }
.cost { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--a-100); color: var(--a-700); margin-top: 6px; }
.cost b { font: var(--display-weight) 26px var(--display); }
.file-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.panel-swap { animation: swap .35s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.board-wrap { margin-top: 26px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.col { background: var(--line-soft); border-radius: var(--r-xl); padding: 12px; min-height: 150px; }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-weight: 600; font-size: 14px; }
.col-h .n { font: var(--display-weight) 22px/1 var(--display); color: var(--ink-soft); }
.col-more { display: block; text-align: center; font-size: 13px; padding: 6px; }
.tk { display: block; background: var(--surface); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; border: 1px solid transparent; color: var(--ink); transition: transform .3s var(--spring), border-color .2s; }
.tk:hover { transform: translateY(-3px) rotate(-.4deg); border-color: var(--p-200); text-decoration: none; }
.tk .ref { font-size: 11.5px; color: var(--ink-soft); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tk b { display: block; margin: 4px 0 8px; font-size: 14.5px; line-height: 1.3; }
.tk .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tk .loc { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk .av { width: 26px; height: 26px; font-size: 10px; }
.tk.done b { text-decoration: line-through; text-decoration-color: var(--mint-700); color: var(--ink-soft); }

/* ---------- Listen ---------- */
.tlist { display: flex; flex-direction: column; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem .4rem; border-top: 1px solid var(--line-soft); color: var(--ink); border-radius: 10px; }
.trow:first-child { border-top: 0; }
.trow:hover { background: var(--p-50); text-decoration: none; }
.trow-main { min-width: 0; display: flex; flex-direction: column; }
.trow-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-main small { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-meta { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 50%; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain > li { padding: .6rem 0; border-top: 1px solid var(--line-soft); }
ul.plain > li:first-child { border-top: 0; }
.is-due, .is-due a { color: var(--red-700); }
.is-done { opacity: .6; }
.is-inactive { opacity: .55; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { border-top: 1px solid var(--line-soft); }
.activity li:first-child { border-top: 0; }
.activity a { display: block; padding: .6rem .3rem; color: var(--ink); border-radius: 10px; }
.activity a:hover { background: var(--p-50); text-decoration: none; }
.activity .muted { display: block; font-size: .78rem; }
.remlist li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }

/* Tabellen */
.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: .75rem .9rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.tbl td { padding: .7rem .9rem; border-top: 1px solid var(--line-soft); vertical-align: top; }
.tbl td small { display: block; color: var(--ink-soft); }
.tbl tr[data-href] { cursor: pointer; }
.tbl tr[data-href]:hover td { background: var(--p-50); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-compact td, .tbl-compact th { padding: .45rem .55rem; }
.tbl select { min-height: 36px; padding: .25rem 2rem .25rem .55rem; font-size: .88rem; }
.row-overdue td:first-child { box-shadow: inset 4px 0 0 var(--red-700); }
.list-edit input:not([type="checkbox"]):not([type="radio"]):not([type="color"]) { min-height: 38px; padding: .3rem .55rem; }

/* Filter, Segmente, Chips */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--line-soft); padding: 4px; border-radius: 999px; margin-bottom: 1rem; }
.segmented a, .segmented label span { display: block; padding: .42rem .95rem; border-radius: 999px; color: var(--ink-soft); font: 600 .86rem var(--sans); cursor: pointer; }
.segmented a:hover { text-decoration: none; color: var(--ink); }
.segmented a.on, .segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px oklch(0.24 0.03 285 / .12); }
.seg-radio label { margin: 0; }
.seg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented-form { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.segmented-form select { width: auto; }
.filters summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .45rem; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; align-items: end; }
.filter-actions { display: flex; gap: .5rem; grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.chips a, .chips button { padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font: 600 .84rem var(--sans); cursor: pointer; transition: transform .25s var(--spring); }
.chips a.on { background: var(--ink); border-color: var(--ink); color: var(--on-action); }
.chips a:hover, .chips button:hover { text-decoration: none; border-color: var(--p-700); }
.chips button:active { transform: scale(.94); }
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; padding: 1rem; color: var(--ink-soft); }
.inline-search input { min-width: 240px; border-radius: 999px; }

/* Tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: 0 0 1.2rem; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: .65rem .95rem; color: var(--ink-soft); font: 600 .9rem var(--sans); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--p-700); border-bottom-color: var(--p-700); }
.tabs small { color: var(--ink-soft); font-weight: 500; }

/* ---------- Vorgang ---------- */
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.crumbs a, .crumbs span { font: 600 12px var(--sans); padding: 5px 11px; border-radius: 999px; background: var(--p-100); color: var(--p-700); }
.crumbs a:hover { text-decoration: none; background: var(--p-200); }
.ticket-head .meta { color: var(--ink-soft); font-size: 13.5px; margin-top: 4px; }
.quick { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.quick-row { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; flex: 1 1 300px; }
.quick-row label { flex: 1 1 180px; }
.quick-row input[type="text"] { flex: 1 1 200px; width: auto; }
.desc { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line-soft); }
dl.kv { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: .4rem .9rem; margin: 0 0 .75rem; font-size: .93rem; }
dl.kv dt { color: var(--ink-soft); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.ev { position: relative; padding: 0 0 1.1rem 1.2rem; border-left: 2px solid var(--line); margin-left: .4rem; }
.ev::before { content: ""; position: absolute; left: -7px; top: .3rem; width: 12px; height: 12px; border-radius: 50%; background: var(--line); border: 2px solid var(--surface); }
.ev-comment::before { background: var(--p-700); }
.ev-status::before, .ev-assign::before { background: var(--a-700); }
.ev-mail_in::before { background: var(--sky-700); }
.ev-mail_out::before { background: var(--mint-700); }
.ev-head { font-size: .86rem; display: flex; gap: .45rem; flex-wrap: wrap; align-items: baseline; }
.ev-type { font: 600 10.5px var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-soft); margin-left: auto; }
.ev-body { margin-top: .2rem; overflow-wrap: anywhere; font-size: .93rem; }
.ev-mail { background: var(--bg); border-radius: var(--r); padding: .6rem .8rem; max-height: 260px; overflow: auto; font-size: .87rem; }
.ev-mail_in .ev-mail { background: var(--sky-100); color: var(--sky-700); border-radius: 16px 16px 16px 6px; }
.comment-form select { width: auto; flex: 1; max-width: 280px; }

.compare { position: relative; aspect-ratio: 4 / 3; max-height: 340px; width: 100%; border-radius: var(--r-xl); overflow: hidden; background: var(--line-soft); --pos: 50%; margin-bottom: 14px; user-select: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare .lbl { position: absolute; bottom: 10px; font: 700 11.5px var(--sans); padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); z-index: 2; }
.compare .lbl.l { left: 10px; } .compare .lbl.r { right: 10px; }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: var(--surface); transform: translateX(-50%); pointer-events: none; z-index: 2; }
.compare .handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 17px; color: var(--p-700); box-shadow: 0 4px 14px oklch(0 0 0 / .2); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 3; min-height: 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; margin-bottom: .6rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); display: block; background: var(--line-soft); transition: transform .3s var(--spring); }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: .74rem; color: var(--ink-soft); margin-top: .25rem; line-height: 1.3; }
.upload-drop { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 1.1rem; border: 2px dashed var(--p-200); border-radius: var(--r-xl); color: var(--p-700); font-weight: 600; cursor: pointer; position: relative; text-align: center; background: var(--p-50); transition: background .15s, border-color .15s; }
.upload-drop:hover { border-color: var(--p-700); }
.upload-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-preview { display: flex; gap: .4rem; flex-wrap: wrap; }
.upload-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.upload-preview .up-info { font-size: .8rem; color: var(--ink-soft); width: 100%; }
.files { list-style: none; padding: 0; margin: 0 0 .75rem; }
.files li { padding: .4rem 0; border-top: 1px solid var(--line-soft); }
.small-upload input[type="file"] { flex: 1; width: auto; }
details.add { margin-top: .8rem; }
details.add > summary { list-style: none; cursor: pointer; }
details.add > summary::-webkit-details-marker { display: none; }
details.card.add > summary { font-weight: 600; display: flex; align-items: center; gap: .45rem; }
details.add[open] > summary { margin-bottom: .8rem; }
.inline-edit summary { font-size: .8rem; color: var(--p-700); cursor: pointer; margin-top: .2rem; }
.inline-edit form { margin-top: .5rem; padding: .8rem; background: var(--bg); border-radius: var(--r); }

.matlist { list-style: none; padding: 0; margin: 0; }
.mat { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--line-soft); }
.mat:first-child { border-top: 0; }
.mat small { display: block; }
.mat-actions { display: flex; align-items: center; gap: .2rem; flex: none; }
.mat-actions select { width: auto; min-height: 36px; padding: .2rem 2rem .2rem .55rem; font-size: .85rem; }
.mat-verbaut, .mat-storniert { opacity: .6; }

.history { list-style: none; padding: 0; margin: 0; }
.history li { border-top: 1px solid var(--line-soft); }
.history li:first-child { border-top: 0; }
.history a { display: block; padding: .7rem .3rem; color: var(--ink); border-radius: 10px; }
.history a:hover { background: var(--p-50); text-decoration: none; }
.history small { display: block; }

.obj-card { color: var(--ink); transition: transform .3s var(--spring), border-color .2s; }
.obj-card:hover { text-decoration: none; border-color: var(--p-200); transform: translateY(-3px); }
.obj-card h2 { margin-bottom: .25rem; }
.obj-stats { display: flex; gap: 1rem; font-size: .86rem; color: var(--ink-soft); flex-wrap: wrap; }

.danger-zone { border-color: var(--red-100); }
.danger-zone form { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.guide ol { padding-left: 1.2rem; margin: 0; }
.guide li { margin-bottom: .6rem; font-size: .92rem; }
.guide ul { padding-left: 1.1rem; margin: .3rem 0; }
.perm-matrix td:first-child { font-size: .85rem; }
.users-tbl td { vertical-align: middle; }
.users-tbl select { min-width: 170px; }
pre.log { font-size: .75rem; background: var(--ink); color: oklch(0.92 0.01 285); padding: .8rem; border-radius: var(--r); max-height: 360px; overflow: auto; white-space: pre-wrap; }
.lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 18px; }
.new-row input[name$="[name]"] { border-style: dashed; }
.theme-pick { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-pick label { position: relative; flex: 1 1 200px; border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 14px; cursor: pointer; display: flex; gap: 12px; align-items: center; color: var(--ink); }
.theme-pick label:has(input:checked) { border-color: var(--p-700); box-shadow: 0 0 0 3px var(--p-100); }
.theme-pick .sw { display: flex; }
.theme-pick .sw i { width: 22px; height: 22px; border-radius: 50%; margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }

/* ---------- Unterwegs: Meine Runde ---------- */
.runde-h { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.ring { width: 70px; height: 70px; position: relative; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .rv { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 700 15px/1 var(--sans); }
.ring .rv small { display: block; font: 500 10px var(--sans); color: var(--ink-soft); margin-top: 2px; }
.ring circle.bg { stroke: var(--p-200); }
.ring circle.fg { stroke: var(--p-700); transition: stroke-dashoffset .8s var(--ease); }
.alert { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-xl); background: var(--red-100); color: var(--red-700); margin-bottom: 18px; }
a.alert:hover { text-decoration: none; filter: brightness(.98); }
.alert b { display: block; }
.house-h { display: flex; align-items: center; gap: 8px; font: 700 15px var(--sans); margin: 20px 0 10px; }
.house-h .pin { width: 28px; height: 28px; border-radius: 9px; background: var(--a-200); color: var(--a-700); display: grid; place-items: center; }
.house-h small { font: 500 12.5px var(--sans); color: var(--ink-soft); margin-left: auto; }
.job { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 14px 16px; border-radius: var(--r-xl); background: var(--surface); margin-bottom: 10px; border: 1px solid var(--line); color: var(--ink); transition: transform .3s var(--spring), border-color .2s; }
.job:hover { transform: translateX(4px); border-color: var(--p-200); text-decoration: none; }
.job .where { font-size: 12.5px; color: var(--ink-soft); grid-column: 1 / -1; }
.job b { font-size: 15.5px; line-height: 1.25; }
.job .tag { align-self: start; }
.job.done { opacity: .62; }
.job.done b { text-decoration: line-through; text-decoration-color: var(--mint-700); }
.job.next { border-color: var(--p-700); box-shadow: 0 0 0 3px var(--p-100); }
.job.next::before { content: "Als Nächstes"; position: absolute; top: -9px; right: 14px; font: 700 10.5px var(--sans); padding: 2px 9px; border-radius: 999px; background: var(--p-700); color: var(--on-action); transform: rotate(2deg); }

/* Aktionsleiste (Handy) */
.dock { display: none; }

/* Abschluss */
.done-hero { text-align: center; padding: 18px 8px 8px; }
.seal { width: 116px; height: 116px; margin: 0 auto 16px; border-radius: 50%; background: var(--p-200); display: grid; place-items: center; position: relative; }
.seal::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px dashed var(--p-200); }
.seal svg { stroke: var(--p-700); }
.seal path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .55s var(--ease) .15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-hero h1 { margin-bottom: 6px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 8px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 14px 8px; text-align: center; }
.fact b { display: block; font: var(--display-weight) 26px/1.1 var(--display); }
.fact small { color: var(--ink-soft); font-size: 12px; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); margin-top: 10px; cursor: pointer; color: var(--ink); font-weight: 400; }
.toggle .txt { flex: 1; }
.toggle .txt b { display: block; font-size: 14.5px; }
.toggle .txt small { color: var(--ink-soft); }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch .knob { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px oklch(0 0 0 / .25); transition: transform .35s var(--spring); }
.switch input:checked ~ .track { background: var(--p-700); }
.switch input:checked ~ .knob { transform: translateX(20px); }
.switch input:focus-visible ~ .track { outline: 2.5px solid var(--p-700); outline-offset: 2px; }
.toggle-body { margin: 8px 0 0; padding: 14px; border-radius: var(--r-xl); border: 1.5px dashed var(--p-200); }
.next-up { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-xl); background: var(--ink); color: var(--on-action); display: flex; gap: 12px; align-items: center; }
.next-up:hover { text-decoration: none; }
.next-up small { color: oklch(0.82 0.02 285); display: block; font-size: 12px; }
.next-up b { font-size: 15px; }
.next-up .arrow { margin-left: auto; width: 42px; height: 42px; border-radius: 14px; background: var(--p-700); display: grid; place-items: center; flex: none; }

/* Anmeldung / Setup */
.login-wrap { min-height: calc(100vh - 6rem); display: grid; place-items: center; }
.login-card { width: 100%; max-width: 420px; padding: 2rem; }
.login-head { text-align: center; margin-bottom: 1.4rem; }
.login-head h1 { margin: 0; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: var(--p-200); }
.brand-mark.big { width: 56px; height: 56px; border-radius: 17px; margin: 0 auto .9rem; }
.local-login { margin-top: 1rem; }
.local-login summary { cursor: pointer; color: var(--ink-soft); font-size: .88rem; margin-bottom: .8rem; }
.setup { max-width: 840px; margin: 0 auto; }

/* Erscheinen beim Scrollen */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

.show-sm { display: none !important; }

/* ---------- Tablet ---------- */
@media (max-width: 1180px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols-ticket, .lead-grid { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Handy ---------- */
@media (max-width: 860px) {
  body { font-size: 15.5px; }
  .hide-sm { display: none !important; }
  .show-sm { display: grid !important; }
  .rail { transform: translateX(-100%); transition: transform .25s var(--ease); width: 110px; padding-bottom: 96px; visibility: hidden; }
  .rail a { width: 92px; }
  body.nav-open .rail { transform: none; visibility: visible; box-shadow: 0 10px 40px rgba(0, 0, 0, .2); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 25; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 20; height: 56px; align-items: center; gap: 10px; padding: 0 12px; background: color-mix(in oklch, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft); }
  .topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
  .topbar .brand:hover { text-decoration: none; }
  .topbar .search { flex: 1; min-width: 0; height: 40px; }
  .main { margin-left: 0; padding: 14px 14px calc(92px + env(safe-area-inset-bottom)); }
  .main-full { padding-bottom: 2rem; }
  .app-tools.hide-sm { display: none; }
  .bottomnav {
    display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 24;
    background: var(--surface); border-radius: 26px; box-shadow: 0 10px 30px -10px oklch(0.24 0.03 285 / .4);
    padding: 6px; justify-content: space-around; align-items: center; gap: 4px;
  }
  .bottomnav a, .bottomnav button { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-soft); font: 600 11px var(--sans); background: none; border: 0; border-radius: 20px; transition: transform .25s var(--spring); }
  .bottomnav a:hover { text-decoration: none; }
  .bottomnav a:active, .bottomnav button:active { transform: scale(.9); }
  .bottomnav a.on { color: var(--p-700); background: var(--p-50); }
  .bottomnav .fab { flex: 1.15; background: var(--action); color: var(--on-action); }
  .bottomnav .fab.on { background: var(--action); color: var(--on-action); }
  /* Vorgangsseite: eigene Aktionsleiste ersetzt die Navigation */
  body.has-dock .bottomnav { display: none; }
  .dock { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 24; gap: 6px; padding: 6px; border-radius: 26px; background: var(--surface); box-shadow: 0 10px 30px -10px oklch(0.24 0.03 285 / .45); }
  .dock a, .dock button, .dock label.dk { flex: 1; min-height: 58px; border: 0; border-radius: 20px; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 600 11.5px var(--sans); color: var(--ink-soft); cursor: pointer; transition: transform .25s var(--spring); position: relative; }
  .dock a:hover { text-decoration: none; }
  .dock a:active, .dock button:active, .dock label.dk:active { transform: scale(.9); }
  .dock .go { flex: 1.7; background: var(--action); color: var(--on-action); flex-direction: row; gap: 8px; font-size: 14px; }
  .dock label.dk input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

  .cols, .grid3, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 16px; border-radius: 18px; }
  .pagehead { margin-bottom: 16px; }
  .pulse { gap: 8px; }
  .pulse .chip { padding: 7px 13px; font-size: 13px; }
  .pulse .chip b { font-size: 22px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .units { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floor { grid-template-columns: 44px 1fr; }
  .ground { margin-left: 54px; }
  .sticky-actions { position: sticky; bottom: calc(86px + env(safe-area-inset-bottom)); background: var(--surface); padding: .6rem 0; margin-bottom: -.4rem; z-index: 5; }
  .sticky-actions .btn-primary { flex: 1; }
  .trow-meta { max-width: 45%; }

  .tbl-tickets thead { display: none; }
  .tbl-tickets, .tbl-tickets tbody, .tbl-tickets tr, .tbl-tickets td { display: block; width: 100%; }
  .tbl-tickets tr { padding: .8rem 1rem; border-top: 1px solid var(--line-soft); }
  .tbl-tickets tr:first-child { border-top: 0; }
  .tbl-tickets td { border: 0; padding: .1rem 0; }
  .tbl-tickets .c-loc { color: var(--ink-soft); font-size: .88rem; }
  .tbl-tickets .c-status { padding: .3rem 0; }
  .tbl-tickets .c-tech, .tbl-tickets .c-due { display: inline; font-size: .84rem; color: var(--ink-soft); }
  .tbl-tickets .c-tech small { display: inline; }
  .tbl-tickets .c-tech small::before { content: " · "; }
  .tbl-tickets .c-due:not(:empty)::before { content: " · fällig "; }
  .row-overdue td:first-child { box-shadow: none; }
  .tbl-tickets tr.row-overdue { box-shadow: inset 4px 0 0 var(--red-700); }

  .quick { flex-direction: column; align-items: stretch; }
  .quick-row { flex: 1 1 auto; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  dl.kv { grid-template-columns: minmax(96px, 36%) 1fr; }
  .inline-search input { min-width: 0; }
  .lists { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .filter-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
  .seal path { stroke-dashoffset: 0; }
}
@media print {
  .rail, .topbar, .bottomnav, .dock, .actions, form, .tabs { display: none !important; }
  .main { margin: 0; padding: 0; }
  .card { break-inside: avoid; }
}
.flip .ic { transform: scaleX(-1); }
.unit:hover, .job:hover, .tk:hover, .open-item:hover, .yev:hover { text-decoration: none; }
