/* ================================================================
   Boarding · Modernes Glassmorphism-Theme
   – Dark-First mit zarter Mesh-Gradient-Animation
   – Inter via rsms.me/inter
   ================================================================ */

:root {
    /* Rettungsdienst-Look: Cockpit-Blau + Rettungsrot, Akzente in Teal/Amber */
    --bg-0:  #07101f;
    --bg-1:  #0b1830;
    --bg-2:  #112450;
    --fg:    #e6e9f5;
    --fg-muted: #9aa3c0;
    --fg-dim: #6b7290;
    --accent:    #ef4444;   /* Rettungsrot */
    --accent-2:  #14b8a6;   /* medizinisches Teal */
    --accent-3:  #f59e0b;   /* Warnsignal-Amber */
    --success:   #22c55e;
    --warning:   #f59e0b;
    --error:     #dc2626;
    --glass-bg:     rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 20px 60px rgba(2, 6, 23, 0.55);
    --radius: 18px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    color: var(--fg);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body { font-size: 15px; line-height: 1.55; }

/* Hintergrund: animierter Mesh-Gradient */
.bg-mesh {
    background:
        radial-gradient(1200px 800px at 10% 0%,  rgba(239,68,68,0.35), transparent 60%),
        radial-gradient(900px 700px at 95% 15%, rgba(20,184,166,0.22), transparent 55%),
        radial-gradient(800px 700px at 50% 100%, rgba(245,158,11,0.18),  transparent 55%),
        linear-gradient(180deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2));
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}
.bg-mesh::before {
    content: "";
    position: fixed;
    inset: -20%;
    background:
        radial-gradient(circle at 20% 30%, rgba(239,68,68,0.12), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(20,184,166,0.10), transparent 40%);
    filter: blur(60px);
    animation: meshShift 24s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}
@keyframes meshShift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(2%, -2%, 0) scale(1.05); }
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 1px 6px;
}
pre {
    padding: 14px 16px;
    overflow: auto;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.25);
}

/* ---------- Glass-Karte ---------- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    user-select: none;
}
.btn:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}
.btn-primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 55%, #991b1b 100%);
    color: #fff;
    box-shadow:
        0 8px 24px rgba(239, 68, 68, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.08);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 28px rgba(239, 68, 68, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    text-decoration: none;
}
.btn-ghost {
    background: rgba(255,255,255,0.04);
    color: var(--fg);
    border-color: var(--glass-border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--fg-muted);
    font-weight: 500;
}
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="url"],
.form input[type="number"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    color: var(--fg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 11px 13px;
    font: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form input:focus {
    outline: none;
    border-color: var(--accent-2);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}
.form input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 4px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.grid-2-full { grid-column: 1 / -1; }
@media (max-width: 600px) {
    .grid-2 { grid-template-columns: 1fr; }
}

fieldset {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px 18px 20px;
    margin: 0;
    background: rgba(0,0,0,0.12);
}
fieldset > legend {
    padding: 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
}
.actions {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.actions .btn-ghost { margin-right: auto; }
@media (max-width: 480px) {
    .actions { flex-direction: column-reverse; }
    .actions .btn { width: 100%; }
    .actions .btn-ghost { margin-right: 0; }
}

/* ---------- Tabs für DB-Auswahl ---------- */
.tabs {
    display: inline-flex;
    padding: 4px;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-bottom: 14px;
}
.tab { position: relative; cursor: pointer; }
.tab input { position: absolute; opacity: 0; pointer-events: none; }
.tab span {
    display: block;
    padding: 8px 18px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-muted);
    transition: background 0.2s ease, color 0.2s ease;
}
.tab input:checked + span {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

details.sql-hint {
    margin-top: 14px;
    padding: 10px 14px;
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03);
}
details.sql-hint > summary {
    cursor: pointer;
    color: var(--fg-muted);
    font-size: 13px;
    font-weight: 500;
}
details[open].sql-hint > summary { color: var(--fg); margin-bottom: 10px; }

