:root { color-scheme: dark light; --bg: #0f1115; --card: #181b21; --line: #2a2f38; --fg: #e8ebf0; --dim: #8b94a3; --acc: #4f8cff; }
@media (prefers-color-scheme: light) { :root { --bg: #eef0f4; --card: #ffffff; --line: #d5d9e0; --fg: #1b1f26; --dim: #5d6675; --acc: #2f6fe4; } }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.card { width: min(380px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 30px 26px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
h1 { margin: 0 0 4px; font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 18px; color: var(--dim); font-size: .92rem; }
label { display: block; margin: 12px 0 5px; font-size: .85rem; color: var(--dim); }
input { width: 100%; padding: 11px 12px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; }
input:focus { outline: 2px solid var(--acc); outline-offset: 1px; }
button { margin-top: 18px; width: 100%; padding: 11px 14px; border-radius: 9px; border: 0; background: var(--acc); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
button:disabled { opacity: .55; cursor: default; } button.link { background: none; color: var(--acc); width: auto; margin: 10px 0 0; padding: 0; font-weight: 400; }
.err { color: #ff6b6b; font-size: .88rem; min-height: 1.2em; margin-top: 10px; }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 6px 0 14px; } .bar i { display: block; height: 100%; width: 35%; background: var(--acc); animation: slide 1.3s infinite ease-in-out; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

.card.wide { width: min(640px, 100%); text-align: center; } .profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin: 18px 0; }
.card .profile { margin: 0; width: 100%; background: transparent; color: var(--fg); border: 1px solid var(--line); border-radius: 14px; padding: 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.card .profile:hover, .card .profile:focus-visible { border-color: var(--acc); outline: none; background: rgba(79,140,255,.12); } .profile .av { width: 64px; height: 64px; border-radius: 50%; background: var(--acc); color: #fff; display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; }
.profile.admin .av { background: #3a3f4b; } .profile small { color: var(--dim); font-weight: 400; font-size: .75rem; min-height: 1em; }

/* Geraete mit Profilwahl: gleiche Optik wie die App (dunkelblaues Glas) */
body.fam { --bg: #07101f; --card: rgba(255,255,255,.07); --line: rgba(255,255,255,.14); --fg: #f2f6ff; --dim: #9db0d0; --acc: #3d8bff; color-scheme: dark;
  background: radial-gradient(1200px 700px at 78% -10%, #1c4a9a66, transparent 60%), radial-gradient(900px 600px at 0% 100%, #0e3a7a55, transparent 60%), linear-gradient(160deg, #0b1830 0%, #06101f 55%, #040a16 100%) fixed; }
body.fam html, html:has(body.fam) { background: #07101f; }
body.fam .card { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
body.fam input { background: rgba(0,0,0,.25); } body.fam button:not(.link):not(.profile) { background: linear-gradient(135deg, #3d8bff, #6b7cff); border-radius: 14px; }
.brand { font-weight: 700; letter-spacing: .12em; color: #7aa8ff; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.brand::before { content: ""; width: 24px; height: 24px; border-radius: 8px; background: linear-gradient(135deg, #3d8bff, #8f6bff); }
body.fam .card .profile { border-radius: 18px; background: rgba(255,255,255,.06); transition: transform .15s, box-shadow .15s; }
body.fam .card .profile:hover, body.fam .card .profile:focus-visible { transform: scale(1.06); border-color: #fff; box-shadow: 0 0 0 3px #fff, 0 12px 34px rgba(0,0,0,.55), 0 0 40px rgba(61,139,255,.45); background: rgba(255,255,255,.12); }
body.fam .profile .av { background: linear-gradient(135deg, #3d8bff, #8f6bff); } body.fam .profile.admin .av { background: #2a3550; }
