:root {
    --blue: #1565c0;
    --blue-mid: #1e88e5;
    --blue-light: #e8f1fd;
    --blue-dark: #0d47a1;
    --grad: linear-gradient(135deg, #1e88e5 0%, #1565c0 55%, #0d47a1 100%);
    --bg: #f5f8fd;
    --card: #ffffff;
    --text: #16233b;
    --muted: #5b6b84;
    --border: #e5eaf2;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(16,40,80,.06);
    --shadow: 0 4px 14px rgba(16,40,80,.07);
    --shadow-md: 0 10px 30px rgba(21,101,192,.14);
    --shadow-lg: 0 22px 48px rgba(16,40,80,.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.62;
    font-size: 15.5px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
::selection { background: rgba(21,101,192,.16); }
a { color: var(--blue); }

/* ── Navigation ──────────────────────────────────────────── */
nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.82);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.logo {
    display: flex; align-items: center; gap: .6rem;
    font-size: 1.2rem; font-weight: 800; color: var(--blue-dark);
    text-decoration: none; letter-spacing: -.02em;
}
.logo img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); }
nav a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; transition: color .15s; }
nav a:hover { color: var(--blue); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.nav-email { font-size: .85rem; color: var(--muted); }

/* ── Main ────────────────────────────────────────────────── */
main { max-width: 1120px; margin: 0 auto; padding: 2.25rem 2rem; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.6rem;
    box-shadow: var(--shadow-sm);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .55rem 1.2rem; border-radius: 9px; font-size: .9rem;
    font-weight: 600; cursor: pointer; border: 1px solid transparent; text-decoration: none;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .15s;
    white-space: nowrap;
}
.btn-primary  { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(21,101,192,.28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(21,101,192,.36); }
.btn-outline  { background: #fff; color: var(--blue-dark); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: #b9d4f5; background: #fbfdff; transform: translateY(-1px); }
.btn-success  { background: #16a34a; color: #fff; box-shadow: 0 6px 18px rgba(22,163,74,.25); }
.btn-danger   { background: #dc2626; color: #fff; box-shadow: 0 6px 18px rgba(220,38,38,.22); }
.btn-success:hover, .btn-danger:hover { transform: translateY(-1px); }
.btn-sm       { padding: .34rem .75rem; font-size: .8rem; border-radius: 7px; }
.btn-lg       { padding: .8rem 1.9rem; font-size: 1rem; border-radius: 11px; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; color: #33425c; }
input, select, textarea {
    width: 100%; padding: .6rem .8rem;
    border: 1px solid var(--border); border-radius: 9px;
    font-size: .9rem; background: #fff; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(21,101,192,.14);
}
.form-hint { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 5.5rem; }
.pw-toggle { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: .8rem; font-weight: 600; color: var(--blue); cursor: pointer; background: none; border: none; padding: 0; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert { padding: .8rem 1.1rem; border-radius: 10px; font-size: .9rem; margin-bottom: 1rem; border: 1px solid transparent; }
.alert-error   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
    text-align: left; padding: .7rem 1rem;
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); border-bottom: 1px solid var(--border);
    background: #fafcfe;
}
td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: #f4f9ff; }
tbody tr:last-child td { border-bottom: none; }

/* ── Badges ──────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: .22rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .01em; }
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-red    { background: #fee2e2; color: #dc2626; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-gray   { background: #eef2f7; color: #475569; }
.badge-blue   { background: var(--blue-light); color: var(--blue-dark); }

/* ── Page header ─────────────────────────────────────────── */
.page-header { margin-bottom: 1.6rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.page-header p { color: var(--muted); font-size: .9rem; margin-top: .25rem; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
    position: relative; overflow: hidden;
    text-align: center;
    padding: 5.5rem 2rem 4.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    background:
        radial-gradient(60% 90% at 15% 0%, rgba(30,136,229,.16), transparent 60%),
        radial-gradient(55% 80% at 100% 20%, rgba(13,71,161,.14), transparent 55%),
        linear-gradient(180deg, #eef5ff 0%, #f7faff 70%);
    border: 1px solid #e4edfb;
}
.hero > * { position: relative; z-index: 1; }
.hero-icon {
    width: 88px; height: 88px;
    border-radius: 22px;
    box-shadow: var(--shadow-md);
    margin: 0 auto 1.6rem;
    display: block;
}
.hero h1 {
    font-size: 2.75rem; font-weight: 800; line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -.03em;
    background: linear-gradient(135deg, #0d47a1 0%, #1e88e5 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 1.15rem; color: #43556f; max-width: 560px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.hero-chips { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: 0 auto 2rem; max-width: 620px; }
.chip {
    background: rgba(255,255,255,.75); border: 1px solid #d8e6fa;
    color: var(--blue-dark); font-size: .8rem; font-weight: 600;
    padding: .32rem .8rem; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.hero-badge {
    display: inline-block; margin-bottom: 1.1rem;
    background: var(--blue-light); color: var(--blue);
    padding: .28rem .95rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase;
}
.hero-badge-test {
    background: #fef3c7; color: #78350f;
    border: 1px solid #fbbf24;
    text-transform: none; letter-spacing: 0;
    font-size: .85rem;
    padding: .4rem 1.05rem;
}
/* App-Store-QR im Hero */
.hero-appstore { display: inline-flex; flex-direction: column; align-items: center; gap: .5rem; margin-top: 1.9rem; text-decoration: none; color: var(--muted); transition: transform .15s; }
.hero-appstore:hover { transform: translateY(-2px); }
.hero-appstore img { border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: 8px; box-shadow: var(--shadow); }
.hero-appstore span { font-size: .85rem; font-weight: 500; }

/* ── Features ─────────────────────────────────────────────── */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.1rem; margin: 2rem 0;
}
.feature {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.6rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s;
}
.feature:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: #cfe1fa; }
.feature-icon {
    width: 48px; height: 48px; border-radius: 13px;
    background: linear-gradient(135deg, #e8f1fd, #d6e8fc);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 1rem;
    box-shadow: inset 0 0 0 1px rgba(21,101,192,.08);
}
.feature h3 { font-size: 1rem; font-weight: 700; margin-bottom: .45rem; color: var(--text); letter-spacing: -.01em; }
.feature p { font-size: .88rem; color: var(--muted); line-height: 1.58; }

/* ── How-it-works ─────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.step {
    text-align: center; padding: 1.75rem 1.1rem;
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    transition: box-shadow .22s, transform .22s;
}
.step:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.step-num {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--grad); color: #fff;
    font-size: 1rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 6px 16px rgba(21,101,192,.3);
}
.step h4 { font-size: .95rem; font-weight: 700; margin-bottom: .4rem; letter-spacing: -.01em; }
.step p  { font-size: .85rem; color: var(--muted); }
.steps-connector { display: flex; align-items: center; justify-content: center; color: var(--border); font-size: 1.4rem; padding-top: 1.5rem; }

/* ── Section header ──────────────────────────────────────── */
.section-header { text-align: center; margin: 3.5rem 0 1.75rem; }
.section-header h2 {
    font-size: 1.7rem; font-weight: 800; color: var(--blue-dark); margin-bottom: .5rem;
    letter-spacing: -.02em;
}
.section-header h2::after {
    content: ""; display: block; width: 46px; height: 3px; margin: .7rem auto 0;
    background: var(--grad); border-radius: 3px;
}
.section-header p { color: var(--muted); font-size: .95rem; }

/* ── Auth forms ──────────────────────────────────────────── */
.form-container { max-width: 440px; margin: 2.5rem auto; }
.form-container h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: .3rem; letter-spacing: -.02em; }
.form-container .subtitle { color: var(--muted); font-size: .9rem; margin-bottom: 1.6rem; }

/* ── Grid ────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── Search row ──────────────────────────────────────────── */
.toolbar { display: flex; gap: .75rem; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; }
.toolbar input { max-width: 300px; }

/* ── QR code ─────────────────────────────────────────────── */
.qr-box { text-align: center; padding: 1.5rem; }
.qr-box img { display: block; margin: 0 auto 1rem; border: 6px solid #fff; box-shadow: var(--shadow); border-radius: 10px; }
.qr-box .qr-hint { font-size: .82rem; color: var(--muted); }

/* ── Section divider ─────────────────────────────────────── */
.section-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .8rem; }

/* ── Footer ──────────────────────────────────────────────── */
footer {
    text-align: center; padding: 2.75rem 2rem;
    color: var(--muted); font-size: .82rem;
    border-top: 1px solid var(--border); margin-top: 4rem;
    background: #fff;
}
footer p { margin: .15rem 0; }
footer a { color: var(--blue); text-decoration: none; font-weight: 500; }
footer a:hover { text-decoration: underline; }

/* ── Doku-Seiten (Handbuch, Changelog) ───────────────────── */
.doc {
    max-width: 800px;
    margin: 2.5rem auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.75rem 3rem;
    box-shadow: var(--shadow);
}
.doc-header { border-bottom: 1px solid var(--border); padding-bottom: 1.35rem; margin-bottom: 2rem; }
.doc-header h1 { font-size: 1.9rem; color: var(--blue-dark); margin-bottom: .4rem; letter-spacing: -.02em; }
.doc-meta { color: var(--muted); font-size: .88rem; }
.doc-toc {
    display: block; height: auto;
    background: linear-gradient(135deg, #eef5ff, #e4eefc);
    border: 1px solid #dbe8fb; border-radius: var(--radius);
    padding: 1.6rem 1.85rem; margin: 0 0 2rem;
    overflow: hidden;
}
.doc-toc > strong { display: block; margin-bottom: 1rem; color: var(--blue-dark); font-size: 1.02rem; letter-spacing: -.01em; }
.toc-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .93rem; }
.toc-table td { padding: .58rem .25rem; vertical-align: top; border-bottom: 1px solid rgba(21,101,192,.13); }
.toc-table tr:last-child td { border-bottom: none; }
.toc-table .toc-num { width: 2.25rem; color: var(--blue-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.toc-table a { color: var(--blue); text-decoration: none; display: block; line-height: 1.4; }
.toc-table a:hover { text-decoration: underline; }
.doc section { margin-bottom: 2rem; }
.doc section h2 { font-size: 1.25rem; color: var(--blue-dark); margin-bottom: .75rem; padding-bottom: .4rem; border-bottom: 2px solid var(--blue-light); letter-spacing: -.01em; }
.doc section h3 { font-size: 1.05rem; color: var(--text); margin: 1.35rem 0 .5rem; }
.doc section p, .doc section ul, .doc section ol { margin-bottom: .8rem; }
.doc section ul, .doc section ol { padding-left: 1.5rem; }
.doc section li { margin-bottom: .4rem; }
.doc section code { background: #eef2f8; padding: .1rem .38rem; border-radius: 5px; font-size: .85em; }
.doc .release { border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 1.5rem; }
.doc .release:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.doc .release h2 { border-bottom: none; padding-bottom: 0; }
.doc .release-meta { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }
.doc-footer-note { color: var(--muted); font-size: .88rem; font-style: italic; border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 2rem; }
.doc .hint {
    background: #fffbeb; border-left: 3px solid #f59e0b;
    padding: .7rem .95rem; border-radius: 8px;
    font-size: .9rem; color: #78350f; margin: .8rem 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    nav { padding: 0 1rem; }
    main { padding: 1.25rem 1rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; }
    .hero { padding: 3.25rem 1.25rem 2.75rem; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1.02rem; }
    .steps-connector { display: none; }
    .section-header h2 { font-size: 1.4rem; }
    .doc { padding: 1.6rem 1.3rem; margin: 1rem auto; }
    .doc-toc { padding: 1.25rem 1.25rem; }
}
