:root {
    --bg: #05070d;
    --panel: rgba(10, 17, 29, 0.93);
    --panel-strong: rgba(13, 24, 40, 0.98);
    --panel-soft: rgba(255, 255, 255, 0.05);
    --border: rgba(0, 204, 255, 0.24);
    --border-soft: rgba(255, 255, 255, 0.09);
    --blue: #00c8ff;
    --blue-strong: #0088ff;
    --blue-soft: rgba(0, 200, 255, 0.13);
    --text: #f4f8ff;
    --muted: #93a3bb;
    --success: #25e58f;
    --warning: #ffd166;
    --danger: #ff4f6d;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --blue-shadow: 0 0 60px rgba(0, 200, 255, 0.20);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, Segoe UI, Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 12% 8%, rgba(0, 200, 255, 0.18), transparent 31%),
        radial-gradient(circle at 86% 12%, rgba(0, 90, 255, 0.14), transparent 33%),
        radial-gradient(circle at 60% 92%, rgba(255, 79, 109, 0.08), transparent 30%),
        var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

.ambient {
    position: fixed;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.8;
    z-index: 0;
}
.ambient-one { width: 280px; height: 280px; top: -110px; left: 260px; background: rgba(0, 200, 255, 0.13); }
.ambient-two { width: 360px; height: 360px; right: -140px; bottom: 140px; background: rgba(255, 79, 109, 0.10); }

.app-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }
.sidebar {
    width: 302px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(5, 8, 14, 0.98), rgba(7, 12, 21, 0.94));
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 26px;
    box-shadow: 24px 0 80px rgba(0,0,0,0.22);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
    width: 62px;
    height: 62px;
    border-radius: 19px;
    display: grid;
    place-items: center;
    color: var(--blue);
    font-weight: 950;
    letter-spacing: -1px;
    font-size: 23px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(0, 200, 255, 0.17), rgba(255,255,255,0.03));
    box-shadow: var(--blue-shadow);
}
.brand-title { font-size: 23px; font-weight: 850; letter-spacing: -0.4px; }
.brand-sub { margin-top: 4px; color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 8px; }
.nav-link {
    color: var(--muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 15px;
    transition: 0.16s ease;
}
.nav-link span { width: 22px; text-align: center; }
.nav-link:hover, .nav-link.active { color: var(--text); border-color: var(--border); background: var(--blue-soft); box-shadow: 0 0 32px rgba(0, 200, 255, 0.07); }
.nav-link.disabled { opacity: 0.48; cursor: not-allowed; }
.license-panel {
    margin-top: auto;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(0,200,255,0.11), rgba(255,255,255,0.035));
}
.license-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; }
.license-name { margin-top: 8px; color: var(--blue); font-size: 20px; font-weight: 900; }
.license-note { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }

.main { flex: 1; padding: 30px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; text-transform: uppercase; letter-spacing: 1.7px; font-weight: 900; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(34px, 5vw, 58px); letter-spacing: -2.2px; line-height: 0.98; }
h2 { margin-bottom: 10px; font-size: 24px; letter-spacing: -0.6px; }
h3 { margin-bottom: 8px; }
.lead { max-width: 780px; color: var(--muted); line-height: 1.6; font-size: 16px; }
.status-card {
    min-width: 220px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--blue-shadow);
}
.status-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.status-card strong { color: var(--blue); }
.status-card.bad strong { color: var(--danger); }
.status-card.good strong { color: var(--success); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.55fr); gap: 22px; margin-bottom: 22px; }
.hero-card, .connection-card, .metric-card, .panel {
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(13, 24, 40, 0.96), rgba(7, 12, 21, 0.94));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}
.hero-card { padding: 30px; position: relative; overflow: hidden; }
.hero-card::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    right: -120px;
    top: -120px;
    border-radius: 999px;
    background: rgba(0, 200, 255, 0.12);
}
.hero-chip {
    display: inline-flex;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--blue);
    background: var(--blue-soft);
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.hero-card p { max-width: 700px; color: var(--muted); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; position: relative; z-index: 2; }
.connection-card { padding: 24px; }
.form-grid { display: grid; gap: 13px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select {
    width: 100%;
    color: var(--text);
    background: rgba(2, 6, 12, 0.82);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 13px 14px;
    outline: none;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 200, 255, 0.08); }
