/* Lieferscheinerfassung – übernimmt Schrift des Themes, eigene Farben nur für Status */
.lse {
	--lse-ink: #1f2933;
	--lse-muted: #616e7c;
	--lse-line: #d3d8de;
	--lse-soft: #f3f5f7;
	--lse-primary: #1d4e89;
	--lse-primary-ink: #fff;
	--lse-ok: #2f7d4f;
	--lse-ok-bg: #e9f5ee;
	--lse-warn: #8a5a00;
	--lse-warn-bg: #fff6df;
	--lse-err: #b42318;
	--lse-err-bg: #fdecea;
	color: var(--lse-ink);
	font-size: 16px;
	line-height: 1.45;
	max-width: 100%;
}
.lse *, .lse *::before, .lse *::after { box-sizing: border-box; }
.lse a { color: var(--lse-primary); }

/* Tabs */
.lse-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--lse-line); margin-bottom: 24px; overflow-x: auto; }
.lse-tab { padding: 10px 16px; text-decoration: none; color: var(--lse-muted) !important; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; font-weight: 600; }
.lse-tab:hover { color: var(--lse-ink) !important; }
.lse-tab.is-active { color: var(--lse-primary) !important; border-bottom-color: var(--lse-primary); }
.lse-badge { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 11px; background: var(--lse-warn-bg); color: var(--lse-warn); font-size: 13px; text-align: center; margin-left: 4px; }

.lse-h { font-size: 1.3em; margin: 0 0 8px; }
.lse-lead { color: var(--lse-muted); margin: 0 0 16px; max-width: 70ch; }
.lse-muted { color: var(--lse-muted); font-size: 14px; }
.lse-empty { padding: 24px; background: var(--lse-soft); border-radius: 6px; }

/* Buttons */
.lse-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--lse-line); border-radius: 6px; background: #fff; color: var(--lse-ink) !important; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.lse-btn:hover { border-color: var(--lse-ink); }
.lse-btn:focus-visible, .lse input:focus-visible, .lse select:focus-visible, .lse-tab:focus-visible, .lse-drop:focus-within { outline: 3px solid #f2b705; outline-offset: 2px; }
.lse-btn--primary { background: var(--lse-primary); border-color: var(--lse-primary); color: var(--lse-primary-ink) !important; }
.lse-btn--primary:hover { background: #163d6c; border-color: #163d6c; }
.lse-btn--ghost { background: transparent; }
.lse-btn--danger { background: transparent; color: var(--lse-err) !important; border-color: transparent; }
.lse-btn--danger:hover { background: var(--lse-err-bg); border-color: var(--lse-err-bg); }
.lse-btn--small { min-height: 36px; padding: 0 12px; font-size: 14px; }

/* Meldungen */
.lse-msg { padding: 12px 16px; border-radius: 6px; margin: 0 0 16px; border-left: 4px solid; }
.lse-msg p { margin: 0 0 4px; }
.lse-msg p:last-child { margin: 0; }
.lse-msg--ok { background: var(--lse-ok-bg); border-color: var(--lse-ok); }
.lse-msg--warn { background: var(--lse-warn-bg); border-color: #e0a800; color: var(--lse-warn); }
.lse-msg--error { background: var(--lse-err-bg); border-color: var(--lse-err); color: var(--lse-err); }

/* Upload */
.lse-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 160px; padding: 24px; border: 2px dashed var(--lse-line); border-radius: 8px; background: var(--lse-soft); cursor: pointer; text-align: center; }
.lse-drop.is-over { border-color: var(--lse-primary); background: #e8eff8; }
.lse-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lse-drop-title { font-weight: 700; font-size: 1.1em; color: var(--lse-primary); }
.lse-drop-sub { color: var(--lse-muted); }
.lse-queue { list-style: none; margin: 16px 0 0; padding: 0; }
.lse-q-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--lse-line); }
.lse-q-name { font-weight: 600; overflow-wrap: anywhere; }
.lse-q-status { font-size: 14px; color: var(--lse-muted); }
.lse-q-item.is-busy .lse-q-status { color: var(--lse-primary); }
.lse-q-item.is-ok .lse-q-status { color: var(--lse-ok); }
.lse-q-item.is-error .lse-q-status { color: var(--lse-err); }
.lse-q-result { grid-column: 1 / -1; font-size: 15px; }
.lse-q-result ul { margin: 4px 0 0; padding-left: 18px; }
.lse-q-result p { margin: 4px 0; color: var(--lse-err); }
.lse-q-hint { display: block; color: var(--lse-warn); font-size: 14px; }
.lse-done { margin-top: 20px; }

/* Tabellen */
.lse-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lse-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.lse-table th { text-align: left; font-size: 13px; color: var(--lse-muted); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--lse-line); white-space: nowrap; }
.lse-table td { padding: 10px; border-bottom: 1px solid var(--lse-line); vertical-align: middle; }
.lse-table--dense td { padding: 6px 10px; white-space: nowrap; }
.lse-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lse-table tr.is-error td:first-child { box-shadow: inset 3px 0 0 var(--lse-err); }
.lse-warn-dot { display: inline-block; min-width: 24px; padding: 2px 8px; border-radius: 12px; background: var(--lse-warn-bg); color: var(--lse-warn); font-weight: 700; font-size: 13px; text-align: center; cursor: help; }

