/* StreamPass – helles, freundliches Design */
:root {
    --bg: #f6f8fc;
    --bg-soft: #eef3fb;
    --card: #ffffff;
    --text: #22304a;
    --muted: #6d7a90;
    --line: #e4eaf3;
    --primary: #2f7cf6;
    --primary-2: #00b4d8;
    --primary-dark: #1f63d6;
    --primary-soft: #e8f1ff;
    --green: #17985a;
    --green-bg: #e2f7ec;
    --red: #e0475b;
    --red-bg: #fdeaed;
    --orange: #d97a0f;
    --orange-bg: #fff3e0;
    --grey-bg: #eef1f6;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(34, 48, 74, .04), 0 6px 20px rgba(34, 48, 74, .06);
    --shadow-hover: 0 2px 4px rgba(34, 48, 74, .06), 0 12px 28px rgba(34, 48, 74, .10);
    --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--bg);
    background-image: radial-gradient(1200px 400px at 85% -120px, #dcebff 0%, rgba(220, 235, 255, 0) 70%),
                      radial-gradient(900px 360px at -10% -80px, #dff8fb 0%, rgba(223, 248, 251, 0) 70%);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 650; margin: 0 0 .75rem; }
h3 { font-size: 1rem; font-weight: 650; margin: 1.4rem 0 .6rem; }
p { margin: 0 0 .75rem; }

/* ---------- Kopfzeile ---------- */
.topbar {
    position: sticky; top: 0; z-index: 10;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1320px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { color: var(--text); font-weight: 750; font-size: 1.2rem; display: flex; align-items: center; gap: .6rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-icon {
    width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 4px 12px rgba(47, 124, 246, .35);
}
.nav-toggle { display: none; margin-left: auto; background: var(--bg-soft); border: 0; color: var(--text); font-size: 1.3rem; width: 42px; height: 42px; border-radius: 12px; cursor: pointer; }

/* ---------- Grundgerüst ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 32px 16px 48px; }
.container.narrow { max-width: 760px; }
.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 0 16px 28px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; box-shadow: var(--shadow); }
.card-highlight { border-color: #b9d4ff; background: linear-gradient(180deg, #f3f8ff 0%, #ffffff 60%); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card-head h2 { margin: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }

/* ---------- Kennzahlen ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow); position: relative; overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.stat:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--primary), var(--primary-2)); }
.stat-num { display: block; font-size: 2rem; font-weight: 750; color: var(--text); line-height: 1.2; }
.stat-label { color: var(--muted); font-size: .88rem; }
.stat-warn::before { background: var(--red); }
.stat-warn .stat-num { color: var(--red); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: .75rem .65rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; background: var(--bg); }
th:first-child { border-top-left-radius: var(--radius-sm); }
th:last-child { border-top-right-radius: var(--radius-sm); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f9fbfe; }
tr:last-child td { border-bottom: 0; }
.row-muted td { opacity: .6; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
td.actions { display: table-cell; }
td.actions > * { display: inline-block; margin: .15rem 0 .15rem .3rem; }
.actions form, form.inline { display: inline; margin: 0; }

/* ---------- Plaketten ---------- */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .7rem; border-radius: 999px; font-size: .76rem; font-weight: 650; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-grey { background: var(--grey-bg); color: var(--muted); }
.badge-green::before, .badge-red::before, .badge-orange::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.text-red { color: var(--red); font-weight: 650; }
.text-orange { color: var(--orange); }
.muted { color: var(--muted); }
.small { font-size: .86rem; }

/* ---------- Meldungen ---------- */
.alert { padding: .9rem 1.1rem; border-radius: 12px; margin-bottom: 1.1rem; border: 1px solid transparent; font-weight: 500; }
.alert-success { background: var(--green-bg); color: #0f6e40; border-color: #bfe9d2; }
.alert-error { background: var(--red-bg); color: #b4283b; border-color: #f6c6ce; }
.alert-warn { background: var(--orange-bg); color: #9c5306; border-color: #fbd9a8; }

/* ---------- Schaltflächen ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    font: inherit; font-size: .9rem; font-weight: 600; padding: .55rem 1.05rem; border-radius: 999px;
    border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer;
    line-height: 1.3; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn:hover { border-color: #c9d5e6; background: var(--bg-soft); text-decoration: none; }
.btn-sm { font-size: .8rem; padding: .35rem .8rem; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #4a8ff8); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(47, 124, 246, .30); }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; box-shadow: 0 6px 18px rgba(47, 124, 246, .38); }
.btn-danger { color: var(--red); border-color: #f4c3cb; background: #fff; }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-warn { color: var(--orange); border-color: #f7d6ab; background: #fff; }
.btn-warn:hover { background: var(--orange-bg); border-color: var(--orange); }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 1rem; color: var(--text); }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=date], input[type=search], select, textarea {
    display: block; width: 100%; margin-top: .35rem; padding: .65rem .85rem; font: inherit; font-weight: 400;
    color: var(--text); background: #fff; border: 1px solid #d8e0ec; border-radius: 12px;
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a3aec0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(47, 124, 246, .15); }
input[readonly] { background: var(--bg); }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.check { display: flex; gap: .6rem; align-items: center; font-weight: 500; margin-bottom: .5rem; cursor: pointer; }
.check-top { margin-top: 1.7rem; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.input-row { display: flex; gap: .5rem; align-items: center; }
.input-row input { margin-top: 0; flex: 1; min-width: 0; }
label .input-row { margin-top: .35rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.form-grid h2 { margin-top: .6rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.form-grid h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; }
.mount-list { margin: .6rem 0 1.1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .1rem 1rem; }
.mount-list.disabled { opacity: .45; pointer-events: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.searchbar { display: flex; gap: .6rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.searchbar input, .searchbar select { margin-top: 0; width: auto; flex: 1; min-width: 180px; }
.searchbar select { flex: 0 1 210px; }
.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .9rem; }
.inline-form input, .inline-form select { margin-top: 0; width: auto; flex: 1; min-width: 140px; }
.inline-form select { flex: 0 1 auto; }

.details { display: grid; grid-template-columns: 190px 1fr; gap: .55rem 1rem; margin: 0 0 .5rem; padding: 1rem 1.1rem; background: var(--bg); border-radius: 12px; }
.details dt { color: var(--muted); font-size: .86rem; }
.details dd { margin: 0; word-break: break-all; }
.details dd .inline { display: block; margin-top: .35rem; }

.credbox { background: #fff; border: 2px dashed #b9d4ff; border-radius: 12px; padding: 1.1rem 1.25rem; font-size: 1.02rem; line-height: 1.8; word-break: break-all; }
.snippet { font-family: var(--font); font-size: .85rem; white-space: pre; overflow: auto; margin-bottom: .6rem; background: var(--bg); }
.code-line { background: var(--primary-soft); color: var(--primary-dark); border-radius: 10px; padding: .5rem .9rem; display: inline-block; font-weight: 600; }
.steps h2 { margin-top: 1.6rem; display: flex; align-items: center; gap: .5rem; }
.steps h2:first-child { margin-top: 0; }
.steps ul { margin: 0 0 .75rem; padding-left: 1.25rem; }
.steps li { margin-bottom: .25rem; }
.pager { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }

/* ---------- Anmeldung ---------- */
.login-wrap { display: flex; justify-content: center; padding-top: 48px; }
.login-card { width: 100%; max-width: 400px; padding: 32px; }
.login-card h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.login-card .btn-block { margin-top: .4rem; padding: .7rem 1rem; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* ---------- Kopfzeile: Benutzer ---------- */
.brand-sub { font-size: .78rem; font-weight: 500; color: var(--muted); padding-left: .6rem; margin-left: .1rem; border-left: 1px solid var(--line); }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.user-chip { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; color: var(--text); }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); font-weight: 750; }
.ico { flex: 0 0 auto; }
.btn .ico { width: 16px; height: 16px; }

/* ---------- Seitenmenü ---------- */
.shell { max-width: 1320px; margin: 0 auto; display: flex; align-items: flex-start; }
.shell > .container { flex: 1; min-width: 0; }
.has-sidebar .container { flex: 1; min-width: 0; max-width: none; padding-left: 28px; }
.sidebar {
    position: sticky; top: 64px; flex: 0 0 250px; width: 250px; max-height: calc(100vh - 64px); overflow-y: auto;
    padding: 28px 8px 24px 16px;
}
.side-group { margin-bottom: 1.4rem; }
.side-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: #9aa6b8; padding: 0 .8rem; margin-bottom: .45rem; }
.side-link {
    display: flex; align-items: center; gap: .7rem; padding: .58rem .8rem; border-radius: 12px;
    color: #4a5870; font-weight: 550; font-size: .93rem; margin-bottom: 2px; transition: background .15s, color .15s;
}
.side-link .ico { color: #9aa6b8; transition: color .15s; }
.side-link:hover { background: #fff; color: var(--text); text-decoration: none; box-shadow: 0 1px 3px rgba(34, 48, 74, .06); }
.side-link:hover .ico { color: var(--primary); }
.side-link.active { background: #fff; color: var(--primary); box-shadow: var(--shadow); }
.side-link.active .ico { color: var(--primary); }
.side-foot { font-size: .75rem; color: #a3aec0; padding: 0 .8rem; }
.sidebar-backdrop { display: none; }

/* ---------- Hilfe ---------- */
.help-head { margin-bottom: 1.2rem; }
.help-head h1 { margin-bottom: .25rem; }
.help-kicker { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: .2rem .7rem; border-radius: 999px; margin-bottom: .6rem; }
.help { padding: 28px 30px; }
.help h2 { margin-top: 1.6rem; }
.help h2:first-child { margin-top: 0; }
.help p, .help li { max-width: 78ch; }
.lead { font-size: 1.05rem; color: #3a4862; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 1.2rem 0 .6rem; }
.feature { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: linear-gradient(180deg, #fbfcff, #fff); transition: box-shadow .2s, transform .2s; }
.feature:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.feature h3 { margin: .6rem 0 .3rem; font-size: .98rem; }
.feature p { margin: 0; font-size: .88rem; color: var(--muted); }
.feature-ico { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.flow, .steps-list { counter-reset: step; list-style: none; padding: 0; margin: 1rem 0 0; }
.flow li, .steps-list li { counter-increment: step; position: relative; padding: .2rem 0 1rem 3rem; }
.flow li::before, .steps-list li::before {
    content: counter(step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 750; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 3px 10px rgba(47, 124, 246, .28);
}
.flow li { padding-top: .35rem; }
.steps-list li:not(:last-child)::after { content: ""; position: absolute; left: 1.03rem; top: 2.4rem; bottom: .3rem; width: 2px; background: var(--line); }
.steps-list h3 { margin: .3rem 0 .35rem; }
.example { white-space: pre-wrap; word-break: break-all; background: #f3f7fd; border: 1px solid #dbe6f6; border-radius: 12px; padding: 1rem 1.1rem; font-size: .88rem; line-height: 1.6; color: #34445e; margin: .4rem 0 1rem; }
.checklist { list-style: none; padding: 0; margin: .4rem 0 1rem; }
.checklist li { position: relative; padding-left: 1.8rem; margin-bottom: .55rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: .05rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--green-bg); color: var(--green); font-size: .75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.note { border-radius: 12px; padding: .9rem 1.1rem; margin: 1rem 0; }
.note-info { background: var(--primary-soft); color: #1f4f9e; }
.note-warn { background: var(--orange-bg); color: #8a4a05; border: 1px solid #fbd9a8; margin-top: 0; }
table.kv th { width: 200px; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--muted); background: transparent; font-weight: 600; }
.faq { border: 1px solid var(--line); border-radius: 12px; margin-bottom: .7rem; background: #fff; }
.faq summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.2rem; line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq[open] summary { border-bottom: 1px solid var(--line); }
.faq p { padding: .8rem 1.1rem 0; }
.help-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pager-card { display: flex; flex-direction: column; gap: .15rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; color: var(--text); box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s; }
.pager-card:hover { text-decoration: none; border-color: #b9d4ff; box-shadow: var(--shadow-hover); }
.pager-next { text-align: right; grid-column: 2; }

@media (max-width: 1100px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .brand-sub, .user-name { display: none; }
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 30; width: 280px; max-height: none; background: var(--bg);
        transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(34, 48, 74, .18); padding-top: 20px;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop.open { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(34, 48, 74, .35); }
    .has-sidebar .container { padding-left: 16px; }
    .form-grid, .grid-2 { grid-template-columns: 1fr; }
    .details { grid-template-columns: 1fr; }
    .details dt { margin-top: .4rem; }
    .check-top { margin-top: 0; }
}
@media (max-width: 600px) {
    .card, .help { padding: 18px; }
    h1 { font-size: 1.45rem; }
    .hide-xs { display: none; }
    .help-pager, .feature-grid { grid-template-columns: 1fr; }
    .pager-next { grid-column: auto; }
    table.kv th { width: auto; }
}

/* ---------- Passwort-Anzeige ---------- */
.btn-xs { font-size: .74rem; padding: .2rem .55rem; }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn-soft:hover { background: #d9e8ff; border-color: transparent; }
.pw-widget { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.pw-mask { letter-spacing: .12em; color: var(--muted); }
.pw-value { font-weight: 650; color: var(--text); background: var(--primary-soft); padding: .1rem .5rem; border-radius: 6px; word-break: break-all; }
.pw-value[hidden], .pw-mask[hidden] { display: none; }
.current-pw { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; font-weight: 500; font-size: .85rem; color: var(--muted); }