/* ---------- Alerts ---------- */
.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-error    { background: rgba(239, 68, 68, 0.12);  border-color: rgba(239, 68, 68, 0.35); color: #fecaca; }
.alert-success  { background: rgba(34, 197, 94, 0.12);  border-color: rgba(34, 197, 94, 0.35); color: #bbf7d0; }
.alert-info     { background: rgba(20, 184, 166, 0.12); border-color: rgba(20, 184, 166, 0.35); color: #99f6e4; }

/* ---------- Typo ---------- */
h1, h2, h3 { margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; color: var(--fg); margin-top: 22px; }
.lead { color: var(--fg-muted); margin: 0 0 22px; max-width: 56ch; }
.muted { color: var(--fg-muted); }
.hint { font-size: 13px; color: var(--fg-muted); margin: 8px 0 0; }

/* ================================================================
   Installer
   ================================================================ */
.install-shell {
    position: relative;
    z-index: 1;
    max-width: 880px;
    margin: 0 auto;
    padding: 36px 24px 80px;
}
.install-header {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 22px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    letter-spacing: -0.01em;
}
.brand strong { font-weight: 700; }
/* Brand-Mark: rotes Roundel mit weißem medizinischen Plus.
   Der Inhalt (Emoji o.ä.) wird per font-size:0 versteckt; die Plus-Form
   malen ::before/::after — so bleibt jedes vorhandene HTML gültig,
   auch wenn dort noch ein Emoji als Platzhalter steht. */
.brand-mark {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.18), transparent 55%),
        linear-gradient(135deg, #ef4444 0%, #b91c1c 70%, #7f1d1d 100%);
    box-shadow:
        0 6px 18px rgba(239, 68, 68, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: transparent;
    font-size: 0;
    overflow: hidden;
    flex-shrink: 0;
}
.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}
.brand-mark::before { /* vertikaler Strich */
    width: 12%;
    height: 52%;
}
.brand-mark::after { /* horizontaler Strich */
    width: 52%;
    height: 12%;
}
.stepnav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    counter-reset: step;
}
.stepnav .step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.04);
    color: var(--fg-muted);
    font-size: 13px;
    font-weight: 500;
}
.stepnav .step .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--fg-dim);
}
.stepnav .step.done    { color: var(--fg); }
.stepnav .step.done .dot    { background: var(--success); }
.stepnav .step.active  { color: var(--fg); border-color: rgba(239,68,68,0.55); box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.stepnav .step.active .dot  { background: var(--accent); box-shadow: 0 0 0 4px rgba(239,68,68,0.25); }

.card { padding: 32px; }
@media (max-width: 600px) { .card { padding: 22px; } }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    font-size: 14px;
}
.checklist .check-icon {
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    position: relative; flex-shrink: 0;
}
.checklist .ok .check-icon {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.45);
}
.checklist .ok .check-icon::after {
    content: "";
    position: absolute; left: 4px; top: 1px;
    width: 5px; height: 9px;
    border: solid #4ade80; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checklist .fail .check-icon::after {
    content: "×";
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: #fca5a5; font-weight: 700; font-size: 14px; line-height: 1;
}

.summary { display: grid; grid-template-columns: 160px 1fr; gap: 10px 18px; margin: 18px 0 6px; }
.summary dt { color: var(--fg-muted); font-size: 13px; }
.summary dd { margin: 0; }
.apps-summary { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.apps-summary li { display: flex; align-items: center; gap: 10px; }
.apps-summary .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* App-Zeilen im Installer */
.app-rows { display: grid; gap: 14px; margin-bottom: 14px; }
.app-row {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px;
}
.app-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.app-row-num { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-muted); }

.install-footer { margin-top: 24px; text-align: center; font-size: 12px; }

/* ================================================================
   Login
   ================================================================ */
.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px 18px;
}
.auth-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 36px;
    overflow: hidden;
}
/* Akzent-Streifen am oberen Kartenrand */
.auth-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #ef4444 50%, transparent 100%);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.55);
}
.auth-header { text-align: center; margin-bottom: 26px; }
.auth-header .brand-mark { width: 52px; height: 52px; border-radius: 14px; font-size: 26px; margin: 0 auto 12px; display: grid; place-items: center; }
.auth-header h1 { font-size: 24px; margin-bottom: 6px; }
.auth-header .lead { margin: 0; }
.auth-footer { margin-top: 22px; text-align: center; font-size: 12px; }

