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

        body {
            font-family: system-ui, -apple-system, Arial, sans-serif;
            background: #f4f6f9;
            font-size: 14px;
        }

        /* ===== Header (grün) ===== */
        .header {
            background: #2e7d32;
            color: #fff;
            padding: 10px 20px;
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
        }
        .header-left {
            display: flex;
            align-items: center;
        }
        .header-center {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .header-center strong { font-size: 16px; }
        .header-right {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 14px;
        }
        .header-user { font-size: 13px; opacity: .85; }

        /* ===== Seitentitel-Balken (im Content) ===== */
.page-bar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 400;
    color: #1f2937;
    margin-bottom: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 59px;
}
        .header-logout {
            color: rgba(255,255,255,.8);
            font-size: 13px;
            text-decoration: none;
        }
        .header-logout:hover { opacity: 1; text-decoration: underline; }

        /* ===== Layout ===== */
        .app-layout {
            display: flex;
            min-height: calc(100vh - 46px);
        }

        /* ===== Sidebar Rollenwechsel ===== */
        .sidebar-rolle {
            padding: 10px 12px;
            border-bottom: 1px solid rgba(255,255,255,.08);
            margin-bottom: 0;
        }
        .sidebar-rolle-select {
            width: 100%;
            background: #2e7d32;
            border: 1px solid rgba(255,255,255,.2);
            color: #fff;
            padding: 6px 28px 6px 10px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
        }
        .sidebar-rolle-select option {
            background: #2e7d32;
            color: #fff;
        }
        .sidebar-rolle-label {
            display: block;
            background: #2e7d32;
            color: #fff;
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            text-align: center;
        }

        /* ===== Sidebar (grau) ===== */
        .sidebar {
            width: 210px;
            background: #3a3a3a;
            flex-shrink: 0;
            padding: 8px 0;
        }

        /* Hauptbutton */
        .nav-main-btn {
            display: block;
            width: 100%;
            padding: 10px 18px;
            background: none;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            color: #a89880;
            text-align: left;
            font-family: inherit;
        }
        .nav-main-btn:hover { color: #c9b79c; }
        .nav-main-btn.has-separator {
            border-top: 1px solid rgba(201,183,156,.2);
            padding-top: 12px;
            margin-top: 2px;
        }
        .nav-main-btn.active {
            color: #ffffff;
            font-weight: 700;
            border-bottom: 3px solid #b08a2e;
        }

        /* Subbuttons – eingerückt, nur sichtbar wenn Hauptbutton aktiv */
        .nav-sub-list {
            display: none;
            padding: 2px 0 6px 0;
        }
        .nav-sub-list.visible { display: block; }

        .nav-sub-btn {
            display: block;
            width: 100%;
            padding: 7px 18px 7px 36px;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 12px;
            color: #a89880;
            text-align: left;
            font-family: inherit;
            text-decoration: none;
        }
        .nav-sub-btn:hover { color: #c9b79c; }
        .nav-sub-btn.active {
            color: #fff;
            font-weight: 600;
        }
        
/* ===== Content-Wrapper ===== */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}
        /* ===== Content ===== */
        .content {
            flex: 1;
            padding: 24px;
            background: #f4f6f9;
            overflow: auto;
        }

        /* ===== Tabellen ===== */
        .table-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }
        .table-outer {
            display: flex;
        }
        .table-wrap {
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            overflow: hidden;
            width: 100%;
            box-shadow: 0 1px 4px rgba(0,0,0,.06);
        }
        .table-wrap table { width: 100%; }

        /* Gruppen-Header (über Spaltenüberschriften) */
        .group-header {
            background: #f0f0ee;
            padding: 10px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            border-bottom: 1px solid #e5e7eb;
        }
        .group-title {
            font-size: 13px;
            font-weight: 700;
            color: #374151;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .group-count {
            background: #e5e7eb;
            color: #6b7280;
            font-size: 11px;
            font-weight: 600;
            padding: 1px 7px;
            border-radius: 20px;
        }

        /* Tabellen-Header ohne Gruppe (direkt dunkel) */
        .table-header {
            background: #3a3a3a;
            padding: 10px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            outline: none;
        }
        .table-title {
            font-size: 13px;
            font-weight: 600;
            color: #e8d9c0;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .table-title .count {
            background: rgba(255,255,255,.12);
            color: #c9b79c;
            font-size: 11px;
            font-weight: 600;
            padding: 1px 7px;
            border-radius: 20px;
        }

        /* Suchfeld – hell (in group-header) */
        .search-row { display: flex; gap: 6px; }
        .search-input {
            padding: 5px 10px;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            font-size: 12px;
            width: 200px;
            color: #374151;
            font-family: inherit;
            background: #fff;
        }
        .search-input:focus { outline: none; border-color: #2e7d32; }

        /* Suchfeld – dunkel (in table-header) */
        .table-header .search-input {
            background: rgba(255,255,255,.1);
            border-color: rgba(255,255,255,.15);
            color: #fff;
        }
        .table-header .search-input::placeholder { color: rgba(255,255,255,.4); }
        .table-header .search-input:focus { border-color: rgba(255,255,255,.4); }

        .search-btn {
            padding: 5px 12px;
            background: #2e7d32;
            color: #fff;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
        }
        .search-btn:hover { background: #1b5e20; }

        /* Spaltenüberschriften — dunkel mit sandfarbener Schrift */
        table { border-collapse: collapse; }
        th {
            background: #3a3a3a;
            color: #c9b79c;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: .04em;
            padding: 8px 14px;
            text-align: left;
            white-space: nowrap;
        }
        td {
            padding: 8px 14px;
            font-size: 13px;
            color: #374151;
            border-bottom: 1px solid #f3f4f6;
            white-space: nowrap;
        }
        tr:last-child td { border-bottom: 0; }
        tr:hover td { background: #fafafa; }

        /* ===== Cards / Formulare ===== */
        .card-outer {
            display: flex;
            justify-content: center;
            margin-bottom: 20px;
        }
        .card {
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            overflow: hidden;
            width: 100%;
            max-width: 520px;
            box-shadow: 0 1px 4px rgba(0,0,0,.06);
        }
        .card-header {
            background: #3a3a3a;
            padding: 12px 18px;
            display: flex;
            align-items: center;
            gap: 8px;
            outline: none;
        }
        .card-header-dot {
            width: 7px; height: 7px;
            border-radius: 50%;
            background: #b08a2e;
            flex-shrink: 0;
        }
        .card-title {
            font-size: 13px;
            font-weight: 600;
            color: #e8d9c0;
            letter-spacing: .02em;
        }
        .card-body { padding: 20px; }
        .card-footer {
            padding: 12px 18px;
            background: #fafafa;
            border-top: 1px solid #f3f4f6;
            display: flex;
            gap: 8px;
        }
        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            margin-bottom: 14px;
        }
        .form-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
            margin-bottom: 14px;
        }
        .form-group label {
            font-size: 12px;
            font-weight: 600;
            color: #6b7280;
        }
        .form-group input,
        .form-group select,
        .form-group textarea {
            padding: 8px 10px;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            font-size: 13px;
            color: #111827;
            font-family: inherit;
            background: #fff;
        }
        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #2e7d32;
            box-shadow: 0 0 0 3px rgba(46,125,50,.1);
        }
        .form-group small {
            font-size: 12px;
            color: #9ca3af;
        }

        /* Checkboxen in Rollen-Liste */
        .check-list { display: flex; flex-direction: column; gap: 6px; }
        .check-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 7px 10px;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            font-size: 13px;
            color: #374151;
            cursor: pointer;
        }
        .check-item:hover { background: #f9fafb; }
        .check-item input[type=checkbox] {
            width: 15px; height: 15px;
            accent-color: #2e7d32;
            cursor: pointer;
            padding: 0; border: none; box-shadow: none;
        }

        /* Buttons */
        .btn-row {
            display: flex;
            gap: 8px;
            margin-top: 16px;
            padding-top: 14px;
            border-top: 1px solid #f3f4f6;
        }
        .btn {
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            border: none;
            font-family: inherit;
            text-decoration: none;
            display: inline-block;
        }
        .btn-primary {
            background: #3a3a3a;
            color: #e8d9c0;
            border: 1px solid #3a3a3a;
        }
        .btn-primary:hover {
            background: #2a2a2a;
            border-color: #2a2a2a;
        }
        .btn-secondary {
            background: #fff;
            color: #374151;
            border: 1px solid #e5e7eb;
        }
        .btn-secondary:hover { background: #f9fafb; }
        .btn-danger {
            background: transparent;
            color: #b08a2e;
            border: 1px solid #b08a2e;
        }
        .btn-danger:hover {
            background: rgba(176,138,46,.08);
        }
        .btn-sm { padding: 5px 10px; font-size: 12px; }

        /* Badges */
        .badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
        }
        .badge-green { background: #dcfce7; color: #15803d; }
        .badge-gray  { background: #f3f4f6; color: #6b7280; }
        .badge-amber { background: #fef3c7; color: #b45309; }
        .badge-red   { background: #fee2e2; color: #b91c1c; }

        /* Alerts */
        .alert {
            padding: 10px 14px;
            border-radius: 6px;
            margin-bottom: 14px;
            font-size: 13px;
        }
        .alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
        .alert-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
        .alert-info    { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }

        /* Page title */
        .page-title {
            font-size: 17px;
            font-weight: 700;
            color: #1f2937;
            margin-bottom: 20px;
        }

/* ===== Auth-Layout (Login, Erstlogin) ===== */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
    padding: 40px 16px;
}
.auth-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