.small-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.btn {
    border: 1px solid transparent;
    border-radius: 15px;
    padding: 13px 17px;
    color: white;
    font-weight: 900;
    cursor: pointer;
    background: rgba(255,255,255,0.08);
    transition: transform 0.14s ease, filter 0.14s ease, border-color 0.14s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.primary { background: linear-gradient(135deg, var(--blue), var(--blue-strong)); }
.btn.secondary { background: linear-gradient(135deg, #1d2a41, #101827); border-color: var(--border); }
.btn.ghost { background: rgba(255,255,255,0.04); border-color: var(--border-soft); }
.btn.danger { background: linear-gradient(135deg, rgba(255,79,109,0.85), rgba(135, 18, 45, 0.92)); }
.btn.full { width: 100%; margin-top: 16px; }
.btn.small { padding: 9px 12px; font-size: 12px; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric-card { padding: 20px; }
.metric-card span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1.3px; font-weight: 900; }
.metric-card strong { display: block; margin-top: 9px; font-size: 25px; color: var(--text); letter-spacing: -0.5px; }
.metric-card small { display: block; margin-top: 5px; color: var(--muted); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr); gap: 22px; margin-bottom: 22px; }
.panel { padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pill { padding: 9px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 900; }

.empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 280px;
    color: var(--muted);
    border: 1px dashed rgba(255,255,255,0.16);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.025);
    padding: 24px;
}
.empty-icon { font-size: 44px; margin-bottom: 12px; }
.small-empty { min-height: 180px; }
.fault-list { display: grid; gap: 14px; }
.fault-item {
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 18px;
    background: rgba(255,255,255,0.035);
}
.fault-item.priority-hoch { border-color: rgba(255, 79, 109, 0.42); box-shadow: 0 0 30px rgba(255, 79, 109, 0.08); }
.fault-item.priority-mittel { border-color: rgba(255, 209, 102, 0.38); }
.fault-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.fault-code { color: var(--blue); font-size: 26px; font-weight: 950; letter-spacing: 1px; }
.fault-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fault-tags span { padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--muted); font-size: 12px; font-weight: 800; }
.fault-text { color: var(--text); margin-bottom: 12px; line-height: 1.5; }
.fault-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.fault-meta span { padding: 7px 10px; border-radius: 10px; background: rgba(0,0,0,0.2); }
.fault-hint { color: #dbe9ff; line-height: 1.55; border-left: 3px solid var(--blue); padding-left: 12px; }

.history-list { display: grid; gap: 10px; }
.history-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    background: rgba(255,255,255,0.035);
}
.history-item strong { display: block; }
.history-item span, .history-item small { color: var(--muted); }
.history-stats { text-align: right; }
.history-stats b { display: block; color: var(--blue); font-size: 22px; }
.raw-panel pre {
    margin: 0;
    max-height: 360px;
    overflow: auto;
    color: #c9f4ff;
    background: rgba(0,0,0,0.34);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 18px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; }
    .hero-grid, .content-grid, .summary-grid { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; }
}


/* Step 2.1 Ergänzungen */
.step-note {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(0, 200, 255, 0.20);
    border-radius: 18px;
    background: rgba(0, 200, 255, 0.07);
    color: #9fb6cc;
    line-height: 1.45;
}
.step-note strong {
    color: #dff8ff;
}
.prepare-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.prepare-box {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    background: rgba(255,255,255,0.035);
    padding: 13px;
}
.prepare-box span {
    display: block;
    color: #7f8da3;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 7px;
}
.prepare-box strong {
    display: block;
    color: #e9f9ff;
    font-size: 17px;
}
.protocol-plan {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}
.protocol-plan .plan-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(3, 8, 17, 0.55);
    border: 1px solid rgba(0, 200, 255, 0.12);
}
.protocol-plan .plan-line span {
    color: #8596ac;
}
.protocol-plan .plan-line b {
    color: #dff8ff;
    text-align: right;
}
.btn.prepare {
    background: linear-gradient(135deg, #00c8ff, #004dff);
    color: white;
}
.badge-safe {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(36, 227, 138, 0.35);
    background: rgba(36, 227, 138, 0.10);
    color: #72f0b1;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
@media (max-width: 900px) {
    .prepare-grid { grid-template-columns: 1fr; }
}


/* Step 2.3 Parser/Klartext Erweiterung */
.fault-status-note,
.fault-explain,
.fault-checks {
    margin-top: 10px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    background: rgba(15, 23, 42, 0.56);
    border-radius: 14px;
    padding: 10px 12px;
    color: rgba(226, 232, 240, 0.92);
    line-height: 1.45;
}

.fault-status-note strong,
.fault-checks strong {
    color: #dbeafe;
}

.fault-note-list {
    margin: 10px 0 0;
    padding-left: 20px;
    color: rgba(226, 232, 240, 0.86);
}

.fault-note-list li + li,
.fault-checks li + li {
    margin-top: 4px;
}

.fault-checks ol {
    margin: 8px 0 0;
    padding-left: 21px;
}
