:root {
    --bg: #f5f7fa;
    --card: #ffffff;
    --primary: #2563eb;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
}

* {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

header h1 {
    margin: 0;
}

nav a {
    margin-left: 1rem;
    text-decoration: none;
    color: var(--primary);
}

.container {
    max-width: 900px;
    margin: auto;
    padding: 1rem;
}

footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--muted);
}

h2, h3 {
    margin-top: 0;
}

.card {
    background: var(--card);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.center-card {
    max-width: 400px;
    margin: 4rem auto;
}

label {
    display: block;
    margin-bottom: .25rem;
    font-weight: 600;
}

input, textarea {
    width: 100%;
    padding: .6rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

button {
    padding: .6rem 1.2rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

button.primary {
    background: var(--primary);
    color: white;
}

.grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 1rem;
}

.list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.list-item {
    background: var(--card);
    padding: 1rem;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
}

.list-item:hover {
    border-color: var(--primary);
}

.list-item span {
    display: block;
    color: var(--muted);
    font-size: .9rem;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-item {
    background: var(--card);
    padding: 1rem;
    border-left: 4px solid var(--primary);
}

.muted {
    color: var(--muted);
}

.back {
    display: inline-block;
    margin-bottom: 1rem;
    text-decoration: none;
    color: var(--primary);
}

select {
    width: 100%;
    padding: .6rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
}
.timeline-item small {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: .3rem;
}
form.grid input[type="date"] {
    padding: .5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}
/* Filterformular */
.filter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.filter-form .form-group {
    display: flex;
    flex-direction: column;
}

.filter-form label {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.filter-form input {
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.filter-form button {
    align-self: flex-start;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    margin-top: 0.5rem;
}

@media (min-width: 600px) {
    .filter-form {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 1rem 1.5rem;
    }
    .filter-form .form-group {
        flex: 1 1 150px;
    }
    .filter-form button {
        flex: 0 0 auto;
        margin-top: 0;
    }
}

form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.8rem;
}

form .form-group label {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

form .form-group input {
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.list-item {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.list-item:hover {
    border-color: var(--primary);
}

.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.file-row form {
    margin: 0;
}

button.danger {
    background: #dc2626;
    color: white;
}
button.danger:hover {
    opacity: 0.9;
}

.client-meta {
    margin-top: 0.5rem;
    color: var(--muted);
    line-height: 1.5;
}

.client-meta div {
    margin-bottom: 0.2rem;
}

.client-meta a {
    color: var(--primary);
    text-decoration: none;
}
.client-meta a:hover {
    text-decoration: underline;
}

.file-upload-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.file-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.file-title a {
    text-decoration: none;
    color: inherit;
}
.file-title a:hover {
    text-decoration: underline;
}

.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 0.85rem;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.sidebar-head {
    padding: 1rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.sidebar-title {
    font-weight: 700;
}

.sidebar-action {
    text-decoration: none;
    color: var(--primary);
}

.sidebar-list {
    padding: 0.5rem;
    overflow-y: auto;
    flex: 1;
}

.sidebar-item {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}

.sidebar-item:hover {
    border-color: var(--border);
}

.sidebar-item.active {
    border-color: var(--primary);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.main {
    flex: 1;
    padding: 1rem;
}



.tabs a {
    text-decoration: none;
    color: var(--muted);
    margin-left: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;
}

.tabs a.active {
    color: var(--text);
    border-bottom-color: var(--primary);
}



.app-shell {
    display: flex;
    min-height: 100vh;
}

.login-wrapper {
    max-width: 400px;
    margin: 4rem auto;
}

.topbar {
    height: 56px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
}

.topbar-left {
    font-size: 1.1rem;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-right a {
    text-decoration: none;
    color: var(--primary);
}

.topbar-right .user {
    color: var(--muted);
}

/* App-Layout unter Topbar verschieben */
.app-shell {
    display: flex;
    min-height: calc(100vh - 56px);
}

a.button {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid var(--border);
    color: inherit;
}
a.button.secondary:hover {
    border-color: var(--primary);
}


.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}


.user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.user-link {
    flex: 1;
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 0.2rem 0;
}

.user-row:hover {
    border-color: var(--primary);
    cursor: pointer;
}

.user-link:hover strong {
    text-decoration: underline;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
}
@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
}

a.button.secondary {
    border: 1px solid var(--border);
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.row-between{
    display:flex;
    justify-content:space-between;
}

.button.danger{
    background:#b00020;
    color:#fff;
    border-color:#b00020;
}
.button.danger:hover{
    filter: brightness(0.95);
}

/* =========================================================
   Verlauf: Filter-Aktionen
   ========================================================= */
.history-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.history-filter-actions .button.active {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.history-filter-panel > summary {
    cursor: pointer;
    font-size: 1.17rem;
    font-weight: 600;
}

.history-filter-panel[open] > summary {
    margin-bottom: 1rem;
}

.history-filter-panel .history-filter-form {
    margin: 0;
    padding: 0;
    box-shadow: none;
}

.history-filter-active {
    margin-left: .6rem;
    vertical-align: middle;
    font-size: .75rem;
}

.filter-status {
    margin: -0.5rem 0 1rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 0.9rem;
}

/* =========================================================
   Tabellen allgemein
   ========================================================= */
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.8rem 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.table th {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    background: #f9fafb;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

/* =========================================================
   Audit-Protokoll
   ========================================================= */
.audit-page-head,
.audit-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.audit-page-head h2,
.audit-detail-head h2 {
    margin: 0;
}

.audit-page-head p,
.audit-detail-head p {
    margin: 0.25rem 0 0;
}

.audit-total {
    min-width: 92px;
    padding: 0.65rem 0.9rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
}

.audit-total span,
.audit-meta-card span,
.audit-card-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.audit-total strong {
    display: block;
    font-size: 1.35rem;
}

.audit-filter-card,
.audit-list-card,
.audit-changes-card {
    padding: 1.25rem;
}

.audit-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.audit-section-title > div {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.audit-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem 1rem;
}

.audit-filter-grid .form-group {
    margin-bottom: 0;
}

.audit-filter-grid input,
.audit-filter-grid select {
    margin-bottom: 0;
}

.audit-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.audit-period {
    margin-left: auto;
}

.audit-list-title {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.audit-table {
    min-width: 850px;
}

.audit-table tbody tr {
    transition: background 0.15s ease;
}

.audit-table tbody tr:hover {
    background: #f9fafb;
}

.audit-time-cell strong,
.audit-time-cell span,
.audit-user-cell strong,
.audit-user-cell span,
.audit-entity-cell strong,
.audit-entity-cell span {
    display: block;
}

.audit-time-cell span,
.audit-user-cell span,
.audit-entity-cell span {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.audit-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f3f4f6;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.audit-action-create {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.audit-action-update {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.audit-action-delete {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.audit-action-login,
.audit-action-logout {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #6d28d9;
}

.audit-action-export {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.audit-message-cell {
    max-width: 360px;
    line-height: 1.4;
}

.audit-detail-cell {
    text-align: right !important;
    white-space: nowrap;
}

.audit-detail-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.audit-detail-link:hover {
    text-decoration: underline;
}

.audit-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.audit-pagination-buttons {
    display: flex;
    gap: 0.5rem;
}

.audit-empty {
    padding: 1rem;
    border-radius: 8px;
    background: #f9fafb;
    color: var(--muted);
    text-align: center;
}

/* Audit-Detail */
.audit-detail-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.audit-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.audit-meta-card {
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    min-width: 0;
}

.audit-meta-card strong {
    display: block;
    overflow-wrap: anywhere;
}

.audit-message-card,
.audit-client-card {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
}

.audit-client-card strong,
.audit-client-card .muted {
    margin-right: 0.4rem;
}

.audit-field-name {
    width: 18%;
    font-weight: 700;
    white-space: nowrap;
}

.audit-value {
    padding: 0.55rem 0.65rem;
    border-radius: 7px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-height: 2.2rem;
}

.audit-value-before {
    background: #fef2f2;
    border: 1px solid #fee2e2;
}

.audit-value-after {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
}

.audit-raw-details {
    padding: 1rem 1.25rem;
}

.audit-raw-details summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 600;
}

.audit-raw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.audit-raw-grid pre {
    margin: 0;
    padding: 0.8rem;
    max-height: 380px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f9fafb;
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .audit-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .audit-meta-grid {
        grid-template-columns: 1fr 1fr;
    }

    .audit-raw-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .audit-page-head,
    .audit-detail-head,
    .audit-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .audit-total {
        width: 100%;
    }

    .audit-filter-grid,
    .audit-meta-grid {
        grid-template-columns: 1fr;
    }

    .audit-period {
        margin-left: 0;
        width: 100%;
    }
}

/* Django-Ergänzungen */
.errorlist {
    margin: -0.6rem 0 0.8rem;
    padding-left: 1.2rem;
    color: #991b1b;
    font-size: 0.9rem;
}

input[type="checkbox"] {
    width: auto;
    margin: 0 0.35rem 0 0;
}

.checkbox-row,
.compact-check {
    display: block;
}

.compact-check {
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.group-actions {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.client-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.history-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-status {
    padding: 0.7rem 0.9rem;
    margin: -0.5rem 0 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #eff6ff;
    color: #1e40af;
}

.audit-action-login_failed {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.audit-action-download {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #155e75;
}

@media (max-width: 760px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--border); }
    .sidebar-list { max-height: 240px; }
    .topbar { height: auto; min-height: 56px; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 1rem; }
    .topbar-right { flex-wrap: wrap; }
    .grid { grid-template-columns: 1fr; }
}

.inline-logout { margin: 0; display: inline; }
.link-button {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--primary);
    font: inherit;
    cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

/* Granulare Rechte / Gruppenverwaltung */
.permission-matrix {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.permission-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem;
    background: #fff;
}

.permission-section.administrative {
    background: #fffaf0;
}

.permission-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.permission-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0.4rem 0;
    font-weight: 500;
    cursor: pointer;
}

.permission-item.readonly {
    cursor: default;
    color: var(--text);
}

.permission-state {
    width: 1.1rem;
    flex: 0 0 1.1rem;
    text-align: center;
    font-weight: 700;
    color: var(--primary);
}

.group-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.group-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    background: var(--card);
}

.group-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.checkbox-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkbox-list li {
    margin: 0.35rem 0;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

button.compact,
a.button.compact {
    padding: 0.3rem 0.55rem;
    font-size: 0.85rem;
}

.history-entry-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.history-entry-head small {
    margin-bottom: 0;
}

.history-entry-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.history-entry-actions form {
    margin: 0;
}

@media (max-width: 760px) {
    .permission-matrix {
        grid-template-columns: 1fr;
    }

    .group-card-head,
    .history-entry-head {
        flex-direction: column;
    }
}

/* Einheitliche 16x16-Aktionssymbole */
.icon-action {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    text-decoration: none;
    cursor: pointer;
    vertical-align: middle;
}

.icon-action img {
    display: block;
    width: 16px;
    height: 16px;
}

.icon-action:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.icon-action:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.icon-action-delete {
    border-color: #fecaca;
}

.icon-action-delete:hover {
    border-color: #dc2626;
    background: #fef2f2;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.row-actions form,
.icon-action + form {
    margin: 0;
}

/* Schlanker Rich-Text-Editor für Verlaufsberichte */
.richtext-widget {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    overflow: hidden;
}

.richtext-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.richtext-tool {
    min-width: 30px;
    height: 30px;
    padding: 0 0.5rem;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1;
}

.richtext-tool:hover {
    border-color: var(--border);
    background: var(--card);
}

.richtext-tool:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.richtext-bold { font-weight: 700; }
.richtext-italic { font-style: italic; }
.richtext-underline { text-decoration: underline; }

.richtext-separator {
    width: 1px;
    height: 20px;
    margin: 0 0.15rem;
    background: var(--border);
}

.richtext-editor {
    min-height: 150px;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.75rem;
    outline: none;
    line-height: 1.55;
}

.richtext-editor:focus {
    box-shadow: inset 0 0 0 1px var(--primary);
}

.richtext-editor p,
.richtext-editor div,
.richtext-content p,
.richtext-content div {
    margin: 0 0 0.65rem;
}

.richtext-editor p:last-child,
.richtext-editor div:last-child,
.richtext-content p:last-child,
.richtext-content div:last-child {
    margin-bottom: 0;
}

.richtext-editor ul,
.richtext-editor ol,
.richtext-content ul,
.richtext-content ol {
    margin: 0.35rem 0 0.65rem;
    padding-left: 1.5rem;
}

.richtext-source-hidden {
    display: none !important;
}

.richtext-content {
    line-height: 1.55;
    overflow-wrap: anywhere;
}

/* Rich-Text-Toolbar: einheitliche 16x16 SVG-Symbole */
.richtext-tool {
    width: 32px;
    min-width: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.richtext-tool img {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}

.richtext-tool.active,
.richtext-tool[aria-pressed="true"] {
    border-color: #bfdbfe;
    background: #dbeafe;
}

.session-warning {
  position: fixed;
  z-index: 10000;
  right: 1rem;
  bottom: 1rem;
  width: min(24rem, calc(100vw - 2rem));
  padding: 1rem;
  border: 1px solid #d39b2a;
  border-radius: 8px;
  background: #fff8e6;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}

.session-warning:not([hidden]) {
  display: grid;
  gap: .65rem;
}

.care-chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.care-chart { margin: 0; padding: .75rem; border: 1px solid #dce5e4; border-radius: 8px; }
.care-chart figcaption { font-weight: 700; margin-bottom: .5rem; }
.care-chart canvas { display: block; width: 100%; height: auto; }
