* {
    box-sizing: border-box;
}

html {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f6f8;
    color: #1f2933;
}

body {
    margin: 0;
}

.container {
    width: min(92%, 900px);
    margin: 0 auto;
    padding: 3rem 0;
}

header {
    margin-bottom: 2rem;
}

h1 {
    margin-bottom: 0.25rem;
}

.subtitle {
    margin-top: 0;
    color: #52606d;
}

.card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

button {
    padding: 0.75rem 1.25rem;
    border: 0;
    border-radius: 0.5rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.hint {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #52606d;
}

/* Tabellen
-------------------------------------------------- */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 0.8rem 1rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #d9dee5;
}

th {
    font-weight: 600;
    white-space: nowrap;
    background: #f5f7f9;
}

tbody tr:hover {
    background: #f8fafc;
}


/* Statusanzeige
-------------------------------------------------- */

.status {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Aktiv – Grün */

.status-active {
    background: #e8f5e9;
    border-color: #b7dfbd;
    color: #25602d;
}

/* Deaktiviert – Rot */

.status-disabled {
    background: #fbecec;
    border-color: #e6bcbc;
    color: #8a3434;
}

/* Einladung noch nicht erzeugt – Blau */

.status-invitation {
    background: #eaf2f8;
    border-color: #bfd3e2;
    color: #365f7c;
}

/* Formulare
-------------------------------------------------- */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    max-width: 32rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd2d9;
    border-radius: 0.4rem;
    font: inherit;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

form button {
    padding: 0.65rem 1rem;
    border: 0;
    border-radius: 0.4rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* Aktivierung ausstehend – Gelb */

.status-pending {
    background: #fff8df;
    border-color: #ead99d;
    color: #735f20;
}

/* Einladung abgelaufen – Orange */

.status-expired {
    background: #fff0df;
    border-color: #e8c49d;
    color: #87551f;
}

/* Einladung widerrufen – Grau */

.status-revoked {
    background: #eef1f3;
    border-color: #cfd6dc;
    color: #596773;
}

/* Benutzerverwaltung: dezente Statusfarbe der gesamten Zeile */

.user-row.status-active {
    background: #f5fbf6;
}

.user-row.status-invitation {
    background: #f5f9fc;
}

.user-row.status-pending {
    background: #fffdf3;
}

.user-row.status-expired {
    background: #fff8f0;
}

.user-row.status-revoked {
    background: #f7f8f9;
}

.user-row.status-disabled {
    background: #fdf5f5;
}


/* Statusfarbe auch beim Überfahren erhalten */

.user-row.status-active:hover {
    background: #edf7ef;
}

.user-row.status-invitation:hover {
    background: #edf5fa;
}

.user-row.status-pending:hover {
    background: #fff9e5;
}

.user-row.status-expired:hover {
    background: #fff1e2;
}

.user-row.status-revoked:hover {
    background: #eef1f3;
}

.user-row.status-disabled:hover {
    background: #f9eaea;
}

/* Benutzerverwaltung: Aktionsschaltflächen */

.user-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.user-actions form {
    margin: 0;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #aab4be;
    border-radius: 7px;
    background: #f4f6f8;
    color: #18212b;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.action-button:hover {
    background: #e5e9ed;
}

.action-button-primary {
    background: #18212b;
    border-color: #18212b;
    color: #ffffff;
}

.action-button-primary:hover {
    background: #303c48;
}

.action-note {
    color: #65727e;
    font-size: 0.9rem;
}
