/* MS-IT Faktura */
:root {
  --accent: #1f5fd1;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #1b2333;
  --muted: #6b7588;
  --line: #e3e7ef;
  --soft: #eef2f9;
  --good: #1f9d55;
  --warn: #d9480f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .05);
  --side: 264px;
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.45; -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.2; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: .98rem; margin-top: 1.2rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: .85em; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; left: -9999px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-warn { color: var(--warn); }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.gap { gap: .5rem; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.inline { display: inline; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .45rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
ul.plain li:last-child { border: 0; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side); background: #fff; border-right: 1px solid var(--line); position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); overflow-y: auto; z-index: 40;
  padding-top: calc(14px + env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; padding: 4px 8px 14px; }
.brand img { width: 32px; height: 32px; }
.company-switch { display: flex; gap: 6px; margin: 0 4px 12px; }
.company-switch select { flex: 1; min-width: 0; }
.company-switch .mini { display: grid; place-items: center; width: 40px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a, .navbtn {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: #39435a; font-size: .93rem;
  background: none; border: 0; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
}
.sidebar nav a:hover, .navbtn:hover { background: var(--soft); text-decoration: none; }
.sidebar nav a.active { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); font-weight: 600; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 6px; }
.main { flex: 1; margin-left: var(--side); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 28px 12px; background: rgba(243, 245, 249, .92); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent;
}
.topbar h1 { flex: 1; margin: 0; font-size: 1.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { padding: 8px 28px 28px; max-width: 1280px; width: 100%; }
.copyright { text-align: center; color: var(--muted); font-size: .78rem; padding: 10px 16px 24px; margin: 0; }
.copyright.side { margin-top: auto; padding: 18px 6px 4px; text-align: left; }
.only-mobile { display: none !important; }
.backdrop { display: none; }
.newmenu { position: relative; }
.dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 30, 60, .15); min-width: 240px; padding: 6px; z-index: 60; max-height: 70vh; overflow: auto;
}
.dropdown.show { display: block; }
.dropdown a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.dropdown a:hover { background: var(--soft); text-decoration: none; }
.dropdown .pad { padding: 10px; }

/* Karten & Komponenten */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 18px; }
.company-card.current { outline: 2px solid var(--accent); }
.company-card h3 { text-transform: none; letter-spacing: 0; font-size: 1.05rem; color: var(--text); margin: 0 0 .2rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.grid2.cols { gap: 18px; align-items: start; }
.grid2.cols > .card { margin-bottom: 0; }
.grid2.cols + * { margin-top: 18px; }
.grid2 > *, .grid3 > * { min-width: 0; }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: .93rem; border: 1px solid; }
.alert.success { background: #ebf8f0; border-color: #b9e5c9; color: #135e33; }
.alert.error { background: #fdeeee; border-color: #f3c3c3; color: #8f1d1d; }
.alert.info { background: #eef4fd; border-color: #c7d9f6; color: #1b3f7a; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--soft); color: #46516a; white-space: nowrap; }
.st-draft { background: #eceff4; color: #5a6476; }
.st-open { background: #e7f0ff; color: #1b4fb0; }
.st-accepted, .st-paid, .st-done { background: #e3f6ea; color: #17793f; }
.st-partial { background: #fff4dc; color: #8a5a00; }
.st-rejected, .st-cancelled { background: #f1f1f1; color: #777; text-decoration: line-through; }
.st-overdue { background: #fde8e1; color: #b23a0c; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty p { margin: 0 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--soft); border-radius: 8px; font-size: .86rem; margin: 0 6px 6px 0; }
.hello { margin: 0 0 14px; color: var(--muted); }

/* Formulare */
.form label { display: flex; flex-direction: column; gap: 5px; font-size: .84rem; color: #4a5468; font-weight: 500; margin-bottom: 12px; }
.form label.check, label.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 400; color: var(--text); font-size: .92rem; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--text); background: #fff; border: 1px solid #d5dbe6; border-radius: 9px;
  padding: 9px 11px; width: 100%; min-height: 40px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.4; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); flex: none; }
input[type=color] { padding: 3px; height: 42px; }
input[type=file] { padding: 7px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input:disabled { background: var(--soft); color: var(--muted); }
.w-sm { max-width: 110px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-size: .92rem; font-weight: 600;
  padding: 9px 15px; min-height: 40px; border-radius: 9px; border: 1px solid #d5dbe6; background: #fff; color: var(--text);
  cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger { color: #b42318; border-color: #f0c2bd; }
.btn.danger:not(.ghost) { background: #b42318; color: #fff; border-color: #b42318; }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: .84rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.iconbtn { border: 0; background: none; padding: 6px; color: var(--text); cursor: pointer; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.seg label { flex-direction: row !important; align-items: center; gap: 8px !important; border: 1px solid #d5dbe6; border-radius: 9px; padding: 8px 12px; margin: 0 !important; cursor: pointer; color: var(--text) !important; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters input[type=search] { flex: 1; min-width: 180px; }
.filters select { width: auto; }
.filters .btn.primary { margin-left: auto; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 9px 13px; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--accent); border-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.captcha { display: flex; gap: 12px; align-items: flex-end; }
.captcha svg { flex: none; margin-bottom: 12px; }
.captcha label { flex: 1; }
.logo-prev { max-width: 220px; max-height: 90px; display: block; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
.calc-out { display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: .88rem; color: var(--muted); padding-top: 18px; }

/* Tabellen */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.click tbody tr { cursor: pointer; }
.table.click tbody tr:hover { background: #f8faff; }
.table.compact td, .table.compact th { padding: 7px 10px; }
.table tr.sum td { font-weight: 700; background: #fafbfd; }
.card:not(.flush) .table th { background: none; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; color: var(--text); border-left: 4px solid var(--accent); }
.kpi:hover { text-decoration: none; }
.kpi span { font-size: .8rem; color: var(--muted); }
.kpi strong { font-size: 1.3rem; letter-spacing: -.01em; }
.kpi.warn { border-left-color: var(--warn); }
.kpi.warn strong { color: var(--warn); }
.kpi.good { border-left-color: var(--good); }
.small-kpis .kpi strong { font-size: 1.1rem; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.qbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); font-weight: 600; font-size: .88rem; }
.qbtn .ic { color: var(--accent); width: 26px; height: 26px; }
.qbtn:hover { text-decoration: none; background: #f8faff; }

/* Diagramm */
.chart { display: flex; align-items: stretch; gap: 6px; height: 190px; padding: 8px 0 0; }
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-group span { font-size: .72rem; color: var(--muted); }
.bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); }
.bar { width: 42%; max-width: 26px; border-radius: 5px 5px 0 0; min-height: 2px; }
.bar.in { background: var(--accent); }
.bar.out { background: #f2a65a; }
.legend { display: flex; gap: 14px; align-items: center; font-size: .82rem; color: var(--muted); margin: 10px 0 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -8px; }
.dot.in { background: var(--accent); }
.dot.out { background: #f2a65a; }

/* Beleg-Editor */
.items-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.items-head h2 { margin: 0; }
.article-pick { position: relative; min-width: 260px; }
.article-pick .dropdown { left: 0; right: auto; width: 100%; min-width: 300px; }
.article-pick .dropdown a { flex-direction: column; align-items: flex-start; gap: 0; }
.article-pick .dropdown a span { font-size: .8rem; color: var(--muted); }
.items { padding: 6px 0; }
.item { display: grid; grid-template-columns: 26px 28px 1fr 34px; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); align-items: start; }
.item.text { grid-template-columns: 26px 1fr 34px; background: #fbfcfe; }
.item-pos { font-weight: 700; color: var(--muted); padding-top: 10px; text-align: center; }
.item-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.item-main .f-title { font-weight: 600; }
.item-main textarea { min-height: 38px; font-size: 15px; }
.item-nums { display: grid; grid-template-columns: 90px 100px 1fr 90px 90px 1fr; gap: 8px; align-items: end; }
.item-nums label { margin: 0 !important; font-size: .74rem !important; }
.item-sum { display: flex; flex-direction: column; align-items: flex-end; font-size: .74rem; color: var(--muted); padding-bottom: 8px; }
.item-sum strong { font-size: 1rem; color: var(--text); }
.item-move { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.item-move button, .item-del { border: 0; background: var(--soft); border-radius: 6px; cursor: pointer; color: var(--muted); font-size: .7rem; padding: 4px 0; width: 26px; }
.item-move button:disabled { opacity: .35; cursor: default; }
.item-del { width: 34px; height: 34px; font-size: .9rem; margin-top: 3px; }
.item-del:hover { background: #fde8e1; color: #b42318; }
.no-prices .pr { display: none; }
.no-prices .item-nums { grid-template-columns: 110px 120px; }
.totals { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 16px 20px; }
.totals > div { display: flex; justify-content: space-between; gap: 30px; min-width: 300px; }
.totals .grand { border-top: 2px solid var(--text); padding-top: 8px; font-size: 1.12rem; font-weight: 700; }
.totals.static { border-top: 1px solid var(--line); }
.sticky-actions {
  position: sticky; bottom: 0; z-index: 20; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%);
}

/* Beleg-Ansicht */
.doc-summary h2.big { font-size: 2rem; margin: .4rem 0 .2rem; letter-spacing: -.02em; }
.doc-summary p { margin: .2rem 0; }
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.more-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 7px 0 7px 14px; border-left: 2px solid var(--line); font-size: .9rem; }

/* Auth */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(circle at 20% 0%, #e3ecfb, var(--bg) 60%); }
.auth-wrap { width: 100%; max-width: 430px; }
.auth-wrap.wide { max-width: 640px; }
.auth-card { background: #fff; border-radius: 18px; box-shadow: 0 10px 40px rgba(20, 30, 60, .1); padding: 30px; }
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; margin-bottom: 20px; }
.auth-logo img { width: 38px; height: 38px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: .9rem; flex-wrap: wrap; }
.checklist { list-style: none; padding: 0; margin: 0 0 14px; columns: 2; font-size: .88rem; }
.checklist li.ok { color: var(--good); }
.checklist li.bad { color: var(--warn); }

/* Tabbar (Mobil) */
.tabbar { display: none; }

@media (max-width: 1100px) {
  .item-nums { grid-template-columns: repeat(3, 1fr); }
  .item-sum { grid-column: span 1; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  .sidebar.open { transform: none; }
  .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(15, 20, 35, .35); z-index: 35; }
  .main { margin-left: 0; }
  .only-mobile { display: initial !important; }
  .topbar { padding-left: 12px; padding-right: 12px; }
  .content { padding: 4px 12px 100px; }
  .hide-sm { display: none !important; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
  .quick { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .qbtn { font-size: .78rem; padding: 12px 4px; }
  .card { padding: 16px; border-radius: 14px; }
  .table td, .table th { padding: 10px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi strong { font-size: 1.08rem; }
  .item { grid-template-columns: 1fr 34px; padding: 12px 14px; }
  .item.text { grid-template-columns: 1fr 34px; }
  .item-move { grid-column: 1 / -1; flex-direction: row; order: 3; }
  .item-move button { width: 40px; }
  .item-pos { display: none; }
  .item-nums { grid-template-columns: 1fr 1fr; }
  .item-sum { grid-column: span 2; flex-direction: row; justify-content: space-between; align-items: center; padding: 4px 0 0; }
  .totals > div { min-width: 0; width: 100%; }
  .article-pick { min-width: 0; width: 100%; }
  .items-head .row { width: 100%; }
  .items-head .btn { flex: 1; }
  .filters .btn.primary { margin-left: 0; }
  .sticky-actions {
    bottom: 0; flex-wrap: nowrap; gap: 6px; margin: 0 -12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .sticky-actions .btn { flex: 1; padding: 9px 8px; font-size: .88rem; }
  .sticky-actions .btn.ghost { display: none; }
  body.editing .tabbar { display: none; }
  body.editing .content { padding-bottom: 20px; }
  .hide-sm { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--muted); padding: 4px 0; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .fab { flex: none; width: 52px; height: 52px; margin: -18px 8px 0; border-radius: 50%; background: var(--accent); color: #fff; justify-content: center; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent); }
  .tabbar .fab .ic { width: 26px; height: 26px; }
  .checklist { columns: 1; }
  .hide-sm { display: none; }
}
@media (max-width: 480px) {
  .hide-sm { display: none; }
  .btn span.hide-sm { display: none; }
  .doc-summary h2.big { font-size: 1.6rem; }
}

/* ---------- Landingpage ---------- */
body.landing { background: #fff; }
.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.lp-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding: calc(10px + env(safe-area-inset-top)) 0 10px; }
.lp-nav nav a:not(.btn) { color: var(--text); font-weight: 600; font-size: .92rem; margin-right: 8px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--text); }
.lp-brand:hover { text-decoration: none; }
.lp-brand img { width: 34px; height: 34px; }
.lp-hero { background: radial-gradient(1200px 500px at 10% -10%, #dfe9fc, transparent 60%), radial-gradient(900px 500px at 100% 0%, #e9f1ff, transparent 60%), #f7f9fd; padding: 54px 0 64px; }
.lp-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; }
.lp-pill { display: inline-block; background: #e3f6ea; color: #17793f; font-weight: 700; font-size: .8rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.lp-copy h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 16px; }
.lp-copy h1 span { color: var(--accent); }
.lp-lead { font-size: 1.1rem; color: #46516a; margin: 0 0 18px; max-width: 560px; }
.lp-checks { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 8px; }
.lp-checks li { padding-left: 28px; position: relative; font-weight: 500; }
.lp-checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .72rem; display: grid; place-items: center; font-weight: 800; }
.lp-mock { position: relative; max-width: 420px; background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(20,40,90,.14); padding: 20px 22px; transform: rotate(-1.5deg); }
.m-head { display: flex; justify-content: space-between; margin-bottom: 14px; }
.m-logo { width: 70px; height: 22px; border-radius: 6px; background: linear-gradient(90deg, var(--accent), #6c9cf0); }
.m-lines { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.m-lines i { display: block; height: 6px; width: 90px; background: #e7ecf5; border-radius: 3px; }
.m-lines i + i { width: 60px; }
.m-title { font-weight: 800; margin-bottom: 10px; }
.m-row, .m-total { display: flex; justify-content: space-between; font-size: .9rem; padding: 7px 0; border-bottom: 1px solid #eef1f6; }
.m-total { border: 0; margin-top: 6px; background: #eef3fd; padding: 9px 10px; border-radius: 8px; color: var(--accent); font-weight: 800; }
.m-badge { position: absolute; right: -10px; top: -12px; background: var(--good); color: #fff; font-weight: 800; font-size: .8rem; padding: 6px 12px; border-radius: 999px; transform: rotate(6deg); box-shadow: 0 6px 16px rgba(31,157,85,.35); }
.lp-card { background: #fff; border-radius: 18px; box-shadow: 0 16px 50px rgba(20,40,90,.13); padding: 28px; position: sticky; top: 84px; scroll-margin-top: 90px; }
.lp-card h2 { font-size: 1.3rem; margin-bottom: 14px; }
.lp-section { padding: 64px 0; scroll-margin-top: 60px; }
.lp-section.alt { background: #f7f9fd; }
.lp-h2 { text-align: center; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; margin-bottom: 8px; }
.lp-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 36px; font-size: 1.02rem; }
.lp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-feature { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; transition: transform .15s, box-shadow .15s; }
.lp-feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lp-feature h3 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 1rem; margin: 12px 0 6px; }
.lp-feature p { margin: 0; color: var(--muted); font-size: .9rem; }
.lp-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: #eaf1fd; color: var(--accent); }
.lp-ic .ic { width: 22px; height: 22px; }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.lp-steps > div { background: #fff; border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.lp-steps span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; }
.lp-steps h3 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 1.05rem; margin: 12px 0 4px; }
.lp-steps p { margin: 0; color: var(--muted); }
.lp-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.lp-footer { border-top: 1px solid var(--line); padding: 30px 0 calc(20px + env(safe-area-inset-bottom)); text-align: center; }
.lp-footer .lp-brand { justify-content: center; margin-bottom: 6px; }
@media (max-width: 1000px) {
  .lp-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .lp-card { position: static; order: -1; }
  .lp-mock { display: none; }
}
@media (max-width: 600px) {
  .lp-hero { padding: 26px 0 36px; }
  .lp-wrap { padding: 0 14px; }
  .lp-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lp-feature { padding: 14px; }
  .lp-feature p { font-size: .84rem; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-card { padding: 22px; }
  .lp-section { padding: 44px 0; }
  .lp-lead { font-size: 1rem; }
}
@media (max-width: 380px) { .lp-grid { grid-template-columns: 1fr; } }

/* ---------- Werkstatt ---------- */
.lbl { font-size: .84rem; color: #4a5468; font-weight: 500; margin: 0 0 6px; }
.industry-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.industry-pick .ind { margin: 0 !important; cursor: pointer; display: block !important; }
.industry-pick .ind input { position: absolute; opacity: 0; pointer-events: none; }
.industry-pick .ind span { display: flex; flex-direction: column; gap: 4px; height: 100%; border: 2px solid #d5dbe6; border-radius: 12px; padding: 12px; color: var(--text); transition: border-color .15s, background .15s; }
.industry-pick .ind span .ic { color: var(--accent); width: 24px; height: 24px; }
.industry-pick .ind small { color: var(--muted); font-weight: 400; font-size: .78rem; line-height: 1.3; }
.industry-pick .ind input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, #fff); }
.industry-pick .ind input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.plate { display: inline-block; font-family: "DIN Alternate", "Arial Narrow", Arial, sans-serif; border: 1.5px solid #222; border-left: 7px solid #1846a8; border-radius: 4px; padding: 0 6px; font-size: .86rem; letter-spacing: .04em; background: #fff; color: #111; }
.cart-sel { width: auto; min-width: 220px; }
pre.code { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: .8rem; line-height: 1.5; }
details summary { cursor: pointer; font-weight: 600; margin: 8px 0; }
.cat-row { border-bottom: 1px dashed var(--line); margin-bottom: 8px; }
@media (max-width: 900px) { .cart-sel { width: 100%; } }
@media (max-width: 420px) { .industry-pick { grid-template-columns: 1fr; } }

/* ---------- Teilekatalog-Dialog ---------- */
dialog.dlg { border: 0; border-radius: 16px; padding: 0; width: min(760px, 96vw); max-height: 88vh; box-shadow: 0 20px 60px rgba(10,20,50,.3); }
dialog.dlg::backdrop { background: rgba(15, 20, 35, .45); }
.dlg > * { padding-left: 20px; padding-right: 20px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.dlg-head h2 { margin: 0; }
#tmMenu, #tmReview { padding-top: 12px; }
#tmStatus { padding-bottom: 16px; margin: 6px 0 0; }
.tm-cat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.tm-nr input { width: 90px; min-height: 32px; padding: 5px 8px; }
.num-in { width: 84px; min-height: 34px; padding: 5px 8px; text-align: right; }
.tm-table td { vertical-align: middle; }
@media (max-width: 600px) { dialog.dlg { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 16px 16px 0 0; } .num-in { width: 64px; } }

/* ---------- Firmenlogo & Kopf ---------- */
.brand { color: var(--text); }
.brand:hover { text-decoration: none; }
.co-brand { justify-content: center; padding: 6px 8px 14px; }
.co-brand img { width: auto !important; height: auto !important; max-width: 200px; max-height: 56px; object-fit: contain; border-radius: 6px; }
.co-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.co-hero img { max-height: 64px; max-width: 180px; object-fit: contain; background: #fff; border-radius: 10px; padding: 6px; box-shadow: var(--shadow); }
.co-hero h2 { margin: 0; font-size: 1.4rem; }
.co-hero .hello { margin: 0; }
.side-foot { margin-top: auto; padding-top: 12px; }
.side-foot .copyright.side { margin: 0; padding-top: 6px; }
.legal-links { font-size: .78rem; color: var(--muted); text-align: center; }
.legal-links a { color: var(--muted); }
.side-foot .legal-links { text-align: left; padding: 0 6px; }
.legal-page { padding-top: 20px; padding-bottom: 30px; max-width: 900px; }
.legal h1 { font-size: 1.6rem; }
.legal h2 { margin-top: 1.4rem; font-size: 1.1rem; }
.legal p, .legal li { line-height: 1.6; }
.terms span { line-height: 1.4; }
.dot-on { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c5cbd6; vertical-align: middle; }
.dot-on.on { background: var(--good); box-shadow: 0 0 0 3px rgba(31,157,85,.18); }

/* ---------- Design-Auswahl ---------- */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.theme-pick .ind { margin: 0 !important; cursor: pointer; display: block !important; position: relative; }
.theme-pick .ind input { position: absolute; opacity: 0; pointer-events: none; }
.theme-pick .ind > span { display: flex; flex-direction: column; gap: 3px; border: 2px solid var(--line); border-radius: 12px; padding: 10px; color: var(--text); height: 100%; }
.theme-pick .ind input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.theme-pick small { color: var(--muted); font-size: .76rem; font-weight: 400; }
.theme-pick .sw { display: flex; height: 54px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0,0,0,.08); margin-bottom: 6px; }
.theme-pick .sw b { display: block; height: 100%; }
.theme-pick .sw b:first-child { width: 32%; }
.theme-pick .sw b:last-child { flex: 1; position: relative; }
.theme-pick .sw em { position: absolute; left: 10px; top: 10px; width: 40%; height: 9px; border-radius: 4px; }

/* ---------- Designs ---------- */
body { --side-bg: #fff; --side-text: #39435a; --side-hover: var(--soft); --side-line: var(--line); --top-bg: rgba(243,245,249,.92); --input-bg: #fff; --input-line: #d5dbe6; --thead: #fafbfd; --rowhover: #f8faff; }
.sidebar { background: var(--side-bg); border-right-color: var(--side-line); }
.sidebar nav a, .navbtn { color: var(--side-text); }
.sidebar nav a:hover, .navbtn:hover { background: var(--side-hover); }
.sidebar .brand span, .sidebar .copyright, .sidebar .legal-links a { color: var(--side-text); }
.nav-sep { background: var(--side-line); }
.topbar { background: var(--top-bg); }
input, select, textarea { background: var(--input-bg); border-color: var(--input-line); color: var(--text); }
.btn { background: var(--card); border-color: var(--input-line); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; }
.table th { background: var(--thead); }
.table.click tbody tr:hover { background: var(--rowhover); }
.kpi, .qbtn, .dropdown, .lp-card, dialog.dlg, .dlg-head, .industry-pick .ind span { background: var(--card); color: var(--text); }
.item.text { background: var(--thead); }

/* Navy: dunkelblaue Seitenleiste */
body.theme-navy { --bg: #eef1f7; --side-bg: #14213d; --side-text: #c9d3e8; --side-hover: rgba(255,255,255,.08); --side-line: rgba(255,255,255,.1); --top-bg: rgba(238,241,247,.92); }
body.theme-navy .sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; }
body.theme-navy .company-switch select { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }
body.theme-navy .company-switch select option { color: #111; }
body.theme-navy .company-switch .mini { border-color: rgba(255,255,255,.15); color: #c9d3e8; }
body.theme-navy .co-brand img { background: #fff; padding: 6px; }

/* Werkstatt: Anthrazit */
body.theme-workshop { --bg: #ececec; --side-bg: #26292e; --side-text: #d4d6da; --side-hover: rgba(255,255,255,.07); --side-line: rgba(255,255,255,.08); --top-bg: rgba(236,236,236,.94); --thead: #f4f4f4; --rowhover: #f7f7f7; --radius: 8px; }
body.theme-workshop .sidebar nav a.active { background: var(--accent); color: #fff; }
body.theme-workshop .company-switch select { background: #33373d; color: #fff; border-color: #43474e; }
body.theme-workshop .company-switch select option { color: #111; }
body.theme-workshop .company-switch .mini { border-color: #43474e; color: #d4d6da; }
body.theme-workshop .kpi { border-left-width: 6px; }
body.theme-workshop .topbar h1 { text-transform: uppercase; letter-spacing: .04em; font-size: 1.15rem; }
body.theme-workshop .co-brand img { background: #fff; padding: 6px; }

/* Sand: warm */
body.theme-sand { --bg: #f6f1ea; --card: #fffdf9; --text: #3a3128; --muted: #85786a; --line: #ece3d6; --soft: #f3ebe0; --side-bg: #fffaf3; --side-text: #5a4d40; --top-bg: rgba(246,241,234,.94); --input-line: #e2d6c6; --thead: #faf5ee; --rowhover: #fbf6ef; }

/* Dunkel */
body.theme-dark { --bg: #0f1218; --card: #181c24; --text: #e6e9ef; --muted: #98a2b3; --line: #2a303c; --soft: #222835; --side-bg: #12161d; --side-text: #c5ccd8; --side-hover: #1d222c; --side-line: #222835; --top-bg: rgba(15,18,24,.92); --input-bg: #11151c; --input-line: #2f3644; --thead: #1c212b; --rowhover: #1d232e; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }
body.theme-dark .sidebar nav a.active { background: color-mix(in srgb, var(--accent) 22%, transparent); color: #fff; }
body.theme-dark .alert.success { background: #10291c; border-color: #1d5236; color: #9be3b8; }
body.theme-dark .alert.error { background: #2d1414; border-color: #5c2323; color: #f5b1b1; }
body.theme-dark .alert.info { background: #121f36; border-color: #233d68; color: #a9c4f5; }
body.theme-dark .badge { background: #262d3a; color: #c5ccd8; }
body.theme-dark .st-open { background: #14284a; color: #8fb4ff; }
body.theme-dark .st-paid, body.theme-dark .st-accepted, body.theme-dark .st-done { background: #12301f; color: #7fd8a2; }
body.theme-dark .st-partial { background: #3a2c0b; color: #f3c766; }
body.theme-dark .st-overdue { background: #3b1a0e; color: #ff9b72; }
body.theme-dark .tabbar, body.theme-dark .sticky-actions { background: rgba(18,22,29,.96); border-color: var(--line); }
body.theme-dark .co-brand img, body.theme-dark .co-hero img { background: #fff; padding: 6px; }
body.theme-dark .plate { background: #fff; }
body.theme-dark .item-move button, body.theme-dark .item-del { background: #222835; }
body.theme-dark .totals .grand { border-color: var(--text); }
body.theme-dark .table.click tbody tr:hover { background: var(--rowhover); }

/* ---------- Design „Physio“ (aus PhysioRechnung) ---------- */
.industry-pick { grid-template-columns: repeat(3, 1fr); }
.ind-img { width: 24px; height: 24px; }
.rx-box { background: #fcf7f7; border: 1px solid #f0e4e6; border-radius: 12px; padding: 10px 12px 0; margin-bottom: 12px; }
body.theme-physio { --bg: #f7f6f7; --card: #fff; --text: #29282c; --muted: #716a72; --line: #ede7e8; --soft: #faf2f2; --radius: 15px;
  --side-bg: #fff; --side-text: #48434a; --side-hover: #faf2f2; --side-line: #eae4e5; --top-bg: rgba(247,246,247,.94); --input-line: #e4dcde; --thead: #fbf8f8; --rowhover: #fcf7f7;
  --shadow: 0 4px 13px rgba(62,37,37,.04); font-family: Arial, "Helvetica Neue", sans-serif; }
body.theme-physio .sidebar nav a { margin: 1px 4px; min-height: 42px; border-radius: 9px; }
body.theme-physio .sidebar nav a.active { background: #f8eded; color: var(--accent); }
body.theme-physio .card, body.theme-physio .kpi { border: 1px solid #ede7e8; }
body.theme-physio .kpi { border-left: 1px solid #ede7e8; position: relative; padding-left: 16px; }
body.theme-physio .kpi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
body.theme-physio .kpi.warn::before { background: var(--warn); }
body.theme-physio .kpi.good::before { background: var(--good); }
body.theme-physio .qbtn { border: 1px solid #eee4e5; background: #fcf7f7; }
body.theme-physio .qbtn .ic { color: var(--accent); }
body.theme-physio .btn:not(.primary) { color: var(--accent); border-color: #e4cdd1; }
body.theme-physio .btn.ghost { color: var(--text); }
body.theme-physio .st-open { background: #fbecef; color: #a52e3d; }
body.theme-physio .st-paid, body.theme-physio .st-done, body.theme-physio .st-accepted { background: #e9f5ed; color: #287b51; }
body.theme-physio .sidebar::after { content: ""; display: block; flex: none; height: 120px; margin: 10px 20px 0; opacity: .18;
  background: url(physio/physio-mark.svg) center/contain no-repeat; }
.ph-hero { min-height: 220px; border-radius: 18px; overflow: hidden; background: #f5eeee url(physio/therapy-room.jpg) right center / 57% 100% no-repeat; position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; padding: 24px 30px; margin-bottom: 16px; border: 1px solid #ede7e8; }
.ph-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, #f5eeee 0%, #f5eeee 36%, rgba(245,238,238,.93) 43%, transparent 66%); }
.ph-hero > div { max-width: 52%; }
.ph-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.ph-hero h2 { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.12; margin: 7px 0 9px; font-weight: 750; letter-spacing: -.03em; color: #29282c; }
.ph-hero em { font-style: normal; color: var(--accent); }
.ph-hero p { font-size: 14px; line-height: 1.5; color: #716a72; max-width: 420px; margin: 0; }
.ph-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 15px; }
.ph-actions .btn:not(.primary) { background: #fff; }
.ph-logo { max-height: 70px; max-width: 180px; background: #fff; border-radius: 12px; padding: 8px; box-shadow: var(--shadow); align-self: flex-start; }
@media (max-width: 650px) {
  .ph-hero { padding: 20px; background-size: cover; min-height: 230px; }
  .ph-hero::before { background: linear-gradient(90deg, rgba(245,238,238,.99), rgba(245,238,238,.87) 70%, rgba(245,238,238,.53)); }
  .ph-hero > div { max-width: 100%; }
  .ph-logo { display: none; }
  .industry-pick { grid-template-columns: 1fr; }
}

/* ---------- Design „GaLaBau“ ---------- */
.site-box { background: #f3f8f1; border: 1px solid #dcebd8; border-radius: 12px; padding: 10px 12px 0; margin-bottom: 12px; }
.items.has-kinds .item-nums { grid-template-columns: 80px 90px 1fr 80px 80px 110px 1fr; }
body.theme-galabau { --bg: #f6f8f5; --card: #fff; --text: #14251d; --muted: #53645a; --line: #e2e8e2; --soft: #eef5ec;
  --side-bg: linear-gradient(180deg, #063627 0%, #0a4430 70%, #0d4d36 100%); --side-text: #e3efe6; --side-hover: rgba(255,255,255,.08); --side-line: rgba(255,255,255,.12);
  --top-bg: rgba(246,248,245,.94); --input-line: #d6e1d6; --thead: #f7faf6; --rowhover: #f3f8f1; --radius: 12px; }
body.theme-galabau .sidebar { background: var(--side-bg); }
body.theme-galabau .sidebar::after { content: ""; display: block; flex: none; height: 150px; margin: 8px -12px calc(-14px - env(safe-area-inset-bottom));
  background: url(galabau/garten-sidebar.png) center bottom / cover no-repeat; }
body.theme-galabau .brand span { color: #fff; font-size: 1.1rem; }
body.theme-galabau .brand img { width: 40px; height: auto; }
body.theme-galabau .sidebar nav a.active { background: #2f8a3a; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
body.theme-galabau .company-switch select { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
body.theme-galabau .company-switch select option { color: #111; }
body.theme-galabau .company-switch .mini { border-color: rgba(255,255,255,.18); color: #e3efe6; }
body.theme-galabau .co-brand img { background: #fff; padding: 6px; }
body.theme-galabau .kpi { border-left-color: #2f8a3a; }
body.theme-galabau .qbtn .ic { color: #176526; }
body.theme-galabau .st-open { background: #fff4dc; color: #8a5a00; }
body.theme-galabau .st-paid { background: #e3f4e5; color: #176526; }
.gl-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 150px; padding: 22px 26px; margin-bottom: 16px;
  border-radius: 16px; background: #fff url(galabau/garten-banner.png) right top / auto 100% no-repeat; border: 1px solid #e2e8e2; overflow: hidden; }
.gl-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #fff 0%, #fff 55%, rgba(255,255,255,.6) 75%, transparent 100%); }
.gl-hero > * { position: relative; }
.gl-hero h2 { margin: 0 0 4px; font-size: clamp(22px, 2.6vw, 34px); color: #063627; letter-spacing: -.02em; }
.gl-hero p { margin: 0; color: #176526; font-size: clamp(15px, 1.4vw, 19px); }
@media (max-width: 1100px) { .items.has-kinds .item-nums { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .items.has-kinds .item-nums { grid-template-columns: 1fr 1fr; } body.theme-galabau .sidebar::after { height: 110px; } }
@media (max-width: 650px) { .gl-hero { background-size: auto 70%; background-position: right bottom; } .gl-hero::before { background: linear-gradient(90deg, #fff, rgba(255,255,255,.9) 70%, rgba(255,255,255,.6)); } }

/* ---------- Terminplaner ---------- */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-toolbar h2 { margin: 0 0 0 6px; font-size: 1.1rem; white-space: nowrap; }
.iconbtn-s { width: 36px; padding: 0; font-size: 1.2rem; }
.seg-btns { display: inline-flex; border: 1px solid var(--input-line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg-btns button { border: 0; background: transparent; padding: 7px 12px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 36px; }
.seg-btns button + button { border-left: 1px solid var(--input-line); }
.seg-btns button.active { background: var(--accent); color: #fff; }
.seg-btns.full { display: flex; width: 100%; margin-bottom: 12px; }
.seg-btns.full button { flex: 1; }
.cal-res { width: auto; min-width: 150px; }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cal-legend i.done { background: repeating-linear-gradient(45deg, #9ca3af, #9ca3af 2px, transparent 2px, transparent 4px); opacity: .6; }
.cal-legend i.cancel { background: #fecaca; outline: 1px solid #ef4444; }
.cal-card { overflow: hidden; }
.cal-body.loading { opacity: .6; pointer-events: none; }
.cal-hint { margin-top: 8px; }
.cg { --gut: 52px; }
.cg-head { display: grid; grid-template-columns: var(--gut) repeat(var(--cols), minmax(120px, 1fr)); border-bottom: 1px solid var(--line); background: var(--thead); position: sticky; top: 0; z-index: 3; }
.cg-colhead { padding: 9px 6px; text-align: center; font-weight: 700; font-size: .86rem; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.cg-colhead[data-goday] { cursor: pointer; }
.cg-colhead i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.cg-colhead.today { color: var(--accent); }
.cg-scroll { max-height: calc(100vh - 260px); min-height: 380px; overflow: auto; -webkit-overflow-scrolling: touch; }
.cg-head, .cg-grid { min-width: calc(var(--gut) + var(--cols) * 120px); }
.cg-grid { display: grid; grid-template-columns: var(--gut) repeat(var(--cols), minmax(120px, 1fr)); position: relative; }
.cg-gutter { position: relative; }
.cg-hour { position: absolute; right: 6px; transform: translateY(-50%); font-size: .72rem; color: var(--muted); }
.cg-hour:first-child { transform: none; }
.cg-col { position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2); }
.cg-col.today { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.cg-now { position: absolute; left: var(--gut); right: 0; height: 2px; background: #ef4444; z-index: 2; pointer-events: none; }
.cg-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.ev { position: absolute; z-index: 1; border-radius: 8px; padding: 3px 6px 4px 8px; overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y;
  background: color-mix(in srgb, var(--c) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-left: 4px solid var(--c); color: var(--text);
  font-size: .78rem; line-height: 1.25; box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: box-shadow .15s; }
.ev:hover { box-shadow: 0 4px 12px rgba(0,0,0,.15); z-index: 4; }
.ev-time { font-size: .7rem; color: var(--muted); font-weight: 600; }
.ev-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .72rem; }
.ev.short { display: flex; gap: 5px; align-items: center; }
.ev.short .ev-sub { display: none; }
.ev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.ev-resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: color-mix(in srgb, var(--c) 60%, transparent); opacity: 0; }
.ev:hover .ev-resize::after { opacity: 1; }
.ev.st-done { opacity: .55; background-image: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(0,0,0,.04) 6px, rgba(0,0,0,.04) 12px); }
.ev.st-done .ev-title::before { content: "✓ "; color: var(--good); }
.ev.st-cancelled { opacity: .5; text-decoration: line-through; border-left-style: dashed; }
.ev.st-confirmed { box-shadow: inset 0 0 0 1px var(--c); }
.ev.locked { cursor: pointer; }
.ev.dragging { opacity: .9; z-index: 10; box-shadow: 0 10px 24px rgba(0,0,0,.25); cursor: grabbing; }
body.cal-dragging, body.cal-dragging * { cursor: grabbing !important; user-select: none !important; }
body.cal-dragging .cg-scroll { touch-action: none; }
.cm-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--thead); border-bottom: 1px solid var(--line); }
.cm-head div { padding: 8px; text-align: center; font-weight: 700; font-size: .8rem; color: var(--muted); }
.cm-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(104px, auto); }
.cm-day { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; cursor: pointer; min-width: 0; }
.cm-day:hover { background: var(--rowhover); }
.cm-day.other { opacity: .45; }
.cm-day.today .cm-num { background: var(--accent); color: #fff; }
.cm-num { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 12px; font-size: .8rem; font-weight: 700; margin-bottom: 3px; }
.cm-ev { font-size: .72rem; padding: 2px 5px; border-radius: 5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--c) 18%, var(--card)); border-left: 3px solid var(--c); }
.cm-ev.st-done { opacity: .5; }
.cm-ev.st-cancelled { text-decoration: line-through; opacity: .5; }
.cm-more { font-size: .7rem; color: var(--muted); padding-left: 4px; }
.cm-dots { display: none; gap: 3px; flex-wrap: wrap; padding: 2px; }
.cm-dots i { width: 7px; height: 7px; border-radius: 50%; }
.cl-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cl-tools label { margin: 0 !important; }
.cl-day { padding: 10px 16px 6px; font-weight: 700; font-size: .84rem; color: var(--muted); background: var(--thead); border-bottom: 1px solid var(--line); }
.cl-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cl-row:hover { background: var(--rowhover); }
.cl-row.st-done .cl-main { opacity: .65; }
.cl-row.st-cancelled .cl-main { text-decoration: line-through; opacity: .5; }
.cl-time { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--muted); min-width: 92px; }
.cl-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.cl-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlg-body { padding-top: 14px; max-height: calc(88vh - 140px); overflow-y: auto; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding-top: 12px; padding-bottom: 16px; border-top: 1px solid var(--line); }
.dlg-foot #fDelete { margin-right: auto; }
.color-pick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.color-pick button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.color-pick button.auto { width: auto; border-radius: 15px; padding: 0 10px; background: var(--soft); color: var(--text); font-size: .78rem; font-weight: 600; border-color: var(--input-line); }
.color-pick button.active { outline: 3px solid var(--text); outline-offset: 2px; }
.grid2.tight { gap: 0 8px; }
.mb6 { margin-bottom: 6px; }
.pad-x { padding: 0 16px 12px; }
.cal-set input[type=color] { width: 44px; padding: 2px; height: 34px; }
.cal-set td { vertical-align: middle; }
.cal-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; transition: all .25s; z-index: 200;
  background: #1b2333; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); pointer-events: none; max-width: 90vw; }
.cal-toast.show { opacity: 1; transform: translate(-50%, 0); }
.cal-toast.err { background: #b42318; }
.today-list li { cursor: default; }
.today-list .t-time { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 48px; }
@media (max-width: 900px) {
  .cal-toolbar h2 { font-size: .98rem; width: 100%; order: -1; margin: 0; }
  .cal-toolbar > .row:first-child { flex-wrap: wrap; }
  .seg-btns button { padding: 7px 10px; }
  .cg { --gut: 42px; }
  .cg-scroll { max-height: calc(100vh - 250px); }
  .cm-grid { grid-auto-rows: minmax(58px, auto); }
  .cm-ev, .cm-more { display: none; }
  .cm-dots { display: flex; }
  .cl-time { min-width: 76px; font-size: .78rem; }
  .cl-row .badge { display: none; }
  dialog.dlg .dlg-body { max-height: calc(92vh - 150px); }
  .cal-hint { display: none; }
}

/* ---------- Schnellsuche (Strg+K) ---------- */
.palette { border: 0; padding: 0; border-radius: 16px; width: min(640px, 96vw); margin: 10vh auto auto; box-shadow: 0 24px 70px rgba(10,20,50,.35); background: var(--card); color: var(--text); }
.palette::backdrop { background: rgba(15,20,35,.45); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pal-in input { border: 0; box-shadow: none !important; font-size: 1.05rem; padding: 6px 0; background: transparent; }
.pal-in kbd, .kbd { font-size: .72rem; border: 1px solid var(--input-line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--muted); background: var(--soft); white-space: nowrap; font-family: inherit; }
.pal-list { max-height: 56vh; overflow-y: auto; padding: 6px; }
.pal-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px 4px; font-weight: 700; }
.pal-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); cursor: pointer; }
.pal-item:hover, .pal-item.sel { background: color-mix(in srgb, var(--accent) 12%, transparent); text-decoration: none; }
.pal-item .ic { color: var(--accent); }
.pal-item small { color: var(--muted); margin-left: auto; white-space: nowrap; }
.pal-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 9px 16px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); }
.search-btn { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); border: 1px solid var(--input-line); background: var(--card); border-radius: 9px; padding: 7px 10px; cursor: pointer; font: inherit; font-size: .88rem; min-height: 38px; }
.search-btn .kbd { margin-left: 18px; }
.keys-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.keys-table td:first-child { white-space: nowrap; }
@media (max-width: 900px) { .search-btn .kbd, .search-btn span { display: none; } .palette { margin-top: 4vh; } .pal-foot { display: none; } }

/* ---------- Design „Kfz“ (dunkel, orange) ---------- */
body.theme-kfz { --bg: #111a24; --card: #1a2531; --text: #f3f5f8; --muted: #a9b3bf; --line: #2c3a48; --soft: #223040; --radius: 12px;
  --side-bg: linear-gradient(180deg, #0d151e 0%, #121c27 100%); --side-text: #d7dde4; --side-hover: rgba(255,255,255,.06); --side-line: rgba(255,255,255,.08);
  --top-bg: rgba(17,26,36,.94); --input-bg: #121b25; --input-line: #3a4856; --thead: #1f2b38; --rowhover: #213040; --shadow: 0 2px 10px rgba(0,0,0,.35); color-scheme: dark; }
body.theme-kfz .sidebar { background: var(--side-bg); }
body.theme-kfz .sidebar::after { content: ""; display: block; flex: none; height: 170px; margin: 8px -12px calc(-14px - env(safe-area-inset-bottom));
  background: url(kfz/bremsen-sidebar.png) left bottom / cover no-repeat; }
body.theme-kfz .brand span { color: #fff; }
body.theme-kfz .brand img { width: 44px; height: auto; border-radius: 6px; }
body.theme-kfz .sidebar nav a.active { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 80%, #ffb15c)); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
body.theme-kfz .card, body.theme-kfz .kpi, body.theme-kfz .qbtn { border: 1px solid #2f3e4d; }
body.theme-kfz .kpi { border-left: 4px solid var(--accent); }
body.theme-kfz .alert.info { background: #12243a; border-color: #23406a; color: #b6ccf3; }
body.theme-kfz .alert.success { background: #10291c; border-color: #1d5236; color: #9be3b8; }
body.theme-kfz .alert.error { background: #2d1414; border-color: #5c2323; color: #f5b1b1; }
body.theme-kfz .badge { background: #26323f; color: #cbd3dc; }
body.theme-kfz .st-open { background: #3a2a10; color: #ffb766; }
body.theme-kfz .st-paid, body.theme-kfz .st-accepted, body.theme-kfz .st-done { background: #12301f; color: #7fd8a2; }
body.theme-kfz .st-overdue { background: #3b1a0e; color: #ff9b72; }
body.theme-kfz .tabbar, body.theme-kfz .sticky-actions { background: rgba(17,26,36,.96); border-color: var(--line); }
body.theme-kfz .co-brand img, body.theme-kfz .co-hero img, body.theme-kfz .ph-logo { background: #fff; padding: 6px; }
body.theme-kfz .company-switch select { background: #172230; color: #fff; border-color: #33414f; }
body.theme-kfz .company-switch .mini { border-color: #33414f; color: #d7dde4; }
body.theme-kfz .plate { background: #fff; }
body.theme-kfz .item-move button, body.theme-kfz .item-del { background: #223040; }
body.theme-kfz .ev { box-shadow: none; }
body.theme-kfz .cal-toast { background: #e8760b; }
body.theme-kfz .content { background: url(kfz/reifen-dekor.png) right bottom / 300px auto no-repeat fixed; }
.kfz-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 140px; padding: 20px 26px; margin-bottom: 16px;
  border-radius: 14px; border: 1px solid #2f3e4d; background: #0f1823 url(kfz/werkstatt-banner.png) right center / auto 100% no-repeat; }
.kfz-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0f1823 0%, #0f1823 42%, rgba(15,24,35,.75) 60%, rgba(15,24,35,.1) 100%); }
.kfz-hero > * { position: relative; }
.kfz-hero h2 { margin: 0 0 4px; font-size: clamp(22px, 2.5vw, 32px); color: #fff; letter-spacing: -.01em; }
.kfz-hero p { margin: 0; color: var(--accent); font-weight: 600; font-size: clamp(14px, 1.4vw, 18px); }
@media (max-width: 650px) { .kfz-hero { background-size: cover; } .kfz-hero::before { background: linear-gradient(90deg, rgba(15,24,35,.97), rgba(15,24,35,.82)); } body.theme-kfz .content { background: none; } }

/* Rechnungsvorlagen-Auswahl */
.tpl-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tpl-pick .ind { margin: 0 !important; cursor: pointer; display: block !important; position: relative; }
.tpl-pick .ind input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-pick .ind > span { display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--line); border-radius: 12px; padding: 8px; color: var(--text); height: 100%; font-size: .85rem; }
.tpl-pick .ind input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.tpl-pick .ind input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpl-pick small { color: var(--muted); font-size: .74rem; }
.tpl-pick .thumb { display: block; aspect-ratio: 210 / 297; background: #fff; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0,0,0,.1); margin-bottom: 4px; }
.tpl-pick .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.tpl-pick a { color: var(--accent); }
@media (max-width: 560px) { .tpl-pick { grid-template-columns: repeat(2, 1fr); } }
.kfz-hero .btn:not(.primary) { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); }
.kfz-hero .btn:not(.primary):hover { background: rgba(255,255,255,.16); }

/* Videografie – helles Studio-Design */
body.theme-video { --bg: #f5f7fb; --card: #fff; --text: #19233b; --muted: #637087; --line: #e3e8f1; --soft: #f3f0fd; --radius: 14px;
  --side-bg: #fff; --side-text: #4c5a73; --side-hover: #f3f0fd; --side-line: #e3e8f1; --top-bg: rgba(255,255,255,.94); --input-line: #dfe4ee; --thead: #f6f8fb; --rowhover: #f8f7fe;
  --shadow: 0 4px 16px rgba(37,55,91,.05); }
body.theme-video .sidebar nav a { margin: 1px 4px; min-height: 40px; border-radius: 9px; font-weight: 550; }
body.theme-video .sidebar nav a.active { background: #eeeafd; color: #583bb6; }
body.theme-video .sidebar::after { content: ""; display: block; flex: none; height: 110px; margin: 12px 14px 0; border-radius: 12px;
  background: #1a1f2e url(video/klappe.jpg) center / cover no-repeat; }
body.theme-video .btn.primary { background: linear-gradient(105deg, #6546c5, #337fbe); border-color: transparent; }
body.theme-video .btn:not(.primary) { color: #583bb6; border-color: #ddd6f6; }
body.theme-video .btn.ghost { color: var(--text); }
body.theme-video .kpi { border: 1px solid var(--line); }
body.theme-video .kpi:nth-child(odd) { border-top: 3px solid #6546c5; }
body.theme-video .kpi:nth-child(even) { border-top: 3px solid #12a5c3; }
body.theme-video .qbtn { border: 1px solid #e6e1f8; background: #faf9ff; }
body.theme-video .qbtn .ic { color: #6546c5; }
body.theme-video .st-open { background: #efebfd; color: #583bb6; }
body.theme-video .st-paid, body.theme-video .st-done, body.theme-video .st-accepted { background: #e4f6ef; color: #1d7d57; }
.vd-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 190px;
  padding: 24px 30px; margin-bottom: 18px; border-radius: 18px; border: 1px solid #e2dcf5;
  background: linear-gradient(110deg, #fff 20%, #f0edff 75%, #dcf7fc); }
.vd-hero::after { content: ""; position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: 38%; background: url(video/studio.jpg) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 22%); }
.vd-hero > div { max-width: 60%; }
.vd-eyebrow { font-size: 11px; letter-spacing: .16em; color: #6546c5; font-weight: 750; }
.vd-hero h2 { font-size: clamp(24px, 2.5vw, 38px); letter-spacing: -.03em; margin: 8px 0 6px; color: #19233b; line-height: 1.12; }
.vd-hero p { margin: 0; color: #637087; }
.vd-hero .ph-logo { max-height: 80px; max-width: 160px; background: #fff; padding: 8px; border-radius: 12px; z-index: 1; }
@media (max-width: 650px) { .vd-hero > div { max-width: 100%; } .vd-hero::after { width: 100%; opacity: .14; -webkit-mask-image: none; mask-image: none; } }

/* ---------- Zeiterfassung ---------- */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.grid4 > * { min-width: 0; }
@media (max-width: 700px) { .grid4 { grid-template-columns: 1fr 1fr; } }
.spacer { flex: 1; }
.month-label { min-width: 120px; text-align: center; }
.clock-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-left: 4px solid var(--line); }
.clock-card.is-in { border-left-color: #12a150; }
.clock-card > div { display: flex; flex-direction: column; gap: 2px; }
.clock-state { font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.clock-state .ic { width: 18px; height: 18px; }
.clock-card.is-in .clock-state { color: #12813f; }
.clock-time { font-size: 2.2rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.clock-card.mini .clock-time { font-size: 1.6rem; }
.clock-btn { min-width: 150px; min-height: 52px; font-size: 1.05rem; justify-content: center; }
.clock-card.is-in .clock-btn { background: #b42318; border-color: #b42318; }
@media (max-width: 560px) { .clock-card form, .clock-btn { width: 100%; } }
.time-table td { vertical-align: top; }
.tchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; margin: 0 4px 4px 0; border-radius: 8px; background: var(--soft); color: var(--text); font-variant-numeric: tabular-nums; font-size: .88rem; text-decoration: none; border: 1px solid var(--line); }
a.tchip:hover { border-color: var(--accent); }
.tchip small { font-size: .68rem; color: var(--muted); }
.tchip.live { background: #e8f7ee; border-color: #b6e3c6; color: #12613a; }
.tchip.warn, .warnrow .tchip.warn { background: #fff5e6; border-color: #f2d19b; color: #8a5a00; }
.badge.good { background: #e8f7ee; color: #12613a; }
.badge.warn { background: #fff1db; color: #8a5a00; }
.howto { margin: 0; padding-left: 20px; line-height: 1.6; }
.howto li { margin-bottom: 6px; }
.tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.tag-card { display: flex; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--card); }
.tag-card.off { opacity: .6; }
.tag-qr { flex: none; background: #fff; border-radius: 10px; padding: 4px; align-self: flex-start; border: 1px solid var(--line); }
.tag-qr svg { display: block; width: 130px; height: 130px; }
.tag-body { flex: 1; min-width: 0; }
.tag-body .actions { flex-wrap: wrap; gap: 6px; }
@media (max-width: 520px) { .tag-grid { grid-template-columns: 1fr; } .tag-card { flex-direction: column; } .tag-qr { align-self: center; } }
.copyline { display: flex; gap: 6px; align-items: center; }
.copyline input { flex: 1; min-width: 0; font-size: .82rem; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { flex: 1; min-width: 180px; margin: 0; }
.module-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.module-row strong { display: inline-flex; gap: 8px; align-items: center; }
.module-row p { margin: 4px 0 0; }
.switch { position: relative; width: 50px; height: 30px; flex: none; margin: 0 !important; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #c9ced8; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Stempelseite (NFC/QR) */
.stamp-co { text-align: center; color: #637087; font-weight: 600; margin: -6px 0 14px; }
.stamp-res { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 16px; border-radius: 16px; background: #f3f5f9; margin-bottom: 14px; }
.stamp-res strong { font-size: 1.6rem; letter-spacing: -.02em; }
.stamp-res small { color: #637087; }
.stamp-res .stamp-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; font-weight: 700; color: #fff; background: #7b8496; }
.stamp-res.good { background: #e8f7ee; } .stamp-res.good .stamp-ic { background: #12a150; }
.stamp-res.good.out { background: #eef3fd; } .stamp-res.good.out .stamp-ic { background: #1f5fd1; }
.stamp-res.warn { background: #fff5e6; } .stamp-res.warn .stamp-ic { background: #e08a00; }
.stamp-res.bad { background: #fdeeee; }
.stamp-actions { display: flex; flex-direction: column; gap: 8px; }
.stamp-actions form { margin: 0; }
.stamp-forget { background: none; border: 0; color: #8a93a6; font-size: .8rem; text-decoration: underline; cursor: pointer; margin-top: 6px; width: 100%; }
/* Stempelterminal */
.terminal-body { margin: 0; min-height: 100vh; background: #0f1623; color: #fff; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; display: grid; place-items: center; }
.term { text-align: center; padding: 30px; max-width: 760px; width: 100%; }
.term-co { font-size: 1.2rem; color: #9aa4b8; margin: 0 0 10px; font-weight: 600; }
.term-clock { font-size: clamp(64px, 18vw, 150px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1; }
.term-date { color: #9aa4b8; font-size: 1.2rem; margin: 8px 0 34px; }
.term-start { font-size: 1.3rem; padding: 18px 34px; border-radius: 14px; border: 0; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; margin-bottom: 26px; }
.term-msg { font-size: clamp(20px, 4.5vw, 34px); font-weight: 700; padding: 26px; border-radius: 18px; background: #1b2436; transition: background .2s; }
.term-msg.ok { background: #12813f; } .term-msg.out { background: #1f5fd1; } .term-msg.bad { background: #b42318; }
.term-hint { color: #7c869a; margin-top: 20px; }
.table th.right, .table td.right { text-align: right; }

/* IT Solutions – hell mit dunkelblauer Seitenleiste */
body.theme-itsol { --bg: #f3f7fc; --card: #fff; --text: #102846; --muted: #536984; --line: #dce6f2; --soft: #eaf4fd; --radius: 14px;
  --side-bg: #0b2d52; --side-text: #dbe8f6; --side-hover: rgba(255,255,255,.08); --side-line: rgba(255,255,255,.12); --top-bg: rgba(243,247,252,.94);
  --input-line: #d3dfec; --thead: #f2f7fc; --rowhover: #f4f9fe; --shadow: 0 4px 16px rgba(16,40,70,.06); }
body.theme-itsol .sidebar { background: linear-gradient(160deg, #092642, #153d66); color: #fff; border-right: 0; }
body.theme-itsol .sidebar .brand, body.theme-itsol .sidebar .brand span { color: #fff; }
body.theme-itsol .sidebar .brand img { background: #fff; border-radius: 9px; padding: 3px; }
body.theme-itsol .sidebar nav a { color: #dbe8f6; border-radius: 9px; margin: 1px 4px; }
body.theme-itsol .sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
body.theme-itsol .sidebar nav a.active { background: linear-gradient(115deg, #007ac6, #00b5df); color: #fff; box-shadow: 0 0 14px rgba(0,200,255,.35); }
body.theme-itsol .sidebar select, body.theme-itsol .sidebar .btn { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
body.theme-itsol .sidebar select option { color: #102846; }
body.theme-itsol .sidebar hr, body.theme-itsol .sidebar .sep { border-color: rgba(255,255,255,.12); }
body.theme-itsol .sidebar::after { content: ""; display: block; flex: none; height: 150px; margin: 12px 0 0; background: url(itsol/chip.jpg) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%); mask-image: linear-gradient(180deg, transparent, #000 30%); }
body.theme-itsol .btn.primary { background: linear-gradient(105deg, #0078c2, #00a9dc); border-color: transparent; }
body.theme-itsol .btn:not(.primary) { color: #0b4f86; border-color: #cfe0f1; }
body.theme-itsol .btn.ghost { color: var(--text); }
body.theme-itsol .kpi { border: 1px solid var(--line); border-top: 3px solid #00a9dc; }
body.theme-itsol .kpi:nth-child(even) { border-top-color: #6a35d6; }
body.theme-itsol .qbtn { border: 1px solid #dce6f2; background: #fff; }
body.theme-itsol .qbtn .ic { color: #0089cf; }
body.theme-itsol .st-open { background: #e3f3fd; color: #0b5d94; }
body.theme-itsol .st-paid, body.theme-itsol .st-done, body.theme-itsol .st-accepted { background: #e4f6ef; color: #1d7d57; }
.its-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 180px;
  padding: 24px 32px; margin-bottom: 18px; border-radius: 18px; background: #0b2d52; color: #fff; }
.its-hero::after { content: ""; position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: 62%; background: url(itsol/workstation.jpg) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
.its-hero > div { max-width: 55%; }
.its-hero h2 { margin: 0 0 10px; font-size: clamp(24px, 2.6vw, 38px); line-height: 1.1; color: #fff; letter-spacing: -.02em; }
.its-badge { display: inline-block; padding: 5px 16px; border-radius: 99px; border: 1px solid #26bcf4; color: #7fdcff; font-style: italic; font-weight: 700; background: rgba(0,140,210,.15); box-shadow: 0 0 12px rgba(38,188,244,.3); }
.its-hero .ph-actions { margin-top: 14px; }
body .its-hero .btn:not(.primary), body.theme-itsol .its-hero .btn:not(.primary) { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); }
.its-hero .ph-logo { max-height: 80px; max-width: 160px; background: #fff; padding: 8px; border-radius: 12px; z-index: 1; }
@media (max-width: 650px) { .its-hero > div { max-width: 100%; } .its-hero::after { width: 100%; opacity: .25; -webkit-mask-image: none; mask-image: none; } }

/* ---------- v1.8 ---------- */
.pub-body { margin: 0; background: #f3f5f9; color: #1b2333; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.pub { max-width: 820px; margin: 0 auto; padding: 22px 16px 40px; }
.pub-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pub-head img { max-height: 56px; max-width: 160px; background: #fff; border-radius: 10px; padding: 6px; }
.pub-head strong { display: block; font-size: 1.2rem; }
.pub-head span { color: #637087; font-size: .88rem; }
.pub-card { background: #fff; border-radius: 16px; padding: 20px; margin-bottom: 14px; box-shadow: 0 6px 24px rgba(20,30,60,.06); border-top: 4px solid var(--accent); }
.pub-card h1 { margin: 2px 0; font-size: 1.6rem; }
.pub-card h2 { margin: 0 0 12px; font-size: 1.15rem; }
.pub-title { margin-top: 12px !important; }
.pub-sum { text-align: right; } @media (max-width: 560px) { .pub-sum { text-align: left; margin-top: 10px; } } .pub-sum strong { display: block; font-size: 1.8rem; color: var(--accent); }
.pub-foot { text-align: center; color: #8a93a6; font-size: .82rem; margin-top: 18px; }
.pub-foot a { color: inherit; }
.pay-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.pay-btns .btn { min-height: 50px; font-size: 1rem; flex: 1 1 220px; justify-content: center; }
.pub-bank { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: #f6f8fb; border-radius: 12px; padding: 14px; }
.sig-wrap { position: relative; border: 2px dashed #c9d0dc; border-radius: 12px; background: #fff; touch-action: none; }
.sig-wrap canvas { width: 100%; height: 160px; display: block; cursor: crosshair; touch-action: none; }
.sig-wrap .btn { position: absolute; right: 6px; top: 6px; }
.sig-img { max-width: 280px; max-height: 110px; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-top: 8px; }
.rec-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; margin-top: 10px; }
.rec-codes code { background: #fff; padding: 6px 8px; border-radius: 6px; text-align: center; font-size: .95rem; letter-spacing: .05em; }
.totp-setup { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.totp-key { font-size: .95rem; letter-spacing: .06em; word-break: break-all; }
.code-in { font-size: 1.4rem; letter-spacing: .3em; text-align: center; }
.badge.abs-vacation { background: #e3f2fd; color: #0b5d94; } .badge.abs-sick { background: #fdecec; color: #a3261f; }
.badge.abs-holiday { background: #efe9fb; color: #5b3bb0; } .badge.abs-other { background: #eef3e6; color: #46612a; } .badge.abs-unpaid { background: #f1f1f1; color: #555; }
.wd-pick label { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 2px; margin: 0 4px 0 0 !important; font-size: .82rem; font-weight: 500; }
.wd-pick input { width: auto; min-height: 0; }
.member-cfg .num-in { width: 70px; }
.stock-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.stock-box legend { font-weight: 600; padding: 0 6px; }
.bank-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bank-form select { max-width: 320px; min-height: 34px; }
.bank-table td { vertical-align: top; }
.time-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 760px) { .time-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rec-items input, .rec-items textarea { width: 100%; min-width: 0; }
.rec-items textarea { margin-top: 4px; font-size: .85rem; }
.einv-form { padding: 12px 16px; }
.kpi.good strong { color: #12813f; } .kpi.warn strong { color: #b45309; }