/* Prüfmaske */
.lse-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.lse-preview { position: sticky; top: 16px; }
.lse-preview iframe, .lse-preview img { display: block; width: 100%; height: 78vh; border: 1px solid var(--lse-line); border-radius: 6px; background: var(--lse-soft); }
.lse-preview img { height: auto; max-height: 78vh; object-fit: contain; }
.lse-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lse-status { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 12px; white-space: nowrap; }
.lse-status--pruefen { background: var(--lse-warn-bg); color: var(--lse-warn); }
.lse-status--fehler { background: var(--lse-err-bg); color: var(--lse-err); }
.lse-status--freigegeben { background: var(--lse-ok-bg); color: var(--lse-ok); }

.lse-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.lse-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.lse-field > span { font-size: 14px; font-weight: 600; color: var(--lse-muted); }
.lse-field em { font-style: normal; font-weight: 400; color: var(--lse-err); margin-left: 4px; }
.lse input[type="text"], .lse input[type="date"], .lse input[type="search"], .lse select, .lse textarea {
	width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--lse-line); border-radius: 6px; background: #fff; color: var(--lse-ink); font: inherit; font-size: 16px; margin: 0;
}
.lse-field--code { grid-column: 1 / -1; padding: 12px; background: #e8eff8; border-radius: 6px; }
.lse-field--code > span { color: var(--lse-primary); }
.lse-field--code select { border-color: var(--lse-primary); font-weight: 600; }

.lse-pos { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.lse-pos legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.lse-pos-head, div.lse-pos-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 110px 40px; gap: 8px; align-items: center; }
.lse-pos-head { font-size: 13px; color: var(--lse-muted); font-weight: 600; margin-bottom: 4px; }
div.lse-pos-row { margin-bottom: 8px; }
.lse .lse-num { text-align: right; font-variant-numeric: tabular-nums; }
.lse-pos-del { width: 40px; height: 44px; border: 0; background: transparent; color: var(--lse-muted); font-size: 22px; cursor: pointer; border-radius: 6px; }
.lse-pos-del:hover { background: var(--lse-err-bg); color: var(--lse-err); }

.lse-rechnung { margin-top: 20px; border-top: 1px solid var(--lse-line); padding-top: 12px; }
.lse-rechnung summary { cursor: pointer; font-weight: 700; margin-bottom: 12px; }

.lse-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--lse-line); }
.lse-actions-spacer { flex: 1; }

/* Liste */
.lse-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.lse-filter { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-items: end; padding: 16px; background: var(--lse-soft); border-radius: 8px; margin-bottom: 16px; }
.lse-filter-actions { display: flex; gap: 8px; }
.lse-summary { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 12px; }
.lse-summary span { color: var(--lse-muted); }


