/* ============ KFZ Connect – Design-Tokens ============ */
:root, [data-theme="dark"] {
  --background: 250 30% 9%; --foreground: 0 0% 97%; --card: 250 20% 5%; --muted: 250 25% 12%; --muted-foreground: 230 20% 65%;
  --border: 258 40% 22%; --input: 258 35% 20%; --primary: 258 90% 66%; --primary-gedaempft: 258 70% 64%; --secondary: 7 85% 62%;
  --accent: 25 80% 58%; --destructive: 0 80% 62%; --success: 152 55% 45%; --warning: 38 92% 55%; --info: 214 75% 65%;
  --in-arbeit: 190 75% 65%; --uebergeben: 272 75% 70%; --abgelehnt: 185 75% 40%; --abgebrochen: 24 75% 65%;
  --radius: .625rem; --radius-lg: .75rem;
  --primary-foreground: 0 0% 100%;
  --sidebar: 250 22% 4%; --field: 250 22% 7%; --hover: 255 30% 15%;
  --shadow: 0 10px 40px -10px rgb(0 0 0 / .6);
  --glow: 0 0 0 1px hsl(var(--primary) / .35), 0 8px 24px -6px hsl(var(--primary) / .55);
  color-scheme: dark;
}
[data-theme="light"] {
  --background: 250 45% 97%; --foreground: 250 30% 13%; --card: 0 0% 100%; --muted: 250 35% 93%; --muted-foreground: 250 15% 42%;
  --border: 258 30% 86%; --input: 258 28% 80%; --primary: 258 70% 50%; --primary-gedaempft: 258 55% 55%; --secondary: 7 72% 48%; --accent: 25 85% 42%;
  --destructive: 0 75% 42%; --success: 152 62% 27%; --warning: 30 92% 28%; --info: 214 75% 38%;
  --in-arbeit: 190 80% 30%; --uebergeben: 272 60% 45%; --abgelehnt: 185 75% 28%; --abgebrochen: 24 80% 38%;
  --sidebar: 0 0% 100%; --field: 0 0% 100%; --hover: 258 50% 95%;
  --shadow: 0 10px 30px -12px hsl(258 40% 30% / .25);
  --glow: 0 6px 18px -6px hsl(var(--primary) / .5);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: hsl(var(--foreground));
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .9375rem; line-height: 1.5;
  background: hsl(var(--background));
  background-image:
    radial-gradient(1100px 600px at 75% -10%, hsl(270 70% 30% / .32), transparent 65%),
    radial-gradient(800px 500px at 10% 110%, hsl(258 60% 25% / .25), transparent 60%),
    linear-gradient(180deg, hsl(258 35% 10%), hsl(250 30% 8%));
  background-attachment: fixed;
}
[data-theme="light"] body { background-image: radial-gradient(1000px 500px at 80% -10%, hsl(258 80% 90% / .7), transparent 65%), linear-gradient(180deg, hsl(250 50% 98%), hsl(250 40% 96%)); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0 0 .6em; }
.ic { flex: none; }
.boot { padding: 3rem; color: hsl(var(--muted-foreground)); }
.mono { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }
.muted-text { color: hsl(var(--muted-foreground)); }
.small { font-size: .82rem; }
.mb { margin-bottom: 1rem; } .mt { margin-top: 1rem; } .mb-s { margin-bottom: .5rem; } .mt-s { margin-top: .5rem; }
.ml-auto { margin-left: auto; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.link { color: hsl(var(--primary)); font-weight: 600; }
.link:hover { text-decoration: underline; }
.link-btn { background: none; border: 0; padding: 0; color: hsl(var(--primary)); font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.req { color: hsl(var(--destructive)); font-weight: 700; }
.err-text { color: hsl(var(--destructive)); font-size: .82rem; }
.ok-text { color: hsl(var(--success)); }

/* ============ Rahmen ============ */
.app { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: hsl(var(--sidebar)); border-right: 1px solid hsl(var(--border) / .55); padding: 10px 9px 10px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 6px; padding: 2px 6px 12px; color: hsl(var(--foreground)); }
.logo-mark { display: grid; place-items: center; color: hsl(var(--foreground)); }
.brand-txt { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-txt b { font-size: 1.18rem; font-weight: 800; letter-spacing: -.01em; }
.brand-txt small { font-size: .42rem; overflow: hidden; text-overflow: ellipsis; letter-spacing: .04em; text-transform: uppercase; color: hsl(var(--muted-foreground)); margin-top: 3px; white-space: nowrap; }
.btn-new { width: 100%; justify-content: flex-start; padding: .62rem .75rem; margin-bottom: 14px; font-weight: 600; }
.btn-new.current { box-shadow: var(--glow), 0 0 0 2px hsl(var(--primary) / .45); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-head { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--muted-foreground) / .9); padding: 12px 9px 4px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; padding: .5rem .6rem; border-radius: var(--radius);
  color: hsl(var(--foreground) / .86); font-size: .86rem; font-weight: 500; transition: background .15s, color .15s; white-space: nowrap;
}
.nav-item .ic { color: hsl(var(--muted-foreground)); }
.nav-item:hover { background: hsl(var(--hover)); color: hsl(var(--foreground)); }
.nav-item.active { background: hsl(var(--primary)); color: #fff; font-weight: 600; box-shadow: var(--glow); }
.nav-item.active .ic { color: #fff; }
.nav-dot { position: absolute; left: 22px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--primary)); box-shadow: 0 0 0 2px hsl(var(--sidebar)); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid hsl(var(--border) / .5); margin-inline: -9px; padding-inline: 12px; }
.side-tools { display: flex; align-items: center; gap: 4px; color: hsl(var(--muted-foreground)); }
.sep-dot { opacity: .6; }
.version { margin-top: 10px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: .64rem; color: hsl(var(--accent)); white-space: nowrap; }
.nav-backdrop { display: none; }

.app.collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.app.collapsed .brand-txt, .app.collapsed .nav-item span, .app.collapsed .btn-new span, .app.collapsed .nav-head, .app.collapsed .version, .app.collapsed .sep-dot, .app.collapsed #fontBtn { display: none; }
.app.collapsed .nav-item, .app.collapsed .btn-new { justify-content: center; padding-inline: 0; }
.app.collapsed .nav-head + .nav-item { margin-top: 10px; }
.app.collapsed .brand { justify-content: center; padding-inline: 0; }
.app.collapsed .side-tools { justify-content: center; }

.main { min-width: 0; display: flex; flex-direction: column; }
.banners { display: flex; flex-direction: column; }
.banner { display: flex; align-items: center; gap: 8px; min-height: 26px; padding: 3px 14px; font-size: .77rem; border-bottom: 1px solid hsl(var(--border) / .45); }
.banner .b-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-red { justify-content: center; color: hsl(var(--destructive)); background: hsl(var(--destructive) / .06); font-weight: 500; }
.banner-red span { text-align: center; }
.banner-orange { color: hsl(var(--accent)); background: hsl(var(--accent) / .08); }
.banner-blue { color: hsl(var(--info)); background: hsl(var(--info) / .08); }
.b-more { background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; padding: 0 2px; font-size: .77rem; }
.b-x { background: none; border: 0; color: inherit; opacity: .8; display: grid; place-items: center; padding: 2px; border-radius: 4px; }
.b-x:hover { opacity: 1; background: hsl(var(--foreground) / .08); }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px; border-bottom: 1px solid hsl(var(--border) / .5); background: hsl(var(--background) / .82); backdrop-filter: blur(10px); }
.top-title { font-weight: 700; font-size: 1.05rem; }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: hsl(var(--foreground) / .85); position: relative; }
.icon-btn:hover { background: hsl(var(--hover)); color: hsl(var(--foreground)); }
.icon-btn.sm { width: 24px; height: 24px; }
.icon-btn.txt { font-weight: 700; font-size: .72rem; width: 30px; }
.bell-count { position: absolute; top: 3px; right: 2px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: hsl(var(--secondary)); color: #fff; font-size: .6rem; font-style: normal; font-weight: 700; display: grid; place-items: center; }
.account { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 8px; border-radius: 999px; border: 1px solid hsl(var(--border) / .8); background: hsl(var(--card) / .7); }
.account:hover { border-color: hsl(var(--primary) / .6); }
.account .av { color: hsl(var(--primary)); display: grid; }
.acc-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.acc-txt b { font-size: .78rem; font-weight: 700; }
.acc-txt small { font-size: .66rem; color: hsl(var(--muted-foreground)); }

.content { padding: 2.1rem 1.6rem 4rem; width: 100%; max-width: 1180px; }
.content.wide { max-width: 1400px; }

/* ============ Typografie & Seitenkopf ============ */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.page-head h1 { font-size: 2.05rem; font-weight: 800; letter-spacing: -.015em; display: flex; align-items: center; gap: .55rem; }
.page-head h1 .ic { width: 28px; height: 28px; }
.page-head .sub { color: hsl(var(--muted-foreground)); margin: .55rem 0 0; font-size: .92rem; }
.page-head-r { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.title-inline { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.title-inline h1 { font-size: 1.85rem; font-weight: 800; }
h2.sec { font-size: 1.15rem; font-weight: 700; margin: 2rem 0 .8rem; }

/* ============ Karten ============ */
.card { background: hsl(var(--card)); border: 1px solid hsl(var(--border) / .7); border-radius: var(--radius-lg); padding: 1.25rem 1.25rem; }
.card + .card, .card + .grid-2, .grid-2 + .card, .card + .tiles, .tiles + .card { margin-top: 1.1rem; }
.grid-2 > .card, .grid-3 > .card, .grid-4 > .card, .summary > .card { margin-top: 0; }
.field > .plate-in, .field > .fin-boxes { align-self: flex-start; }
.code-in::placeholder { letter-spacing: 0; text-transform: none; font-family: "Source Sans 3", system-ui, sans-serif; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.card-head h2, .card h2 { font-size: 1.12rem; font-weight: 700; }
.card-head p, .card .desc { color: hsl(var(--muted-foreground)); font-size: .88rem; margin: .35rem 0 0; }
.card .desc.mb { margin-bottom: 1rem; }
.card.flush { padding: 0; overflow: hidden; }
.card.soft { background: hsl(var(--muted) / .5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stack > * + * { margin-top: 1.1rem; }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 2.4rem; padding: 0 1rem; border-radius: var(--radius); border: 1px solid transparent; font-weight: 600; font-size: .9rem; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, opacity .15s; }
.btn.sm { height: 2rem; padding: 0 .7rem; font-size: .84rem; }
.btn.lg { height: 2.8rem; padding: 0 1.3rem; font-size: .98rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: hsl(var(--primary)); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover:not(:disabled) { background: hsl(var(--primary) / .88); }
.btn-outline { background: hsl(var(--card)); border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.btn-outline:hover:not(:disabled) { border-color: hsl(var(--primary) / .7); background: hsl(var(--hover)); }
.btn-ghost { background: transparent; color: hsl(var(--foreground) / .9); }
.btn-ghost:hover:not(:disabled) { background: hsl(var(--hover)); }
.btn-soft { background: hsl(var(--primary) / .14); color: hsl(var(--primary)); border-color: hsl(var(--primary) / .3); }
.btn-soft:hover { background: hsl(var(--primary) / .22); }
.btn-danger { background: hsl(var(--destructive)); color: #fff; }
.btn-danger:hover { background: hsl(var(--destructive) / .85); }
.btn-success { background: hsl(var(--success)); color: #fff; }
.btn-icon { width: 2.4rem; padding: 0; }
.btn-icon.sm { width: 2rem; }

/* ============ Formulare ============ */
.input, .select {
  width: 100%; height: 2.4rem; padding: 0 .75rem; border-radius: var(--radius); border: 1px solid hsl(var(--input)); background: hsl(var(--field)); color: hsl(var(--foreground)); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: .55rem .75rem; resize: vertical; }
.input::placeholder { color: hsl(var(--muted-foreground) / .75); }
.input:focus, .select:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 3px hsl(var(--primary) / .22); }
.input.invalid, .select.invalid { border-color: hsl(var(--destructive)); }
.input:disabled { opacity: .6; }
.select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .55rem center; }
.select.sm, .input.sm { height: 2rem; font-size: .84rem; }
.select.xs, .input.xs { height: 1.75rem; font-size: .78rem; padding-left: .5rem; border-radius: 6px; }
.select.xs { padding-right: 1.5rem; background-position: right .3rem center; background-size: 13px; }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: hsl(var(--muted-foreground)); pointer-events: none; }
.search-box .input { padding-left: 2.2rem; }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; min-width: 0; }
.field .label { font-weight: 600; font-size: .86rem; display: inline-flex; align-items: center; gap: .3rem; }
.field .hint { font-size: .78rem; color: hsl(var(--muted-foreground)); }
.info-tip { color: hsl(var(--muted-foreground)); display: inline-grid; cursor: help; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 1rem; }
.c-12 { grid-column: span 12; } .c-8 { grid-column: span 8; } .c-6 { grid-column: span 6; } .c-4 { grid-column: span 4; } .c-3 { grid-column: span 3; } .c-2 { grid-column: span 2; } .c-9 { grid-column: span 9; }

.radio-row { display: flex; gap: 1.4rem; flex-wrap: wrap; margin: .3rem 0 1rem; }
.radio, .check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; }
.radio input, .check input { appearance: none; width: 17px; height: 17px; border: 1.5px solid hsl(var(--muted-foreground)); border-radius: 50%; display: grid; place-items: center; margin: 0; background: hsl(var(--field)); cursor: pointer; flex: none; }
.check input { border-radius: 4px; }
.radio input:checked { border-color: hsl(var(--primary)); }
.radio input:checked::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: hsl(var(--primary)); }
.check input:checked { background: hsl(var(--primary)); border-color: hsl(var(--primary)); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check-box { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 1px solid hsl(var(--border) / .8); border-radius: var(--radius); margin-bottom: 1rem; }

.switch-row { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; padding: .55rem 0; }
.switch { position: relative; width: 38px; height: 22px; flex: none; margin-top: 1px; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: hsl(var(--muted)); border: 1px solid hsl(var(--border)); transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: hsl(var(--muted-foreground)); transition: .2s; }
.switch input:checked + i { background: hsl(var(--primary)); border-color: hsl(var(--primary)); }
.switch input:checked + i::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px hsl(var(--primary) / .3); }
.sw-label { display: block; font-weight: 600; font-size: .9rem; }
.sw-sub { display: block; font-size: .8rem; color: hsl(var(--muted-foreground)); }

.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: calc(var(--radius) + 3px); border: 1px solid hsl(var(--border) / .8); background: hsl(var(--card)); }
.seg button { border: 0; background: transparent; padding: .38rem .8rem; border-radius: var(--radius); font-weight: 600; font-size: .86rem; color: hsl(var(--foreground) / .85); }
.seg button:hover { background: hsl(var(--hover)); }
.seg button.active { background: hsl(var(--primary)); color: #fff; box-shadow: var(--glow); }
.seg.outline button.active { background: hsl(var(--primary) / .15); color: hsl(var(--foreground)); box-shadow: inset 0 0 0 1px hsl(var(--primary)); }

.chip { display: inline-flex; align-items: center; gap: .35rem; height: 1.85rem; padding: 0 .7rem; border-radius: 8px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); font-size: .8rem; font-weight: 600; }
.chip:hover { border-color: hsl(var(--primary) / .6); }
.chip.active { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: #fff; }
.chips { display: flex; gap: .45rem; flex-wrap: wrap; }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid hsl(var(--border) / .7); margin-bottom: 1.1rem; overflow-x: auto; }
.tab { border: 0; background: none; padding: .6rem .9rem; font-weight: 600; color: hsl(var(--muted-foreground)); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: .4rem; align-items: center; white-space: nowrap; }
.tab:hover { color: hsl(var(--foreground)); }
.tab.active { color: hsl(var(--foreground)); border-bottom-color: hsl(var(--primary)); }

/* ============ Badges & Punkte ============ */
.badge { --c: var(--muted-foreground); display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .5rem; border-radius: 6px; font-size: .76rem; font-weight: 600; white-space: nowrap; color: hsl(var(--c)); background: hsl(var(--c) / .12); border: 1px solid hsl(var(--c) / .35); line-height: 1.45; }
.badge.pill { border-radius: 99px; }
.badge-muted { --c: var(--muted-foreground); }
.badge-primary { --c: var(--primary); } .badge-primary-gedaempft { --c: var(--primary-gedaempft); } .badge-secondary { --c: var(--secondary); }
.badge-success { --c: var(--success); } .badge-warning { --c: var(--warning); } .badge-info { --c: var(--info); } .badge-destructive { --c: var(--destructive); }
.badge-in-arbeit { --c: var(--in-arbeit); } .badge-uebergeben { --c: var(--uebergeben); } .badge-abgelehnt { --c: var(--abgelehnt); } .badge-abgebrochen { --c: var(--abgebrochen); } .badge-accent { --c: var(--accent); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--c, var(--muted-foreground))); flex: none; }
.dot-primary { --c: var(--primary); } .dot-primary-gedaempft { --c: var(--primary-gedaempft); } .dot-secondary { --c: var(--secondary); } .dot-success { --c: var(--success); } .dot-warning { --c: var(--warning); } .dot-info { --c: var(--info); } .dot-in-arbeit { --c: var(--in-arbeit); } .dot-destructive { --c: var(--destructive); } .dot-uebergeben { --c: var(--uebergeben); } .dot-abgelehnt { --c: var(--abgelehnt); } .dot-abgebrochen { --c: var(--abgebrochen); } .dot-muted { --c: var(--muted-foreground); } .dot-accent { --c: var(--accent); }
.vg { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; }
.live-dot { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: hsl(var(--muted-foreground)); }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--success)); box-shadow: 0 0 0 3px hsl(var(--success) / .2); }
.count-badge { display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 99px; border: 1px solid hsl(var(--border)); font-size: .78rem; color: hsl(var(--foreground) / .85); background: hsl(var(--muted) / .6); }

