* { box-sizing: border-box; }
html, body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f4f5f7;
    color: #1a1d1a;
}

.app-header {
    background: #1f2937;
    color: #fff;
}
.app-header-inner {
    max-width: 1100px; margin: 0 auto; padding: .8rem 1.2rem;
    display: flex; align-items: center; justify-content: space-between;
}
.app-logo { font-weight: 700; font-size: 1.1rem; }
.app-header nav a { color: #cbd5e1; text-decoration: none; }

.app-main { max-width: 1100px; margin: 0 auto; padding: 1.4rem 1.2rem; }
.page-title { font-size: 1.5rem; margin: 0 0 1rem; }

.toolbar {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem;
    margin-bottom: 1.2rem;
}
.filter-group { display: flex; flex-direction: column; gap: .25rem; }
.filter-group label { font-size: .75rem; color: #6b7280; }

.card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 1rem 1.2rem; margin-bottom: 1.2rem;
}
.form-card { max-width: 720px; }
.form-head { font-weight: 700; margin-bottom: .8rem; }
.form-row { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; }
.form-row label { font-size: .8rem; color: #374151; font-weight: 600; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: .6rem; margin-top: .4rem; }

.input {
    width: 100%; padding: .5rem .6rem; border: 1px solid #d1d5db;
    border-radius: 7px; font-size: .9rem; font-family: inherit; background: #fff;
}
select.input, select { min-width: 130px; }
select {
    padding: .45rem .6rem; border: 1px solid #d1d5db; border-radius: 7px;
    background: #fff; font-size: .9rem;
}

.btn {
    padding: .5rem .9rem; border: 1px solid #d1d5db; border-radius: 7px;
    background: #fff; cursor: pointer; font-size: .88rem;
}
.btn:hover { background: #f3f4f6; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-sm { padding: .3rem .5rem; font-size: .85rem; }
.btn-danger { color: #dc2626; }
.btn-danger:hover { background: #fef2f2; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid #f0f1f3; vertical-align: top; }
.tbl th { background: #fafafa; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; }
.tbl tr:last-child td { border-bottom: none; }
.cell-text { max-width: 280px; white-space: pre-wrap; }
.nowrap { white-space: nowrap; }

.badge { padding: .15rem .5rem; border-radius: 6px; font-size: .75rem; font-weight: 600; }
.badge-bug { background: #fee2e2; color: #b91c1c; }
.badge-requirement { background: #dbeafe; color: #1d4ed8; }

.status { padding: .15rem .5rem; border-radius: 6px; font-size: .75rem; font-weight: 600; }
.status-0 { background: #f3f4f6; color: #374151; }   /* Neu */
.status-1 { background: #fef3c7; color: #92400e; }   /* In Arbeit */
.status-2 { background: #d1fae5; color: #065f46; }   /* Gelöst */
.status-3 { background: #e5e7eb; color: #4b5563; }   /* Geschlossen */

.muted { color: #6b7280; }
.empty { text-align: center; color: #6b7280; }

/* ── Blazor-Fehleranzeige ────────────────────────────────────────────
   WICHTIG: Dieses Div ist im HTML immer vorhanden und muss standardmäßig
   versteckt sein. Blazor blendet es NUR bei einem echten Circuit-Fehler ein.
   Ohne diese Regel wäre die Fehlerleiste dauerhaft sichtbar. */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: .8rem 1.2rem;
    background: #fef3c7;
    color: #92400e;
    border-top: 1px solid #f59e0b;
    box-shadow: 0 -2px 8px rgba(0,0,0,.08);
    z-index: 1000;
}
#blazor-error-ui .reload { color: #92400e; font-weight: 600; }
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem; top: .8rem;
}

/* ── Kopfzeile: Benutzer + Abmelden ──────────────────────────────── */
.app-nav { display: flex; align-items: center; gap: 1rem; }
.app-nav a { color: #cbd5e1; text-decoration: none; }
.app-nav a:hover { color: #fff; }
.app-user { color: #9ca3af; font-size: .85rem; }
.app-logout {
    color: #fca5a5 !important;
    font-size: .85rem;
    border: 1px solid #4b5563;
    padding: .25rem .6rem;
    border-radius: 6px;
}
.app-logout:hover { background: #374151; }