/* ================================================================
   Dashboard
   ================================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(7, 16, 31, 0.72);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--glass-border);
}
/* Akzentstreifen für Dashboard/Admin-Topbar — konsistent mit der Landing */
.topbar::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        #dc2626 12%,
        #ef4444 50%,
        #dc2626 88%,
        transparent 100%);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.55);
}
.topbar-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.user-area { display: inline-flex; align-items: center; gap: 14px; }
.user-name { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fg); }
.avatar {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.dashboard-shell {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 42px 24px 80px;
}
.dashboard-intro h1 { font-size: 32px; margin-bottom: 6px; }

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}
.app-card {
    --accent: #2563eb;
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 22px;
    color: var(--fg);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.app-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, transparent), transparent 65%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.app-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
    box-shadow: 0 16px 38px rgba(0,0,0,0.35);
    text-decoration: none;
}
.app-card:hover::after { opacity: 1; }
.app-card-icon {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,0.05));
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--glass-border));
    font-size: 28px;
    flex-shrink: 0;
}
.app-card-body h2 {
    font-size: 17px;
    margin: 0 0 4px;
    color: var(--fg);
}
.app-card-body p {
    margin: 0;
    color: var(--fg-muted);
    font-size: 13px;
    line-height: 1.45;
}
.app-card-arrow {
    font-size: 20px;
    color: color-mix(in srgb, var(--accent) 70%, var(--fg-muted));
    transition: transform 0.18s ease;
}
.app-card:hover .app-card-arrow { transform: translateX(3px); }

/* Helle Lesbarkeit auf Geräten ohne color-mix Unterstützung – Fallback */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .app-card-icon { background: rgba(255,255,255,0.05); border-color: var(--glass-border); }
    .app-card:hover { border-color: var(--accent); }
}

/* ================================================================
   Admin
   ================================================================ */
.admin-badge {
    margin-left: 10px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0b1020;
    background: linear-gradient(135deg, var(--accent-3), #fb923c);
}

.admin-nav {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}
.admin-nav-item {
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-muted);
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.admin-nav-item:hover { color: var(--fg); background: rgba(255,255,255,0.05); text-decoration: none; }
.admin-nav-item.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
@media (max-width: 820px) {
    .admin-nav { order: 3; flex-basis: 100%; justify-content: center; }
}

.admin-shell {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 36px 24px 80px;
}
.admin-page-head { margin-bottom: 22px; }
.admin-page-head h1 { font-size: 28px; margin: 0 0 6px; }
.admin-page-head .lead { margin: 0; }

.admin-section { padding: 22px 24px; margin-bottom: 18px; }
.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.admin-section-head h2 { margin: 0; }

.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

/* Stat-Karten */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 22px;
    color: var(--fg);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.2s ease;
}
a.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 68, 68, 0.45);
    text-decoration: none;
}
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-muted); }
.stat-value { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; }
.stat-hint  { font-size: 12px; color: var(--fg-dim); }

/* Tabelle */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table thead th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-muted);
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.02);
}
.admin-table tbody td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.admin-table .row-self td { background: rgba(239, 68, 68, 0.05); }
.admin-table .col-actions { text-align: right; white-space: nowrap; }
.admin-table .col-icon { width: 56px; }
.admin-table .col-actions .btn { margin-left: 4px; }
.admin-table code {
    font-size: 12px;
    background: rgba(0, 0, 0, 0.35);
    padding: 2px 7px;
    border-radius: 6px;
    color: var(--accent-2);
}
.admin-table .small { font-size: 12px; }