/* Projekt-Umschalter */
.lse-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.lse-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15em; letter-spacing: 0.01em; color: var(--lse-ink); margin-right: auto; }
.lse-brand-logo, .lse-login-logo { display: inline-grid; place-items: center; background: var(--lse-primary); color: #fff; font-weight: 800; letter-spacing: 0.04em; border-radius: 8px; }
.lse-brand-logo { width: 40px; height: 32px; font-size: 13px; }
.lse-user { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.lse-user-name { color: var(--lse-muted); }
.lse-user-logout { font-weight: 600; text-decoration: none; padding: 6px 10px; border: 1px solid var(--lse-line); border-radius: 6px; }
.lse-user-logout:hover { border-color: var(--lse-ink); }
.lse-projektwahl { display: flex; align-items: center; gap: 8px; }
.lse-projektwahl label { font-size: 14px; font-weight: 600; color: var(--lse-muted); }
.lse .lse-projektwahl select { min-width: 260px; font-weight: 600; border-color: var(--lse-primary); }
.lse-projekt-leer { margin: 0; color: var(--lse-muted); }
.lse-table tr.is-current td { background: #e8eff8; }
.lse-row-actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.lse-row-actions form { margin: 0; }
.lse-narrow { max-width: 760px; }
.lse textarea { min-height: 0; resize: vertical; line-height: 1.4; }
.lse-field small { font-weight: 400; }
.lse-field--wide { grid-column: 1 / -1; }
.lse-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lse-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Art des Uploads */
.lse-typen { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lse-typ { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 14px 44px; border: 2px solid var(--lse-line); border-radius: 8px; cursor: pointer; background: #fff; }
.lse-typ input { position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; margin: 0; accent-color: var(--lse-primary); }
.lse-typ:has(input:checked) { border-color: var(--lse-primary); background: #e8eff8; }
.lse-typ:focus-within { outline: 3px solid #f2b705; outline-offset: 2px; }
.lse-typ-titel { font-weight: 700; }
.lse-typ-text { font-size: 14px; color: var(--lse-muted); line-height: 1.35; }

/* Positionstabelle AB/Rechnung */
.lse-pos--dok { margin-top: 28px; }
.lse-postable { border-collapse: collapse; width: 100%; min-width: 900px; }
.lse-postable th { text-align: left; font-size: 13px; color: var(--lse-muted); font-weight: 600; padding: 0 4px 6px; white-space: nowrap; }
.lse-postable th.num { text-align: right; }
.lse-postable td { padding: 3px 4px; vertical-align: middle; }
.lse .lse-postable input[type="text"], .lse .lse-postable select { min-height: 40px; padding: 6px 8px; font-size: 15px; }
.lse-w-xs { min-width: 70px; }
.lse-w-s { min-width: 90px; }
.lse-w-l { min-width: 200px; }
.lse-w-d { min-width: 150px; }

/* Abgleich */
.lse-abgleich { margin-top: 28px; padding: 20px; border: 1px solid var(--lse-line); border-radius: 8px; background: #fbfcfd; }
.lse-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0 16px; }
.lse-kpi { padding: 12px 14px; border-radius: 6px; background: var(--lse-soft); display: flex; flex-direction: column; gap: 2px; }
.lse-kpi span { font-size: 13px; color: var(--lse-muted); }
.lse-kpi strong { font-size: 1.25em; font-variant-numeric: tabular-nums; }
.lse-kpi.is-warn { background: var(--lse-warn-bg); }
.lse-kpi.is-warn strong { color: var(--lse-warn); }
.lse-table--abgleich th.lse-group { text-align: center; border-bottom: 1px solid var(--lse-line); }
.lse-table--abgleich td { white-space: normal; }
.lse-chip { display: inline-block; padding: 2px 9px; border-radius: 11px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.lse-chip--ok { background: var(--lse-ok-bg); color: var(--lse-ok); }
.lse-chip--warn { background: var(--lse-warn-bg); color: var(--lse-warn); }
.lse-chip--info { background: #e8eff8; color: var(--lse-primary); }
.lse-chip--neutral { background: var(--lse-soft); color: var(--lse-muted); }

@media (max-width: 700px) {
	.lse-kpis { grid-template-columns: 1fr; }
	.lse-abgleich { padding: 14px; }
}

/* Lieferanten */
.lse-suche { display: flex; gap: 8px; margin-bottom: 16px; max-width: 560px; }
.lse .lse-suche input[type="search"] { flex: 1; font-size: 17px; }
.lse-table tr.is-leer td { color: var(--lse-muted); }
.lse-table tr.is-leer td a { color: var(--lse-muted); }
.lse-neu { margin-top: 20px; }
.lse-neu summary { cursor: pointer; font-weight: 700; color: var(--lse-primary); }
.lse-inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 12px 0 8px; }
.lse-inline-form .lse-field { flex: 1 1 280px; }
.lse-crumb { margin: 0 0 8px; font-size: 14px; }
.lse-crumb a { text-decoration: none; }
.lse-h--gross { font-size: 1.6em; margin: 0; }
.lse-block { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--lse-line); }
.lse .lse-pos-filter { max-width: 320px; margin-bottom: 10px; }
.lse-actions--compact { margin-top: 12px; padding-top: 0; border-top: 0; }
.lse-herkunft { font-size: 13px; color: var(--lse-muted); min-width: 170px; }
.lse-herkunft--rechnung { color: var(--lse-warn); }
.lse-w-m { min-width: 150px; }
.lse-upload-lief { margin-top: 16px; }
.lse-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; cursor: pointer; }
.lse-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--lse-primary); flex: none; }
.lse-drop--klein { min-height: 110px; }
.lse-msg--info { background: #e8eff8; border-color: var(--lse-primary); color: var(--lse-ink); }
.lse-bestaetigen { padding: 14px 16px; margin-bottom: 14px; border-radius: 6px; background: var(--lse-warn-bg); }
.lse-bestaetigen p { margin: 0 0 10px; }
.lse-bestaetigen p:last-child { margin: 0; }
.lse-btn--confirm { margin-top: 6px; border-color: var(--lse-warn); color: var(--lse-warn) !important; }
.lse-btn--confirm:hover { background: var(--lse-warn-bg); border-color: var(--lse-warn); }
.lse-status--abgelegt { background: var(--lse-soft); color: var(--lse-muted); }

/* App-Fenster (ohne Website-Design) */
html:has(body.lse-app-body) { background: #eef1f4; }
body.lse-app-body { margin: 0; min-height: 100vh; background: #eef1f4; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.lse-app { padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.lse-app > .lse:not(.lse-login) { max-width: 1440px; margin: 0 auto; background: #fff; border-radius: 12px; padding: 16px 24px 32px; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08); }

/* Anmeldebildschirm */
.lse-login { min-height: calc(100vh - 48px); display: grid; place-items: center; padding: 24px 0; }
.lse-login-karte { width: 100%; max-width: 400px; background: #fff; border-radius: 14px; padding: 36px 32px 24px; box-shadow: 0 10px 30px rgba(16, 24, 40, 0.10), 0 1px 3px rgba(16, 24, 40, 0.08); }
.lse-login-kopf { text-align: center; margin-bottom: 24px; }
.lse-login-logo { width: 64px; height: 52px; font-size: 20px; border-radius: 12px; margin-bottom: 14px; }
.lse-login-titel { font-size: 1.6em; margin: 0; line-height: 1.2; color: var(--lse-ink); }
.lse-login-sub { margin: 6px 0 0; color: var(--lse-muted); font-size: 15px; }
.lse-login-form { display: flex; flex-direction: column; gap: 16px; }
.lse .lse-login-form input[type="text"], .lse .lse-login-form input[type="password"] { min-height: 48px; font-size: 17px; }
.lse-pw { position: relative; display: block; }
.lse .lse-pw input { padding-right: 96px; width: 100%; min-height: 48px; padding-left: 10px; border: 1px solid var(--lse-line); border-radius: 6px; font: inherit; font-size: 17px; }
.lse-pw-zeigen { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--lse-primary); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 10px; cursor: pointer; border-radius: 4px; }
.lse-btn--block { width: 100%; min-height: 50px; font-size: 17px; }
.lse-login-fuss { text-align: center; margin: 20px 0 0; font-size: 14px; }
.lse-login .lse-msg { margin-bottom: 16px; }

/* Benutzerverwaltung */
.lse-subnav { display: flex; gap: 6px; margin: 0 0 16px; padding: 4px; background: var(--lse-soft); border-radius: 8px; width: fit-content; max-width: 100%; overflow-x: auto; }
.lse-subnav a { padding: 8px 14px; border-radius: 6px; text-decoration: none; font-weight: 600; color: var(--lse-muted); white-space: nowrap; }
.lse-subnav a.is-active { background: #fff; color: var(--lse-primary); box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.lse-table tr.is-gesperrt td { color: var(--lse-muted); }
.lse-projekte-zelle { max-width: 280px; white-space: normal !important; font-size: 14px; }
.lse-projekt-wahl, .lse-pw-wahl { border: 1px solid var(--lse-line); border-radius: 8px; padding: 14px 16px 6px; margin: 20px 0 0; min-width: 0; }
.lse-projekt-wahl legend, .lse-pw-wahl legend { font-weight: 700; padding: 0 6px; }
.lse-projekt-wahl > p { margin: 0 0 10px; }
.lse-projekt-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--lse-line); }
.lse-check--stark span { font-weight: 600; }
.lse-check input:disabled + span { color: var(--lse-muted); }
.lse-pw-setzen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 12px 28px; }
.lse-pw-setzen .lse-pw, .lse-karte .lse-pw { flex: 1 1 260px; max-width: 360px; }
.lse-pw-optionen { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.lse-karte { border: 1px solid var(--lse-line); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.lse-karte p { margin: 0; }
.lse-karte .lse-pw { width: 100%; max-width: none; }
.lse-link-btn { border: 0; background: none; padding: 4px 0; color: var(--lse-primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.lse-pw-hinweis { font-size: 13px; }
.lse-btn--outline { border-color: var(--lse-err) !important; }

/* Projektzuweisung (Personen × Projekte) */
.lse-matrix th, .lse-matrix td { text-align: center; }
.lse-matrix th:first-child, .lse-matrix td:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; min-width: 180px; }
.lse-matrix-projekt { vertical-align: bottom; min-width: 90px; max-width: 140px; white-space: normal !important; line-height: 1.25; }
.lse-matrix-alle { background: #f6f8fb; }
.lse-matrix input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--lse-primary); cursor: pointer; }
.lse-matrix input:disabled { cursor: default; }
.lse-matrix tbody tr:hover td { background: #f8fafc; }
.lse-matrix tbody tr:hover td:first-child { background: #f8fafc; }

@media (max-width: 900px) {
	.lse-split { grid-template-columns: 1fr; }
	.lse-preview { position: static; }
	.lse-preview iframe { height: 60vh; }
}
@media (max-width: 560px) {
	.lse-grid { grid-template-columns: 1fr; }
	.lse-pos-head { display: none; }
	div.lse-pos-row { grid-template-columns: minmax(0, 1fr) 80px 40px; }
	div.lse-pos-row input[name="pos_beschrieb[]"] { grid-column: 1 / -1; }
	.lse-typen { grid-template-columns: 1fr; }
	.lse-top { justify-content: stretch; }
	.lse-app { padding-left: 8px; padding-right: 8px; }
	.lse-app > .lse:not(.lse-login) { padding: 12px 12px 24px; border-radius: 8px; }
	.lse-login-karte { padding: 28px 20px 20px; }
	.lse-user-name { display: none; }
	.lse-user { order: 2; }
	.lse-projektwahl { order: 3; }
	.lse-projektwahl { width: 100%; }
	.lse-actions .lse-btn { flex: 1 1 auto; }
	.lse-actions-spacer { display: none; }
}

/* =====================================================================
   Schlichtes Design: Logo als einziges Gestaltungselement, sonst Blau,
   Weiss und helles Grau
   ===================================================================== */
.lse {
	--lse-ink: #1f2933;
	--lse-muted: #5f6b7a;
	--lse-line: #dde2e8;
	--lse-soft: #f4f6f9;
	--lse-primary: #1d4e89;
	--lse-hell: #eaf0f7;
}
.lse input[type="email"] { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--lse-line); border-radius: 6px; background: #fff; color: var(--lse-ink); font: inherit; font-size: 16px; margin: 0; }

/* Kopfzeile mit Logo */
.lse .lse-top { padding-bottom: 12px; }
.lse .lse-brand { gap: 12px; align-items: flex-end; text-decoration: none; color: inherit; }
.lse .lse-brand-mark { height: 44px; width: auto; display: block; }
.lse .lse-brand-wort { height: 16px; width: auto; display: block; }
.lse .lse-tab.is-active { color: var(--lse-primary) !important; border-bottom-color: var(--lse-primary); }
.lse .lse-typ:has(input:checked) { border-color: var(--lse-primary); background: var(--lse-hell); }

/* App-Fenster */
html:has(body.lse-app-body), body.lse-app-body { background: var(--lse-soft, #f4f6f9); }
body.lse-app-body { background: #f4f6f9; }

/* Anmeldebildschirm: nur das Logo */
.lse .lse-login-karte { padding: 40px 36px 28px; border-radius: 10px; box-shadow: 0 8px 28px rgba(16, 24, 40, 0.08), 0 1px 3px rgba(16, 24, 40, 0.06); }
.lse .lse-login-kopf { margin-bottom: 28px; }
.lse .lse-login-titel { margin: 0; line-height: 0; }
.lse img.lse-login-logo { width: 100%; max-width: 260px; height: auto; display: inline-block; background: none; border-radius: 0; margin: 0; }

/* Reiter «Daten» */
.lse-intro { max-width: 80ch; margin: -4px 0 18px; }
.lse-daten-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.lse-daten-karte { border: 1px solid var(--lse-line); border-radius: 8px; padding: 16px 18px 14px; margin: 0; min-width: 0; background: #fff; }
.lse-daten-karte legend { font-weight: 700; padding: 0 6px; display: flex; align-items: center; gap: 8px; }
.lse-daten-karte > p { margin: 0 0 12px; font-size: 14px; }
.lse-zahl { display: inline-block; min-width: 24px; padding: 1px 8px; border-radius: 11px; background: var(--lse-hell); color: var(--lse-primary); font-size: 13px; text-align: center; }
.lse-daten-liste { max-height: 420px; overflow-y: auto; margin-bottom: 8px; padding-right: 2px; }
.lse .lse-daten-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; gap: 8px; align-items: center; margin-bottom: 6px; }
.lse .lse-daten-zeile input[type="text"] { min-height: 40px; padding: 6px 10px; font-size: 15px; }
.lse-verwendet { font-size: 12px; color: var(--lse-muted); min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.lse-hinweis { display: block; font-size: 13px; color: var(--lse-muted); margin-top: 4px; }
.lse-aufnehmen { margin: 6px 0 0; font-size: 14px; }
.lse-aufnehmen span { color: var(--lse-primary); font-weight: 600; }

/* Anmeldung: Code-Schritt und Registrierung */
.lse input[type="tel"] { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--lse-line); border-radius: 6px; background: #fff; color: var(--lse-ink); font: inherit; font-size: 16px; margin: 0; }
.lse .lse-login-form input[type="email"], .lse .lse-login-form input[type="tel"] { min-height: 48px; font-size: 17px; }
.lse-login-h { font-size: 1.15em; margin: 0 0 6px; color: var(--lse-ink); }
.lse-login-schritt > p.lse-muted { margin: 0 0 16px; font-size: 15px; }
.lse .lse-code-feld { text-align: center; font-size: 28px !important; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; font-weight: 700; min-height: 60px !important; }
.lse-login-fuss--zeile { display: flex; justify-content: space-between; gap: 12px; }
.lse-login-fuss--zeile form { margin: 0; }
.lse-grid--login { gap: 12px; }
.lse-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.lse-login-trenner { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--lse-muted); font-size: 13px; }
.lse-login-trenner::before, .lse-login-trenner::after { content: ""; flex: 1; height: 1px; background: var(--lse-line); }
.lse .lse-btn--ghost-blau { background: #fff; border-color: var(--lse-primary); color: var(--lse-primary) !important; text-decoration: none; }
.lse .lse-btn--ghost-blau:hover { background: var(--lse-hell); }
.lse-login .lse-check { font-size: 14px; line-height: 1.4; }
.lse-login .lse-check a { color: var(--lse-primary); }

/* Benutzerverwaltung: offene Anträge, Zwei-Faktor */
.lse-antraege { border: 1px solid var(--lse-primary); border-radius: 8px; padding: 14px 16px; margin-bottom: 22px; background: var(--lse-hell); }
.lse-antraege .lse-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--lse-primary); }
.lse-antraege .lse-table { background: #fff; }
.lse-zeile-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; }
.lse-zeile-knoepfe form { margin: 0; }
.lse .lse-drop--polier { min-height: 200px; border-color: var(--lse-primary); background: var(--lse-hell); }
.lse .lse-drop--polier .lse-drop-title { font-size: 1.25em; }
.lse-kopf-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lse-kopf-knoepfe form { margin: 0; }
.lse .lse-h--klein { font-size: 1em; margin: 22px 0 6px; }
.lse-table tfoot td { border-top: 2px solid var(--lse-line); border-bottom: 0; padding-top: 10px; }

@media (max-width: 900px) {
	.lse-daten-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.lse .lse-brand-mark { height: 34px; }
	.lse .lse-brand-wort { height: 13px; }
	.lse .lse-login-karte { padding: 30px 20px 22px; }
}

/* =====================================================================
   Kamera-Scanner (Vollbild)
   ===================================================================== */
html.lse-scan-offen, html.lse-scan-offen body { overflow: hidden; }
.lse-scan { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; z-index: 100000; background: #000; color: #fff; display: flex; flex-direction: column; }
.lse-scan[hidden], .lse-scan [hidden] { display: none !important; }
.lse-scan-kamera { position: relative; flex: 1; overflow: hidden; }
.lse-scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.lse-scan-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lse-scan-oben { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 14px 12px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.lse-scan-seite { font-weight: 700; font-size: 15px; }
.lse-scan-rund { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.lse-scan-unten { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 16px calc(env(safe-area-inset-bottom, 0px) + 40px); background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.lse-scan-hinweis { background: rgba(0,0,0,.6); padding: 8px 14px; border-radius: 18px; font-size: 15px; font-weight: 600; text-align: center; max-width: 92%; }
.lse-scan-fortschritt { width: 180px; height: 4px; background: rgba(255,255,255,.25); border-radius: 2px; overflow: hidden; }
.lse-scan-fortschritt span { display: block; height: 100%; width: 0; background: #2ea05a; transition: width .1s linear; }
.lse-scan-ausloeser { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; }
.lse-scan-ausloeser:active { background: #fff; }
.lse-scan-tipp { font-size: 12px; opacity: .8; text-align: center; }
.lse-scan-blitz { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.lse-scan-blitz.an { animation: lse-blitz .35s ease-out; }
@keyframes lse-blitz { from { opacity: .85; } to { opacity: 0; } }
.lse-scan-pruefen { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #1b1f24; padding: max(14px, env(safe-area-inset-top)) 12px calc(env(safe-area-inset-bottom, 0px) + 16px); gap: 14px; }
.lse-scan-frage { flex: none; display: flex; flex-direction: column; gap: 10px; }
.lse-scan-bild { flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: center; overflow: auto; }
.lse-scan-bild img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; box-shadow: 0 4px 20px rgba(0,0,0,.5); }
.lse-scan-info { text-align: center; font-size: 16px; line-height: 1.4; }
.lse-scan-info span { display: block; font-size: 13px; opacity: .7; margin-top: 2px; }
.lse-scan-aktionen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lse-scan-aktionen .lse-btn { min-height: 52px; font-size: 16px; }
.lse-scan-aktionen [data-a="fertig"] { grid-column: 1 / -1; }
.lse-scan-aktionen [data-a="fertig"] { order: -1; }

/* Knopf «Lieferschein fotografieren» */
.lse .lse-kamera-btn { width: 100%; min-height: 60px; font-size: 18px; margin-bottom: 12px; gap: 10px; }
.lse .lse-kamera-btn svg { width: 24px; height: 24px; }
.lse-oder { text-align: center; color: var(--lse-muted); font-size: 14px; margin: 0 0 12px; }
