/* LenaX Guard · Eltern-Übersicht */
.lg {
	--lg-bg: #f6f7f9; --lg-card: #ffffff; --lg-ink: #1b1f24; --lg-ink2: #5a636d; --lg-line: #e2e6ea;
	--lg-accent: #1f6f8b; --lg-accent-ink: #ffffff;
	--lg-s1: #d6ecf3; --lg-s2: #a9d6e6; --lg-s3: #6fb7cf; --lg-s4: #3a93b0; --lg-s5: #1f6f8b; --lg-s0: #eef1f4;
	--lg-warn-bg: #fff4e0; --lg-warn-ink: #8a5200; --lg-danger: #b3261e;
	max-width: 980px; margin: 0 auto; padding: 16px; color: var(--lg-ink); background: var(--lg-bg); border-radius: 16px;
	font-size: 16px; line-height: 1.45; box-sizing: border-box;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .lg {
		--lg-bg: #14171a; --lg-card: #1d2125; --lg-ink: #eef1f4; --lg-ink2: #a3acb5; --lg-line: #2e343a;
		--lg-s0: #252a30; --lg-s1: #17394a; --lg-s2: #1d5368; --lg-s3: #2a7795; --lg-s4: #4aa3c2; --lg-s5: #8fd0e6;
		--lg-warn-bg: #3a2c12; --lg-warn-ink: #f3c27a;
	}
}
.lg *, .lg *::before, .lg *::after { box-sizing: border-box; }
.lg h1 { margin: 0; font-size: 1.6rem; }
.lg h2 { margin: 0 0 4px; font-size: 1.1rem; }
.lg-muted { color: var(--lg-ink2); font-size: .9rem; }
.lg-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.lg-head p { margin: 2px 0 0; }
.lg-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.lg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-chip, .lg-seg__b, .lg-btn { font: inherit; cursor: pointer; border: 1px solid var(--lg-line); background: var(--lg-card); color: var(--lg-ink); border-radius: 999px; padding: 7px 14px; min-height: 40px; }
.lg-chip.is-on, .lg-seg__b.is-on, .lg-btn--primary { background: var(--lg-accent); border-color: var(--lg-accent); color: var(--lg-accent-ink); }
.lg-chip--add { border-style: dashed; }
.lg-seg { display: inline-flex; gap: 4px; }
.lg-btn { border-radius: 10px; }
.lg-btn--danger { color: var(--lg-danger); }
.lg-status { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 12px; font-size: .95rem; }
.lg-status.is-late { background: var(--lg-warn-bg); color: var(--lg-warn-ink); padding: 8px 12px; border-radius: 10px; }
.lg-hint { font-size: .9rem; color: var(--lg-ink2); margin: -6px 0 12px; }
.lg-card { background: var(--lg-card); border: 1px solid var(--lg-line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.lg-card__sub { margin: 0 0 12px; }
.lg-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 6px 0 12px; }
.lg-hero strong { font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Balken pro Tag: dünne Balken, abgerundetes Ende, Grundlinie unten */
.lg-days { display: flex; align-items: stretch; gap: 6px; height: 170px; }
.lg-day { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.lg-day__bar { width: min(28px, 70%); background: var(--lg-s3); border-radius: 4px 4px 0 0; }
.lg-day.is-today .lg-day__bar { background: var(--lg-s5); }
.lg-day__v { font-size: .72rem; color: var(--lg-ink2); white-space: nowrap; margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.lg-day__l { font-size: .78rem; color: var(--lg-ink2); margin-top: 4px; border-top: 1px solid var(--lg-line); width: 100%; text-align: center; padding-top: 3px; min-height: 1.4em; }
.lg-day.is-today .lg-day__l { color: var(--lg-ink); font-weight: 600; }
.lg-days--many { gap: 2px; }

/* Apps */
.lg-apps { list-style: none; margin: 0; padding: 0; }
.lg-apps li { display: grid; grid-template-columns: minmax(90px, 200px) 1fr auto 38px; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--lg-line); }
.lg-apps li:last-child { border-bottom: 0; }
.lg-apps__l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-apps__bar { height: 10px; background: var(--lg-s0); border-radius: 4px; overflow: hidden; }
.lg-apps__bar span { display: block; height: 100%; background: var(--lg-s4); border-radius: 0 4px 4px 0; }
.lg-apps__v { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.lg-apps__n { text-align: right; }

/* Stunden-Raster */
.lg-grid { display: grid; grid-template-columns: 52px repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; }
.lg-grid__h { font-size: .7rem; color: var(--lg-ink2); }
.lg-grid__d { font-size: .75rem; color: var(--lg-ink2); white-space: nowrap; }
.lg-grid__c { display: block; aspect-ratio: 1 / 1; min-height: 8px; max-height: 26px; border-radius: 3px; background: var(--lg-s0); }
.lg-l1 { background: var(--lg-s1); } .lg-l2 { background: var(--lg-s2); } .lg-l3 { background: var(--lg-s3); } .lg-l4 { background: var(--lg-s4); } .lg-l5 { background: var(--lg-s5); }
.lg-legend { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.lg-legend .lg-grid__c { width: 16px; height: 16px; }

.lg-list { margin: 0; padding-left: 1.1em; }
.lg-list li { margin: 3px 0; }
.lg-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lg-input { font: inherit; padding: 8px 10px; border: 1px solid var(--lg-line); border-radius: 10px; background: var(--lg-card); color: var(--lg-ink); min-width: 0; flex: 1 1 200px; }
.lg-steps { padding-left: 1.3em; margin: 6px 0 12px; }
.lg-steps li { margin-bottom: 10px; }
.lg-code { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 8px; }
.lg-code__n { font-size: 2.2rem; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.lg-err { color: var(--lg-danger); }
.lg--gate { text-align: center; padding: 40px 16px; }

@media (max-width: 560px) {
	.lg { padding: 10px; border-radius: 0; }
	.lg-apps li { grid-template-columns: minmax(70px, 1fr) 1fr auto; }
	.lg-apps__n { display: none; }
	.lg-grid { grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 1px; }
	.lg-grid__c { border-radius: 2px; }
	.lg-days { height: 140px; gap: 3px; }
}

/* ---------- Regeln und Anfragen (0.2.0) ---------- */
.lg-guard { font-size: .85rem; padding: 1px 10px; border-radius: 999px; }
.lg-guard.is-on { background: #e3f4ea; color: #1e6b3c; }
.lg-guard.is-off { background: var(--lg-warn-bg); color: var(--lg-warn-ink); }
.lg-card--req { border-color: var(--lg-accent); box-shadow: 0 0 0 2px rgba(31,111,139,.15); }
.lg-req { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--lg-line); }
.lg-req:last-child { border-bottom: 0; }
.lg-form { display: grid; gap: 12px; margin-bottom: 8px; }
.lg-field { display: grid; gap: 4px; }
.lg-check { display: flex; gap: 6px; align-items: flex-start; }
.lg-check input { margin-top: 4px; width: 18px; height: 18px; }
.lg-input--sel { flex: 0 0 auto; min-width: 140px; }
.lg-input--time { flex: 0 0 auto; width: 110px; }
.lg-input--min { flex: 0 0 auto; width: 76px; }
.lg-h3 { font-size: 1rem; margin: 14px 0 6px; }
.lg-rules__row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--lg-line); }
.lg-rules__l { flex: 1 1 140px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-row--end { justify-content: flex-end; margin-top: 12px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lg-guard.is-on { background: #183826; color: #9be0b4; } }

/* ---------- Netzfilter (0.3.0) ---------- */
.lg-input--area { width: 100%; font-size: .9rem; resize: vertical; }
.lg-net { padding: 4px 0 4px 26px; }
.lg-apps__bar--x span { background: #c25b4a; }

/* ---------- Logo und Schutzstand (0.3.1) ---------- */
.lg-head { justify-content: flex-start; align-items: center; gap: 14px; }
.lg-mark { width: 56px; height: 56px; flex: 0 0 auto; }
.lg-state { margin: 0; font-weight: 700; font-size: 1.15rem; }
.lg-head--ok .lg-state { color: #128a59; }
.lg-head--observe .lg-state { color: #2b6fd0; }
.lg-head--warn .lg-state { color: #b26d00; }
.lg-head--off .lg-state { color: #c7353a; }
.lg-head--offline .lg-state { color: #5d6875; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lg-head--ok .lg-state { color: #7cf0b8; } :root:not([data-theme="light"]) .lg-head--warn .lg-state { color: #ffd585; } :root:not([data-theme="light"]) .lg-head--off .lg-state { color: #ff9ea1; } :root:not([data-theme="light"]) .lg-head--observe .lg-state { color: #9cc6ff; } :root:not([data-theme="light"]) .lg-head--offline .lg-state { color: #c9d0d8; } }

/* Seite Sicherheit (inc/security.php) */
.lg--doc { max-width: 720px; margin: 0 auto; }
.lg--doc h2 { margin-top: 1.6em; font-size: 1.2rem; }
.lg--doc p { line-height: 1.6; }

/* Einstieg ohne Anmeldung */
.lg--gate { max-width: 720px; }
.lg--gate h2 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
.lg-steps { padding-left: 1.3em; line-height: 1.6; }
.lg-steps li { margin: .3em 0; }

/* Empfehlung je App */
.lg-reco { display: flex; align-items: center; gap: 10px; margin: -2px 0 8px; padding: 4px 10px; font-size: .86rem; color: var(--lg-ink2); background: var(--lg-s0); border-radius: 8px; }
.lg-reco.is-same { opacity: .65; }
.lg-reco .lg-btn--small { min-height: 30px; padding: 3px 10px; font-size: .85rem; margin-left: auto; }

/* Wissen über die Person ([075] Etappe B) */
.lg-kdocs { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--lg-line); }
.lg-h4 { margin: 0 0 4px; font-size: 1rem; }
.lg-kdocs__list { list-style: none; padding: 0; margin: 8px 0; }
.lg-kdocs__list li { padding: 6px 0; border-bottom: 1px solid var(--lg-line); font-size: .92rem; }

/* Was Metrux gehört hat ([075] Etappe C) */
.lg-heard summary { cursor: pointer; }
.lg-heard__row { display: grid; grid-template-columns: minmax(120px, 1.2fr) 1fr minmax(150px, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--lg-line); font-size: .9rem; }
.lg-heard__h { font-weight: 600; }
@media (max-width: 640px) { .lg-heard__row { grid-template-columns: 1fr; } }

/* Verhalten je Gefahr, Ausnahmen, Risiko-Register ([070]) */
.lg-areas { display: grid; gap: 2px; margin: 4px 0 10px; }
.lg-area { display: grid; grid-template-columns: minmax(160px, 1.4fr) repeat(3, minmax(110px, 1fr)); gap: 6px 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--lg-line); }
.lg-area__l { font-weight: 600; }
.lg-area__why { grid-column: 1 / -1; margin: 0; font-size: .86rem; color: var(--lg-ink2); }
.lg-area__why:empty { display: none; }
.lg-area__why.is-low { color: #8a5a00; }
.lg-area__why.is-base { color: #a3262b; font-weight: 600; }
.lg-input--small { padding: 6px 8px; font-size: .9rem; }
.lg-riskbox:empty { display: none; }
.lg-risk { border: 1px solid var(--lg-line); border-left: 4px solid #d4a017; border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.lg-risk.is-base { border-left-color: #c0392b; }
.lg-risk p { margin: 0 0 6px; }
.lg-exc { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.lg-exc .lg-btn--small, .lg-list .lg-btn--small { min-height: 30px; padding: 3px 10px; font-size: .85rem; }
.lg-ok { color: #1a7f4b; font-size: .88rem; }
.lg-chan { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: .9rem; background: var(--lg-s0, #eef2f5); }
.lg-chan--green { background: #dff5e9; color: #145c38; }
.lg-chan--blue { background: #e1ecfb; color: #1c4a8a; }
.lg-chan--red { background: #fde3e3; color: #8a1c1c; }
.lg-ev { display: inline-block; min-width: 9em; font-size: .8rem; font-weight: 600; padding: 1px 8px; border-radius: 6px; background: var(--lg-s0, #eef2f5); }
.lg-ev--block { background: #fde3e3; color: #8a1c1c; }
.lg-ev--warn, .lg-ev--proceed { background: #fff1cc; color: #6b4a00; }
.lg-events li { padding: 5px 0; border-bottom: 1px solid var(--lg-line); }
.lg-acc summary { cursor: pointer; font-weight: 600; margin-top: 12px; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .lg-area__why.is-low { color: #ffd585; }
	:root:not([data-theme="light"]) .lg-area__why.is-base { color: #ff9ea1; }
	:root:not([data-theme="light"]) .lg-chan--green { background: #173a29; color: #7cf0b8; }
	:root:not([data-theme="light"]) .lg-chan--blue { background: #172a45; color: #9cc6ff; }
	:root:not([data-theme="light"]) .lg-chan--red, :root:not([data-theme="light"]) .lg-ev--block { background: #45191b; color: #ff9ea1; }
	:root:not([data-theme="light"]) .lg-ev--warn, :root:not([data-theme="light"]) .lg-ev--proceed { background: #3d3216; color: #ffd585; }
	:root:not([data-theme="light"]) .lg-ok { color: #7cf0b8; }
}
/* Sicherheits-Check ([080]) */
.lg-dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: 6px; vertical-align: baseline; background: #8a939c; }
.lg-dot--green { background: #1f9d5c; }
.lg-dot--yellow { background: #d4a017; }
.lg-dot--red { background: #c0392b; }
.lg-light { padding: 8px 12px; border-radius: 10px; background: var(--lg-s0, #eef2f5); }
.lg-light--green { background: #dff5e9; color: #145c38; }
.lg-light--yellow { background: #fff1cc; color: #6b4a00; }
.lg-light--red { background: #fde3e3; color: #8a1c1c; }
.lg-checks li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--lg-line); }
.lg-check__t { flex: 1 1 18em; min-width: 0; overflow-wrap: anywhere; }
.lg-check__list, .lg-check__why { flex: 1 1 100%; font-size: .9rem; overflow-wrap: anywhere; }
.lg-check__why { color: var(--lg-muted, #5a636d); }
.lg-st { flex: 0 0 auto; min-width: 8.5em; font-size: .8rem; font-weight: 600; padding: 1px 8px; border-radius: 6px; text-align: center; background: var(--lg-s0, #eef2f5); }
.lg-st--ok { background: #dff5e9; color: #145c38; }
.lg-st--risk { background: #e1ecfb; color: #1c4a8a; }
.lg-st--fail { background: #fde3e3; color: #8a1c1c; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .lg-light--green, :root:not([data-theme="light"]) .lg-st--ok { background: #173a29; color: #7cf0b8; }
	:root:not([data-theme="light"]) .lg-light--yellow { background: #3d3216; color: #ffd585; }
	:root:not([data-theme="light"]) .lg-light--red, :root:not([data-theme="light"]) .lg-st--fail { background: #45191b; color: #ff9ea1; }
	:root:not([data-theme="light"]) .lg-st--risk { background: #172a45; color: #9cc6ff; }
}
@media (max-width: 640px) { .lg-area { grid-template-columns: 1fr 1fr; } .lg-area__l { grid-column: 1 / -1; } }

/* Labor-Protokoll ([057]) */
.lg-sub { margin: 4px 0 6px 26px; }
.lg-labfilter { flex-wrap: wrap; margin: 8px 0; }
.lg-labfilter .lg-input--sel { max-width: 100%; }
.lg-link { font: inherit; background: none; border: 0; padding: 0; color: var(--lg-accent); cursor: pointer; text-decoration: underline; }
.lg-labapps li { padding: 3px 0; }
.lg-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.lg-shot { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.lg-shot img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--lg-line); background: var(--lg-s0); }
.lg-tablewrap { overflow-x: auto; max-width: 100%; }
.lg-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.lg-table th { text-align: left; font-weight: 600; color: var(--lg-ink2); border-bottom: 1px solid var(--lg-line); padding: 6px 8px 6px 0; }
.lg-table td { border-bottom: 1px solid var(--lg-line); padding: 5px 8px 5px 0; vertical-align: top; }
.lg-nowrap { white-space: nowrap; }
.lg-labtxt { overflow-wrap: anywhere; min-width: 160px; }
@media (max-width: 600px) {
	.lg-table thead { display: none; }
	.lg-table tr { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; border-bottom: 1px solid var(--lg-line); padding: 6px 0; }
	.lg-table td { border: 0; padding: 0; }
	.lg-table td.lg-labtxt { grid-column: 1 / -1; min-width: 0; }
}
.lg-labfilter .lg-btn--small, .lg-card > .lg-row .lg-btn--small { min-height: 34px; padding: 4px 12px; font-size: .85rem; text-decoration: none; display: inline-flex; align-items: center; }

/* [065] Konto und Sicherheit, Zwei-Faktor, Hilfe, Status */
.lg-account__part { border-top: 1px solid var(--lg-line); padding-top: 12px; margin-top: 12px; }
.lg-account__part h3 { font-size: 1rem; margin: 0 0 8px; }
.lg-input--code { width: 9.5em; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.lg-secret { font-size: .9rem; word-break: break-all; background: var(--lg-s0); padding: 2px 6px; border-radius: 6px; }
.lg-qr { margin: 8px 0 12px; }
.lg-qr svg, .lg-qr canvas { display: block; width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 8px; }
.lg-recovery { background: var(--lg-s0); border-radius: 10px; padding: 12px; margin: 10px 0; }
.lg-recovery__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(9em, 1fr)); gap: 4px 16px; list-style: none; padding: 0; margin: 8px 0; font-family: ui-monospace, Consolas, monospace; }
.lg-picks { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 0 24px; }
.lg-invite { margin: 10px 0; }
.lg-admins { list-style: none; padding: 0; }
.lg-admins li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--lg-line); }
.lg-admins li > span:nth-child(2) { flex: 1 1 12em; }
.lg-danger { border: 1px solid var(--lg-danger); border-radius: 10px; padding: 12px; margin-top: 10px; }
.lg-list--check { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12em, 1fr)); gap: 2px 16px; }
.lg-list--check li { display: flex; justify-content: space-between; gap: 8px; }
.lg-chip__shared { font-size: .8em; opacity: .8; }
.lg-gate2fa { max-width: 34em; margin: 24px auto; }
.lg-details { border: 1px solid var(--lg-line); border-radius: 10px; padding: 8px 12px; margin: 6px 0; background: var(--lg-card); }
.lg-details summary { cursor: pointer; font-weight: 600; }
.lg-details ul { margin: 8px 0 4px; padding-left: 1.2em; }
.lg-statebar { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 14px; border-radius: 10px; background: var(--lg-s0); }
.lg-statebar--ok { background: #e3f5ea; } .lg-statebar--degraded { background: var(--lg-warn-bg); } .lg-statebar--down { background: #fbe4e2; }
.lg-statepage .lg-checks, .lg-statuspage .lg-checks, .lg-ops .lg-checks { list-style: none; padding: 0; }
.lg-incident { border-left: 3px solid var(--lg-line); padding-left: 10px; margin: 8px 0; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .lg-statebar--ok { background: #163a26; }
	:root:not([data-theme="light"]) .lg-statebar--down { background: #4a1d1a; }
}
@media (max-width: 600px) {
	.lg-account .lg-row .lg-input { flex: 1 1 100%; }
}

/* Gerät verbinden: persönlicher QR-Code neben dem Code */
.lg-pair { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: flex-start; margin-top: 10px; }
.lg-pair__qr { max-width: 230px; }
.lg-pair__qr .lg-qr { margin: 0 0 6px; }
.lg-pair__code { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.lg-gate-qr { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin: 4px 0 8px; }
.lg-gate-qr .lg-qr { margin: 0; }
.lg-gate-qr p { flex: 1 1 220px; text-align: left; }