/* Pills (Status/Role) */
.pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid transparent;
    line-height: 1.4;
}
.pill-admin { background: rgba(245, 158, 11, 0.18);  border-color: rgba(245, 158, 11, 0.40); color: #fde68a; }
.pill-user  { background: rgba(255, 255, 255, 0.08); border-color: var(--glass-border);     color: var(--fg-muted); }
.pill-ok    { background: rgba(34, 197, 94, 0.15);   border-color: rgba(34, 197, 94, 0.40); color: #bbf7d0; }
.pill-off   { background: rgba(148, 163, 184, 0.15); border-color: rgba(148, 163, 184, 0.35); color: #cbd5e1; }
.pill-self  { background: rgba(20, 184, 166, 0.15);  border-color: rgba(20, 184, 166, 0.35); color: #99f6e4; margin-left: 6px; }

/* App-Dot in Tabelle */
.app-dot {
    display: inline-grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    font-size: 20px;
    border: 1px solid var(--glass-border);
}

/* Buttons: Danger */
.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fecaca;
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.65);
    text-decoration: none;
}

/* Danger-Zone-Sektion */
.danger-zone {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}
.danger-zone h2 { color: #fecaca; }

/* Select-Felder */
.form select {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    color: var(--fg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 11px 13px;
    font: inherit;
    font-size: 14px;
}
.form select:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}
.form select:disabled { opacity: 0.55; cursor: not-allowed; }

/* Switch-Zeile (Checkbox + Label) */
.switch-row {
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--fg);
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
}
.switch-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    margin: 0;
}
.switch-row input[type="checkbox"]:disabled { opacity: 0.55; cursor: not-allowed; }

/* Kleine Helfer */
.small { font-size: 12px; }
@media (max-width: 720px) {
    .admin-table .col-actions { white-space: normal; }
    .admin-table .col-actions .btn { margin-top: 4px; }
}

/* ================================================================
   Landing-Page
   ================================================================ */

.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 14px; }

.landing-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(7, 16, 31, 0.7);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--glass-border);
}
/* Rettungsdienst-Akzentstreifen am oberen Rand */
.landing-topbar::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        #dc2626 10%,
        #ef4444 50%,
        #dc2626 90%,
        transparent 100%);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}
.landing-topbar-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.landing-topnav { display: inline-flex; align-items: center; gap: 18px; }
.landing-topnav-link {
    color: var(--fg-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.18s ease;
}
.landing-topnav-link:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 600px) {
    .landing-topnav-link { display: none; }
}

.landing-main { position: relative; z-index: 1; }

/* --- Hero --- */
.hero {
    position: relative;
    max-width: 1160px;
    margin: 0 auto;
    padding: 90px 24px 70px;
    text-align: center;
    overflow: hidden;
}
.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
}
/* Dezenter EKG-Streifen im Hero-Hintergrund */
.hero-ekg {
    position: absolute;
    left: -2%;
    right: -2%;
    width: 104%;
    height: 110px;
    top: 55%;
    transform: translateY(-50%);
    color: #ef4444;
    opacity: 0.16;
    z-index: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.35));
}
.hero-ekg path {
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}
.hero-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 22px;
}
.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-weight: 800;
    margin: 0 0 24px;
}
.hero-accent {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 35%, #f59e0b 70%, #fbbf24 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-lead {
    font-size: 18px;
    line-height: 1.6;
    color: var(--fg-muted);
    margin: 0 0 32px;
}
.hero-cta {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
}
.hero-meta { font-size: 13px; margin: 0; }

/* --- Sections --- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.section-head h2 {
    font-size: clamp(26px, 3.5vw, 36px);
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}
.section-head .lead { margin: 0 auto; }

.apps-showcase, .about, .final-cta {
    max-width: 1160px;
    margin: 0 auto;
    padding: 60px 24px;
}

/* --- App-Showcase-Karten (öffentlich, größer als Dashboard-Karten) --- */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 18px;
}
.showcase-card {
    --accent: #2563eb;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    padding: 26px;
    color: var(--fg);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.showcase-card::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.showcase-card::after {
    content: "";
    position: absolute;
    top: -40%; right: -30%;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 50%, transparent), transparent 70%);
    filter: blur(20px);
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.4s ease;
}
.showcase-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 60%, var(--glass-border));
    box-shadow: 0 22px 50px rgba(0,0,0,0.4);
    text-decoration: none;
}
.showcase-card:hover::before { opacity: 1; }
.showcase-card:hover::after  { opacity: 0.8; transform: scale(1.1); }

