:root {
  --bg: #f3f5f8; --panel: #fff; --text: #1b2733; --muted: #667585; --line: #dde3ea;
  --primary: #0f3a5f; --primary-2: #1c5d94; --accent: #2b7de9;
  --shadow: 0 1px 2px rgba(15,30,50,.08), 0 6px 20px rgba(15,30,50,.07);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c; --panel: #1a222b; --text: #e6ebf1; --muted: #93a1b0; --line: #2d3945;
    --primary: #1c5d94; --primary-2: #2b7de9; --accent: #5fa2f5;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.hero { background: linear-gradient(135deg, #0f3a5f, #1c5d94 60%, #31859b); color: #fff; padding: 36px 0 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .12em; }
.brand img { border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
h1 { margin: 28px 0 4px; font-size: clamp(26px, 4vw, 36px); }
.sub { margin: 0; opacity: .85; }
main { margin-top: -44px; }
#filter { width: 100%; max-width: 360px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; box-shadow: var(--shadow); margin-bottom: 16px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .12s, border-color .12s; }
a.card:hover, a.card:focus-visible { transform: translateY(-2px); border-color: var(--accent); outline: none; }
.card-head { display: flex; align-items: center; gap: 12px; }
.icon { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.icon span { width: 26px; height: 26px; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.card h2 { margin: 0; font-size: 18px; }
.host { font-size: 13px; color: var(--muted); }
.card p { margin: 0; color: var(--muted); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.card.soon { opacity: .6; cursor: default; }
.badge { margin-left: auto; font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.empty { color: var(--muted); }
.foot { margin: 40px auto 24px; font-size: 13px; color: var(--muted); }
.foot a { color: inherit; }
.foot kbd { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--panel); }

/* ---- Anmeldung, Konto, Verwaltung ---- */
.topline { display: flex; align-items: center; gap: 12px; }
.topline .brand { color: inherit; text-decoration: none; }
.userbar { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; font-size: 14px; }
.userbar .who { font-weight: 600; margin-right: 4px; }
.userbar .btn { color: #fff; text-decoration: none; padding: 6px 14px; border-radius: 980px; background: rgba(255,255,255,.16); }
.userbar .btn:hover { background: rgba(255,255,255,.26); }
.userbar .btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.hero.small { padding-bottom: 64px; }
.stack { display: flex; flex-direction: column; gap: 16px; padding-bottom: 40px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; }
.panel h2 { margin: 0 0 14px; font-size: 19px; }
.panel h3 { margin: 22px 0 10px; font-size: 16px; }
.muted { color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.form.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-width: none; align-items: end; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; padding-bottom: 10px; }
input:not([type=checkbox]) { font: inherit; font-size: 15px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
input:disabled { opacity: .6; }
button { font: inherit; font-weight: 500; border: 0; border-radius: 980px; padding: 8px 16px; cursor: pointer; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--accent); }
button:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
button.primary { background: var(--accent); color: #fff; font-weight: 600; justify-self: start; align-self: flex-start; }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: #e5484d; }
button:disabled { opacity: .5; cursor: default; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 500; font-size: 12.5px; color: var(--muted); }
td.actions { text-align: right; }
td.actions button { padding: 4px 11px; font-size: 13px; margin-left: 4px; }
tr.inactive td { opacity: .5; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 14px; z-index: 100; }
.toast.error { background: #e5484d; color: #fff; }
body.auth { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0f3a5f, #1c5d94 60%, #31859b); }
.auth-wrap { width: 100%; padding: 16px; display: grid; place-items: center; }
.auth-card { width: min(380px, 100%); background: var(--panel); border-radius: 24px; padding: 34px 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.auth-brand img { border-radius: 11px; }
.auth-brand b { display: block; font-size: 20px; letter-spacing: .12em; }
.auth-brand span { font-size: 13px; color: var(--muted); }
.auth-card button.primary { align-self: stretch; padding: 11px; }
.err { color: #e5484d; font-size: 13px; min-height: 18px; margin: 0; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
@media (max-width: 600px) { .userbar .who { display: none; } }
/* App-Zugriff in der Kontenverwaltung */
select { font: inherit; font-size: 14px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
select:focus { outline: none; border-color: var(--accent); }
select.none { color: var(--muted); }
.apps-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
td.actions { white-space: normal; min-width: 230px; }
td.actions button { margin-bottom: 3px; }
.apps-grid label select { font-size: 15px; padding: 9px 10px; border-radius: 10px; }
.wrap.wide { max-width: 1320px; }
.areas { display: flex; gap: 10px; margin-top: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.areas label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: inherit; flex-direction: row; }
.areas input { width: auto; margin: 0; }
.areas[hidden] { display: none; }
