/* Benutzerverwaltung. Setzt auf den vorhandenen Listenstil der Ticketansicht auf
   und ergaenzt nur, was es dort noch nicht gibt: Formular, Rollenchips, Protokoll. */

.users-notice {
    max-width: 720px;
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid #9fd6a4;
    border-radius: 10px;
    background: #f1fbef;
    color: #216c2c;
    font-size: 13px;
}

.users-form {
    margin: 0 0 22px;
    padding: 22px 24px;
    border: 1px solid #c7dce8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px #294f670e;
}

.users-form h3 {
    margin: 0 0 16px;
    font-size: 18px;
    letter-spacing: -0.03em;
}

.users-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 18px;
}

.users-form label {
    display: grid;
    gap: 6px;
    color: #3d596d;
    font-size: 12px;
    font-weight: 800;
}

.users-form input,
.users-form select {
    width: 100%;
    border: 1px solid #b6cfdd;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fbfdff;
    color: #17384e;
    font: inherit;
    outline: none;
}

.users-form input:focus,
.users-form select:focus {
    border-color: #5fb85f;
    box-shadow: 0 0 0 3px #9be97c33;
}

.users-form input:disabled,
.users-form select:disabled {
    background: #eef3f6;
    color: #6b8091;
    cursor: not-allowed;
}

.users-form label small {
    color: #6a8290;
    font-size: 11px;
    font-weight: 400;
}

.users-form > button,
.users-form-actions button {
    margin-top: 18px;
    border: 0;
    border-radius: 8px;
    padding: 12px 18px;
    background: #2f8744;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.users-form > button:disabled,
.users-form-actions button:disabled {
    opacity: 0.62;
    cursor: wait;
}

.users-form-actions {
    display: flex;
    gap: 10px;
}

.users-form-actions .users-secondary {
    background: #fff;
    border: 1px solid #9fbedb;
    color: #1b3047;
}

.users-permissions {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f2f9fd;
    color: #3d596d;
    font-size: 12px;
}

.users-permissions b {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.users-permissions ul {
    margin: 0;
    padding-left: 18px;
    line-height: 1.6;
}

/* Rollen als farbige Chips, damit die Tabelle auf einen Blick lesbar ist. */
.users-role-admin {
    background: #ffe9c9;
    color: #8a5411;
}

.users-role-inhaber {
    background: #dbe7ff;
    color: #24478f;
}

.users-role-buero {
    background: #e6f7dd;
    color: #25753a;
}

.users-state-active {
    color: #25753a;
    font-weight: 800;
}

.users-state-inactive {
    color: #a82028;
    font-weight: 800;
}

.users-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.users-actions button {
    border: 1px solid #9fbedb;
    border-radius: 6px;
    padding: 7px 10px;
    background: #fff;
    color: #1b3047;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.users-actions button:hover:not(:disabled) {
    border-color: #6cc55a;
    background: #f1fbf3;
}

.users-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.users-actions .users-danger {
    border-color: #e0a9a4;
    color: #a1332d;
}

.users-actions .users-danger:hover:not(:disabled) {
    border-color: #d66b6b;
    background: #fff4f3;
}

.users-audit {
    margin-top: 26px;
    padding: 20px 22px;
    border: 1px solid #c7dce8;
    border-radius: 12px;
    background: #fff;
}

.users-audit h3 {
    margin: 0 0 12px;
    font-size: 15px;
}

.users-audit ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.users-audit li {
    display: flex;
    gap: 14px;
    align-items: baseline;
    padding-bottom: 8px;
    border-bottom: 1px solid #e6eef3;
    font-size: 12px;
}

.users-audit li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.users-audit b {
    flex: 0 0 150px;
    color: #3d596d;
    font-size: 11px;
}

.users-audit span {
    color: #244258;
}

@media (max-width: 800px) {
    .users-audit li {
        flex-direction: column;
        gap: 2px;
    }

    .users-audit b {
        flex: none;
    }
}

/* Dunkles Farbschema, passend zum Rest der Anwendung. */
:root[data-theme='dark'] .users-form,
:root[data-theme='dark'] .users-audit {
    border-color: #34505f;
    background: #172a36;
    color: #e5eff5;
}

:root[data-theme='dark'] .users-form input,
:root[data-theme='dark'] .users-form select {
    border-color: #3a5868;
    background: #132630;
    color: #e3eff5;
}

:root[data-theme='dark'] .users-form label,
:root[data-theme='dark'] .users-permissions,
:root[data-theme='dark'] .users-audit span {
    color: #b4c5cf;
}

:root[data-theme='dark'] .users-permissions {
    background: #1d3544;
}

:root[data-theme='dark'] .users-notice {
    border-color: #39704a;
    background: #163023;
    color: #d7f3d9;
}

:root[data-theme='dark'] .users-actions button {
    border-color: #3a5868;
    background: #132630;
    color: #dceaf2;
}

:root[data-theme='dark'] .users-audit li {
    border-color: #294553;
}