/* ============ Hinweise ============ */
.alert { --c: var(--info); display: flex; align-items: flex-start; gap: .8rem; padding: .95rem 1.1rem; border-radius: var(--radius-lg); border: 1px solid hsl(var(--c) / .4); background: hsl(var(--c) / .1); color: hsl(var(--c)); margin-bottom: 1.2rem; }
.alert .ic { margin-top: 2px; }
.alert .a-txt { flex: 1; }
.alert .a-txt b { color: inherit; }
.alert-warning { --c: var(--warning); } .alert-success { --c: var(--success); } .alert-danger { --c: var(--destructive); } .alert-accent { --c: var(--accent); } .alert-muted { --c: var(--muted-foreground); }
.alert a, .alert .link-btn { color: inherit; text-decoration: underline; font-weight: 700; white-space: nowrap; }
.note { padding: .85rem 1rem; border-radius: var(--radius); border: 1px solid hsl(var(--border) / .8); background: hsl(var(--muted) / .45); font-size: .88rem; color: hsl(var(--muted-foreground)); margin-bottom: 1.1rem; }

/* ============ Tabellen ============ */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-weight: 700; font-size: .86rem; padding: .7rem .65rem .5rem; vertical-align: top; white-space: nowrap; }
.tbl th .th-l { display: flex; align-items: center; gap: .25rem; margin-bottom: .4rem; }
.tbl th.sortable { cursor: pointer; }
.tbl th .sort { color: hsl(var(--muted-foreground)); }
.tbl td { padding: .75rem .65rem; border-top: 1px solid hsl(var(--border) / .55); vertical-align: middle; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover td { background: hsl(var(--hover) / .6); }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl .strong { font-weight: 700; }
.tbl .f-in { min-width: 90px; }
.tbl thead { border-bottom: 1px solid hsl(var(--border) / .6); }
.tbl-plain th { padding-bottom: .7rem; border-bottom: 1px solid hsl(var(--border) / .6); }
.tbl-plain td { border-top: 0; border-bottom: 1px solid hsl(var(--border) / .35); }
.tbl-plain tr:last-child td { border-bottom: 0; }
.td-sub { display: block; font-size: .76rem; color: hsl(var(--muted-foreground)); font-weight: 400; }
.range-btn { display: inline-flex; align-items: center; gap: .3rem; height: 1.75rem; padding: 0 .5rem; border: 1px solid hsl(var(--input)); border-radius: 6px; background: hsl(var(--field)); font-size: .78rem; font-weight: 500; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.range-btn.on { color: hsl(var(--foreground)); border-color: hsl(var(--primary)); }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 2.4rem 1rem; color: hsl(var(--muted-foreground)); text-align: center; font-size: .9rem; }
.empty.sm { padding: 1.2rem; }
.empty.left { align-items: flex-start; text-align: left; padding: 1rem 1.2rem; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .9rem 1.1rem; flex-wrap: wrap; font-size: .88rem; }
.pager-r { display: flex; align-items: center; gap: .5rem; }
.pager .select { width: 5.2rem; }
.tbl-toolbar { display: flex; align-items: center; gap: .6rem; padding: .85rem .9rem; flex-wrap: wrap; border-bottom: 1px solid hsl(var(--border) / .5); }

/* ============ Kennzeichen ============ */
.plate-disp, .plate-in { display: inline-flex; align-items: stretch; border: 2px solid #1b1b1f; border-radius: 6px; background: #fff; color: #111; font-weight: 700; overflow: hidden; line-height: 1; }
.plate-disp { height: 26px; font-size: .84rem; letter-spacing: .03em; }
.plate-disp .pt { display: flex; align-items: center; padding: 0 5px; white-space: nowrap; }
.plate-disp.lg { height: 40px; font-size: 1.35rem; border-width: 3px; }
.plate-disp.lg .eu { width: 22px; font-size: .7rem; }
.eu { width: 16px; background: #1f47b8; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-size: .55rem; padding-bottom: 2px; gap: 2px; flex: none; }
.eu .stars { width: 9px; height: 9px; border-radius: 50%; border: 1.5px dotted #ffd43b; margin-top: 3px; margin-bottom: auto; }
.plate-disp .seal, .plate-in .seal { width: 12px; height: 12px; border-radius: 50%; align-self: center; background: radial-gradient(circle at 50% 50%, #fff 30%, #8bc34a 32% 55%, #2e7d32 58%); flex: none; }
.plate-in { height: 40px; padding-right: 6px; gap: 6px; border-color: hsl(var(--destructive) / .0); box-shadow: 0 0 0 2px #e14f5c; }
.plate-in .eu { width: 22px; font-size: .62rem; }
.plate-in input { width: 46px; border: 1px solid #d6d6db; border-radius: 5px; background: #f6f6f8; color: #111; text-align: center; font-weight: 700; font-size: .95rem; margin: 5px 0; text-transform: uppercase; outline: none; padding: 0; min-width: 0; }
.plate-in input[data-p="ziff"] { width: 58px; }
.plate-in input::placeholder { color: #a5a5ad; font-weight: 500; }
.plate-in input:focus { border-color: hsl(258 90% 66%); box-shadow: 0 0 0 2px hsl(258 90% 66% / .3); background: #fff; }
.plate-in.ok { box-shadow: 0 0 0 2px hsl(var(--success)); }
.plate-in.neutral { box-shadow: none; }
.plate-in .suffix { align-self: center; font-size: 1rem; }
.plate-in.mini { height: 26px; gap: 3px; padding-right: 3px; box-shadow: none; border-width: 1.5px; border-radius: 4px; }
.plate-in.mini .eu { width: 11px; font-size: .4rem; }
.plate-in.mini .eu .stars { width: 6px; height: 6px; border-width: 1px; }
.plate-in.mini input { width: 26px; height: 18px; margin: 2px 0; font-size: .72rem; border-radius: 9px; }
.plate-in.mini input[data-p="ziff"] { width: 32px; }
.plate-in.mini .seal { width: 7px; height: 7px; }

/* ============ Popover, Menüs, Modal, Toast ============ */
.popover { position: fixed; z-index: 100; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg); box-shadow: var(--shadow); min-width: 200px; animation: pop .12s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu { padding: 5px; display: flex; flex-direction: column; min-width: 210px; }
.menu-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border: 0; background: none; border-radius: 7px; text-align: left; font-size: .88rem; }
.menu-item:hover { background: hsl(var(--hover)); }
.menu-item.danger { color: hsl(var(--destructive)); }
.menu-item.active { color: hsl(var(--primary)); font-weight: 600; }
.menu-sep { height: 1px; background: hsl(var(--border) / .7); margin: 4px 2px; }
.menu-head { padding: .45rem .65rem .55rem; font-weight: 700; font-size: .86rem; border-bottom: 1px solid hsl(var(--border) / .6); margin-bottom: 4px; }
.menu-head small { font-weight: 400; color: hsl(var(--muted-foreground)); font-size: .76rem; }
.notif { width: 340px; max-width: calc(100vw - 20px); }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .75rem .9rem; border-bottom: 1px solid hsl(var(--border) / .6); font-size: .88rem; }
.notif-item { display: flex; gap: .6rem; padding: .65rem .9rem; border-bottom: 1px solid hsl(var(--border) / .35); font-size: .84rem; }
.notif-item:hover { background: hsl(var(--hover)); }
.notif-item div { display: flex; flex-direction: column; }
.notif-item span { color: hsl(var(--muted-foreground)); }
.notif-item small { color: hsl(var(--muted-foreground)); font-size: .72rem; margin-top: 2px; }
.ndot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: transparent; }
.notif-item.unread .ndot { background: hsl(var(--primary)); }
.range-pop { padding: .9rem; width: 300px; }
.rp-presets { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; }
.rp-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; font-size: .8rem; color: hsl(var(--muted-foreground)); }
.rp-row label { display: flex; flex-direction: column; gap: .25rem; }
.rp-foot { display: flex; justify-content: space-between; margin-top: .8rem; }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgb(5 3 12 / .62); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 1rem; animation: fade .15s; }
.modal-backdrop.out { opacity: 0; transition: opacity .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 540px; max-height: calc(100vh - 2rem); overflow: auto; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 14px; box-shadow: var(--shadow); animation: pop .15s ease-out; }
.modal.sm { max-width: 420px; } .modal.lg { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem .4rem; }
.modal-head h2 { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.modal-body { padding: .6rem 1.2rem 1rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: .6rem; padding: .9rem 1.2rem; border-top: 1px solid hsl(var(--border) / .6); flex-wrap: wrap; }
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: .6rem; max-width: calc(100vw - 36px); }
.toast { --c: var(--info); display: flex; align-items: flex-start; gap: .65rem; min-width: 280px; max-width: 400px; padding: .8rem .8rem .8rem 1rem; border-radius: 12px; background: hsl(var(--card)); border: 1px solid hsl(var(--c) / .5); box-shadow: var(--shadow); animation: pop .2s; font-size: .9rem; }
.toast > .ic { color: hsl(var(--c)); margin-top: 2px; }
.toast > div { flex: 1; }
.toast-title { font-weight: 600; }
.toast-sub { color: hsl(var(--muted-foreground)); font-size: .8rem; }
.toast-success { --c: var(--success); } .toast-error { --c: var(--destructive); } .toast-warning { --c: var(--warning); }
.toast.out { opacity: 0; transform: translateX(10px); transition: .2s; }
.prose p { margin: 0 0 .8em; }
.prose h3 { font-size: 1.05rem; margin: 1.3em 0 .5em; }
.prose ul { padding-left: 1.2rem; margin: .4em 0 1em; }
.prose li { margin-bottom: .35em; }

/* ============ Dashboard ============ */
.mitteilung { --c: var(--warning); position: relative; border: 1px solid hsl(var(--border) / .7); border-left: 3px solid hsl(var(--c)); border-radius: var(--radius); padding: .85rem 1rem; margin-top: .8rem; background: hsl(var(--background) / .35); }
.mitteilung.info { --c: var(--info); }
.mitteilung .m-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding-right: 6rem; }
.mitteilung .m-head b { font-weight: 700; }
.mitteilung .m-head small { color: hsl(var(--muted-foreground)); font-size: .76rem; }
.mitteilung .m-hide { position: absolute; right: .8rem; top: .7rem; }
.mitteilung .m-text { margin-top: .4rem; font-size: .9rem; color: hsl(var(--foreground) / .88); }
.mitteilung .m-text p { margin: 0 0 .7em; }
.mitteilung .m-text p:last-child { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tile { display: flex; flex-direction: column; gap: .2rem; padding: 1.05rem 1.1rem; background: hsl(var(--card)); border: 1px solid hsl(var(--border) / .7); border-radius: var(--radius-lg); transition: border-color .15s, transform .15s; position: relative; overflow: hidden; }
a.tile:hover { border-color: hsl(var(--primary) / .7); transform: translateY(-1px); }
.tile .t-top { display: flex; align-items: center; justify-content: space-between; color: hsl(var(--muted-foreground)); font-size: .84rem; font-weight: 600; }
.tile .t-num { font-size: 2.1rem; font-weight: 800; line-height: 1.1; margin-top: .25rem; }
.tile .t-desc { font-size: .8rem; color: hsl(var(--muted-foreground)); }
.tile .t-link { margin-top: .5rem; font-size: .78rem; font-weight: 600; color: hsl(var(--primary)); }
.tile.accent-destructive .t-num { color: hsl(var(--destructive)); }
.tile.accent-warning .t-num { color: hsl(var(--warning)); }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: hsl(var(--c, var(--border))); opacity: .9; }
.tile.zero .t-num { color: hsl(var(--muted-foreground)); }
.day-head { display: flex; align-items: center; gap: .6rem; margin: 1.8rem 0 .8rem; }
.day-head h2 { font-size: 1.12rem; font-weight: 700; }
.day-head .icon-btn { width: 28px; height: 28px; border: 1px solid hsl(var(--border)); }
.status-list { display: flex; flex-direction: column; }
.status-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .3rem; border-top: 1px solid hsl(var(--border) / .45); font-weight: 600; border-radius: 6px; }
.status-row:first-child { border-top: 0; }
.status-row:hover { background: hsl(var(--hover) / .6); }
.status-row .n { margin-left: auto; font-size: 1.1rem; font-weight: 800; }
.status-row .ic { color: hsl(var(--muted-foreground)); }
.bill-sum { font-size: 1.9rem; font-weight: 800; margin: .2rem 0; }
.chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: .8rem; align-items: end; height: 200px; padding: .5rem .2rem 0; border-bottom: 1px solid hsl(var(--border) / .7); }
.bar-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 0; position: relative; }
.bar-col .stack-bar { width: min(36px, 70%); display: flex; flex-direction: column-reverse; border-radius: 6px 6px 0 0; overflow: hidden; }
.bar-col .bseg { display: block; width: 100%; min-height: 3px; }
.bar-col .bv { font-size: .74rem; color: hsl(var(--muted-foreground)); margin-bottom: 3px; font-weight: 600; }
.chart-x { display: grid; grid-template-columns: repeat(7, 1fr); gap: .8rem; text-align: center; font-size: .74rem; color: hsl(var(--muted-foreground)); padding-top: .4rem; }
.chart-x b { display: block; color: hsl(var(--foreground) / .9); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .9rem; font-size: .78rem; color: hsl(var(--muted-foreground)); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ============ Assistent ============ */
.mode-bar { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; margin-bottom: 1.1rem; font-size: .84rem; color: hsl(var(--muted-foreground)); }
.stepper-card { padding: 1.1rem 1.25rem 1rem; }
.stepper { display: flex; align-items: flex-start; }
.step { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; flex: none; min-width: 120px; background: none; border: 0; padding: 0; }
.step:first-child { align-items: flex-start; text-align: left; }
.step:last-child { align-items: flex-end; text-align: right; }
.step-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; border: 1.5px solid hsl(var(--border)); background: hsl(var(--muted) / .6); color: hsl(var(--muted-foreground)); }
.step:first-child .step-num { margin-left: 28px; } .step:last-child .step-num { margin-right: 28px; }
.step.active .step-num { border: 2px solid hsl(var(--primary)); color: hsl(var(--foreground)); background: hsl(var(--primary) / .18); box-shadow: 0 0 0 4px hsl(var(--primary) / .15); }
.step.done .step-num { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: #fff; }
.step-label { font-size: .8rem; font-weight: 600; color: hsl(var(--muted-foreground)); }
.step.active .step-label { color: hsl(var(--foreground)); }
.step-line { flex: 1; height: 1.5px; background: hsl(var(--border)); margin-top: 17px; }
.step-line.done { background: hsl(var(--primary)); }
.substeps { display: flex; gap: .5rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid hsl(var(--border) / .6); overflow-x: auto; }
.substep { flex: 1; min-width: 86px; display: flex; flex-direction: column; align-items: center; gap: .45rem; background: none; border: 0; padding: 0; font-size: .74rem; font-weight: 600; color: hsl(var(--muted-foreground)); }
.substep .bar { width: 100%; height: 5px; border-radius: 99px; background: hsl(var(--muted)); }
.substep.active { color: hsl(var(--primary)); }
.substep.active .bar, .substep.done .bar { background: hsl(var(--primary)); }
.substep.done { color: hsl(var(--foreground) / .8); }
.substep.err .bar { background: hsl(var(--destructive) / .7); }
.vg-pick { display: flex; align-items: center; gap: .8rem; margin: 1.3rem 0 .35rem; }
.vg-btn { flex: 1; max-width: 420px; display: flex; align-items: center; gap: .6rem; height: 2.9rem; padding: 0 .9rem; border-radius: var(--radius); border: 1px solid hsl(var(--border)); background: hsl(var(--card)); font-weight: 700; font-size: 1.08rem; text-align: left; }
.vg-btn:hover { border-color: hsl(var(--primary) / .6); }
.vg-list { padding: 5px; width: 300px; }
.vg-opt { display: flex; align-items: flex-start; gap: .55rem; width: 100%; border: 0; background: none; text-align: left; padding: .5rem .6rem; border-radius: 7px; font-size: .88rem; }
.vg-opt:hover { background: hsl(var(--hover)); }
.vg-opt .ck { width: 16px; color: hsl(var(--primary)); flex: none; margin-top: 2px; }
.vg-opt.sel { background: hsl(var(--primary) / .14); color: hsl(var(--primary)); font-weight: 600; }
.vg-opt small { display: block; color: hsl(var(--muted-foreground)); font-weight: 400; }
.vg-note { font-size: .78rem; color: hsl(var(--muted-foreground)); display: flex; gap: .35rem; align-items: center; margin-bottom: .9rem; }
.scan-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.scan-btn { display: flex; align-items: center; gap: .7rem; padding: .55rem 1rem; border-radius: var(--radius); background: hsl(var(--primary)); color: #fff; border: 0; text-align: left; box-shadow: var(--glow); }
.scan-btn b { display: block; font-size: .92rem; }
.scan-btn small { display: block; font-size: .74rem; opacity: .9; }
.mini-scan { display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .45rem; border-radius: 6px; border: 1px solid hsl(var(--primary) / .45); color: hsl(var(--primary)); background: hsl(var(--primary) / .1); font-size: .7rem; font-weight: 600; }
.wiz-card { margin-bottom: 1.1rem; scroll-margin-top: 80px; }
.wiz-card > h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 1rem; }
.wiz-sec { font-weight: 700; font-size: .95rem; margin: 1.2rem 0 .5rem; display: flex; align-items: center; gap: .35rem; }
.wiz-sec:first-of-type { margin-top: 0; }
.fin-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.fin-boxes { display: flex; gap: 0; border: 1.5px solid hsl(var(--accent) / .55); border-radius: var(--radius); overflow: hidden; background: hsl(var(--field)); }
.fin-boxes.ok { border-color: hsl(var(--success)); }
.fin-boxes.short { display: none; }
.fin-boxes input { width: 1.9rem; height: 2.6rem; border: 0; border-right: 1px solid hsl(var(--border) / .7); background: transparent; text-align: center; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; font-size: .95rem; text-transform: uppercase; outline: none; padding: 0; }
.fin-boxes input:last-child { border-right: 0; }
.fin-boxes input:focus { background: hsl(var(--primary) / .15); }
.fin-boxes input:nth-child(3), .fin-boxes input:nth-child(9) { border-right-color: hsl(var(--muted-foreground) / .6); }
.pz-box { width: 2.6rem; height: 2.6rem; border-radius: var(--radius); border: 1px solid hsl(var(--border)); display: grid; place-items: center; font-weight: 800; font-family: "JetBrains Mono", ui-monospace, monospace; background: hsl(var(--muted) / .5); }
.code-in { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.wiz-foot { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.2rem -1.6rem -4rem; padding: .9rem 1.6rem; background: hsl(var(--background) / .88); backdrop-filter: blur(10px); border-top: 1px solid hsl(var(--border) / .6); }
.wiz-foot .info { font-size: .8rem; color: hsl(var(--muted-foreground)); }
.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: .4rem .8rem; font-size: .88rem; margin: 0; }
.kv dt { color: hsl(var(--muted-foreground)); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.err-list { list-style: none; padding: 0; margin: 0; }
.err-list li { display: flex; gap: .5rem; align-items: flex-start; padding: .5rem 0; border-top: 1px solid hsl(var(--destructive) / .2); }
.err-list li:first-child { border-top: 0; }
.err-list a { margin-left: auto; white-space: nowrap; }
.qr { width: 190px; height: 190px; margin: .5rem auto 1rem; display: grid; grid-template-columns: repeat(21, 1fr); background: #fff; padding: 10px; border-radius: 10px; }
.qr i { background: #111; }
.qr i.w { background: transparent; }
.option-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.opt-card { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg); cursor: pointer; }
.opt-card:hover { border-color: hsl(var(--primary) / .6); }
.opt-card.sel { border-color: hsl(var(--primary)); background: hsl(var(--primary) / .1); }
.opt-card b { display: block; }
.opt-card small { color: hsl(var(--muted-foreground)); }

/* ============ Antrag-Detail ============ */
.detail-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.detail-head h1 { font-size: 1.7rem; font-weight: 800; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 22px 1fr auto; gap: .8rem; padding: .7rem 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 1.6rem; bottom: -.7rem; width: 2px; background: hsl(var(--border)); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--c, var(--muted-foreground)) / .18); border: 2px solid hsl(var(--c, var(--muted-foreground))); z-index: 1; }
.timeline .tt { font-weight: 600; }
.timeline .ts { font-size: .82rem; color: hsl(var(--muted-foreground)); }
.timeline time { font-size: .82rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }

/* ============ Hilfe & Neuigkeiten ============ */
.help-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.help-nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.help-nav button { text-align: left; border: 0; background: none; padding: .38rem .6rem; border-radius: 7px; font-size: .88rem; color: hsl(var(--foreground) / .85); }
.help-nav button:hover { background: hsl(var(--hover)); }
.help-nav button.active { background: hsl(var(--muted)); color: hsl(var(--foreground)); font-weight: 700; }
.help-nav .hn-sub { font-size: .72rem; margin: 0 0 4px .6rem; }
.wo-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .6rem; border-radius: 7px; background: hsl(var(--primary) / .14); border: 1px solid hsl(var(--primary) / .35); font-size: .8rem; color: hsl(var(--foreground)); margin: .2rem 0 1rem; }
.wo-pill b { color: hsl(var(--primary)); }
.help-body h2 { font-size: 1.4rem; font-weight: 800; }
.help-body mark { background: hsl(var(--warning) / .3); color: inherit; border-radius: 3px; }
.news-day { font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: hsl(var(--muted-foreground)); margin: 1.8rem 0 .7rem; }
.news-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1rem; margin-bottom: .8rem; }
.news-item .nb { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.news-item h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .35rem; }
.news-item p { color: hsl(var(--foreground) / .82); font-size: .9rem; margin: 0; }