.showcase-icon {
    position: relative;
    z-index: 1;
    width: 60px; height: 60px;
    display: grid; place-items: center;
    border-radius: 16px;
    font-size: 30px;
    background: color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,0.05));
    border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--glass-border));
}
.showcase-body { position: relative; z-index: 1; }
.showcase-body h3 {
    font-size: 20px;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
    color: var(--fg);
}
.showcase-desc {
    color: var(--fg-muted);
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 12px;
}
.showcase-host {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    color: color-mix(in srgb, var(--accent) 70%, var(--fg-muted));
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.showcase-cta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.showcase-cta-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
}
.showcase-arrow {
    font-size: 22px;
    color: color-mix(in srgb, var(--accent) 80%, var(--fg));
    transition: transform 0.2s ease;
}
.showcase-card:hover .showcase-arrow { transform: translateX(4px); }

@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .showcase-icon { background: rgba(255,255,255,0.06); border-color: var(--glass-border); }
    .showcase-card:hover { border-color: var(--accent); }
    .showcase-host { color: var(--accent-2); }
    .showcase-arrow { color: var(--accent-2); }
}

/* --- About-Karten --- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
}
.about-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.about-icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 12px;
    font-size: 24px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    margin-bottom: 10px;
}
.about-card h3 { font-size: 18px; margin: 0; }
.about-card p { color: var(--fg-muted); margin: 0; line-height: 1.55; }

/* --- Abschluss-CTA --- */
.final-cta { padding-bottom: 80px; }
.final-cta-card {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(20, 184, 166, 0.06));
}
.final-cta-card h2 {
    font-size: clamp(24px, 3vw, 32px);
    margin: 0 0 10px;
}
.final-cta-card .lead { max-width: 540px; margin: 0 auto 24px; }

/* --- Footer --- */
.landing-footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    margin-top: 40px;
    position: relative;
    z-index: 1;
}
.landing-footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.landing-footer p { font-size: 13px; margin: 0; }

/* Brand-Link auf Login-Karte (mit Hover-Effekt) */
.brand-link {
    display: inline-block;
    transition: transform 0.2s ease;
}
.brand-link:hover { transform: scale(1.05); }
.brand-link .brand-mark { margin: 0 auto; }

/* ================================================================
   Showcase-Karte: erweiterte Variante mit Tagline + Features
   ================================================================ */
.showcase-card { grid-template-rows: auto auto auto 1fr auto; }
.showcase-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
}
.showcase-head h3 { margin: 0; font-size: 19px; letter-spacing: -0.01em; }
.showcase-tagline {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: color-mix(in srgb, var(--accent) 75%, var(--fg-muted));
    font-weight: 500;
    line-height: 1.4;
}
.showcase-features {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.showcase-features li {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: var(--fg);
    line-height: 1.4;
}
.showcase-features-more {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--fg-muted) !important;
    font-style: italic;
}
.showcase-cta { gap: 12px; flex-wrap: wrap; }
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .showcase-tagline { color: var(--accent-2); }
}

/* ================================================================
   App-Detail-Seite
   ================================================================ */
