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

    :root {
      --bg:        #1a1a1a;
      --sidebar:   #111111;
      --surface:   #222222;
      --surface2:  #2a2a2a;
      --border:    #333333;
      --accent:    #65000B;
      --accent2:   #8B0014;
      --text:      #f0f0f0;
      --text-muted:#888888;
      --radius:    6px;
      --sidebar-w: 220px;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
    }

    /* ── LOGIN ─────────────────────────────────────────────────────── */
    #login-screen {
      display: flex; align-items: center; justify-content: center;
      min-height: 100vh; background: var(--bg);
    }

    .login-box {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 8px; padding: 48px 40px;
      width: 100%; max-width: 380px; text-align: center;
    }

    .login-box img { width: 140px; margin-bottom: 32px; }
    .login-box h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 8px; }
    .login-box p  { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }

    .login-field {
      width: 100%; padding: 13px 16px;
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius); color: var(--text);
      font-size: 0.95rem; margin-bottom: 12px; outline: none;
      font-family: inherit; transition: border-color 0.2s;
    }
    .login-field:focus { border-color: var(--accent); }
    .login-field::placeholder { color: var(--text-muted); }

    .btn-login {
      width: 100%; padding: 13px; background: var(--accent);
      color: #fff; border: none; border-radius: var(--radius);
      font-size: 0.95rem; font-weight: 600; cursor: pointer;
      transition: background 0.2s; margin-top: 4px; font-family: inherit;
    }
    .btn-login:hover { background: var(--accent2); }
    .btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

    .login-error {
      color: var(--accent2); font-size: 0.85rem;
      margin-top: 12px; display: none;
    }

    /* ── MODAL ─────────────────────────────────────────────────────── */
    .modal-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.7); z-index: 1000;
      align-items: center; justify-content: center;
    }
    .modal-overlay.open { display: flex; }

    .modal {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 8px; padding: 32px;
      width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto;
    }

    .modal h3 {
      font-size: 1.1rem; font-weight: 700; margin-bottom: 20px;
      display: flex; align-items: center; gap: 8px;
    }
    .modal h3::before {
      content: ''; display: inline-block;
      width: 3px; height: 18px;
      background: var(--accent); border-radius: 2px;
    }

    .modal-field {
      width: 100%; padding: 11px 14px;
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius); color: var(--text);
      font-size: 0.9rem; margin-bottom: 10px; outline: none;
      font-family: inherit; transition: border-color 0.2s;
    }
    .modal-field:focus { border-color: var(--accent); }
    .modal-field::placeholder { color: var(--text-muted); }

    .modal-actions { display: flex; gap: 10px; margin-top: 16px; }

    .modal-msg { font-size: 0.85rem; margin-top: 10px; display: none; }
    .modal-msg.success { color: #2ecc71; display: block; }
    .modal-msg.error   { color: var(--accent2); display: block; }

    /* ── APP LAYOUT ────────────────────────────────────────────────── */
    #app { display: none; min-height: 100vh; }

    /* ── SIDEBAR ───────────────────────────────────────────────────── */
    .sidebar {
      position: fixed; top: 0; left: 0;
      width: var(--sidebar-w); height: 100vh;
      background: var(--sidebar); border-right: 1px solid #1e1e1e;
      display: flex; flex-direction: column;
      overflow-y: auto; z-index: 100;
    }

    .sidebar-logo {
      padding: 20px 16px 16px;
      border-bottom: 1px solid #1e1e1e;
      flex-shrink: 0;
    }
    .sidebar-logo img { width: 100%; max-width: 150px; display: block; }

    /* Einzelner Nav-Link (z.B. Übersicht) */
    .nav-item {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 16px; cursor: pointer;
      color: #999; font-size: 0.88rem; font-weight: 500;
      transition: background 0.15s, color 0.15s;
      user-select: none; border-left: 3px solid transparent;
    }
    .nav-item:hover  { background: #1a1a1a; color: var(--text); border-left-color: #444; }
    .nav-item.active { background: #1f1f1f; color: #fff; border-left-color: var(--accent); }
    .nav-icon { font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }

    /* Accordion-Bereich */
    .nav-section { border-left: 3px solid transparent; }

    .nav-section-header {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 16px; cursor: pointer;
      color: #999; font-size: 0.88rem; font-weight: 500;
      transition: background 0.15s, color 0.15s;
      user-select: none;
    }
    .nav-section-header:hover { background: #1a1a1a; color: var(--text); }
    .nav-section-header.has-active { color: #fff; }

    .nav-section-chevron {
      margin-left: auto; font-size: 0.7rem; color: #555;
      transition: transform 0.2s;
    }
    .nav-section.open .nav-section-chevron { transform: rotate(90deg); }

    .nav-section-items {
      display: none; background: #0d0d0d;
    }
    .nav-section.open .nav-section-items { display: block; }

    .nav-sub-item {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 16px 9px 36px; cursor: pointer;
      color: #777; font-size: 0.85rem;
      transition: background 0.15s, color 0.15s;
      user-select: none; border-left: 3px solid transparent;
    }
    .nav-sub-item:hover  { background: #1a1a1a; color: var(--text); }
    .nav-sub-item.active { background: #1f1f1f; color: #fff; border-left-color: var(--accent); }

    .nav-empty-hint {
      padding: 8px 16px 8px 36px;
      color: #444; font-size: 0.8rem; font-style: italic;
    }

    .sidebar-label {
      font-size: 0.65rem; font-weight: 700;
      letter-spacing: 0.12em; text-transform: uppercase;
      color: #555; padding: 18px 16px 6px;
    }

    .sidebar-footer {
      margin-top: auto; padding: 12px 0;
      border-top: 1px solid #1e1e1e; flex-shrink: 0;
    }
    .sidebar-user {
      padding: 10px 16px 8px; font-size: 0.8rem; color: #666;
    }
    .sidebar-user strong { display: block; color: #aaa; font-size: 0.85rem; }

    .changepw-btn, .logout-btn {
      display: flex; align-items: center; gap: 10px;
      color: #666; font-size: 0.85rem; cursor: pointer;
      padding: 9px 16px; border-left: 3px solid transparent;
      transition: background 0.15s, color 0.15s; user-select: none;
    }
    .changepw-btn:hover { background: #1a1a1a; color: var(--text); }
    .logout-btn:hover   { background: #1a1a1a; color: var(--accent2); }

    .feedback-btn {
      display: flex; align-items: center; gap: 10px;
      color: #666; font-size: 0.85rem; cursor: pointer;
      padding: 9px 16px; border-left: 3px solid transparent;
      transition: background 0.15s, color 0.15s; user-select: none;
    }
    .feedback-btn:hover  { background: #1a1a1a; color: var(--text); }
    .feedback-btn.active { background: #1f1f1f; color: #fff; border-left-color: var(--accent); }

    /* Badge für ungelesene Feedbacks */
    .feedback-badge {
      display: inline-flex; align-items: center; justify-content: center;
      background: var(--accent); color: #fff;
      font-size: 0.68rem; font-weight: 700;
      min-width: 18px; height: 18px; border-radius: 9px;
      padding: 0 4px; margin-left: auto; flex-shrink: 0;
    }

    /* Feedback-Formular */
    .feedback-form .fb-group { margin-bottom: 16px; }
    .feedback-form label {
      display: block; font-size: 0.85rem;
      color: #aaa; margin-bottom: 6px;
    }
    .char-count { font-size: 0.78rem; color: #555; text-align: right; margin-top: 4px; }

    /* Feedback-Filter */
    .feedback-filter { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
    .feedback-filter-btn {
      padding: 6px 14px; border-radius: 20px;
      background: #2a2a2a; border: 1px solid #333;
      color: #888; font-size: 0.82rem; cursor: pointer;
      transition: all 0.15s; font-family: inherit;
    }
    .feedback-filter-btn:hover { border-color: #555; color: var(--text); }
    .feedback-filter-btn.active {
      background: var(--accent); border-color: var(--accent); color: #fff;
    }

    /* Feedback-Status-Labels */
    .fb-status-neu       { color: #e67e22; font-weight: 600; font-size: 0.82rem; }
    .fb-status-gelesen   { color: #2ecc71; font-size: 0.82rem; }
    .fb-status-archiviert{ color: #555; font-size: 0.82rem; }

    /* Feedback-Tabelle */
    .feedback-table th {
      font-size: 0.75rem; text-transform: uppercase;
      letter-spacing: 0.05em; color: #666;
    }
    .feedback-table td { font-size: 0.87rem; vertical-align: middle; }
    .fb-actions { display: flex; gap: 4px; flex-wrap: wrap; }
    .fb-actions .btn { padding: 4px 8px; font-size: 0.78rem; }

    /* ── MAIN ──────────────────────────────────────────────────────── */
    .main {
      margin-left: var(--sidebar-w); min-height: 100vh;
      padding: 32px 36px; background: var(--bg);
    }

    .tool-view { display: none; }
    .tool-view.active { display: block; }

    .page-header {
      margin-bottom: 28px; padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }
    .page-header h1 {
      font-size: 1.4rem; font-weight: 700; margin-bottom: 4px;
      display: flex; align-items: center; gap: 10px;
    }
    .page-header h1::before {
      content: ''; display: inline-block;
      width: 4px; height: 22px;
      background: var(--accent); border-radius: 2px;
    }
    .page-header p { color: var(--text-muted); font-size: 0.85rem; margin-left: 14px; }

    .card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px;
    }

    /* Placeholder für leere Bereiche */
    .section-placeholder {
      text-align: center; padding: 60px 20px; color: var(--text-muted);
    }
    .section-placeholder .placeholder-icon { font-size: 3rem; margin-bottom: 16px; }
    .section-placeholder h2 { font-size: 1.2rem; color: #666; margin-bottom: 8px; }
    .section-placeholder p  { font-size: 0.9rem; }

    /* Welcome Grid */
    .welcome-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 16px; margin-top: 8px;
    }
    .tool-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 24px 20px;
      cursor: pointer; transition: border-color 0.2s, background 0.2s;
      text-align: center;
    }
    .tool-card:hover { border-color: var(--accent); background: #2a2a2a; }
    .tool-card-icon  { font-size: 2rem; margin-bottom: 12px; }
    .tool-card h3    { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
    .tool-card p     { font-size: 0.8rem; color: var(--text-muted); }

    /* Buttons */
    .btn {
      padding: 10px 20px; border: none; border-radius: var(--radius);
      font-size: 0.9rem; font-weight: 600; cursor: pointer;
      transition: background 0.2s; white-space: nowrap; font-family: inherit;
    }
    .btn-primary { background: var(--accent); color: #fff; }
    .btn-primary:hover { background: var(--accent2); }
    .btn-ghost {
      background: var(--surface2); color: var(--text-muted);
      border: 1px solid var(--border);
    }
    .btn-ghost:hover { background: var(--border); color: var(--text); }

    /* ── CHECKLISTE ────────────────────────────────────────────────── */
    .checklist-input-area { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

    .checklist-textarea {
      flex: 1; min-width: 200px; min-height: 120px;
      padding: 14px 16px; background: var(--surface2);
      border: 1px solid var(--border); border-radius: var(--radius);
      color: var(--text); font-size: 0.9rem; resize: vertical;
      outline: none; font-family: inherit; transition: border-color 0.2s;
    }
    .checklist-textarea:focus { border-color: var(--accent); }
    .checklist-textarea::placeholder { color: var(--text-muted); }

    .checklist-actions { display: flex; flex-direction: column; gap: 8px; }

    .checklist-toolbar {
      display: flex; align-items: center; gap: 12px;
      margin-bottom: 16px; flex-wrap: wrap;
    }
    .checklist-progress { font-size: 0.85rem; color: var(--text-muted); margin-right: auto; }
    .checklist-items    { display: flex; flex-direction: column; gap: 8px; }

    .checklist-item {
      display: flex; align-items: center; gap: 12px;
      padding: 12px 16px; background: var(--surface2);
      border: 1px solid var(--border); border-radius: var(--radius);
      transition: opacity 0.2s;
    }
    .checklist-item.done { opacity: 0.5; }
    .checklist-item.done .item-text { text-decoration: line-through; color: var(--text-muted); }
    .checklist-item input[type="checkbox"] {
      width: 18px; height: 18px; accent-color: var(--accent);
      cursor: pointer; flex-shrink: 0;
    }
    .item-text   { flex: 1; font-size: 0.95rem; }
    .item-delete {
      background: none; border: none; color: var(--text-muted);
      cursor: pointer; font-size: 1rem; padding: 4px;
      border-radius: 4px; transition: color 0.15s; flex-shrink: 0;
    }
    .item-delete:hover { color: var(--accent2); }

    .progress-bar-wrap {
      height: 4px; background: var(--surface2);
      border-radius: 2px; margin-bottom: 20px; overflow: hidden;
    }
    .progress-bar-fill {
      height: 100%; background: var(--accent);
      border-radius: 2px; transition: width 0.3s;
    }

    /* ── ADMIN ─────────────────────────────────────────────────────── */
    .admin-section { margin-bottom: 32px; }
    .admin-section > h2 {
      font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
      text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px;
    }

    .users-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
    .users-table th {
      text-align: left; padding: 10px 14px;
      background: var(--surface2); color: var(--text-muted);
      font-weight: 600; font-size: 0.78rem;
      text-transform: uppercase; letter-spacing: 0.06em;
      border-bottom: 1px solid var(--border);
    }
    .users-table td {
      padding: 11px 14px; border-bottom: 1px solid var(--border);
      vertical-align: middle;
    }
    .users-table tr:last-child td { border-bottom: none; }
    .users-table tr:hover td { background: var(--surface2); }

    .badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 0.75rem; font-weight: 600; }
    .badge-admin { background: rgba(192,57,43,0.2); color: #e88; }
    .badge-user  { background: rgba(255,255,255,0.07); color: #aaa; }

    .btn-sm {
      padding: 5px 12px; font-size: 0.8rem; border: none;
      border-radius: var(--radius); cursor: pointer;
      font-family: inherit; font-weight: 600; transition: background 0.15s;
    }
    .btn-danger { background: rgba(192,57,43,0.2); color: #e88; }
    .btn-danger:hover { background: var(--accent); color: #fff; }
    .btn-edit { background: var(--surface2); color: #aaa; border: 1px solid var(--border); }
    .btn-edit:hover { background: var(--border); color: var(--text); }

    .invite-box {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 16px 20px;
      display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    }
    .invite-box p { font-size: 0.88rem; color: var(--text-muted); flex: 1; min-width: 200px; }
    .invite-link-field {
      width: 100%; padding: 10px 14px;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); color: var(--text);
      font-size: 0.82rem; margin-top: 12px; outline: none;
      font-family: monospace; cursor: text;
    }
    .copy-success { font-size: 0.8rem; color: #2ecc71; display: none; margin-top: 6px; }

    /* Permissions Modal */
    .perm-section {
      border: 1px solid var(--border); border-radius: var(--radius);
      margin-bottom: 10px; overflow: hidden;
    }
    .perm-section-header {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 14px; background: var(--surface2);
      font-weight: 600; font-size: 0.9rem;
    }
    .perm-tools { padding: 8px 14px 8px 32px; }
    .perm-row {
      display: flex; align-items: center; gap: 10px;
      padding: 5px 0; font-size: 0.88rem; color: #ccc;
    }
    .perm-row input[type="checkbox"] {
      width: 16px; height: 16px;
      accent-color: var(--accent); cursor: pointer;
    }
    .perm-label-muted { color: var(--text-muted); font-size: 0.8rem; margin-left: auto; }

    /* ── ADMIN TABS ───────────────────────────────────────────────── */
    .admin-tabs {
      display: flex; gap: 4px; margin-bottom: 20px;
      border-bottom: 1px solid var(--border); padding-bottom: 0;
    }
    .admin-tab {
      padding: 9px 18px; background: none; border: none;
      border-bottom: 2px solid transparent; color: var(--text-muted);
      font-size: 0.88rem; font-weight: 600; cursor: pointer;
      font-family: inherit; transition: color 0.15s, border-color 0.15s;
      margin-bottom: -1px;
    }
    .admin-tab:hover  { color: var(--text); }
    .admin-tab.active { color: var(--text); border-bottom-color: var(--accent); }

    .admin-tab-content { display: none; }
    .admin-tab-content.active { display: block; }

    /* ── AKTIVITÄTSLOG ────────────────────────────────────────────── */
    .log-list { display: flex; flex-direction: column; gap: 6px; }

    .log-item {
      display: flex; align-items: flex-start; gap: 12px;
      padding: 10px 14px; background: var(--surface2);
      border: 1px solid var(--border); border-radius: var(--radius);
      font-size: 0.85rem;
    }
    .log-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; margin-top: 1px; }
    .log-body { flex: 1; min-width: 0; }
    .log-user { font-weight: 600; color: var(--text); }
    .log-detail { color: var(--text-muted); margin-top: 1px; }
    .log-time  { color: #555; font-size: 0.78rem; flex-shrink: 0; white-space: nowrap; }

    .log-type-tool_use        .log-icon::before { content: '🔧'; }
    .log-type-registration    .log-icon::before { content: '👤'; }
    .log-type-permission_change .log-icon::before { content: '🔐'; }

    /* ── SYSTEM-STATUS ─────────────────────────────────────────────── */
    .status-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 12px; margin-bottom: 20px;
    }
    .status-card {
      background: var(--surface2); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 16px 18px;
    }
    .status-card-label {
      font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 6px;
    }
    .status-card-value {
      font-size: 1.15rem; font-weight: 700; color: var(--text);
    }
    .status-card-sub {
      font-size: 0.75rem; color: #666; margin-top: 2px;
    }

    .file-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
    .file-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); }
    .file-table tr:last-child td { border-bottom: none; }
    .file-table td:last-child { text-align: right; color: var(--text-muted); }

    /* Responsive */
    .mobile-toggle {
      display: none; position: fixed; top: 16px; left: 16px;
      z-index: 200; background: var(--surface); border: 1px solid var(--border);
      border-radius: 8px; padding: 10px 12px; cursor: pointer;
      font-size: 1.1rem; color: var(--text);
    }
    @media (max-width: 768px) {
      .mobile-toggle { display: block; }
      .sidebar { transform: translateX(-100%); transition: transform 0.25s; }
      .sidebar.open { transform: translateX(0); }
      .main { margin-left: 0; padding: 24px 16px; padding-top: 64px; }
    }
