:root {
    color-scheme: dark;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #334155 #020617;
}

body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.10), transparent 28rem),
        #020617;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 290px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: rgba(15, 23, 42, 0.92);
    border-right: 1px solid rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(18px);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 24px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
}

.sidebar-nav {
    padding: 16px;
}

.nav-group {
    margin-bottom: 18px;
}

.nav-group-title {
    margin: 0 0 8px 10px;
    font-size: 11px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: .15s ease;
}

.nav-link:hover {
    background: rgba(30, 41, 59, .9);
    color: #fff;
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, .35), rgba(14, 165, 233, .18));
    color: #fff;
    border: 1px solid rgba(96, 165, 250, .25);
}

.nav-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(15, 23, 42, .9);
}

.content-wrap {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(2, 6, 23, .78);
    border-bottom: 1px solid rgba(51, 65, 85, .7);
    backdrop-filter: blur(16px);
}

.page-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px;
}

.page-hero {
    background: linear-gradient(135deg, rgba(30, 41, 59, .95), rgba(15, 23, 42, .88));
    border: 1px solid rgba(51, 65, 85, .9);
    border-radius: 26px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
}

.page-title {
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

.page-subtitle {
    margin-top: 8px;
    max-width: 900px;
    color: #94a3b8;
    line-height: 1.65;
}

.help-box {
    border: 1px solid rgba(59, 130, 246, .25);
    background: rgba(37, 99, 235, .08);
    border-radius: 20px;
    padding: 16px;
    color: #cbd5e1;
    margin-bottom: 22px;
}

.help-box strong {
    color: #dbeafe;
}

.app-card {
    background: rgba(15, 23, 42, .86);
    border: 1px solid rgba(51, 65, 85, .85);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

.app-card-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(51, 65, 85, .72);
}

.app-card-body {
    padding: 20px;
}

.app-input,
.app-select,
.app-textarea {
    width: 100%;
    border-radius: 14px;
    background: rgba(2, 6, 23, .7);
    border: 1px solid rgba(71, 85, 105, .9);
    color: #f8fafc;
    padding: 10px 12px;
    outline: none;
}

.app-input:focus,
.app-select:focus,
.app-textarea:focus {
    border-color: rgba(96, 165, 250, .9);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .22);
}

.app-label {
    display: block;
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #0284c7);
    color: #fff;
    transition: .15s ease;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 700;
    background: rgba(30, 41, 59, .9);
    color: #e2e8f0;
    border: 1px solid rgba(71, 85, 105, .7);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(30, 41, 59, .9);
    color: #cbd5e1;
}

.status-ok,
.status-aktiv,
.status-geprüft,
.status-genehmigt {
    background: rgba(34, 197, 94, .14);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, .25);
}

.status-warn,
.status-bald_fällig,
.status-offen,
.status-geplant {
    background: rgba(234, 179, 8, .14);
    color: #fef08a;
    border: 1px solid rgba(234, 179, 8, .25);
}

.status-danger,
.status-abgelaufen,
.status-fehlt,
.status-abgelehnt,
.status-defekt {
    background: rgba(239, 68, 68, .14);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, .25);
}

.table-wrap {
    overflow-x: auto;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.app-table th {
    text-align: left;
    padding: 12px;
    color: #94a3b8;
    font-weight: 700;
    background: rgba(2, 6, 23, .65);
    white-space: nowrap;
}

.app-table td {
    padding: 13px 12px;
    border-top: 1px solid rgba(51, 65, 85, .72);
    vertical-align: top;
}

.empty-state {
    color: #94a3b8;
    padding: 28px;
    text-align: center;
}

.preview-img {
    width: 92px;
    height: 70px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(71, 85, 105, .75);
}

.mobile-menu-button {
    display: none;
}

@media (max-width: 1100px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        display: none;
        position: fixed;
        z-index: 60;
        inset: 0 auto 0 0;
        width: 310px;
        max-width: 85vw;
    }

    body.menu-open .sidebar {
        display: block;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .page-container {
        padding: 18px;
    }
}