.app-detail-page { --accent: #2563eb; }

.app-hero {
    max-width: 1160px;
    margin: 0 auto;
    padding: 40px 24px 30px;
}
.app-hero-inner { max-width: 920px; margin: 0 auto; }

.app-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
    color: var(--fg-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.app-back:hover { color: var(--fg); text-decoration: none; }

.app-hero-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 30px;
    padding: 38px;
    position: relative;
    overflow: hidden;
}
.app-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, transparent), transparent 65%);
    pointer-events: none;
}
.app-hero-card::after {
    content: "";
    position: absolute;
    top: -50%; right: -20%;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 50%, transparent), transparent 70%);
    filter: blur(40px);
    opacity: 0.55;
    pointer-events: none;
}
.app-hero-mark {
    position: relative;
    z-index: 1;
    width: 140px; height: 140px;
    display: grid; place-items: center;
    border-radius: 28px;
    background: color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,0.05));
    border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--glass-border));
    box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 25%, transparent);
}
.app-hero-icon { font-size: 72px; line-height: 1; }
.app-hero-text { position: relative; z-index: 1; }
.app-hero-eyebrow {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,0.05));
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--glass-border));
    color: color-mix(in srgb, var(--accent) 80%, var(--fg));
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.app-hero-text h1 {
    font-size: clamp(30px, 4.5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 0 0 12px;
}
.app-hero-lead {
    font-size: 17px;
    line-height: 1.55;
    color: var(--fg-muted);
    margin: 0 0 16px;
}
.app-hero-meta { margin-bottom: 22px; }
.app-hero-host {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.3);
    color: color-mix(in srgb, var(--accent) 70%, var(--fg-muted));
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.app-hero-cta { display: inline-flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 720px) {
    .app-hero-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 30px 22px;
        gap: 20px;
    }
    .app-hero-mark { margin: 0 auto; width: 100px; height: 100px; border-radius: 22px; }
    .app-hero-icon { font-size: 52px; }
    .app-hero-cta { justify-content: center; }
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .app-hero-mark   { background: rgba(255,255,255,0.06); border-color: var(--glass-border); }
    .app-hero-host   { color: var(--accent-2); }
    .app-hero-eyebrow { color: #fecaca; background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.4); }
}

/* --- Body: Prose + Features --- */
.app-body {
    max-width: 1160px;
    margin: 0 auto;
    padding: 20px 24px 40px;
}
.app-body-grid {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 22px;
}
@media (max-width: 820px) {
    .app-body-grid { grid-template-columns: 1fr; }
}

.app-prose { padding: 30px 32px; }
.app-prose h2,
.app-features h2 {
    font-size: 20px;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}
.app-prose p {
    margin: 0 0 14px;
    line-height: 1.65;
    color: var(--fg);
    font-size: 15.5px;
}
.app-prose p:last-child { margin-bottom: 0; }

.app-features { padding: 28px; }
.feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14.5px;
    line-height: 1.5;
}
.feature-bullet {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,0.05));
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--glass-border));
    color: color-mix(in srgb, var(--accent) 85%, var(--fg));
    font-size: 11px;
    font-weight: 700;
    margin-top: 1px;
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .feature-bullet { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.45); color: #bbf7d0; }
}

/* --- App-Logo im Hero (wenn logo_url gepflegt ist) --- */
.app-hero-mark.has-logo {
    background: #ffffff;
    border-color: var(--glass-border);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 16px;
}
.app-hero-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* --- Screenshot-Galerie auf der Detail-Seite --- */
.app-screenshots {
    max-width: 1160px;
    margin: 0 auto;
    padding: 30px 24px 50px;
}
.app-screenshots .section-head { text-align: center; max-width: 720px; margin: 0 auto 28px; }

.screenshot-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.screenshot-grid-1 {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
}
.screenshot-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.screenshot-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.screenshot-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) {
    .screenshot-grid-3, .screenshot-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .screenshot-grid-2, .screenshot-grid-3, .screenshot-grid-4 { grid-template-columns: 1fr; }
}

.screenshot-tile {
    margin: 0;
    padding: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.screenshot-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.screenshot-frame {
    display: block;
    aspect-ratio: 16 / 10;
    background:
        repeating-linear-gradient(45deg,
            rgba(255,255,255,0.02) 0 6px,
            rgba(0,0,0,0.18) 6px 12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 0 0 12px;
    position: relative;
    transition: filter 0.25s ease;
}
.screenshot-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.screenshot-tile:hover .screenshot-frame { filter: brightness(1.05); }

.screenshot-caption {
    margin: 0 6px;
    font-size: 13px;
    color: var(--fg-muted);
    line-height: 1.5;
}
.screenshot-source {
    text-align: center;
    margin-top: 22px;
    font-size: 12px;
}
.screenshot-source a { color: var(--fg-muted); border-bottom: 1px dotted rgba(255,255,255,0.2); }
.screenshot-source a:hover { color: var(--fg); text-decoration: none; }

/* --- Hilfstexte unter Formularlabels (Admin) --- */
.hint-inline {
    font-weight: 400;
    color: var(--fg-dim);
    font-size: 12px;
    margin-left: 4px;
}
.form textarea {
    width: 100%;
    min-height: 90px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--fg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 11px 13px;
    font: inherit;
    font-size: 14px;
    line-height: 1.55;
    resize: vertical;
    font-family: inherit;
}
.form textarea:focus {
    outline: none;
    border-color: var(--accent-2);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}