/* ============ Login ============ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-card { width: 100%; max-width: 410px; padding: 2rem 1.8rem 1.4rem; }
.login-brand { display: flex; align-items: center; gap: .5rem; justify-content: center; margin-bottom: 1.6rem; }
.login-brand b { font-size: 1.5rem; font-weight: 800; }
.login-card h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: .3rem; }
.login-foot { display: flex; gap: .5rem; justify-content: center; margin-top: 1.3rem; font-size: .8rem; color: hsl(var(--muted-foreground)); }
.login-foot a:hover { color: hsl(var(--foreground)); }
.pw-wrap { position: relative; }
.pw-wrap .icon-btn { position: absolute; right: 3px; top: 3px; width: 32px; height: 32px; }

/* Firmen-Seite */
.addr-col { padding: 1rem; border: 1px solid hsl(var(--border) / .6); border-radius: var(--radius); }
.addr-col h3 { font-size: .9rem; display: flex; align-items: center; gap: .4rem; margin-bottom: .5rem; }
.addr-col .addr { font-weight: 600; line-height: 1.45; }
.addr-col .meta { font-size: .8rem; color: hsl(var(--muted-foreground)); margin: .4rem 0 .8rem; }
.list-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid hsl(var(--border) / .45); }
.list-row:first-child { border-top: 0; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-main b { display: block; }
.list-row .lr-main small { color: hsl(var(--muted-foreground)); }
.kpi .k-label { font-size: .84rem; color: hsl(var(--muted-foreground)); }
.kpi .k-num { font-size: 1.7rem; font-weight: 800; margin: .1rem 0; }
.kpi .k-sub { font-size: .78rem; color: hsl(var(--muted-foreground)); }
.price-tbl td:last-child, .price-tbl th:last-child { text-align: right; white-space: nowrap; }

/* ============ Responsiv ============ */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app, .app.collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .app.collapsed .sidebar .brand-txt, .app.collapsed .nav-item span, .app.collapsed .btn-new span, .app.collapsed .nav-head, .app.collapsed .version { display: revert; }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: rgb(0 0 0 / .5); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-layout { grid-template-columns: 1fr; }
  .help-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: .3rem; }
  .help-nav button { border: 1px solid hsl(var(--border)); }
  .help-nav .hn-sub { display: none; }
  .option-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: .9rem; }
  .content { padding: 1.3rem .9rem 4rem; }
  .topbar { padding: 0 .7rem; gap: .4rem; }
  .acc-txt { display: none; }
  .account { padding: 4px 6px; }
  .page-head h1 { font-size: 1.6rem; }
  .tiles { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .tile { padding: .8rem; }
  .tile .t-num { font-size: 1.6rem; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .form-grid > * { grid-column: span 12; }
  .news-item { grid-template-columns: 1fr; gap: .4rem; }
  .news-item .nb { flex-direction: row; }
  .chart { gap: .35rem; height: 160px; } .chart-x { gap: .35rem; }
  .wiz-foot { margin: 1rem -.9rem -4rem; padding: .7rem .9rem; }
  .fin-row > .field { width: 100%; }
  .fin-boxes { width: 100%; align-self: stretch !important; }
  .fin-boxes input { flex: 1; width: auto; min-width: 0; font-size: .78rem; }
  .tbl-toolbar .search-box { flex-basis: 100% !important; max-width: none !important; }
  .step { min-width: 0; } .step:first-child .step-num { margin-left: 10px; } .step:last-child .step-num { margin-right: 10px; }
  .hide-sm { display: none !important; }
  .banner { font-size: .72rem; padding: 3px 8px; }
  .banner-red span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mitteilung .m-head { padding-right: 0; }
  .mitteilung .m-hide { position: static; margin-top: .4rem; }
  .modal-foot .btn { flex: 1; }
  .kv { grid-template-columns: 1fr; gap: 0 0; } .kv dd { margin-bottom: .5rem; }
}
