.users-table-container {
    margin-top: 20px;
}

.users-logo {
    font-weight: bold;
    font-size: 1.2rem;
    color:var(--color-brand-text);
    margin-right: 20px;
}

.page-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color:var(--color-brand-text);
    line-height: 1;
}

.users-modal-content {
    max-width: 600px;
    height: auto;
}

.users-modal-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.users-modal-title {
    margin-top: 0;
    margin-bottom: 5px;
}

.users-select {
    height: 44px;
}

.users-modal-actions {
    border-top: 1px solid var(--color-border);
    padding-top: 15px;
    text-align: right;
}

.action-column {
    text-align: right;
    width: 120px;
}

.btn-cancel {
    margin-right: 10px;
}

.empty-table-cell {
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted);
}

.never-logged-in {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Status-Badge (User-Zustand: Aktiv/Eingeladen/Inaktiv/Gesperrt).
   Pastell-Pill-Optik analog zu .badge (tickets.css) und .role-* - eine Familie. */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    border: 1px solid transparent;
    min-width: 50px;
    text-align: center;
}
/* Uppercase-Variante (aktueller Standard, wie .badge-status-*, .role-*) */
.status-ACTIVE,
.status-active {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}
.status-INVITED,
.status-invited {
    background: #dbeafe;
    color: #1e3a8a;
    border-color: #bfdbfe;
}
.status-DISABLED,
.status-disabled {
    background: var(--ci-gray-100);
    color: var(--ci-gray-700);
    border-color: var(--ci-gray-200);
}
.status-LOCKED,
.status-locked {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

/* Action Buttons in der Tabelle */
.action-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 6px;
    font-size: 16px;
    border-radius: 4px;

}
.action-btn:hover {
    background-color: var(--color-surface-muted);
    color:var(--color-brand-text);
}
.action-btn.delete:hover {
    color: var(--color-error);
}

/* Formular Layout im Modal */
.user-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.user-form-grid .full-width {
    grid-column: span 2;
}

#user-form{
    padding: 10px;
}

/* =========================================
   Pattern-Library-Klassen (siehe design.html)
   ========================================= */

/* Rolle als reiner Text — Admin in CI-Orange als Akzent, User/Guest unaufgeregt grau.
   Bewusst kein Pill-Background: sitzt in dichten Tabellen ruhiger und
   kollidiert nicht optisch mit den echten Status-Badges daneben. */
.role-ADMIN,
.role-USER,
.role-GUEST {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.role-ADMIN { color: var(--ci-orange-700); }
.role-USER  { color: var(--color-text); }
.role-GUEST { color: var(--color-text-muted); }

/* Memberships-Liste (Checkboxen fuer Gruppen-Zugehoerigkeit) */
.memberships {
    border: 1px solid var(--color-border-panel);
    border-radius: 6px;
    padding: 8px 10px;
    max-height: 240px;
    overflow-y: auto;
    background: var(--color-surface);
}
.memberships label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
}
.memberships label:hover { background: var(--color-surface-muted); }
.memberships input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--ci-orange-600);
}

/* Member-Row (Gruppen-Detail: Mitglied mit Leader-Toggle) */
.member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
}
.member-row:last-child { border-bottom: none; }
.member-row .info { flex: 1; min-width: 0; }
.member-row .info .name {
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text-strong);
}
.member-row .info .email {
    font-size: 11px;
    color: var(--color-text-muted);
}
.leader-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
    cursor: pointer;
}
.leader-toggle input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--ci-orange-600);
}

/* Hinweis unter dem Status: Einladungslink verschickt und gueltig bis ... */
.invite-note { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
