.layout {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Pages whose main is not .content still push the footer to the bottom */
.layout > main {
    flex: 1 1 auto;
}

body {
    margin: 0;
}

.header {
    display: block;
    padding: 1rem 2rem;
    background: #1f2937;
    color: #f9fafb;
    overflow-x: auto;
}

/* Bottom bar: same palette and flex row layout as .header */
.site-footer {
    display: block;
    padding: 0.75rem 2rem;
    margin-top: auto;
    background: #1f2937;
    color: #e5e7eb;
    font-size: 0.85rem;
    overflow-x: auto;
}

.site-footer a {
    color: #93c5fd;
    text-decoration: underline;
}

.site-footer a:hover,
.site-footer a:focus {
    color: #dbeafe;
}

.site-footer-legal {
    white-space: nowrap;
}

.site-footer-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem 1.25rem;
    width: 100%;
    min-width: 0;
}

.site-footer-col--left {
    flex: 0 1 auto;
    min-width: 0;
    font-weight: 700;
    color: #f9fafb;
}

.site-footer-col--center {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    color: #d1d5db;
}

.site-footer-col--right {
    flex: 0 1 auto;
    margin-left: auto;
    min-width: 0;
    font-variant-numeric: tabular-nums;
    color: #f9fafb;
}

/*
 * Three zones in one row: logo (left) | org + user (center) | language (right).
 * Flex is used instead of grid so Safari and narrow widths keep a single horizontal bar.
 */
.header-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem 1.25rem;
    width: 100%;
    min-width: 0;
}

.header-col--left {
    flex: 0 0 auto;
    min-width: 0;
    align-self: center;
}

.header-col--center {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-center-cluster {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 1rem;
    max-width: 100%;
    text-align: center;
}

.header-col--right {
    flex: 0 1 auto;
    margin-left: auto;
    align-self: center;
    min-width: 0;
    max-width: 100%;
}

/* Logo uses intrinsic width/height from the uploaded file (no downscaling). */
.header-logo {
    display: block;
    width: auto;
    height: auto;
    flex-shrink: 0;
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px;
}

.header-org-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #f9fafb;
}

/* Organization name in the left column when no logo is uploaded */
.header-col--left .header-org-name {
    display: block;
    text-align: left;
    line-height: 1.25;
    max-width: min(85vw, 28rem);
}

.header-account {
    font-size: 0.9rem;
    min-width: 0;
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    white-space: nowrap;
}

.header-account .badge {
    flex-shrink: 0;
}

.header-account .header-user-tools {
    flex-shrink: 0;
}

/* Journal list + counterparties: shared grid table skin (journal keeps fixed layout) */
table.data-table.booking-journal-table,
table.data-table.counterparties-master-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

table.data-table.booking-journal-table {
    table-layout: fixed;
}

table.data-table.counterparties-master-table {
    table-layout: auto;
}

.booking-journal-table thead th,
.counterparties-master-table thead th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    text-align: left;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-bottom: 2px solid #d1d5db;
}

.booking-journal-table tbody td,
.counterparties-master-table tbody td {
    padding: 0.5rem 0.65rem;
    border: 1px solid #e5e7eb;
    vertical-align: middle;
}

.booking-journal-table tbody tr:nth-child(even),
.counterparties-master-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.booking-journal-table tbody tr:hover,
.counterparties-master-table tbody tr:hover {
    background: #f1f5f9;
}

.counterparties-master-table .counterparty-cell--partner {
    min-width: 14rem;
    max-width: 28rem;
}

.counterparties-master-table .counterparty-cell--partner .counterparty-partner__inner {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.counterparties-master-table .counterparty-cell--iban {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.counterparties-master-table .counterparty-cell--address {
    color: #6b7280;
    max-width: 22rem;
    min-width: 10rem;
}

.counterparties-master-table .counterparty-cell--address span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.counterparties-master-table .counterparty-cell--active {
    white-space: nowrap;
    text-align: center;
    width: 5rem;
}

.counterparties-master-table .counterparty-cell--actions {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

/* Event offering: request list (Angebotsanfragen) — keep real <table> cells; flex lives in inner .event-offering-list-table__actions */
.event-offering-list-table-wrap {
    width: 100%;
    max-width: 56rem;
    margin-top: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.data-table.event-offering-list-table {
    width: 100%;
    min-width: 36rem;
    margin-top: 0;
    border-collapse: collapse;
    font-size: 0.875rem;
    table-layout: fixed;
}

.event-offering-list-table thead th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    text-align: left;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-bottom: 2px solid #d1d5db;
    vertical-align: middle;
}

.event-offering-list-table tbody td {
    padding: 0.5rem 0.65rem;
    border: 1px solid #e5e7eb;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.event-offering-list-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.event-offering-list-table tbody tr:hover {
    background: #f1f5f9;
}

.event-offering-list-table th:nth-child(1),
.event-offering-list-table td:nth-child(1) {
    width: 28%;
}

.event-offering-list-table th:nth-child(2),
.event-offering-list-table td:nth-child(2) {
    width: 30%;
}

.event-offering-list-table th:nth-child(3),
.event-offering-list-table td:nth-child(3) {
    width: 22%;
}

.event-offering-list-table th:nth-child(4),
.event-offering-list-table td:nth-child(4) {
    width: 20%;
    min-width: 10.5rem;
}

.event-offering-list-table__cell-created {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.event-offering-list-table__col-action {
    text-align: right;
    vertical-align: middle;
}

.event-offering-list-table__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
}

.event-offering-delete-form {
    margin: 0;
}

.event-offering-delete-form--inline {
    display: inline;
}

.event-offering-delete-btn {
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.28rem 0.6rem;
    border-radius: 0.35rem;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    cursor: pointer;
}

.event-offering-delete-btn:hover {
    background: #fee2e2;
}

.event-offering-workflow .event-offering-delete-form {
    margin-top: 0.75rem;
}

.event-offering-workflow .event-offering-delete-btn {
    padding: 0.45rem 0.85rem;
}

/* ZO 355 partner questionnaire (public URL /offer/partner/<token>/ — desktop-first) */
body.event-offering-partner-page {
    background: #e2e8f0;
}

body.event-offering-partner-page .layout--event-offering-partner {
    min-height: 100vh;
    background: linear-gradient(180deg, #dbeafe 0%, #e2e8f0 38%, #e2e8f0 100%);
}

/* Light header: single brand block (no duplicate org name vs. center column) */
body.event-offering-partner-page .header.ep-partner-site-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    color: #0f172a;
    border-bottom: 1px solid #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

body.event-offering-partner-page .ep-partner-site-header__inner {
    max-width: min(72rem, 100%);
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

body.event-offering-partner-page .ep-partner-site-header__controls {
    flex: 0 0 auto;
}

/* Light header: language select matches questionnaire chrome (not dark club header). */
body.event-offering-partner-page .ep-partner-site-header .language-switcher select {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #94a3b8;
}

body.event-offering-partner-page .ep-partner-site-header__brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem 1.25rem;
    flex-wrap: wrap;
}

body.event-offering-partner-page .ep-partner-site-header__logo {
    max-height: 3.25rem;
    width: auto;
    border-radius: 0.35rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

body.event-offering-partner-page .ep-partner-site-header__text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

body.event-offering-partner-page .ep-partner-site-header__org {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

body.event-offering-partner-page .ep-partner-site-header__meta {
    font-size: 0.88rem;
    font-weight: 500;
    color: #475569;
}

body.event-offering-partner-page .event-offering-partner-main {
    max-width: min(72rem, 100%);
    margin: 0 auto;
    padding: 1.5rem 1.75rem 3rem;
    box-sizing: border-box;
}

body.event-offering-partner-page .event-offering-partner-hero {
    margin-bottom: 1.25rem;
    padding: 0 0.25rem;
}

body.event-offering-partner-page .event-offering-partner-hero__title {
    margin: 0 0 0.5rem;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.2;
}

body.event-offering-partner-page .event-offering-partner-hero__lead {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.55;
    color: #334155;
    max-width: 44rem;
}

body.event-offering-partner-page .event-offering-partner-panel {
    padding: 1.75rem 2rem 2.5rem;
    border: 1px solid #cbd5e1;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 12px 32px rgba(15, 23, 42, 0.08);
}

body.event-offering-partner-page .ep-partner-flash {
    margin: 0 0 1rem;
}

body.event-offering-partner-page .event-offering-partner-form {
    margin-top: 0;
}

body.event-offering-partner-page .event-offering-partner-form ul.errorlist {
    margin: 0.25rem 0 0.35rem;
    padding-left: 1.1rem;
    color: #b91c1c;
    font-size: 0.9rem;
}

body.event-offering-partner-page .ep-form-section {
    margin-top: 1.5rem;
    padding: 1.35rem 1.5rem 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    border-left: 4px solid #0d9488;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.event-offering-partner-page .ep-form-section:first-of-type {
    margin-top: 0;
}

body.event-offering-partner-page .ep-form-section--confirm {
    border-left-color: #6366f1;
    background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
}

body.event-offering-partner-page .ep-form-section__title {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #134e4a;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #cbd5e1;
}

body.event-offering-partner-page .ep-form-section--confirm .ep-form-section__title {
    color: #3730a3;
}

body.event-offering-partner-page .ep-form-section--partner-done {
    border-left-color: #059669;
    background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
}

body.event-offering-partner-page .ep-form-section--partner-done .ep-form-section__title {
    color: #047857;
}

body.event-offering-partner-page .ep-form-section--partner-closed {
    border-left-color: #d97706;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}

body.event-offering-partner-page .ep-form-section--partner-closed .ep-form-section__title {
    color: #b45309;
}

body.event-offering-partner-page .ep-partner-done-body {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #334155;
}

body.event-offering-partner-page .ep-form-section__hint {
    margin: -0.25rem 0 0.85rem;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.45;
}

body.event-offering-partner-page .ep-partner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
    align-items: start;
}

body.event-offering-partner-page .ep-partner-grid .ep-span-2 {
    grid-column: 1 / -1;
}

body.event-offering-partner-page .ep-field label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 0.35rem;
}

body.event-offering-partner-page .ep-field input[type="text"],
body.event-offering-partner-page .ep-field input[type="tel"],
body.event-offering-partner-page .ep-field input[type="number"],
body.event-offering-partner-page .ep-field input[type="email"],
body.event-offering-partner-page .ep-field textarea,
body.event-offering-partner-page .ep-field select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    line-height: 1.45;
    padding: 0.5rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
}

body.event-offering-partner-page .ep-field textarea {
    min-height: 6.5rem;
    resize: vertical;
}

body.event-offering-partner-page .ep-field textarea.ep-partner-textarea {
    min-height: 5.25rem;
}

body.event-offering-partner-page .ep-field--after-table {
    margin-top: 1rem;
}

body.event-offering-partner-page .ep-partner-days-wrap {
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.event-offering-partner-page table.data-table.ep-partner-days-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

body.event-offering-partner-page .ep-partner-days-table thead th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: #334155;
    font-weight: 600;
    text-align: left;
    padding: 0.55rem 0.75rem;
    border-bottom: 2px solid #cbd5e1;
}

body.event-offering-partner-page .ep-partner-days-table tbody td {
    text-align: left !important;
    vertical-align: middle;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

body.event-offering-partner-page .ep-partner-days-table tbody tr:last-child td {
    border-bottom: none;
}

body.event-offering-partner-page .ep-partner-days-table input[type="date"],
body.event-offering-partner-page .ep-partner-days-table input[type="time"] {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 1rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: #fafafa;
    font-variant-numeric: tabular-nums;
}

body.event-offering-partner-page .ep-partner-days-table input[type="date"]:focus,
body.event-offering-partner-page .ep-partner-days-table input[type="time"]:focus {
    outline: 2px solid #99f6e4;
    border-color: #14b8a6;
    background: #fff;
}

body.event-offering-partner-page table.data-table.ep-partner-tristate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 0.75rem;
    table-layout: fixed;
}

body.event-offering-partner-page .ep-partner-tristate-table thead th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    text-align: left;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-bottom: 2px solid #d1d5db;
    vertical-align: middle;
}

body.event-offering-partner-page .ep-partner-tristate-table tbody td,
body.event-offering-partner-page .ep-partner-tristate-table tbody th[scope="row"] {
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    vertical-align: top;
}

body.event-offering-partner-page .ep-partner-tristate-table tbody th[scope="row"] {
    font-weight: 500;
    text-align: left;
    background: #fff;
    width: 62%;
}

body.event-offering-partner-page .ep-partner-tristate-table tbody th[scope="row"] label {
    font-weight: 500;
    cursor: pointer;
}

body.event-offering-partner-page .ep-partner-tristate-table tbody td {
    width: 38%;
    background: #fff;
}

body.event-offering-partner-page .ep-partner-tristate-table tbody tr:nth-child(even) td,
body.event-offering-partner-page .ep-partner-tristate-table tbody tr:nth-child(even) th[scope="row"] {
    background: #fafafa;
}

body.event-offering-partner-page .ep-partner-tristate-table__answer-col {
    width: 12rem;
}

body.event-offering-partner-page .ep-partner-tristate-table select {
    width: 100%;
    max-width: 12rem;
    min-width: 9rem;
    font-size: 1rem;
    padding: 0.45rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
}

body.event-offering-partner-page .ep-form-actions {
    margin: 2rem 0 0;
    padding-top: 0.5rem;
}

body.event-offering-partner-page .ep-form-submit {
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0.65rem 1.5rem;
    min-width: 11rem;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #2dd4bf 0%, #14b8a6 45%, #0d9488 100%);
    border: 1px solid #0f766e;
    color: #fff;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
    cursor: pointer;
}

body.event-offering-partner-page .ep-form-submit:hover {
    filter: brightness(1.05);
}

body.event-offering-partner-page .ep-form-submit:active {
    transform: translateY(1px);
}

@media (max-width: 52rem) {
    body.event-offering-partner-page .ep-partner-grid {
        grid-template-columns: 1fr;
    }
}

/*
 * ZO 355 risk level (Stufe): 1 = lowest … 5 = highest.
 * Shared across checklist, request detail, and agreement.
 */
.eo-risk-stufe-pill,
.eo-risk-stufe-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.45rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.eo-risk-stufe-pill {
    min-width: 2.2rem;
    height: 2.2rem;
    padding: 0 0.5rem;
    font-size: 1.08rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}

.eo-risk-stufe-badge {
    padding: 0.35rem 0.8rem;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.eo-risk-stufe-pill--1,
.eo-risk-stufe-badge.eo-risk-stufe-pill--1 {
    background: linear-gradient(180deg, #34d399 0%, #059669 55%, #047857 100%);
}

.eo-risk-stufe-pill--2,
.eo-risk-stufe-badge.eo-risk-stufe-pill--2 {
    background: linear-gradient(180deg, #2dd4bf 0%, #0d9488 55%, #0f766e 100%);
}

.eo-risk-stufe-pill--3,
.eo-risk-stufe-badge.eo-risk-stufe-pill--3 {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 50%, #b45309 100%);
    color: #fff;
}

.eo-risk-stufe-pill--4,
.eo-risk-stufe-badge.eo-risk-stufe-pill--4 {
    background: linear-gradient(180deg, #fb923c 0%, #ea580c 52%, #c2410c 100%);
}

.eo-risk-stufe-pill--5,
.eo-risk-stufe-badge.eo-risk-stufe-pill--5 {
    background: linear-gradient(180deg, #f87171 0%, #dc2626 48%, #991b1b 100%);
}

.eo-risk-detail-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #334155;
}

.eo-risk-detail-summary__sep {
    color: #94a3b8;
    user-select: none;
}

.eo-risk-stufe-gradient-bar {
    height: 0.5rem;
    border-radius: 999px;
    margin: 0.4rem 0 0.2rem;
    background: linear-gradient(
        90deg,
        #059669 0%,
        #14b8a6 22%,
        #ca8a04 48%,
        #ea580c 72%,
        #b91c1c 100%
    );
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

.eo-risk-stufe-gradient-bar__ticks {
    display: flex;
    justify-content: space-between;
    margin: 0.15rem 0 0;
    font-size: 0.68rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #64748b;
    letter-spacing: 0.02em;
}

.eo-risk-stufe-legend {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
}

.eo-risk-stufe-swatch {
    display: inline-block;
    flex-shrink: 0;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.45rem;
    border-radius: 50%;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.eo-risk-stufe-swatch--1 {
    background: #059669;
}

.eo-risk-stufe-swatch--2 {
    background: #0d9488;
}

.eo-risk-stufe-swatch--3 {
    background: #d97706;
}

.eo-risk-stufe-swatch--4 {
    background: #ea580c;
}

.eo-risk-stufe-swatch--5 {
    background: #dc2626;
}

.eo-risk-staffing-level-line {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 0 0 0.45rem;
    font-size: 0.86rem;
    line-height: 1.45;
}

.eo-risk-staffing-level-line:last-child {
    margin-bottom: 0;
}

/* Internal risk checklist (staff) — polished layout */
.eo-risk-checklist-form {
    margin-top: 0;
}

.eo-risk-checklist-form ul.errorlist {
    margin: 0.25rem 0 0.35rem;
    padding-left: 1.1rem;
    color: #b91c1c;
    font-size: 0.9rem;
}

.eo-risk-checklist-form .eo-risk-placeholder {
    color: #94a3b8;
}

.eo-risk-checklist-form .eo-risk-preamble {
    margin-bottom: 0.25rem;
}

.eo-risk-checklist-form .eo-risk-preamble .eo-risk-meta-panel {
    margin-bottom: 0.65rem;
}

.eo-risk-checklist-form .eo-risk-preamble .eo-risk-meta-panel:last-child {
    margin-bottom: 0;
}

.eo-risk-checklist-form .eo-risk-event-summary {
    margin: 0 0 0.75rem;
    border-left-color: #0d9488;
}

.eo-risk-checklist-form .eo-risk-event-summary__row {
    display: grid;
    grid-template-columns: minmax(7.5rem, 10.5rem) 1fr;
    gap: 0.15rem 1rem;
    align-items: baseline;
    padding: 0.35rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.eo-risk-checklist-form .eo-risk-event-summary__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.eo-risk-checklist-form .eo-risk-event-summary__row:first-child {
    padding-top: 0;
}

.eo-risk-checklist-form .eo-risk-event-summary dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

.eo-risk-checklist-form .eo-risk-event-summary dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.45;
    word-break: break-word;
}

.eo-risk-checklist-form > section.ep-form-section:first-of-type {
    margin-top: 0;
}

.eo-risk-checklist-form .eo-risk-section {
    margin-top: 1rem;
    padding: 0.9rem 1rem 1rem;
    background: linear-gradient(165deg, #fafbfc 0%, #f4f6f8 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    border-left-width: 4px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.eo-risk-checklist-form .eo-risk-section--aktiv {
    border-left-color: #0d9488;
}

.eo-risk-checklist-form .eo-risk-section--zuschauer {
    border-left-color: #6366f1;
}

.eo-risk-checklist-form .eo-risk-section--umfeld {
    border-left-color: #0ea5e9;
}

.eo-risk-checklist-form .eo-risk-section--notes {
    border-left-color: #8b5cf6;
}

.eo-risk-checklist-form .eo-risk-section--aktiv .ep-form-section__title {
    color: #134e4a;
}

.eo-risk-checklist-form .eo-risk-section--zuschauer .ep-form-section__title {
    color: #312e81;
}

.eo-risk-checklist-form .eo-risk-section--umfeld .ep-form-section__title {
    color: #0c4a6e;
}

.eo-risk-checklist-form .eo-risk-section--notes .ep-form-section__title {
    color: #5b21b6;
}

.eo-risk-checklist-form .ep-form-section__title {
    margin: 0 0 0.85rem;
    font-size: 1.12rem;
    font-weight: 700;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #cbd5e1;
}

.eo-risk-checklist-form .ep-form-section__hint {
    margin: -0.25rem 0 0.85rem;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.45;
}

.eo-risk-checklist-form .ep-field label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 0.35rem;
}

.eo-risk-checklist-form .eo-risk-count-field {
    margin-bottom: 0.65rem;
}

.eo-risk-checklist-form .ep-field textarea,
.eo-risk-checklist-form .ep-field input[type="text"],
.eo-risk-checklist-form .ep-field input[type="number"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    line-height: 1.45;
    padding: 0.5rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #fff;
}

.eo-risk-checklist-form .ep-field textarea.ep-partner-textarea {
    min-height: 5.25rem;
}

.eo-risk-checklist-form .ep-field--after-table {
    margin-top: 1rem;
}

.eo-risk-checklist-form .eo-risk-readonly-count {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0.25rem 0.85rem;
    font-size: 1.05rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.eo-risk-checklist-form .eo-risk-table-wrap {
    margin-top: 0.5rem;
    border-radius: 0.55rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.eo-risk-checklist-form table.data-table.eo-risk-checklist-table.eo-risk-matrix-table {
    width: 100%;
    min-width: min(100%, 18rem);
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-top: 0;
    table-layout: fixed;
}

.eo-risk-checklist-form .eo-risk-matrix-table thead th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: #334155;
    font-weight: 600;
    padding: 0.35rem 0.45rem;
    border: none;
    border-bottom: 1px solid #cbd5e1;
    vertical-align: middle;
}

.eo-risk-checklist-form .eo-risk-matrix-table thead .eo-risk-col-q {
    text-align: left;
}

.eo-risk-checklist-form .eo-risk-matrix-table thead .eo-risk-col-yn {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #334155;
    width: 3rem;
}

.eo-risk-checklist-form .eo-risk-matrix-table tbody td,
.eo-risk-checklist-form .eo-risk-matrix-table tbody th[scope="row"] {
    padding: 0.3rem 0.45rem;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.eo-risk-checklist-form .eo-risk-matrix-table tbody tr:last-child td,
.eo-risk-checklist-form .eo-risk-matrix-table tbody tr:last-child th[scope="row"] {
    border-bottom: none;
}

.eo-risk-checklist-form .eo-risk-matrix-table tbody th.eo-risk-col-q {
    font-weight: 500;
    text-align: left;
    line-height: 1.3;
    background: #fff;
    color: #334155;
}

.eo-risk-checklist-form .eo-risk-matrix-table .eo-risk-q-text {
    font-weight: 600;
    color: #1e293b;
}

.eo-risk-checklist-form .eo-risk-matrix-table tbody td.eo-risk-col-yn {
    text-align: center;
    background: #fff;
    width: 3rem;
    min-width: 2.75rem;
    border-left: 1px solid #f1f5f9;
}

.eo-risk-checklist-form .eo-risk-matrix-table tbody tr:nth-child(even) td,
.eo-risk-checklist-form .eo-risk-matrix-table tbody tr:nth-child(even) th[scope="row"] {
    background: #fafafa;
}

.eo-risk-checklist-form .eo-risk-matrix-table tbody tr.eo-risk-row--derived td,
.eo-risk-checklist-form .eo-risk-matrix-table tbody tr.eo-risk-row--derived th[scope="row"] {
    background: #f0fdfa;
}

.eo-risk-checklist-form .eo-risk-matrix-table tbody tr:hover td,
.eo-risk-checklist-form .eo-risk-matrix-table tbody tr:hover th[scope="row"] {
    background: #f0fdfa;
}

.eo-risk-checklist-form .eo-risk-matrix-table tbody tr.eo-risk-row--derived:hover td,
.eo-risk-checklist-form .eo-risk-matrix-table tbody tr.eo-risk-row--derived:hover th[scope="row"] {
    background: #ccfbf1;
}

/* Matrix Ja/Nein: compact chips */
.eo-risk-checklist-form .eo-risk-matrix-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    min-height: 1.65rem;
    margin: 0;
    padding: 0.12rem 0.38rem;
    border-radius: 0.4rem;
    border: 1px solid #d1d5db;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease, transform 0.1s ease,
        color 0.12s ease;
}

.eo-risk-checklist-form .eo-risk-matrix-option:hover {
    transform: translateY(-0.5px);
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.08);
}

.eo-risk-checklist-form .eo-risk-matrix-option:active {
    transform: translateY(0);
}

.eo-risk-checklist-form .eo-risk-matrix-option input[type="radio"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.eo-risk-checklist-form .eo-risk-matrix-option__text {
    position: relative;
    z-index: 1;
    pointer-events: none;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
    line-height: 1;
}

.eo-risk-checklist-form .eo-risk-matrix-option--yes {
    color: #64748b;
    border-color: #cbd5e1;
}

.eo-risk-checklist-form .eo-risk-matrix-option--yes:hover {
    border-color: #34d399;
    background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
    color: #047857;
}

.eo-risk-checklist-form .eo-risk-matrix-option--yes:has(input:checked) {
    border-color: #059669;
    background: linear-gradient(180deg, #d1fae5 0%, #6ee7b7 100%);
    color: #064e3b;
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.eo-risk-checklist-form .eo-risk-matrix-option--no {
    color: #64748b;
    border-color: #cbd5e1;
}

.eo-risk-checklist-form .eo-risk-matrix-option--no:hover {
    border-color: #94a3b8;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: #334155;
}

.eo-risk-checklist-form .eo-risk-matrix-option--no:has(input:checked) {
    border-color: #475569;
    background: linear-gradient(180deg, #f1f5f9 0%, #cbd5e1 100%);
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(71, 85, 105, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.eo-risk-checklist-form .eo-risk-matrix-option:has(input:focus-visible) {
    outline: 2px solid #2dd4bf;
    outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
    .eo-risk-checklist-form .eo-risk-matrix-option,
    .eo-risk-checklist-form .eo-risk-matrix-option:hover,
    .eo-risk-checklist-form .eo-risk-matrix-option:active {
        transition: none;
        transform: none;
    }
}

.eo-risk-checklist-form .eo-risk-meta-panel {
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    border-left: 3px solid #94a3b8;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #334155;
}

.eo-risk-checklist-form .eo-risk-meta-panel--reference {
    border-left-color: #0d9488;
}

.eo-risk-checklist-form .eo-risk-meta-panel--derived-note {
    border-left-color: #f59e0b;
    background: linear-gradient(90deg, #fffbeb 0%, #f8fafc 100%);
}

.eo-risk-checklist-form .eo-risk-meta-panel--preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    border-left-width: 4px;
}

.eo-risk-checklist-form .eo-risk-meta-panel--preview.eo-risk-meta-panel--preview-stufe-1 {
    border-left-color: #059669;
}

.eo-risk-checklist-form .eo-risk-meta-panel--preview.eo-risk-meta-panel--preview-stufe-2 {
    border-left-color: #0d9488;
}

.eo-risk-checklist-form .eo-risk-meta-panel--preview.eo-risk-meta-panel--preview-stufe-3 {
    border-left-color: #d97706;
}

.eo-risk-checklist-form .eo-risk-meta-panel--preview.eo-risk-meta-panel--preview-stufe-4 {
    border-left-color: #ea580c;
}

.eo-risk-checklist-form .eo-risk-meta-panel--preview.eo-risk-meta-panel--preview-stufe-5 {
    border-left-color: #dc2626;
}

.eo-risk-checklist-form .eo-risk-level-bands-wrap .eo-risk-level-bands__title {
    margin: 0;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1e293b;
}

.eo-risk-checklist-form .eo-risk-level-bands {
    list-style: none;
    margin: 0.45rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.eo-risk-checklist-form .eo-risk-level-bands li {
    margin: 0;
    padding: 0.35rem 0.55rem 0.35rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    border-left-width: 4px;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: #334155;
    line-height: 1.3;
}

.eo-risk-checklist-form .eo-risk-level-bands__item--1 {
    background: #ecfdf5;
    border-left-color: #059669;
}

.eo-risk-checklist-form .eo-risk-level-bands__item--2 {
    background: #f0fdfa;
    border-left-color: #0d9488;
}

.eo-risk-checklist-form .eo-risk-level-bands__item--3 {
    background: #fffbeb;
    border-left-color: #d97706;
}

.eo-risk-checklist-form .eo-risk-level-bands__item--4 {
    background: #fff7ed;
    border-left-color: #ea580c;
}

.eo-risk-checklist-form .eo-risk-level-bands__item--5 {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.eo-risk-checklist-form details.eo-risk-meta-panel summary {
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
}

.eo-risk-checklist-form details.eo-risk-meta-panel summary:hover {
    color: #0d9488;
}

.eo-risk-checklist-form .eo-risk-staffing-details__body {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid #e2e8f0;
}

.eo-risk-checklist-form .eo-risk-staffing-details__body p {
    margin: 0 0 0.5rem;
    font-size: 0.86rem;
    color: #475569;
}

.eo-risk-checklist-form .eo-risk-staffing-details__body ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.eo-risk-checklist-form .eo-risk-staffing-details__body li {
    margin-bottom: 0;
    font-size: 0.86rem;
    line-height: 1.45;
}

@media (max-width: 36rem) {
    .eo-risk-checklist-form .eo-risk-event-summary__row {
        grid-template-columns: 1fr;
    }

    .eo-risk-checklist-form .eo-risk-section {
        padding: 0.85rem 0.85rem 0.95rem;
    }

    .eo-risk-checklist-form .eo-risk-matrix-table thead .eo-risk-col-yn,
    .eo-risk-checklist-form .eo-risk-matrix-table tbody td.eo-risk-col-yn {
        width: 2.85rem;
    }

    .eo-risk-checklist-form .eo-risk-matrix-option {
        min-width: 2.1rem;
        min-height: 1.5rem;
        padding: 0.08rem 0.28rem;
    }

    .eo-risk-checklist-form .eo-risk-matrix-option__text {
        font-size: 0.62rem;
    }
}

/* Creditors / debtors directory */
.counterparty-directory-intro {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%);
    border: 1px solid #e2e8f0;
}

.counterparty-directory-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.counterparty-directory-header__intro {
    flex: 1 1 18rem;
    min-width: 0;
}

.counterparty-directory-header__intro h1 {
    margin: 0 0 0.4rem;
    color: #0f172a;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.counterparty-directory-lead {
    margin: 0;
    max-width: 44rem;
    line-height: 1.5;
}

.counterparty-directory-header__cta {
    flex: 0 0 auto;
    align-self: center;
}

.counterparty-directory-new-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.5rem 1.1rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background: #2563eb;
    border: 1px solid #1d4ed8;
    border-radius: 0.45rem;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.counterparty-directory-new-btn:hover {
    background: #1d4ed8;
    border-color: #1e40af;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.counterparty-directory-new-btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.counterparty-directory-new-btn--inline {
    margin-top: 0.65rem;
}

.counterparty-directory-panel {
    margin-top: 1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%);
    border: 1px solid #e2e8f0;
}

.counterparty-directory-panel__head > h2 {
    margin: 0 0 0.25rem;
    color: #0f172a;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.counterparty-directory-panel__head .hint {
    margin: 0;
}

.counterparty-directory-list-wrap {
    margin-top: 0.85rem;
}

.counterparty-directory-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.counterparty-directory-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 0.85rem 1rem;
    min-width: 0;
    overflow: hidden;
}

.counterparty-directory-card--inactive {
    opacity: 0.78;
}

.counterparty-directory-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.65rem;
}

.counterparty-directory-card__name {
    margin: 0;
    flex: 1 1 12rem;
    min-width: 0;
    font-size: 1.02rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.counterparty-directory-card__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    flex: 0 1 auto;
}

.counterparty-directory-card__dl {
    display: grid;
    /* Wide enough for DE labels like «Ansprechpartner» / «Festnetz» without clipping into values. */
    grid-template-columns: minmax(6.5rem, 9.5rem) minmax(0, 1fr);
    gap: 0.35rem 0.85rem;
    margin: 0;
    align-items: start;
}

.counterparty-directory-card__dl dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-top: 0.1rem;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.counterparty-directory-card__dl dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.counterparty-directory-card__address {
    color: #475569;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.counterparty-directory-card__mobile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.counterparty-directory-mobile-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.counterparty-directory-mobile-name {
    color: #64748b;
    font-size: 0.85rem;
}

.counterparty-directory-phone {
    font-variant-numeric: tabular-nums;
}

.counterparty-whatsapp-link {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 0.35rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.counterparty-whatsapp-link:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.counterparty-whatsapp-link:focus-visible {
    outline: 2px solid #6ee7b7;
    outline-offset: 2px;
}

a.accounting-icon-btn.counterparty-whatsapp-link {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

a.accounting-icon-btn.counterparty-whatsapp-link:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.counterparty-whatsapp-dropdown {
    display: inline-flex;
    align-items: stretch;
    max-width: 100%;
    border-radius: 0.4rem;
    overflow: hidden;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
}

.counterparty-whatsapp-dropdown__select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 14rem;
    padding: 0.35rem 0.5rem;
    border: 0;
    border-right: 1px solid #a7f3d0;
    background: #fff;
    color: #0f172a;
    font-size: 0.82rem;
    line-height: 1.3;
}

.counterparty-whatsapp-dropdown__select:focus-visible {
    outline: 2px solid #6ee7b7;
    outline-offset: -2px;
}

.counterparty-whatsapp-dropdown__go {
    flex: 0 0 auto;
    border: 0;
    border-radius: 0;
    background: #ecfdf5;
    color: #047857;
    white-space: nowrap;
}

.counterparty-whatsapp-dropdown__go:hover {
    background: #d1fae5;
    color: #065f46;
}

.counterparty-contact-field__whatsapp {
    margin: 0.35rem 0 0;
}

.counterparty-partner-whatsapp {
    margin: 0.5rem 0 0;
}

.counterparty-directory-card__actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.counterparty-directory-card__actions .accounting-row-actions {
    width: 100%;
}

.counterparty-kind-badge {
    display: inline-block;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.counterparty-kind-badge--creditor {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.counterparty-kind-badge--debtor {
    color: #6b21a8;
    background: #faf5ff;
    border-color: #e9d5ff;
}

.counterparty-kind-badge--both {
    color: #0f766e;
    background: #f0fdfa;
    border-color: #99f6e4;
}

.counterparty-directory-iban {
    display: inline-block;
    max-width: 100%;
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.counterparty-directory-empty {
    color: #94a3b8;
}

.counterparty-status-badge {
    display: inline-block;
    min-width: 2.4rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.counterparty-status-badge--active {
    color: #145323;
    background: #eaf8ee;
    border: 1px solid #8bcf9a;
}

.counterparty-status-badge--inactive {
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.counterparty-directory-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: #64748b;
    border: 1px dashed #e2e8f0;
    border-radius: 0.65rem;
    background: #fafbfc;
}

.counterparty-directory-empty-state p {
    margin: 0;
}

@media (max-width: 900px) {
    .counterparty-directory-header__cta {
        align-self: stretch;
    }

    .counterparty-directory-new-btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .counterparty-directory-card__dl {
        grid-template-columns: 1fr;
        gap: 0.15rem 0;
    }

    .counterparty-directory-card__dl dt {
        padding-top: 0.35rem;
    }

    .counterparty-directory-card__dl dt:first-child {
        padding-top: 0;
    }
}

/* Invoice reminder plans (Mahnpläne) */
.reminder-plans-intro {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%);
    border: 1px solid #e2e8f0;
}

.reminder-plans-intro > h1 {
    margin-top: 0;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.reminder-plans-lead {
    max-width: 44rem;
    line-height: 1.5;
}

.reminder-plan-assignments-panel {
    margin-top: 1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%);
    border: 1px solid #e2e8f0;
}

.reminder-plan-assignments-panel > h2 {
    margin-top: 0;
    color: #0f172a;
    font-size: 1.15rem;
}

.reminder-plan-assignments-panel__subtitle {
    margin: 1.1rem 0 0.65rem;
    font-size: 1rem;
    color: #334155;
}

.reminder-plan-info-list {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    max-width: 52rem;
    line-height: 1.5;
}

.reminder-plan-info-list li + li {
    margin-top: 0.35rem;
}

.reminder-plan-default-field {
    margin-bottom: 1rem;
    max-width: 28rem;
}

.reminder-plan-default-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.reminder-plan-default-field select {
    width: 100%;
    max-width: 28rem;
    box-sizing: border-box;
}

.reminder-plan-default-display {
    margin: 0;
    font-weight: 600;
}

.reminder-plan-fee-table-wrap,
.reminder-plans-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.reminder-plan-fee-table,
.reminder-plans-table {
    margin: 0;
}

.reminder-plans-list-panel {
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
}

.reminder-plans-list-panel > h2 {
    margin-top: 0;
    color: #0f172a;
    font-size: 1.15rem;
}

.reminder-plan-steps {
    font-variant-numeric: tabular-nums;
    color: #334155;
}

.reminder-plans-table__row--inactive {
    opacity: 0.72;
}

.reminder-plans-table__empty {
    text-align: center;
    color: #64748b;
    padding: 1.25rem 0.85rem !important;
}

.reminder-plan-assignments-form__actions {
    margin: 0.85rem 0 0;
}

/* Counterparty edit: main fields + contact formset — consistent control widths */
.counterparty-edit-form > p {
    margin: 0.65rem 0;
    max-width: 40rem;
}
.counterparty-edit-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}
.counterparty-edit-form input[type="text"],
.counterparty-edit-form input[type="email"],
.counterparty-edit-form input[type="url"],
.counterparty-edit-form select,
.counterparty-edit-form textarea {
    width: 100%;
    max-width: 40rem;
    box-sizing: border-box;
}
.counterparty-edit-form input[type="checkbox"] {
    width: auto;
    max-width: none;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.counterparty-edit-form #id_country_code {
    width: 5rem;
    max-width: 6rem;
}

.counterparty-contact-fieldset > .hint {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.counterparty-contact-formset-wrap {
    margin-top: 0.25rem;
}

.counterparty-contact-cards {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.counterparty-contact-card {
    padding: 0.65rem 0.75rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.counterparty-contact-card__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #f1f5f9;
}

.counterparty-contact-card__title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.01em;
}

.counterparty-contact-remove-btn {
    margin: 0;
    padding: 0.2rem 0.55rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: #b91c1c;
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 0.35rem;
    cursor: pointer;
}

.counterparty-contact-remove-btn:hover {
    background: #fef2f2;
}

.counterparty-contact-formset-actions {
    margin: 0.65rem 0 0;
}

.counterparty-contact-add-btn {
    margin: 0;
    padding: 0.45rem 0.95rem;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.45rem;
    cursor: pointer;
}

.counterparty-contact-add-btn:hover {
    background: #dbeafe;
}

.counterparty-contact-add-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.counterparty-contact-card__fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.45rem 0.65rem;
    align-items: start;
}

.counterparty-contact-field--full {
    grid-column: 1 / -1;
}

.counterparty-contact-field--sort {
    max-width: 5.5rem;
}

.counterparty-contact-field--delete {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    justify-content: flex-end;
    min-width: 0;
}

.counterparty-contact-field__label {
    display: block;
    font-weight: 600;
    font-size: 0.78rem;
    color: #4b5563;
    margin-bottom: 0.18rem;
    line-height: 1.2;
}

.counterparty-contact-input,
.counterparty-contact-field input.counterparty-contact-input,
.counterparty-contact-field input[type="tel"].counterparty-contact-input,
.counterparty-contact-field input[type="email"].counterparty-contact-input,
.counterparty-contact-field input[type="number"].counterparty-contact-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.3;
    padding: 0.32rem 0.45rem;
    border: 1px solid #d1d5db;
    border-radius: 0.3rem;
    background: #fff;
}

.counterparty-contact-field input:focus,
.counterparty-contact-field select:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 0;
    border-color: #60a5fa;
}

.counterparty-contact-delete {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.counterparty-contact-delete input[type="checkbox"] {
    width: auto;
    min-width: 0.95rem;
    margin: 0;
    flex-shrink: 0;
}

.counterparty-contact-field .errorlist {
    margin: 0.12rem 0 0;
    padding-left: 1rem;
    font-size: 0.75rem;
}

/* Dashboard create event: single-day shift preview (two segments when overnight). */
.shift-day-timeline {
    margin: 0.75rem 0 0.25rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.4rem;
    background: #fafafa;
}

.shift-day-timeline__title {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.shift-day-timeline__hint {
    margin: 0 0 0.55rem !important;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
}

.shift-day-timeline__track-wrap {
    margin-bottom: 0.45rem;
}

.shift-day-timeline__track-wrap--next {
    margin-top: 0.35rem;
}

.shift-day-timeline__track-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

.shift-day-timeline__next-badge {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 0.2rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 600;
}

.shift-day-timeline__bar {
    position: relative;
    height: 2.1rem;
    background: repeating-linear-gradient(
        90deg,
        #f3f4f6,
        #f3f4f6 calc(100% / 24 - 1px),
        #e5e7eb calc(100% / 24 - 1px),
        #e5e7eb calc(100% / 24)
    );
    border: 1px solid #d1d5db;
    border-radius: 0.3rem;
    overflow: hidden;
}

.shift-day-timeline__bar--next {
    background: repeating-linear-gradient(
        90deg,
        #f0fdf4,
        #f0fdf4 calc(100% / 24 - 1px),
        #d1fae5 calc(100% / 24 - 1px),
        #d1fae5 calc(100% / 24)
    );
}

.shift-day-timeline__ticks {
    display: none;
}

.shift-day-timeline__fill {
    position: absolute;
    bottom: 0.2rem;
    left: 0;
    height: 1.25rem;
    min-width: 2px;
    background: #2563eb;
    border-radius: 0.125rem;
    opacity: 0.92;
    transition: left 0.12s ease, width 0.12s ease;
    pointer-events: none;
}

.shift-day-timeline__fill--next {
    background: #059669;
}

.shift-day-timeline__summary {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #6b7280;
    min-height: 0;
}

/* Dashboard create event: 8-column x 24h shift grid (drag to create). */
.shift-grid-multiday__days {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.shift-grid-editor--day-panel {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    padding: 0.65rem 0.75rem 0.75rem;
    background: var(--panel-bg, #fff);
}

.shift-grid-editor__day-heading {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.shift-grid-editor {
    margin: 0.75rem 0 0.5rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.4rem;
    background: #fafafa;
}

.shift-grid-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
}

.shift-grid-editor__toolbar-delete {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    cursor: pointer;
}

.shift-grid-editor__toolbar-delete:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.shift-grid-editor__toolbar-delete:not(:disabled):hover {
    border-color: #b91c1c;
    color: #b91c1c;
}

.shift-grid-editor__intro {
    margin: 0 0 0.55rem !important;
}

.shift-grid-editor__scroll {
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.shift-grid-editor__head {
    display: grid;
    grid-template-columns: 2.75rem repeat(8, minmax(4.5rem, 1fr));
    gap: 1px;
    margin-bottom: 2px;
    min-width: min(100%, 52rem);
}

.shift-grid-editor__corner {
    min-height: 1.25rem;
}

.shift-grid-editor__col-head {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #4b5563;
    padding: 0.15rem 0;
    background: #f3f4f6;
    border-radius: 0.2rem;
}

.shift-grid-editor__matrix {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    gap: 0;
    min-width: min(100%, 52rem);
    min-height: 28rem;
}

.shift-grid-editor__times {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    background: #fff;
}

.shift-grid-editor__time-label {
    /* Use a FIXED row height identical to ``.shift-grid-editor__slot`` (1.6rem,
       border-box) so the time gutter and the shift-slot column are exactly
       ``24 * row`` tall regardless of how their (differently nested) containers
       stretch. With ``flex: 1 1 0`` the two lists grew to fill DIFFERENT heights
       (gutter ~640px vs slot column ~614px), spreading the hour labels ~1px/hour
       more than the gridlines, so shift blocks drifted up to ~1h below their
       printed hour. A fixed basis keeps labels, gridlines and blocks aligned. */
    box-sizing: border-box;
    flex: 0 0 1.6rem;
    min-height: 1.6rem;
    font-size: 0.68rem;
    color: #6b7280;
    padding: 0 0.25rem 0 0;
    text-align: right;
    line-height: 1;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    border-top: 1px solid #f3f4f6;
}

.shift-grid-editor__time-label:first-child {
    border-top: none;
}

.shift-grid-editor__columns {
    display: grid;
    grid-template-columns: repeat(8, minmax(4.5rem, 1fr));
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
}

.shift-grid-editor__column {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    min-height: 28rem;
}

.shift-grid-editor__slots {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 28rem;
}

.shift-grid-editor__slot {
    /* Fixed row height paired with ``.shift-grid-editor__time-label`` so the hour
       gutter and the slot column share identical per-row geometry (see comment
       there). Must stay in sync with that rule's ``flex``/``min-height``. */
    flex: 0 0 1.6rem;
    min-height: 1.6rem;
    border-top: 1px solid #f3f4f6;
    cursor: crosshair;
    box-sizing: border-box;
}

.shift-grid-editor__slot:first-child {
    border-top: none;
}

.shift-grid-editor__blocks {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.shift-grid-editor__block {
    position: absolute;
    left: 2px;
    right: 2px;
    min-height: 2rem;
    padding: 0.15rem 0.25rem 0.15rem 0.1rem;
    border: none;
    border-left: 3px solid var(--shift-accent, transparent);
    border-radius: 0.25rem;
    background: linear-gradient(
        180deg,
        var(--shift-fill-top, #dbeafe) 0%,
        var(--shift-fill-bottom, #bfdbfe) 100%
    );
    color: var(--shift-text, #1e3a8a);
    text-align: left;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.12rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.shift-grid-editor__block-resize {
    position: absolute;
    left: 0;
    right: 0;
    height: 7px;
    z-index: 4;
    touch-action: none;
    box-sizing: border-box;
    background: transparent;
}

.shift-grid-editor__block-resize--top {
    top: 0;
    cursor: ns-resize;
    border-radius: 0.25rem 0.25rem 0 0;
}

.shift-grid-editor__block-resize--bottom {
    bottom: 0;
    cursor: ns-resize;
    border-radius: 0 0 0.25rem 0.25rem;
}

.shift-grid-editor__block:hover .shift-grid-editor__block-resize,
.shift-grid-editor__block--selected .shift-grid-editor__block-resize {
    background: rgba(37, 99, 235, 0.1);
}

.shift-grid-editor__block--selected .shift-grid-editor__block-resize {
    background: rgba(37, 99, 235, 0.16);
}

.shift-grid-editor__block-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.06rem;
    cursor: pointer;
    text-align: left;
}

.shift-grid-editor__block-handle {
    flex: 0 0 0.85rem;
    width: 0.85rem;
    min-height: 1.5rem;
    align-self: stretch;
    border-radius: 0.15rem;
    background: rgba(37, 99, 235, 0.18);
    cursor: grab;
    touch-action: none;
}

.shift-grid-editor__block-handle:active {
    cursor: grabbing;
}

.shift-grid-editor--block-moving .shift-grid-editor__blocks {
    pointer-events: none !important;
}

.shift-grid-editor__block:hover {
    filter: brightness(1.03);
}

.shift-grid-editor__block--invoice-debtor {
    background: linear-gradient(180deg, #ccfbf1 0%, #99f6e4 100%);
    color: #115e59;
    box-shadow: 0 1px 2px rgba(15, 118, 110, 0.14);
}

.shift-grid-editor__block--invoice-debtor .shift-grid-editor__block-handle {
    background: rgba(13, 148, 136, 0.22);
}

.shift-grid-editor__block--invoice-debtor:hover .shift-grid-editor__block-resize,
.shift-grid-editor__block--invoice-debtor.shift-grid-editor__block--selected .shift-grid-editor__block-resize {
    background: rgba(13, 148, 136, 0.12);
}

.shift-grid-editor__block--invoice-debtor.shift-grid-editor__block--selected .shift-grid-editor__block-resize {
    background: rgba(13, 148, 136, 0.18);
}

.shift-grid-editor__block--selected {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    z-index: 3;
}

.shift-grid-editor__block--invoice-debtor.shift-grid-editor__block--selected {
    outline-color: #0d9488;
}

.shift-grid-editor--block-moving .shift-grid-editor__block {
    opacity: 0.88;
}

.shift-grid-editor__block--drag-source {
    opacity: 0.22 !important;
    filter: grayscale(0.2);
    outline: none !important;
}

.shift-grid-editor__block--drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    margin: 0;
    z-index: 10050;
    pointer-events: none;
    opacity: 0.95;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
    cursor: grabbing !important;
    box-sizing: border-box;
}

.shift-grid-editor__block--drag-ghost .shift-grid-editor__block-handle {
    cursor: grabbing !important;
}

.shift-grid-editor__block--drag-ghost .shift-grid-editor__block-resize {
    display: none;
}

.shift-grid-editor__block-title {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
    word-break: break-word;
}

.shift-grid-editor__block-time {
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0.95;
    font-variant-numeric: tabular-nums;
}

.shift-grid-editor__block-cap {
    font-size: 0.62rem;
    opacity: 0.88;
}

.shift-grid-editor__dialog {
    max-width: 22rem;
    width: calc(100vw - 2rem);
    padding: 1rem 1.1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.4rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
}

.shift-grid-editor__dialog::backdrop {
    background: rgba(15, 23, 42, 0.35);
}

.shift-grid-editor__dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.shift-grid-editor__dialog-title {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    line-height: 1.35;
}

.shift-grid-editor__dialog-close {
    flex-shrink: 0;
    margin: -0.15rem -0.25rem 0 0;
    padding: 0.15rem 0.45rem;
    border: none;
    border-radius: 0.25rem;
    background: transparent;
    color: #64748b;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.shift-grid-editor__dialog-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.shift-grid-editor__dialog-close:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.shift-grid-editor__field {
    margin-bottom: 0.65rem;
}

.shift-grid-editor__field--times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
}

.shift-grid-editor__time-field {
    flex: 1 1 7rem;
    min-width: 0;
}

.shift-grid-editor__time-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: #374151;
}

.shift-grid-editor__time-hint {
    margin: -0.35rem 0 0.55rem !important;
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
}

.shift-grid-editor__field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: #374151;
}

.shift-grid-editor__field input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.35rem 0.45rem;
    font-size: 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
}

.shift-grid-editor__field input[readonly] {
    background: #f3f4f6;
    color: #4b5563;
    cursor: not-allowed;
}

.shift-grid-editor__name-hint {
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.shift-grid-editor__dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.shift-grid-editor__save {
    padding: 0.35rem 0.85rem;
    font-size: 0.88rem;
    border-radius: 0.25rem;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}

.shift-grid-editor__delete {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    cursor: pointer;
}

.booking-journal-cell--date {
    width: 9%;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: #4b5563;
}

.booking-journal-cell--account {
    width: 14%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-journal-cell--description {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-journal-cell--amount {
    width: 7%;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.booking-journal-cell--currency {
    width: 5%;
    white-space: nowrap;
    text-align: center;
    color: #4b5563;
}

.booking-journal-cell--source {
    width: 11%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-journal-cell--creditor {
    width: 22%;
}

.booking-creditor-cell {
    max-width: 22rem;
    width: 22%;
    min-width: 10rem;
    vertical-align: middle;
    padding-right: 0.5rem;
}

.booking-creditor-cell__inner {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.data-table a.booking-row-link {
    color: inherit;
    text-decoration: none;
}

.data-table a.booking-row-link:hover {
    text-decoration: underline;
}

.booking-journal-table tbody tr.booking-journal-row {
    cursor: pointer;
}

.data-table .booking-row-preview-target {
    color: inherit;
    text-decoration: none;
}

.booking-journal-row:hover .booking-row-preview-target {
    text-decoration: underline;
}

/* Journal line detail (/members/accounting/bookings/<id>/) */
.booking-detail-page .booking-detail-meta-line {
    margin: 0 0 1rem;
    line-height: 1.5;
}

.booking-detail-page .booking-detail-card {
    margin-top: 1rem;
    border: 1px solid #c5d4e8;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    background: #fff;
}

.booking-detail-page .booking-detail-card--description {
    background: #f8fafc;
}

.booking-detail-page .booking-detail-card--muted {
    border-color: #e5e7eb;
    background: #fafafa;
}

.booking-detail-page .booking-detail-card__title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.booking-detail-page .booking-detail-card__intro {
    margin: -0.35rem 0 0.65rem;
}

.booking-detail-page .booking-detail-card__body-text {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.booking-detail-page .booking-detail-card__empty {
    margin: 0;
}

.booking-detail-page .booking-detail-card__actions {
    margin: 0.75rem 0 0;
}

.booking-detail-page .booking-detail-dl {
    display: grid;
    grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
    gap: 0.45rem 1rem;
    margin: 0;
    align-items: start;
}

.booking-detail-page .booking-detail-dl dt {
    margin: 0;
}

.booking-detail-page .booking-detail-dl dd {
    margin: 0;
    min-width: 0;
}

.booking-detail-page .booking-detail-dl__wrap {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.booking-detail-page .booking-detail-dl__mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92em;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.booking-detail-page .booking-detail-partner-name {
    font-size: 1.02em;
}

@media (max-width: 520px) {
    .booking-detail-page .booking-detail-dl {
        grid-template-columns: 1fr;
        gap: 0.2rem 0;
    }

    .booking-detail-page .booking-detail-dl dt {
        font-size: 0.82rem;
    }

    .booking-detail-page .booking-detail-dl dd {
        margin-bottom: 0.5rem;
    }
}

/* Journal list: click row opens preview popover; full page via link inside (booking_journal_preview.js) */
.booking-journal-preview-backdrop {
    position: fixed;
    inset: 0;
    z-index: 59990;
    background: rgba(15, 23, 42, 0.26);
    backdrop-filter: blur(1px);
}

.booking-journal-preview-backdrop[hidden] {
    display: none !important;
}

.booking-journal-preview {
    position: fixed;
    z-index: 60000;
    /* Viewport-centered; do not mix with document scroll offsets in JS (fixed = viewport coords). */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(44rem, calc(100vw - 2rem));
    min-width: min(22rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    pointer-events: auto;
    box-sizing: border-box;
    filter: drop-shadow(0 12px 40px rgba(15, 23, 42, 0.2));
}

.booking-journal-preview[hidden] {
    display: none !important;
}

.booking-journal-preview.is-visible {
    display: block;
}

.booking-journal-preview__inner {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 0;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #1e293b;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.booking-journal-preview__header {
    padding: 1rem 1.25rem 0.85rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.booking-journal-preview__title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0;
    letter-spacing: 0.01em;
    color: #0f172a;
}

.booking-journal-preview__close {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    border-radius: 0.45rem;
    width: 2rem;
    height: 2rem;
    line-height: 1;
    font-size: 1.2rem;
    cursor: pointer;
}

.booking-journal-preview__close:hover {
    background: #f8fafc;
}

.booking-journal-preview__dl {
    margin: 0;
    padding: 1rem 1.25rem 1.1rem;
    display: grid;
    grid-template-columns: minmax(7.5rem, 11rem) 1fr;
    gap: 0.55rem 1rem;
    align-items: start;
    overflow: auto;
}

.booking-journal-preview__dt {
    margin: 0;
    padding-top: 0.1rem;
    font-weight: 600;
    color: #475569;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.booking-journal-preview__dd {
    margin: 0;
    font-size: 0.95rem;
    color: #0f172a;
    word-break: break-word;
    white-space: pre-line;
    font-variant-numeric: tabular-nums;
}

.booking-journal-preview__footer {
    padding: 0.85rem 1.25rem 1.1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.booking-journal-preview__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border: 1px solid #1e40af;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.booking-journal-preview__link:hover {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    text-decoration: none;
}

.booking-journal-preview__link:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

/* Journal (bookings) page layout */
.booking-journal-page__intro {
    margin-bottom: 0;
}

.booking-journal-page__lede {
    margin: 0.5rem 0 0;
    max-width: 52rem;
    color: #4b5563;
    line-height: 1.5;
    font-size: 0.95rem;
}

.booking-journal-quicklinks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.booking-journal-quicklinks__btn {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #1e40af;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.booking-journal-quicklinks__btn:hover {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.booking-journal-page__messages {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.booking-journal-page__compose {
    margin-top: 1rem;
}

.booking-journal-page__compose .settings-group:first-of-type {
    margin-top: 0;
}

.booking-journal-page__prefill-hint {
    margin: 0 0 1rem;
}

.booking-journal-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    align-items: start;
}

.booking-journal-form__grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.booking-journal-page__compose .form-field-block--wide {
    grid-column: 1 / -1;
}

.booking-journal-page__compose .form-field-block--amount {
    max-width: 14rem;
}

.booking-journal-page__compose .form-field-block--iban input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.booking-journal-page__compose .form-field-block__hint {
    margin: 0.35rem 0 0;
}

.booking-journal-form__section {
    margin-top: 1.15rem;
}

.booking-journal-form__actions {
    margin-top: 1.25rem;
    padding-top: 0.25rem;
}

.booking-journal-qr-details {
    margin-top: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #f8fafc;
    overflow: hidden;
}

.booking-journal-qr-details__summary {
    cursor: pointer;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #334155;
    list-style: none;
}

.booking-journal-qr-details__summary::-webkit-details-marker {
    display: none;
}

.booking-journal-qr-details__summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform 0.15s ease;
    color: #64748b;
}

.booking-journal-qr-details[open] .booking-journal-qr-details__summary::before {
    transform: rotate(90deg);
}

.booking-journal-qr-details__body {
    padding: 0 1rem 1rem;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.booking-journal-qr-details__textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.45;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.45rem;
    resize: vertical;
    min-height: 8rem;
}

.booking-journal-qr-details__actions {
    margin: 0.75rem 0 0;
}

.booking-journal-page__list {
    margin-top: 1rem;
    overflow: hidden;
}

.booking-journal-list__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.85rem;
}

.booking-journal-list__toolbar h2 {
    margin: 0;
    font-size: 1.15rem;
}

.booking-journal-list__hint {
    margin: 0.35rem 0 0;
}

.booking-journal-list__export {
    flex-shrink: 0;
    text-decoration: none;
}

.booking-journal-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #ffffff;
}

.booking-journal-table-wrap .booking-journal-table {
    margin: 0;
    border: none;
}

.booking-journal-table-wrap .booking-journal-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    box-shadow: 0 1px 0 #d1d5db;
}

.booking-journal-amount {
    font-weight: 600;
    color: #0f172a;
}

.booking-journal-cell--actions {
    width: 6.5rem;
    white-space: nowrap;
    vertical-align: middle;
}

.booking-journal-correct-form {
    margin: 0;
}

.booking-journal-correct-btn {
    width: 100%;
    justify-content: center;
}

.booking-journal-source {
    display: inline-block;
    max-width: 100%;
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    border: 1px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.booking-journal-source--manual {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.booking-journal-source--swiss_qr {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.booking-journal-source--member_fee_invoice {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.booking-journal-source--member_expense {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.booking-journal-empty {
    text-align: center;
    padding: 2rem 1rem !important;
    color: #6b7280;
    font-style: italic;
}

table.data-table.booking-journal-form,
table.booking-journal-form {
    display: none;
}

@media (max-width: 720px) {
    .booking-journal-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .booking-journal-page__compose .form-field-block--amount {
        max-width: none;
    }

    .booking-journal-list__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .booking-journal-list__export {
        width: 100%;
        justify-content: center;
    }
}

/* Chart of accounts page */
.accounting-chart-page__intro {
    margin-bottom: 0;
}

.accounting-chart-page__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}

.accounting-chart-page__title-row h1 {
    margin: 0;
}

.accounting-chart-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    border: 1px solid transparent;
}

.accounting-chart-plan-badge--swiss {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.accounting-chart-plan-badge--custom {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.accounting-chart-page__lede {
    margin: 0.5rem 0 0;
    max-width: 52rem;
    color: #4b5563;
    line-height: 1.5;
    font-size: 0.95rem;
}

.accounting-chart-page__messages {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.accounting-chart-page__compose {
    margin-top: 1rem;
}

.accounting-chart-add-form__grid {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr) 8rem;
    gap: 1rem 1.25rem;
    align-items: start;
}

.accounting-chart-page__compose .form-field-block--wide {
    grid-column: auto;
}

.accounting-chart-page__compose .form-field-block--code input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

.accounting-chart-add-form__actions {
    margin-top: 1rem;
}

.accounting-chart-page__list {
    margin-top: 1rem;
    overflow: hidden;
}

.accounting-chart-list__toolbar {
    margin-bottom: 0.85rem;
}

.accounting-chart-list__toolbar h2 {
    margin: 0;
    font-size: 1.15rem;
}

.accounting-chart-list__hint {
    margin: 0.35rem 0 0;
}

.accounting-chart-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #ffffff;
}

.accounting-chart-table-wrap .accounting-chart-table {
    margin: 0;
    border: none;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.accounting-chart-table thead th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    text-align: left;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-bottom: 2px solid #d1d5db;
    position: sticky;
    top: 0;
    z-index: 1;
}

.accounting-chart-table tbody td {
    padding: 0.5rem 0.65rem;
    border: 1px solid #e5e7eb;
    vertical-align: middle;
}

.accounting-chart-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.accounting-chart-table tbody tr:hover {
    background: #f1f5f9;
}

.accounting-chart-cell--sort {
    width: 4.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #6b7280;
}

.accounting-chart-cell--code {
    width: 9rem;
    white-space: nowrap;
}

.accounting-chart-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}

.accounting-chart-cell--name {
    min-width: 12rem;
}

.accounting-chart-cell--actions {
    width: 6.5rem;
    white-space: nowrap;
}

.accounting-chart-delete-form {
    margin: 0;
}

.accounting-chart-delete-btn {
    width: 100%;
    justify-content: center;
}

.accounting-chart-empty {
    text-align: center;
    padding: 2rem 1rem !important;
    color: #6b7280;
    font-style: italic;
}

@media (max-width: 720px) {
    .accounting-chart-add-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .accounting-chart-cell--sort {
        width: auto;
    }
}

.header-center-cluster .header-center-link {
    font-size: 0.9rem;
    font-weight: 500;
}

.header-center-cluster button.header-center-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    text-align: inherit;
}

.header-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
    min-width: 0;
    max-width: 100%;
}

/* Global `select { width: 100% }` otherwise blows up the language form and wraps the whole header. */
.header .language-switcher,
.header .organization-switcher {
    display: inline-flex;
    align-items: center;
    margin: 0;
    width: auto;
    flex: 0 0 auto;
}

.header .language-switcher select,
.header .organization-switcher select {
    width: auto;
    min-width: 6.5rem;
    max-width: 12rem;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #4b5563;
    background: #374151;
    color: #f9fafb;
}

.header .organization-switcher select {
    max-width: 18rem;
}

.auth-panel-brand {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-panel-brand .auth-logo {
    display: block;
    width: auto;
    height: auto;
    margin: 0 auto 0.5rem;
}

.auth-panel-brand .auth-org-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f2937;
}

.auth-panel-brand .auth-product-line {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.2rem;
}

.header a {
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 500;
}

.header a:hover {
    text-decoration: underline;
}

.header-link-btn {
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.header-link-btn:hover {
    text-decoration: underline;
}


.content {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 2rem 2rem;
    background: #f3f4f6;
    flex: 1;
    align-items: start;
}

/* Field aid workflow: wider main column, more room for the map */
.content.content--field-aid-wide {
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    max-width: 100%;
    padding-left: clamp(1rem, 2vw, 2.5rem);
    padding-right: clamp(1rem, 2vw, 2.5rem);
}

/* Public course attendance / organizer self-registration: full viewport width */
.layout.layout--course-public-register {
    max-width: none;
    width: 100%;
}

.course-public-register-main {
    display: block;
    width: 100%;
    box-sizing: border-box;
    flex: 1 1 auto;
    margin: 0;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3rem);
    background: #f3f4f6;
}

.course-public-register-page .course-public-register-panel {
    width: 100%;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.course-public-register-org {
    margin-top: 0.15rem;
    margin-bottom: 1.25rem;
}

.course-public-offer-info {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.5rem;
    background: #f8fafc;
}

.course-public-offer-info > p {
    margin: 0 0 0.45rem;
}

.course-public-offer-info > p:last-child {
    margin-bottom: 0;
}

.course-public-offer-details,
.course-public-offer-fees {
    margin-top: 0.65rem;
}

.course-public-offer-details__body {
    margin-top: 0.25rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.course-public-offer-fees__list {
    margin: 0.25rem 0 0;
    padding-left: 1.2rem;
}

.course-public-flash-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.course-public-flash {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1rem 1rem 1rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.course-public-flash__glyph {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    margin-top: 0.05rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}

.course-public-flash__glyph--minus {
    position: relative;
    font-size: 0;
}

.course-public-flash__glyph--minus::after {
    content: "";
    display: block;
    width: 0.65rem;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
}

.course-public-flash--success .course-public-flash__glyph {
    background: #bbf7d0;
    color: #166534;
}

.course-public-flash--success {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: rgba(22, 101, 52, 0.18);
}

.course-public-flash--info .course-public-flash__glyph {
    background: #dbeafe;
    color: #1e40af;
}

.course-public-flash--info {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border-color: rgba(30, 64, 175, 0.15);
}

.course-public-flash--removed .course-public-flash__glyph {
    background: #e2e8f0;
    color: #475569;
}

.course-public-flash--removed {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: rgba(71, 85, 105, 0.2);
}

.course-public-flash--neutral .course-public-flash__glyph {
    background: #e5e7eb;
    color: #4b5563;
}

.course-public-flash--neutral {
    background: #f9fafb;
    border-color: rgba(75, 85, 99, 0.15);
    margin-bottom: 1rem;
}

.course-public-flash__body {
    min-width: 0;
    flex: 1;
}

.course-public-flash__text,
.course-public-flash__title,
.course-public-flash__detail {
    margin: 0;
    line-height: 1.45;
    color: #1f2937;
}

.course-public-flash__title {
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
}

.course-public-flash__detail {
    margin-top: 0.35rem;
    font-size: 0.92rem;
    color: #4b5563;
}

.course-public-flash--success .course-public-flash__text {
    font-weight: 500;
}

.course-public-flash--info .course-public-flash__text {
    font-weight: 500;
}

.course-public-register-page .form-table,
.course-public-register-page .data-table {
    width: 100%;
}

.course-public-add-formset-scroll,
.course-public-participants-scroll {
    overflow-x: auto;
    margin-top: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.course-public-participants-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.75rem;
}

.course-public-attendee-list {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.course-public-attendee-list .attendance-row {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.course-public-participant-card {
    margin: 0;
    padding: 1rem 1.15rem 1.05rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.55rem;
    background: #fafafa;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.course-public-participant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.25rem, 1fr));
    gap: 0.85rem 1.15rem;
    margin: 0;
}

.course-public-participant-field {
    min-width: 0;
}

.course-public-participant-field--wide {
    grid-column: span 2;
}

@media (max-width: 520px) {
    .course-public-participant-field--wide {
        grid-column: span 1;
    }
}

.course-public-participant-field dt {
    margin: 0 0 0.22rem 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    line-height: 1.2;
}

.course-public-participant-field dd {
    margin: 0;
    font-size: 0.94rem;
    font-weight: 500;
    color: #111827;
    line-height: 1.4;
    word-break: break-word;
}

.course-public-participants-empty {
    margin: 0.75rem 0 0;
    padding: 1rem 1.1rem;
    border: 1px dashed #d1d5db;
    border-radius: 0.55rem;
    background: #f9fafb;
    color: #4b5563;
    font-size: 0.95rem;
}

.course-public-participant-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.course-public-participant-card__actions a {
    color: #1d4ed8;
    font-weight: 500;
}

.course-public-participant-card__actions a:hover {
    text-decoration: underline;
}

.course-public-participant-card__action-sep {
    color: #9ca3af;
    user-select: none;
}

.course-public-participant-card__delete-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.course-public-participant-card__delete-btn {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: #1d4ed8;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

.course-public-participant-card__delete-btn:hover {
    color: #1e3a8a;
}

.course-public-add-formset-table,
.course-public-participants-table {
    width: 100%;
    border-collapse: collapse;
}

.course-public-add-formset-table th,
.course-public-add-formset-table td,
.course-public-participants-table th,
.course-public-participants-table td {
    vertical-align: top;
    min-width: 6.5rem;
    padding: 0.55rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.course-public-add-formset-table thead th,
.course-public-participants-table thead th {
    background: #f3f4f6;
    font-weight: 600;
    color: #374151;
}

.course-public-add-formset-table input,
.course-public-add-formset-table select {
    max-width: 100%;
    box-sizing: border-box;
}

/* Let the main column shrink so wide history HTML cannot push the whole column below the sidebar. */
.content > aside,
.content > section {
    min-width: 0;
}

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

@media (min-width: 981px) {
    /* Dashboard: lock viewport height; left sidebar and main scroll independently. */
    body.dashboard-layout-locked .layout {
        height: 100vh;
        max-height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    body.dashboard-layout-locked .layout > .header {
        flex-shrink: 0;
    }

    body.dashboard-layout-locked .layout > .site-footer {
        flex-shrink: 0;
    }

    body.dashboard-layout-locked .layout > .content.content--dashboard {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        align-items: stretch;
    }

    body:not(.dashboard-sidebar-collapsed) .content.content--dashboard {
        grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    }

    body:not(.dashboard-sidebar-collapsed) .content.content--dashboard .sidebar-column {
        position: static;
        top: auto;
        align-self: stretch;
        height: 100%;
        max-height: none;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        margin-right: -0.25rem;
        padding-right: 0.35rem;
    }

    body.dashboard-layout-locked .content.content--dashboard .events-panel {
        min-height: 0;
        height: 100%;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .content.content--dashboard .menu-panel {
        flex: 0 0 auto;
        display: block;
        overflow: visible;
        position: static;
        top: auto;
        z-index: auto;
        max-height: none;
    }

    .content.content--dashboard .members-panel {
        flex: 0 0 auto;
        min-width: 0;
        display: block;
        overflow: visible;
    }

    .content.content--dashboard .members-panel h2 {
        position: static;
        z-index: auto;
        background: transparent;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .content.content--dashboard .members-panel .hint {
        margin-bottom: 0.35rem;
    }

    .content.content--dashboard .members-panel__scroll {
        overflow: visible;
    }
}

.members-panel__filter-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.members-panel__filter {
    width: 100%;
    box-sizing: border-box;
    margin: 0.35rem 0 0.5rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    background: #f9fafb;
}

.members-panel__filter:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    background: #ffffff;
}

.member-row[hidden] {
    display: none !important;
}

.tree-group-node[hidden] {
    display: none !important;
}

@media (min-width: 981px) {
    /* Keep primary navigation reachable on non-dashboard pages. */
    .menu-panel {
        position: sticky;
        top: 0.75rem;
        z-index: 20;
        max-height: calc(100vh - 1.5rem);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* Dashboard: one sidebar scroll — menu must not stick or cap height. */
    .content.content--dashboard .menu-panel {
        position: static;
        top: auto;
        z-index: auto;
        max-height: none;
        overflow: visible;
    }
}

.menu-panel .menu-panel__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    flex-shrink: 0;
}

.menu-panel .menu-panel__heading h2 {
    margin: 0;
    line-height: 1.25;
}

/* Collapse control is desktop-only; see @media (min-width: 981px) below */
.sidebar-collapse-btn {
    display: none;
}

.menu-box-list li {
    margin-bottom: 0.45rem;
}

.menu-box-list a,
.menu-box-list button.menu-nav-btn,
.menu-logout-btn {
    display: block;
    width: 100%;
    text-align: left;
    text-decoration: none;
    color: #1f2937;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.9rem;
}

.menu-box-list button.menu-nav-btn {
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
}

.menu-nav-btn__unread-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-left: 0.35rem;
    border-radius: 50%;
    background: #dc2626;
    vertical-align: middle;
    box-shadow: 0 0 0 1px #ffffff;
}

.menu-box-list a:hover,
.menu-box-list button.menu-nav-btn:hover,
.menu-logout-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.menu-box-list a.is-active,
.menu-box-list button.menu-nav-btn.is-active {
    background: #dbeafe;
    border-color: #60a5fa;
    font-weight: 600;
}

.menu-nav-item {
    list-style: none;
}

/* Sidebar menu colour groups — rules use .menu-box-list button… so they beat generic menu-btn styles */
.menu-box-list button.menu-nav-btn[class*="menu-nav-btn--group-"] {
    border-left-width: 4px;
    border-left-style: solid;
}

.menu-box-list button.menu-nav-btn.menu-nav-btn--group-scheduling {
    background: #dbeafe;
    border-color: #60a5fa;
    border-left-color: #1d4ed8;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-scheduling:hover {
    background: #bfdbfe;
    border-color: #3b82f6;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-scheduling.is-active {
    background: #93c5fd;
    border-color: #2563eb;
    color: #1e3a8a;
}

.menu-box-list button.menu-nav-btn.menu-nav-btn--group-education {
    background: #ede9fe;
    border-color: #a78bfa;
    border-left-color: #6d28d9;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-education:hover {
    background: #ddd6fe;
    border-color: #8b5cf6;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-education.is-active {
    background: #c4b5fd;
    border-color: #7c3aed;
    color: #4c1d95;
}

.menu-box-list button.menu-nav-btn.menu-nav-btn--group-member {
    background: #cffafe;
    border-color: #22d3ee;
    border-left-color: #0891b2;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-member:hover {
    background: #a5f3fc;
    border-color: #06b6d4;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-member.is-active {
    background: #67e8f9;
    border-color: #0891b2;
    color: #164e63;
}

.menu-box-list button.menu-nav-btn.menu-nav-btn--group-mic {
    background: #f5d0fe;
    border-color: #e879f9;
    border-left-color: #a21caf;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-mic:hover {
    background: #f0abfc;
    border-color: #d946ef;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-mic.is-active {
    background: #e879f9;
    border-color: #c026d3;
    color: #701a75;
}

/* Menu colour groups — shared tokens (sidebar + page titles) */
:root {
    --menu-group-scheduling-text: #1d4ed8;
    --menu-group-scheduling-title-text: #3b82f6;
    --menu-group-education-title-text: #8b5cf6;
    --menu-group-member-title-text: #06b6d4;
    --menu-group-mic-title-text: #d946ef;
    --menu-group-superuser-text: #4f46e5;
    --menu-group-superuser-text-active: #312e81;
    --menu-group-superuser-title-text: #6366f1;
    --menu-group-reports-bg: #fef3c7;
    --menu-group-reports-border: #fbbf24;
    --menu-group-reports-accent: #b45309;
    --menu-group-reports-text: #78350f;
    --menu-group-reports-title-text: var(--menu-group-reports-hover-border);
    --menu-group-reports-hover-bg: #fde68a;
    --menu-group-reports-hover-border: #f59e0b;
    --menu-group-reports-active-bg: #fcd34d;
    --menu-group-reports-active-border: #d97706;
    --menu-group-reports-submenu-bg: #fde68a;
    --menu-group-reports-submenu-open-bg: #fcd34d;
    --menu-group-reports-submenu-active-bg: #fbbf24;
    --menu-group-reports-submenu-panel-bg: #fffbeb;
    --menu-group-accounting-title-text: #22c55e;
    --menu-group-inventory-title-text: #f97316;
    --menu-group-event-offering-title-text: #ec4899;
    --menu-group-admin-title-text: #64748b;
}

.menu-box-list button.menu-nav-btn.menu-nav-btn--group-reports {
    background: var(--menu-group-reports-bg);
    border-color: var(--menu-group-reports-border);
    border-left-color: var(--menu-group-reports-accent);
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-reports:hover {
    background: var(--menu-group-reports-hover-bg);
    border-color: var(--menu-group-reports-hover-border);
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-reports.is-active {
    background: var(--menu-group-reports-active-bg);
    border-color: var(--menu-group-reports-active-border);
    color: var(--menu-group-reports-text);
}

.menu-box-list button.menu-nav-btn.menu-nav-btn--group-superuser {
    background: #e0e7ff;
    border-color: #818cf8;
    border-left-color: #4338ca;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-superuser:hover {
    background: #c7d2fe;
    border-color: #6366f1;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-superuser.is-active {
    background: #a5b4fc;
    border-color: #4f46e5;
    color: var(--menu-group-superuser-text-active);
}

.menu-box-list button.menu-nav-btn.menu-nav-btn--group-accounting {
    background: #dcfce7;
    border-color: #4ade80;
    border-left-color: #15803d;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-accounting:hover {
    background: #bbf7d0;
    border-color: #22c55e;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-accounting.is-active {
    background: #86efac;
    border-color: #16a34a;
    color: #14532d;
}

.menu-box-list button.menu-nav-btn.menu-nav-btn--group-inventory {
    background: #ffedd5;
    border-color: #fb923c;
    border-left-color: #c2410c;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-inventory:hover {
    background: #fed7aa;
    border-color: #f97316;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-inventory.is-active {
    background: #fdba74;
    border-color: #ea580c;
    color: #7c2d12;
}

.menu-box-list button.menu-nav-btn.menu-nav-btn--group-event-offering {
    background: #fce7f3;
    border-color: #f472b6;
    border-left-color: #be185d;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-event-offering:hover {
    background: #fbcfe8;
    border-color: #ec4899;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-event-offering.is-active {
    background: #f9a8d4;
    border-color: #db2777;
    color: #831843;
}

.menu-box-list button.menu-nav-btn.menu-nav-btn--group-admin {
    background: #e2e8f0;
    border-color: #94a3b8;
    border-left-color: #334155;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-admin:hover {
    background: #cbd5e1;
    border-color: #64748b;
}
.menu-box-list button.menu-nav-btn.menu-nav-btn--group-admin.is-active {
    background: #94a3b8;
    border-color: #475569;
    color: #0f172a;
}

/* Main content title — unified typography; light group tint as text colour only */
.app-page-title {
    box-sizing: border-box;
    margin: 0 0 0.75rem;
    padding: 0;
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    color: #1f2937;
}

.app-page-title--group-scheduling,
.layout[data-app-menu-group="scheduling"] .app-page-title {
    color: var(--menu-group-scheduling-title-text);
}
.app-page-title--group-education,
.layout[data-app-menu-group="education"] .app-page-title {
    color: var(--menu-group-education-title-text);
}
.app-page-title--group-member,
.layout[data-app-menu-group="member"] .app-page-title {
    color: var(--menu-group-member-title-text);
}
.app-page-title--group-mic,
.layout[data-app-menu-group="mic"] .app-page-title {
    color: var(--menu-group-mic-title-text);
}
.app-page-title--group-reports,
.layout[data-app-menu-group="reports"] .app-page-title {
    color: var(--menu-group-reports-title-text);
}
.app-page-title--group-superuser,
.layout[data-app-menu-group="superuser"] .app-page-title {
    color: var(--menu-group-superuser-title-text);
}
.app-page-title--group-accounting,
.layout[data-app-menu-group="accounting"] .app-page-title {
    color: var(--menu-group-accounting-title-text);
}
.app-page-title--group-inventory,
.layout[data-app-menu-group="inventory"] .app-page-title {
    color: var(--menu-group-inventory-title-text);
}
.app-page-title--group-event-offering,
.layout[data-app-menu-group="event-offering"] .app-page-title {
    color: var(--menu-group-event-offering-title-text);
}
.app-page-title--group-admin,
.layout[data-app-menu-group="admin"] .app-page-title {
    color: var(--menu-group-admin-title-text);
}

.menu-submenu--group-reports {
    border-color: var(--menu-group-reports-hover-border);
}
.menu-submenu--group-reports > .menu-submenu__summary--group-reports {
    background: var(--menu-group-reports-submenu-bg);
    border-left: 4px solid var(--menu-group-reports-accent);
}
.menu-submenu--group-reports[open] > .menu-submenu__summary--group-reports {
    background: var(--menu-group-reports-submenu-open-bg);
}
.menu-submenu--group-reports[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary--group-reports {
    background: var(--menu-group-reports-submenu-active-bg);
    color: var(--menu-group-reports-text);
}
.menu-submenu--group-reports > .menu-box-list--sub {
    background: var(--menu-group-reports-submenu-panel-bg);
}

.menu-submenu--group-superuser {
    border-color: #6366f1;
}
.menu-submenu--group-superuser > .menu-submenu__summary--group-superuser {
    background: #c7d2fe;
    border-left: 4px solid #4338ca;
    color: var(--menu-group-superuser-text);
}
.menu-submenu--group-superuser[open] > .menu-submenu__summary--group-superuser {
    background: #a5b4fc;
}
.menu-submenu--group-superuser[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary--group-superuser {
    background: #818cf8;
    color: var(--menu-group-superuser-text-active);
}
.menu-submenu--group-superuser > .menu-box-list--sub {
    background: #eef2ff;
}

.menu-submenu--group-accounting {
    border-color: #22c55e;
}
.menu-submenu--group-accounting > .menu-submenu__summary--group-accounting,
.menu-submenu--group-accounting > .menu-box-list--sub .menu-submenu--nested > .menu-submenu__summary--group-accounting {
    background: #bbf7d0;
    border-left: 4px solid #15803d;
}
.menu-submenu--group-accounting[open] > .menu-submenu__summary--group-accounting,
.menu-submenu--group-accounting .menu-submenu--nested[open] > .menu-submenu__summary--group-accounting {
    background: #86efac;
}
.menu-submenu--group-accounting[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary--group-accounting,
.menu-submenu--group-accounting .menu-submenu--nested[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary--group-accounting {
    background: #4ade80;
    color: #14532d;
}
.menu-submenu--group-accounting > .menu-box-list--sub,
.menu-submenu--group-accounting .menu-box-list--nested {
    background: #f0fdf4;
}

.menu-submenu--group-inventory {
    border-color: #f97316;
}
.menu-submenu--group-inventory > .menu-submenu__summary--group-inventory,
.menu-submenu--group-inventory > .menu-box-list--sub .menu-submenu--nested > .menu-submenu__summary--group-inventory {
    background: #fed7aa;
    border-left: 4px solid #c2410c;
}
.menu-submenu--group-inventory[open] > .menu-submenu__summary--group-inventory,
.menu-submenu--group-inventory .menu-submenu--nested[open] > .menu-submenu__summary--group-inventory {
    background: #fdba74;
}
.menu-submenu--group-inventory[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary--group-inventory,
.menu-submenu--group-inventory .menu-submenu--nested[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary--group-inventory {
    background: #fb923c;
    color: #7c2d12;
}
.menu-submenu--group-inventory > .menu-box-list--sub,
.menu-submenu--group-inventory .menu-box-list--nested {
    background: #fff7ed;
}

.menu-submenu--group-reports[open] > .menu-submenu__summary--group-reports:hover,
.menu-submenu--group-superuser[open] > .menu-submenu__summary--group-superuser:hover,
.menu-submenu--group-accounting[open] > .menu-submenu__summary--group-accounting:hover,
.menu-submenu--group-accounting .menu-submenu--nested[open] > .menu-submenu__summary--group-accounting:hover,
.menu-submenu--group-inventory[open] > .menu-submenu__summary--group-inventory:hover,
.menu-submenu--group-inventory .menu-submenu--nested[open] > .menu-submenu__summary--group-inventory:hover {
    filter: brightness(0.96);
}

/* Sidebar: booking / accounting nested menu */
.menu-submenu-item {
    list-style: none;
    margin-bottom: 0.45rem;
    min-width: 0;
}

.menu-submenu {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: #f3f4f6;
    /* overflow: visible so the disclosure chevron is not clipped */
    overflow: visible;
}

.menu-submenu__summary {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    /* Match .menu-box-list a horizontal padding; keep a bit of room for ▶ */
    padding: 0.45rem 0.6rem 0.45rem 0.55rem;
    background: #e5e7eb;
    border: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-align: left;
    user-select: none;
    border-radius: 0.375rem;
    transition: background 0.12s ease, color 0.12s ease;
}

.menu-submenu[open] > .menu-submenu__summary:not([class*="menu-submenu__summary--group-"]) {
    background: #eef0f3;
    color: #1f2937;
    border-radius: 0.375rem 0.375rem 0 0;
}

.menu-submenu[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary:not([class*="menu-submenu__summary--group-"]) {
    background: #dbeafe;
    color: #1e3a8a;
}

.menu-submenu__summary::-webkit-details-marker {
    display: none;
}

.menu-submenu__summary::after {
    content: "▶";
    font-size: 0.6rem;
    line-height: 1;
    color: #4b5563;
    flex-shrink: 0;
    width: 1em;
    text-align: center;
    transition: transform 0.15s ease, color 0.12s ease;
}

.menu-submenu[open] > .menu-submenu__summary::after {
    transform: rotate(90deg);
    color: #4b5563;
}

.menu-submenu[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary:not([class*="menu-submenu__summary--group-"])::after {
    color: #1e40af;
}

.menu-submenu__summary:hover {
    background: #d1d5db;
}

.menu-submenu[open] > .menu-submenu__summary:not([class*="menu-submenu__summary--group-"]):hover {
    background: #e5e7eb;
}

.menu-submenu[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary:not([class*="menu-submenu__summary--group-"]):hover {
    background: #bfdbfe;
}

.menu-box-list--sub {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0.35rem 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 0.3rem 0.3rem;
}

/* Author `display:flex` above overrides the UA rule that hides closed <details> content. */
.menu-submenu:not([open]) > :not(.menu-submenu__summary) {
    display: none !important;
}

.menu-box-list--sub li {
    margin-bottom: 0;
}

.menu-box-list--sub a,
.menu-box-list--sub button.menu-nav-btn {
    font-size: 0.88rem;
    padding: 0.38rem 0.5rem;
}

/* Inventory: nested “Reports” submenu (lending, sales, expired) */
.menu-submenu-item--nested {
    list-style: none;
    margin-bottom: 0;
}

.menu-submenu--nested {
    border-color: #d1d5db;
    margin-top: 0.1rem;
}

.menu-submenu--nested > .menu-submenu__summary--nested {
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0.4rem 0.55rem 0.4rem 0.5rem;
    background: #e8eaed;
}

.menu-submenu--nested[open] > .menu-submenu__summary--nested:not([class*="menu-submenu__summary--group-"]) {
    background: #eef0f3;
}

.menu-submenu--nested[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary--nested:not([class*="menu-submenu__summary--group-"]) {
    background: #dbeafe;
}

.menu-box-list--nested {
    padding-left: 0.55rem;
    padding-right: 0.3rem;
}

/* Buchhaltung hub: space below tab strip (org settings form; Mahnpläne pages) */
.organization-settings-panel .organization-settings-accounting-hub.dashboard-register-tabs-wrap,
.events-panel .panel > .organization-settings-accounting-hub.dashboard-register-tabs-wrap {
    margin-bottom: 1rem;
}

.header-text-nav-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
}

.header-text-nav-btn:hover {
    color: #1d4ed8;
}

button.attendance-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 600;
}

.hint-nav-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.hint-nav-btn:hover {
    color: #1e40af;
}

/* Staff course list: overview table + header */
.course-list-page .course-list-panel {
    max-width: 60rem;
}

.course-list-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.course-list-header__intro {
    flex: 1 1 16rem;
    min-width: 0;
}

.course-list-header__intro h1 {
    margin: 0 0 0.35rem;
    font-size: 1.65rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

.course-list-lead {
    margin: 0;
    max-width: 42rem;
    line-height: 1.5;
}

.course-list-header__cta {
    flex: 0 0 auto;
    align-self: center;
}

.course-list-new-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.5rem 1.1rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background: #2563eb;
    border: 1px solid #1d4ed8;
    border-radius: 0.45rem;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.course-list-new-btn:hover {
    background: #1d4ed8;
    border-color: #1e40af;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.course-list-new-btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.course-list-new-btn--inline {
    margin-top: 0.75rem;
}

.course-list-table-wrap {
    width: 100%;
    margin-top: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fafafa;
}

table.data-table.course-list-table {
    width: 100%;
    min-width: 36rem;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.875rem;
    table-layout: fixed;
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
}

.course-list-table thead th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    text-align: left;
    padding: 0.65rem 0.85rem;
    border-bottom: 2px solid #d1d5db;
    vertical-align: middle;
}

.course-list-table tbody td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.course-list-table tbody tr:last-child td {
    border-bottom: none;
}

.course-list-table tbody tr:hover td {
    background: #f8fafc;
}

.course-list-table th:nth-child(1),
.course-list-table td:nth-child(1) {
    width: 28%;
}

.course-list-table th:nth-child(2),
.course-list-table td:nth-child(2) {
    width: 20%;
}

.course-list-table th:nth-child(3),
.course-list-table td:nth-child(3) {
    width: 14%;
}

.course-list-table th:nth-child(4),
.course-list-table td:nth-child(4) {
    width: 22%;
}

.course-list-table th:nth-child(5),
.course-list-table td:nth-child(5) {
    width: 16%;
}

.course-list-table__th-participants,
.course-list-cell-participants {
    text-align: right;
}

.course-list-topic-link {
    display: block;
    max-width: 100%;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 600;
    color: #1d4ed8;
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.1s ease, border-color 0.1s ease;
}

.course-list-topic-link:hover {
    color: #1e3a8a;
    border-bottom-color: #93c5fd;
}

.course-list-topic-link:focus-visible {
    border-radius: 0.2rem;
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.course-list-when {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    line-height: 1.25;
}

.course-list-when__date {
    font-weight: 600;
    color: #111827;
}

.course-list-when__time {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.course-list-when--empty {
    color: #9ca3af;
}

.course-status-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    line-height: 1.2;
    white-space: nowrap;
}

.course-status-badge--planned {
    background: #e0e7ff;
    color: #3730a3;
}

.course-status-badge--definitive {
    background: #d1fae5;
    color: #065f46;
}

.course-status-badge--done {
    background: #f3f4f6;
    color: #4b5563;
}

.course-list-status-form {
    margin: 0;
    display: inline-block;
    max-width: 100%;
}

.course-list-status-select {
    margin: 0;
    max-width: 100%;
    padding: 0.35rem 1.75rem 0.35rem 0.5rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    background-color: #f3f4f6;
    color: #374151;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
}

.course-list-status-select:hover {
    border-color: #9ca3af;
}

.course-list-status-select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

.course-list-status-select.course-list-status-select--planned {
    background-color: #e0e7ff;
    border-color: #a5b4fc;
    color: #3730a3;
}

.course-list-status-select.course-list-status-select--definitive {
    background-color: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.course-list-status-select.course-list-status-select--done {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #4b5563;
}

.course-list-participants {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #111827;
}

.course-list-participants__sep {
    margin: 0 0.15rem;
    font-weight: 500;
    color: #9ca3af;
}

.course-list-participants--full .course-list-participants__count {
    color: #b45309;
}

.course-list-empty {
    margin-top: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px dashed #d1d5db;
    border-radius: 0.5rem;
    background: #f9fafb;
}

.course-list-empty__text {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #374151;
}

.course-attendance-hint {
    margin-bottom: 0.5rem;
}

.course-attendance-actions {
    margin-top: 0.75rem;
}

.course-attendance-select {
    font: inherit;
    font-size: 0.8125rem;
    padding: 0.25rem 0.35rem;
    border-radius: 0.35rem;
    border: 1px solid #d1d5db;
    min-width: 7.5rem;
    max-width: 100%;
    box-sizing: border-box;
    background: #ffffff;
}

.course-participants-table__attendance {
    vertical-align: middle;
    white-space: nowrap;
}

/* First column (attendance): visible without horizontal scroll; stays pinned when scrolling wide rows */
.course-participants-table thead th.course-participants-table__th-attendance,
.course-participants-table tbody td.course-participants-table__cell-attendance {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #ffffff;
    box-shadow: 4px 0 10px -6px rgba(15, 23, 42, 0.35);
}

.course-participants-table thead th.course-participants-table__th-attendance {
    z-index: 3;
    background: #f3f4f6;
}

.course-attendance-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    line-height: 1.2;
}

.course-attendance-pill--yes {
    background: #d1fae5;
    color: #065f46;
}

.course-attendance-pill--no {
    background: #fee2e2;
    color: #991b1b;
}

.course-attendance-pill--unset {
    background: #f3f4f6;
    color: #6b7280;
}

.course-detail-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.course-detail-hero {
    padding: 0.2rem 0.1rem 0.8rem;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid #e5e7eb;
}

.course-detail-hero h1 {
    margin-bottom: 0.55rem;
    letter-spacing: -0.01em;
}

.course-detail-status-line {
    margin-bottom: 0.45rem;
}

.course-detail-hero-nav {
    margin: 0;
}

.course-detail-hero-delete {
    margin: 0.75rem 0 0;
}

.course-detail-delete-btn {
    border-color: #fca5a5;
    color: #b91c1c;
}

.course-detail-delete-btn:hover {
    border-color: #f87171;
    color: #991b1b;
}

.course-detail-message-panel {
    border: 1px solid #e5e7eb;
    background: #fcfcfd;
}

.course-detail-section-card {
    margin-top: 1rem;
    padding: 0.95rem 1.25rem 1rem 1.05rem;
    border: 1px solid #e5e7eb;
    border-left-width: 4px;
    border-radius: 0.6rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.course-detail-section-card + .course-detail-section-card {
    margin-top: 1.15rem;
}

.course-detail-panel-section[hidden] {
    display: none;
}

.course-detail-tabs {
    margin-bottom: 1rem;
}

.course-detail-section-card > h2 {
    margin-top: 0;
    margin-bottom: 0.55rem;
}

.course-detail-section-card .form-table {
    margin: 0.45rem 0 0;
}

.course-detail-section-card .form-table th,
.course-detail-section-card .form-table td {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.course-form-required-legend {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    color: #334155;
}

.form-required-mark {
    color: #b91c1c;
    font-weight: 700;
    margin-left: 0.12em;
    display: inline;
    white-space: nowrap;
}

.course-mail-compose label .form-required-mark,
.course-form-fields-table th label .form-required-mark {
    display: inline;
}

.course-mail-compose > form > div > label {
    display: inline-block;
    margin-bottom: 0.35rem;
}

.course-form-fields-table th {
    vertical-align: top;
    padding-right: 0.75rem;
}

.course-form-fields-table th label {
    display: inline;
    margin-bottom: 0;
    font-weight: 600;
    white-space: normal;
}

.course-client-debtor-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

.course-client-debtor-kind-option {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: normal;
}

.course-client-debtor-kind-option input {
    margin-right: 0.35rem;
}

.course-client-debtor-cell .form-field-block label {
    display: inline-block;
    margin-bottom: 0.25rem;
}

.course-client-debtor-cell select {
    max-width: 28rem;
    width: 100%;
}

.course-client-debtor-cell input[type="text"],
.course-client-debtor-cell input[type="email"] {
    max-width: 28rem;
    width: 100%;
    box-sizing: border-box;
}

.course-form-fields-table th .form-required-mark {
    display: inline;
    white-space: nowrap;
}

.course-public-add-formset-table th,
.course-participants-table th {
    white-space: nowrap;
}

.course-public-add-formset-table th .form-required-mark,
.course-participants-table th .form-required-mark {
    display: inline;
}

.course-detail-section-card--details {
    background: #f8fafc;
    border-color: #dbe3ec;
    border-left-color: #64748b;
    padding-right: 1.45rem;
}

.course-detail-section-card--registration {
    background: #f5faff;
    border-color: #d7e9fb;
    border-left-color: #2563eb;
}

.course-detail-section-card--leaders {
    background: #faf5ff;
    border-color: #eadcff;
    border-left-color: #7c3aed;
}

.course-detail-section-card--attendance {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #d97706;
}

.course-attendance-checklist-table__name {
    min-width: 12rem;
}

.course-attendance-checklist-email {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.course-attendance-summary {
    margin-bottom: 0.5rem;
}

.course-detail-section-card--participants {
    background: #f5fff9;
    border-color: #d8f3e1;
    border-left-color: #059669;
}

.course-detail-section-card--mail {
    background: #fffaf0;
    border-color: #fde9c7;
    border-left-color: #d97706;
}

@media (max-width: 720px) {
    .course-detail-section-card {
        padding: 0.9rem 1rem 0.95rem;
    }

    .course-detail-section-card--details {
        padding-right: 1rem;
    }
}

/* Field first aid: scan-style cards (white / pale yellow, bold black borders — readable like the PDF) */
.field-aid-workflow {
    --faw-paper: #fffef7;
    --faw-ink: #171717;
    --faw-process-fill: #ffffff;
    --faw-process-border: #171717;
    --faw-decision-fill: #fff9c4;
    --faw-decision-border: #854d0e;
    --faw-current-fill: #fecaca;
    --faw-current-border: #b91c1c;
}

.field-aid-workflow > .panel {
    background: var(--faw-paper);
    border: 2px solid #a8a29e;
    border-radius: 0.35rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.field-aid-workflow > .panel h1:not(.app-page-title) {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--faw-ink);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.field-aid-workflow > .panel .hint {
    font-size: 1.0625rem;
    line-height: 1.5;
    color: #44403c;
}

.field-aid-workflow .field-aid-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.field-aid-workflow .field-aid-secondary-btn {
    cursor: pointer;
    font: inherit;
    font-size: 1.0625rem;
    padding: 0.55rem 1rem;
    min-height: 3rem;
    border: 2px solid #78716c;
    border-radius: 0.35rem;
    background: #fafaf9;
    color: #292524;
}

.field-aid-workflow .field-aid-secondary-btn:hover:not(:disabled) {
    background: #f5f5f4;
    border-color: #57534e;
}

.field-aid-workflow .field-aid-secondary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.field-aid-workflow .field-aid-step-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.field-aid-workflow .field-aid-step-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
    min-width: 0;
    line-height: 1.35;
    color: var(--faw-ink);
}

.field-aid-workflow .field-aid-step-code {
    flex-shrink: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #57534e;
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
    border-radius: 4px;
    padding: 0.2rem 0.45rem;
    margin-top: 0.15rem;
    line-height: 1.2;
}

.field-aid-workflow .field-aid-body ul {
    margin: 0 0 1.1rem;
    padding-left: 1.35rem;
}

.field-aid-workflow .field-aid-body li {
    margin: 0.45rem 0;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: #292524;
}

.field-aid-workflow .field-aid-choices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.field-aid-workflow .field-aid-choice-btn {
    display: block;
    width: 100%;
    max-width: 52rem;
    text-align: left;
    padding: 0.85rem 1.1rem;
    min-height: 3rem;
    border: 2px solid var(--faw-process-border);
    border-radius: 0.35rem;
    background: var(--faw-process-fill);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: 1.0625rem;
    line-height: 1.45;
    color: var(--faw-ink);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.08);
}

.field-aid-workflow .field-aid-choice-btn:hover {
    background: #f5f5f4;
    border-color: #000000;
    color: #000000;
}

.field-aid-workflow .field-aid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem 2rem;
    background: var(--faw-paper);
    border: 2px solid #a8a29e;
    border-radius: 0.35rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.field-aid-workflow .field-aid-layout.panel {
    padding: 1.25rem 1.35rem 1.5rem;
}

@media (min-width: 960px) {
    .field-aid-workflow .field-aid-layout {
        grid-template-columns: minmax(0, 1fr) minmax(360px, min(56%, 640px));
        align-items: start;
    }
}

.field-aid-workflow .field-aid-map-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: var(--faw-ink);
}

.field-aid-workflow .field-aid-map-hint {
    margin: 0 0 0.55rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #44403c;
}

.field-aid-workflow .field-aid-trail {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--faw-ink);
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.65rem;
    background: #ffffff;
    border: 2px solid #171717;
    border-radius: 0.35rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    max-height: 8rem;
    overflow-y: auto;
}

.field-aid-workflow .field-aid-mermaid-wrap.field-aid-mermaid-wrap--scrollonly {
    overflow: auto;
}

.field-aid-workflow .field-aid-mermaid-wrap {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    /* Explicit viewport so svg-pan-zoom fit() can scale the graph to fill this box */
    height: min(80vh, 1040px);
    min-height: 280px;
    border: 2px solid #171717;
    border-radius: 0.35rem;
    background: #e7e5e4;
    padding: 0.5rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* With preventMouseEventsDefault off, keep browser from treating diagram drags as page scroll. */
.field-aid-workflow .field-aid-mermaid-wrap:not(.field-aid-mermaid-wrap--scrollonly) {
    touch-action: none;
}

.field-aid-workflow .field-aid-mermaid-wrap svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    font-size: 22px;
}

/* svg-pan-zoom control icons (injected into the SVG) */
.field-aid-workflow .field-aid-mermaid-wrap .svg-pan-zoom-control {
    z-index: 2;
}

.field-aid-workflow .field-aid-map-column {
    min-width: 0;
}

button.dashboard-register-tab {
    cursor: pointer;
    font-family: inherit;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.accounting-icon-btn[type="button"] {
    font-family: inherit;
}

/* Staff dashboard: register-card / folder tabs (not plain buttons) */
.dashboard-register-tabs-wrap {
    margin-bottom: 0;
    padding: 0.5rem 0.75rem 0;
    background: linear-gradient(180deg, #eef2f6 0%, #e8ecf1 100%);
    border: 1px solid #d1d5db;
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.dashboard-register-tabs {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-register-tab {
    position: relative;
    display: block;
    margin: 0 0 0 0.35rem;
    text-decoration: none;
    color: #4b5563;
    background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 1px solid #c4c9d1;
    border-bottom: none;
    border-radius: 0.45rem 0.45rem 0 0;
    padding: 0.55rem 1.15rem 0.65rem;
    min-width: 7.5rem;
    text-align: center;
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.6) inset, 0 2px 4px rgba(15, 23, 42, 0.06);
    transform: translateY(1px);
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-register-tab:first-child {
    margin-left: 0.15rem;
}

.dashboard-register-tab:hover {
    color: #111827;
    background: linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.8) inset, 0 3px 6px rgba(15, 23, 42, 0.08);
    z-index: 1;
}

.dashboard-register-tab:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    z-index: 2;
}

.dashboard-register-tab__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.dashboard-register-tab.is-active {
    color: #111827;
    background: #ffffff;
    border-color: #d1d5db;
    font-weight: 700;
    transform: translateY(0);
    z-index: 3;
    padding-left: 1.35rem;
    box-shadow:
        0 -1px 0 rgba(255, 255, 255, 1) inset,
        0 -2px 8px rgba(15, 23, 42, 0.06),
        0 1px 0 #ffffff;
    padding-bottom: 0.7rem;
}

.dashboard-register-tab.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0.45rem 0 0 0;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.dashboard-register-tab.is-active .dashboard-register-tab__label {
    font-weight: 700;
}

/* Event offering workflow: completed steps + locked tabs */
.event-offering-workflow .dashboard-register-tab:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.event-offering-workflow .dashboard-register-tab:disabled:hover {
    color: #4b5563;
    background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.6) inset, 0 2px 4px rgba(15, 23, 42, 0.06);
    z-index: auto;
}

.event-offering-workflow .dashboard-register-tab--done:not(.is-active):not(:disabled) {
    border-top: 3px solid #22c55e;
    padding-top: calc(0.55rem - 2px);
}

/* Event offering hub: offer requests vs offer settings (tabs) */
.event-offering-hub .dashboard-register-tabs-wrap {
    margin-bottom: 1rem;
}

.event-offering-settings__title {
    margin: 0.35rem 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.event-offering-settings__hint {
    margin-top: 0;
    max-width: 42rem;
}

/* Event offering — Agreement & costs (Vereinbarung & Kosten) */
.eo-agreement-tab-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
}

.eo-agreement-tab-heading__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.eo-agreement-tab-heading__hint {
    margin: 0;
    flex: 1 1 100%;
}

.eo-agreement-summary-card {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    padding: 0.55rem 0.9rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid #bfdbfe;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.eo-agreement-summary-card__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.eo-agreement-summary-card__value {
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #1d4ed8;
    line-height: 1.1;
}

.eo-agreement-pagehead {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.eo-agreement-pagehead__crumb {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
}

.eo-agreement-pagehead__crumb a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.eo-agreement-pagehead__crumb a:hover {
    text-decoration: underline;
}

.eo-agreement-pagehead__title {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.eo-agreement-pagehead__lead {
    margin: 0;
    max-width: 40rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #475569;
}

.eo-agreement-panel-form.panel {
    padding-top: 1.1rem;
}

.eo-agreement-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.eo-agreement-intro {
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
}

.eo-agreement-intro__text {
    margin: 0 0 0.65rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #475569;
}

.eo-agreement-intro__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.eo-agreement-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.eo-agreement-badge--total {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
    font-variant-numeric: tabular-nums;
}

.eo-agreement-section {
    margin: 0;
    padding: 0.85rem 1rem 1rem;
    border-radius: 0.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* Vereinbarung: same left accent palette as ZO risk checklist sections */
.eo-agreement-section.eo-agreement-section--aktiv,
.eo-agreement-section.eo-agreement-section--zuschauer,
.eo-agreement-section.eo-agreement-section--umfeld,
.eo-agreement-section.eo-agreement-section--notes {
    border: 1px solid #e2e8f0;
    border-left-width: 4px;
    background: linear-gradient(165deg, #fafbfc 0%, #f4f6f8 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.eo-agreement-section.eo-agreement-section--aktiv {
    border-left-color: #0d9488;
}

.eo-agreement-section.eo-agreement-section--zuschauer {
    border-left-color: #6366f1;
}

.eo-agreement-section.eo-agreement-section--umfeld {
    border-left-color: #0ea5e9;
}

.eo-agreement-section.eo-agreement-section--notes {
    border-left-color: #8b5cf6;
}

.eo-agreement-section.eo-agreement-section--aktiv .eo-agreement-section__title {
    color: #134e4a;
    border-bottom-color: rgba(13, 148, 136, 0.35);
}

.eo-agreement-section.eo-agreement-section--zuschauer .eo-agreement-section__title {
    color: #312e81;
    border-bottom-color: rgba(99, 102, 241, 0.35);
}

.eo-agreement-section.eo-agreement-section--umfeld .eo-agreement-section__title {
    color: #0c4a6e;
    border-bottom-color: rgba(14, 165, 233, 0.35);
}

.eo-agreement-section.eo-agreement-section--notes .eo-agreement-section__title {
    color: #5b21b6;
    border-bottom-color: rgba(139, 92, 246, 0.35);
}

.eo-agreement-section__title {
    margin: 0 0 0.75rem;
    padding-bottom: 0.45rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    border-bottom: 2px solid #e0e7ff;
}

.eo-agreement-field {
    margin-bottom: 0.75rem;
}

.eo-agreement-field:last-child {
    margin-bottom: 0;
}

.eo-agreement-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.eo-agreement-field ul.errorlist {
    margin: 0 0 0.35rem;
    padding-left: 1.1rem;
    font-size: 0.85rem;
    color: #b91c1c;
}

.eo-agreement-textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.4rem;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #0f172a;
    background: #fafafa;
    resize: vertical;
    min-height: 5rem;
    transition:
        border-color 0.12s ease,
        box-shadow 0.12s ease;
}

.eo-agreement-textarea:hover {
    border-color: #94a3b8;
}

.eo-agreement-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    background: #ffffff;
}

.eo-agreement-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.4rem;
    font: inherit;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    background: #fafafa;
    transition:
        border-color 0.12s ease,
        box-shadow 0.12s ease;
}

.eo-agreement-input:hover {
    border-color: #94a3b8;
}

.eo-agreement-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    background: #ffffff;
}

.eo-agreement-infra-subtitle {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.eo-agreement-infra-lead {
    margin: 0.75rem 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.eo-agreement-field__legend {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.eo-agreement-infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.65rem 1rem;
    margin-bottom: 0.75rem;
}

.eo-agreement-infra-radio ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.eo-agreement-infra-radio li {
    margin: 0;
}

.eo-agreement-infra-radio label {
    font-weight: 500;
    cursor: pointer;
}

.eo-agreement-field--compact {
    margin-bottom: 0;
}

.eo-agreement-field--grow {
    flex: 1 1 12rem;
}

.eo-agreement-field--amount {
    flex: 0 0 9rem;
    max-width: 100%;
}

.eo-agreement-rate-block {
    margin-bottom: 1rem;
}

.eo-agreement-rate-block:last-child {
    margin-bottom: 0;
}

.eo-agreement-rate-block__label {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.eo-agreement-rate-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
}

@media (max-width: 520px) {
    .eo-agreement-rate-row {
        grid-template-columns: 1fr;
    }

    .eo-agreement-summary-card {
        align-items: flex-start;
        width: 100%;
    }
}

.eo-agreement-other-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    align-items: flex-end;
}

.eo-agreement-actions {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.eo-agreement-standalone .eo-agreement-actions {
    margin-top: 0;
    padding-top: 1.15rem;
}

/* Connect active “card” visually to panels below (same as .panel surface) */
.dashboard-register-tabs-wrap + .panel {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
    border-top: 1px solid #d1d5db;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.07);
}

.menu-logout-btn {
    cursor: pointer;
}

.members-panel, .events-panel, .panel {
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.panel h1 {
    margin-top: 0;
}

.members-panel h2,
.events-panel h2 {
    margin-top: 0;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-link {
    display: inline-block;
    text-decoration: none;
    color: #1f2937;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.tab-link.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.month-nav-btn {
    min-width: 2rem;
    padding: 0.35rem 0.6rem;
    line-height: 1;
    font-size: 1rem;
}

.hint {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Organization → Member fields: wide form table + header-safe controls */
.member-fields-form .member-fields-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.75rem 0 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: #fafafa;
}

.member-fields-table {
    width: 100%;
    min-width: 42rem;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: #fff;
}

.member-fields-table th,
.member-fields-table td {
    padding: 0.55rem 0.65rem;
    vertical-align: top;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    min-width: 0;
}

.member-fields-table thead th {
    background: #f3f4f6;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.member-fields-table tbody tr:last-child td {
    border-bottom: none;
}

.member-fields-table tbody td:first-child:not([colspan]) {
    text-align: center;
    vertical-align: middle;
}

.member-fields-table .member-fields-col--delete {
    width: 4.25rem;
    text-align: center;
    vertical-align: middle;
}

.member-fields-table .member-fields-col--key {
    width: 10rem;
}

.member-fields-table .member-fields-col--label {
    width: 12rem;
}

.member-fields-table .member-fields-col--kind {
    width: 9rem;
}

.member-fields-table .member-fields-col--choices {
    min-width: 14rem;
}

.member-fields-table .member-fields-col--sort {
    width: 5rem;
}

.member-fields-table .member-fields-input,
.member-fields-table .member-fields-select,
.member-fields-table .member-fields-textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.member-fields-table .member-fields-textarea {
    resize: vertical;
    min-height: 5.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.member-fields-form-actions {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Organization settings: same folder tabs as dashboard Overview / Create events (dashboard-register-tabs) */
.organization-settings-panel-surface {
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.organization-settings-panel .organization-settings-panel-surface .settings-section,
.organization-settings-panel .organization-settings-tabbed-shell .settings-tab-panel .settings-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.organization-settings-panel .dashboard-register-tabs-wrap {
    margin-bottom: 0;
}

/* Connect tab strip to content (same as .dashboard-register-tabs-wrap + .panel on dashboard) */
.dashboard-register-tabs-wrap + .panel.organization-settings-tabbed-shell {
    margin-top: 0;
}

.organization-settings-panel .settings-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
}

.organization-settings-panel .settings-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.organization-settings-panel .settings-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.75rem;
}

.organization-settings-panel .settings-section-intro {
    margin: 0 0 1rem;
    max-width: 40rem;
}

/* Visually grouped blocks within a settings tab (related fields belong together) */
.organization-settings-panel .settings-group {
    margin-top: 1.25rem;
    max-width: 52rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.organization-settings-panel .settings-group:first-of-type {
    margin-top: 0.75rem;
}

.organization-settings-panel .settings-group__head {
    padding: 0.75rem 1rem 0.65rem;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
}

.organization-settings-panel .settings-group__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.01em;
}

.organization-settings-panel .settings-group__intro {
    margin: 0.35rem 0 0;
    max-width: 44rem;
    font-size: 0.88rem;
}

.organization-settings-panel .settings-group__body {
    padding: 0.85rem 1rem 1rem;
}

.organization-settings-panel .settings-group__body > .form-field-block:last-child {
    margin-bottom: 0;
}

.organization-settings-panel .settings-group__actions {
    margin: 0.85rem 0 0;
}

.organization-settings-panel .settings-group__body > .settings-group--nested:first-child {
    margin-top: 0;
}

.organization-settings-panel .settings-group__body .data-table {
    margin-top: 0.35rem;
}

.organization-settings-panel .settings-group--accent {
    border-color: #bfdbfe;
    background: #f8fafc;
}

.organization-settings-panel .settings-group--accent .settings-group__head {
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
    border-bottom-color: #bfdbfe;
}

.organization-settings-panel .settings-group--nested {
    margin-top: 0.85rem;
    background: #fff;
    border-color: #e5e7eb;
    box-shadow: none;
}

.organization-settings-panel .settings-group--nested .settings-group__head {
    padding: 0.55rem 0.85rem 0.45rem;
    background: #f9fafb;
    border-bottom-color: #e5e7eb;
}

.organization-settings-panel .settings-group--nested .settings-group__title {
    font-size: 0.92rem;
    font-weight: 600;
}

.organization-settings-panel .settings-group--nested .settings-group__body {
    padding: 0.75rem 0.85rem 0.85rem;
}

.organization-settings-panel .settings-journal-booking-plan-intro {
    margin: 0 0 0.25rem;
    max-width: 44rem;
}

.organization-settings-panel .settings-journal-subblock {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    max-width: none;
}

.organization-settings-panel .settings-journal-subblock__title {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.organization-settings-panel .form-field-block {
    margin-bottom: 1rem;
}

.organization-settings-panel .form-field-block label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #374151;
}

.organization-settings-panel .form-field-block input[type="text"],
.organization-settings-panel .form-field-block input[type="email"],
.organization-settings-panel .form-field-block input[type="number"],
.organization-settings-panel .form-field-block input[type="password"],
.organization-settings-panel .form-field-block input[type="file"],
.organization-settings-panel .form-field-block select,
.organization-settings-panel .organization-settings-select {
    width: 100%;
    max-width: 28rem;
    box-sizing: border-box;
    padding: 0.45rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    background: #fff;
}

.organization-settings-panel .form-field-block input[type="file"] {
    padding: 0.35rem;
    background: #f9fafb;
}

.organization-settings-panel .form-field-block ul.errorlist {
    margin: 0 0 0.35rem;
    padding: 0;
    color: #b91c1c;
    font-size: 0.85rem;
}

/* MultipleChoiceField + CheckboxSelectMultiple (member profile fields, embed columns) */
.organization-settings-panel .form-field-block--multi-checkbox > ul:not(.errorlist) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.35rem 1.25rem;
    margin-top: 0.35rem;
    max-width: 48rem;
}

.organization-settings-panel .form-field-block--multi-checkbox > ul:not(.errorlist) li label {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-weight: 400;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.35;
}

.organization-settings-panel .form-field-block--multi-checkbox > ul:not(.errorlist) li input[type="checkbox"] {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.organization-settings-save {
    margin-top: 1.25rem;
}

.organization-settings-panel .form-field-block--checkbox .form-field-block__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
}

.organization-settings-panel .form-field-block--checkbox .form-field-block__checkbox-label input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Shift hourly tariffs (inside settings-group on Organization / Accounting tab) */
.organization-settings-panel .shift-hourly-tariffs {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    max-width: none;
}

.organization-settings-panel .settings-group__body .shift-hourly-tariffs-mount {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #cbd5e1;
}

.organization-settings-panel .settings-group__body .shift-hourly-tariffs-crosslink {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
}

.shift-hourly-tariffs__title {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #334155;
}

.shift-hourly-tariffs__intro {
    margin: 0;
    max-width: 44rem;
}

.shift-hourly-tariffs__plans {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1rem;
}

.shift-tariff-plan-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.85rem 1rem 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.shift-tariff-plan-card--inactive {
    opacity: 0.72;
    background: #f1f5f9;
}

.shift-tariff-plan-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.65rem;
}

.shift-tariff-plan-card__name {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    color: #0f172a;
}

.shift-tariff-plan-card__active {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
}

.shift-tariff-plan-card__active input {
    margin: 0;
}

.shift-tariff-plan-card__table-wrap {
    overflow-x: auto;
    margin: 0 -0.15rem;
}

.shift-tariff-rates-table {
    width: 100%;
    min-width: 20rem;
    margin: 0;
}

.shift-tariff-rates-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

.shift-tariff-rates-table__col-rate {
    width: 7.5rem;
}

.shift-tariff-rates-table__col-remove {
    width: 6.5rem;
    text-align: center;
}

.shift-tariff-input {
    width: 100%;
    max-width: 16rem;
    box-sizing: border-box;
    padding: 0.4rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    background: #fff;
}

.shift-tariff-input--rate {
    max-width: 7rem;
    font-variant-numeric: tabular-nums;
}

.shift-tariff-remove-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    font-weight: 400;
    color: #64748b;
    cursor: pointer;
}

.shift-tariff-plan-card__empty {
    margin: 0;
}

.shift-hourly-tariffs__actions {
    margin-top: 1rem;
}

.shift-hourly-tariffs__empty {
    margin: 0.75rem 0 0;
}

.shift-hourly-tariffs__sideforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    align-items: start;
}

.shift-tariff-side-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.shift-tariff-side-card--create {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
}

.shift-tariff-side-card__title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.shift-tariff-side-card .form-field-block {
    margin-bottom: 0.75rem;
}

.shift-tariff-side-card .form-field-block label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.2rem;
    color: #374151;
}

.shift-tariff-side-card .form-field-block input[type="text"],
.shift-tariff-side-card .form-field-block select {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 0.45rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.95rem;
}

.shift-tariff-side-card__hint {
    margin: 0 0 0.65rem;
    font-size: 0.85rem;
}

.shift-tariff-side-card__row {
    display: grid;
    grid-template-columns: 1fr minmax(5.5rem, 7rem);
    gap: 0.65rem;
}

.shift-tariff-side-card__btn {
    margin-top: 0.35rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
}

.shift-tariff-side-card__btn:hover:not(:disabled) {
    background: #f1f5f9;
}

.shift-tariff-side-card__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shift-tariff-side-card__btn--primary {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

.shift-tariff-side-card__btn--primary:hover {
    background: #1e40af;
}

@media (max-width: 640px) {
    .shift-tariff-side-card__row {
        grid-template-columns: 1fr;
    }
}

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

.member-card,
.assignment-card {
    background: #f9fafb;
    border-radius: 0.375rem;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.4rem;
    border: 1px solid #e5e7eb;
    cursor: grab;
    font-size: 0.9rem;
}

.shift-assignment-invoice-skip-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

/* Day timetable: keyboard focus for Delete / Backspace to withdraw a pending assignment */
.day-timetable .assignment-card:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

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

.member-menu-trigger {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 0.35rem;
    padding: 0.05rem 0.4rem;
    line-height: 1.1;
    font-size: 0.95rem;
    min-width: 1.8rem;
}

.member-menu-trigger:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

/* Keep dashboard member cards visually identical to information page cards.
   The action button is still available, but only revealed on hover/focus. */
.members-panel .member-row {
    position: relative;
    justify-content: flex-start;
    padding-right: 2.1rem;
}

.members-panel .member-menu-trigger {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.6rem;
    height: 1.35rem;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.members-panel .member-row:hover .member-menu-trigger,
.members-panel .member-row:focus-within .member-menu-trigger {
    opacity: 1;
    pointer-events: auto;
}

.member-meta {
    display: block;
    font-size: 0.72rem;
    color: #6b7280;
    line-height: 1.2;
}

.members-tree {
    margin-top: 0.6rem;
}

.tree-group-node {
    margin-bottom: 0.5rem;
}

.tree-group-node details {
    border: 1px solid #e5e7eb;
    border-radius: 0.4rem;
    background: #f9fafb;
    padding: 0.35rem 0.45rem;
}

.tree-group-node summary {
    cursor: pointer;
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
    list-style: none;
}

.tree-group-node summary::-webkit-details-marker {
    display: none;
}

.tree-group-node summary::before {
    content: "▸";
    margin-right: 0.35rem;
    color: #6b7280;
}

.tree-group-node details[open] summary::before {
    content: "▾";
}

.tree-member-list {
    margin-top: 0.45rem;
    padding-left: 0.35rem;
}

.tree-empty {
    color: #6b7280;
    font-size: 0.82rem;
    padding: 0.2rem 0.15rem;
}

.member-info-panel h3 {
    margin-top: 0;
}

.member-info-content {
    margin: 0;
    display: grid;
    grid-template-columns: 8rem 1fr;
    gap: 0.35rem 0.5rem;
    font-size: 0.88rem;
}

.member-info-content dt {
    color: #6b7280;
    font-weight: 600;
}

.member-info-content dd {
    margin: 0;
    color: #111827;
}

.member-info-actions {
    margin-top: 0.75rem;
}

.member-info-registrations {
    margin-top: 1rem;
}

.member-info-registrations__heading {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.member-info-registrations-table-scroll {
    overflow-x: auto;
}

.member-info-registrations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.member-info-registrations-table th,
.member-info-registrations-table td {
    border: 1px solid #e5e7eb;
    padding: 0.35rem 0.5rem;
    text-align: left;
    vertical-align: top;
}

.member-info-registrations-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.member-context-menu {
    position: fixed;
    z-index: 9999;
    min-width: 190px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.45rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);
    padding: 0.25rem;
}

.member-context-menu button {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: #111827;
    border-radius: 0.35rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.86rem;
}

.member-context-menu button:hover {
    background: #eff6ff;
}

.member-context-menu-delete {
    color: #b91c1c;
}

.member-context-menu-delete:hover {
    background: #fef2f2;
}

.member-delete-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.member-delete-hint {
    margin-bottom: 0.65rem;
}

.member-delete-btn {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    font-size: 0.86rem;
    color: #fef2f2;
    background: #b91c1c;
    border: 1px solid #991b1b;
    border-radius: 0.35rem;
    cursor: pointer;
}

.member-delete-btn:hover {
    background: #991b1b;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


.member-card:hover,
.assignment-card:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.event-card {
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

.event-card--monthly-continued {
    border-left: 4px solid #8b5cf6;
}

.monthly-event-continued-banner {
    font-size: 0.9rem;
}

.event-meta,
.shift-meta {
    font-size: 0.85rem;
    color: #6b7280;
}

.shifts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.shift-card {
    flex: 1 1 260px;
    border-radius: 0.5rem;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.roles {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.role-slot {
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    background: #eef2ff;
    padding: 0.5rem;
}

.role-slot--hover {
    border-color: #3b82f6;
    background: #dbeafe;
}

.role-slot--readonly {
    opacity: 0.92;
    cursor: default;
    background: #f3f4f6;
    border-style: solid;
}

.role-slot--readonly .empty-slot {
    color: #6b7280;
    border-style: solid;
    border-color: transparent;
    background: transparent;
}

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.role-name {
    font-weight: 600;
}

.role-count {
    font-size: 0.8rem;
    color: #4b5563;
}

.empty-slot {
    font-size: 0.8rem;
    color: #9ca3af;
}

.empty-placeholder-line {
    list-style: none;
    height: 1.35rem;
    margin: 0.25rem 0;
    border: 2px dotted #6b7280;
    border-radius: 0.375rem;
    background: #ffffff;
    opacity: 0.9;
}

.badge {
    display: inline-block;
    padding: 0.08rem 0.4rem;
    font-size: 0.7rem;
    border-radius: 999px;
    background: #10b981;
    color: white;
    margin-left: 0.25rem;
}

.badge-shift-pending {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

.dashboard-my-shifts-heading {
    margin-top: 1rem;
    margin-bottom: 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.dashboard-my-shifts-list {
    margin-top: 0;
}

.badge-muted {
    background: #6b7280;
}

.badge-course-leader {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #c4b5fd;
}

.error {
    color: #b91c1c;
    margin-bottom: 0.5rem;
}

.message {
    margin: 0 0 0.35rem 0;
    padding: 0.4rem 0.55rem;
    border-radius: 0.35rem;
    font-size: 0.9rem;
}

.message-success {
    background: #dcfce7;
    color: #166534;
}

.message-warning {
    background: #fef3c7;
    color: #92400e;
}

.message-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

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

form div {
    margin-bottom: 0.75rem;
}

/* Horizontal filter/toolbars: label + control columns with aligned submit (matches label row height). */
form.app-filter-row > .app-filter-field {
    margin-bottom: 0;
}

.app-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
}

.app-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: min(100%, 8.5rem);
}

.app-filter-field label {
    margin-bottom: 0;
}

.app-filter-field select,
.app-filter-field input:not([type="checkbox"]):not([type="radio"]) {
    width: auto;
    min-width: 8rem;
    max-width: 100%;
}

.app-filter-field--wide {
    min-width: min(100%, 14rem);
}

.app-filter-field--action {
    min-width: auto;
    align-self: flex-end;
}

.app-filter-field__label-gap {
    display: block;
    flex-shrink: 0;
    font-size: 0.85rem;
    line-height: 1.2;
    margin-bottom: 0;
    min-height: 1.02rem;
    visibility: hidden;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
}

.app-filter-row--month-nav {
    align-items: flex-end;
}

.app-filter-field--month-arrows {
    min-width: auto;
}

.app-filter-field__month-nav-btns {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
}

/* Dense multi-column forms (e.g. article editor): top-align labels so rows stay even. */
.app-filter-grid > .app-filter-field {
    margin-bottom: 0;
}

.app-filter-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    align-items: start;
}

/* Inline checkbox rows must span the full grid width; otherwise a single column (~14rem) forces wrapping. */
.app-filter-grid > .app-filter-field--checkbox-inline-row {
    grid-column: 1 / -1;
}

/* Multi-line fields (e.g. article description): full row so they do not sit beside short controls. */
.app-filter-grid > .app-filter-field--full {
    grid-column: 1 / -1;
    min-width: 0;
}

.app-filter-grid > .app-filter-field textarea {
    width: 100%;
    max-width: 100%;
    min-height: 5.5rem;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.4;
}

.app-filter-grid > .app-filter-field--full .hint {
    margin: 0.25rem 0 0;
}

.app-filter-grid > .app-filter-field--checkbox-inline-row [role="group"] {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    column-gap: 1.25rem;
    min-width: 0;
    overflow-x: auto;
}

.app-filter-grid > .app-filter-field--checkbox-inline-row [role="group"] > label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    flex-shrink: 0;
}

label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="time"] {
    width: 100%;
    max-width: 100%;
    min-height: 2.35rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    box-sizing: border-box;
    color-scheme: light;
}

@media (max-width: 640px) {
    input[type="date"],
    input[type="time"] {
        font-size: 1rem;
    }
}

textarea {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    font-family: inherit;
}

.wysiwyg-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

/* Member information center: placeholder tokens (Format section) */
.mic-format-section {
    margin-bottom: 0.55rem;
    padding: 0.45rem 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
}

.mic-format-section__head {
    margin-bottom: 0.25rem;
}

.mic-format-section__label {
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
}

.mic-format-hint {
    margin: 0 0 0.45rem !important;
    font-size: 0.82rem;
}

.mic-placeholder-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

button.mic-placeholder-btn {
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    border-radius: 0.3rem;
    cursor: pointer;
    max-width: 100%;
}

button.mic-placeholder-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.message-editor-box {
    border: 3px solid #334155;
    border-radius: 0.5rem;
    padding: 0.55rem;
    background: #ffffff;
    margin-bottom: 0.85rem;
}

.wysiwyg-toolbar button {
    background: #f3f4f6;
    color: #111827;
    border: 1px solid #d1d5db;
    padding: 0.25rem 0.55rem;
    font-size: 0.82rem;
}

.wysiwyg-toolbar button:hover {
    background: #e5e7eb;
}

.wysiwyg-editor {
    min-height: 320px;
    width: 100%;
    box-sizing: border-box;
    display: block;
    padding: 0.6rem 0.65rem;
    border-radius: 0.375rem;
    border: 2px solid #64748b;
    font-size: 0.95rem;
    background: #ffffff;
    overflow-y: auto;
}

.message-form-footer {
    border-top: 2px solid #64748b;
    padding-top: 0.75rem;
    margin-top: 0.2rem;
}

/* Member Information Center: aligned action buttons (compose + preview dialog) */
.mic-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.mic-template-bar {
    align-items: flex-end;
    margin-bottom: 0.75rem;
}

#member-info-form button.mic-btn,
.mic-mail-preview-dialog button.mic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.2;
    border-radius: 0.375rem;
    cursor: pointer;
    box-sizing: border-box;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
}

#member-info-form button.mic-btn--secondary,
.mic-mail-preview-dialog button.mic-btn--secondary {
    border: 1px solid #c4c9d1;
    background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
    color: #1f2937;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

#member-info-form button.mic-btn--secondary:hover,
.mic-mail-preview-dialog button.mic-btn--secondary:hover {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
    color: #1d4ed8;
}

#member-info-form button.mic-btn--secondary:focus-visible,
.mic-mail-preview-dialog button.mic-btn--secondary:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

#member-info-form button.mic-btn--primary {
    border: none;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}

#member-info-form button.mic-btn--primary:hover {
    background: #1d4ed8;
    color: #fff;
}

#member-info-form button.mic-btn--primary:focus-visible {
    outline: 2px solid #1e3a8a;
    outline-offset: 1px;
}

.wysiwyg-editor:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 1px;
}

input[type="file"] {
    width: 100%;
    font-size: 0.9rem;
}

select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    background: #fff;
}

button {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

.day-overview-form {
    display: block;
}

.day-overview-field,
.day-overview-submit {
    margin-bottom: 0;
}

.day-overview-field input[type="date"] {
    max-width: 320px;
}

.day-overview-submit {
    margin-top: 0.55rem;
}

/* Timetable */
.timetable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timetable th,
.timetable td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.4rem 0.5rem;
    vertical-align: top;
}

.timetable th {
    text-align: left;
    background: #f9fafb;
    font-weight: 600;
}

.timetable-time {
    white-space: nowrap;
    color: #4b5563;
}

.timetable-shift {
    margin-bottom: 0.5rem;
}

.timetable-shift-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.timetable-shift-name {
    font-weight: 600;
}

.timetable-shift-time {
    color: #6b7280;
}

/* Scroll wide/tall dashboard tables when they do not fit the viewport */
.dashboard-scroll-region {
    overflow: auto;
    max-width: 100%;
    max-height: min(75vh, calc(100dvh - 11rem));
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.dashboard-scroll-region--month {
    max-height: min(42vh, calc(100dvh - 14rem));
}

.dashboard-scroll-region .month-table,
.dashboard-scroll-region .day-timetable {
    margin-bottom: 0;
}

.dashboard-scroll-region .day-timetable thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 #e5e7eb;
}

.dashboard-scroll-region .day-timetable-time-corner,
.dashboard-scroll-region .day-timetable-time-col {
    position: sticky;
    left: 0;
    z-index: 1;
}

.dashboard-scroll-region .day-timetable-time-corner {
    z-index: 3;
}

/* Month calendar */
.month-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.month-table th,
.month-table td {
    border: 1px solid #e5e7eb;
    text-align: center;
    padding: 0.25rem 0.2rem;
}

.month-table thead th {
    background: #f9fafb;
    font-weight: 600;
    color: #4b5563;
}

.month-cell {
    min-width: 2rem;
    min-height: 2rem;
}

.month-cell button {
    border: none;
    background: transparent;
    color: #111827;
    border-radius: 0;
    cursor: pointer;
    padding: 0.1rem 0.2rem;
    min-width: 100%;
    min-height: 2.2rem;
    position: relative;
}

.day-number {
    display: inline-block;
}

.day-event-names {
    display: block;
    font-size: 0.55rem;
    line-height: 1.05;
    color: #4b5563;
    min-height: 1.15rem;
    margin-bottom: 1px;
}

.day-event-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 72px;
}

.month-cell.other-month {
    background: #f9fafb;
    color: #9ca3af;
}

.month-cell.is-selected {
    background: #dbeafe;
    border-color: #3b82f6;
}

.month-cell.has-events button {
    background: #eff6ff;
}

.month-cell.has-mine button {
    background: #dcfce7;
}

.month-cell.has-standard.has-mine button {
    box-shadow: inset 0 0 0 2px #fca5a5;
}

.month-cell.has-standard button {
    background: #eff6ff;
}

.month-cell.has-monthly button {
    background: #f5f3ff;
}

.month-cell.has-standard.has-monthly button {
    background: linear-gradient(135deg, #eff6ff 50%, #f5f3ff 50%);
}

.day-markers {
    position: absolute;
    bottom: 1px;
    right: 2px;
    display: inline-flex;
    gap: 2px;
}

.marker {
    display: inline-block;
    font-size: 0.55rem;
    line-height: 1;
    padding: 1px 3px;
    border-radius: 999px;
    color: #111827;
    background: #e5e7eb;
}

.marker-standard {
    background: #bfdbfe;
}

.marker-monthly {
    background: #ddd6fe;
}

.marker-course {
    background: #fdba74;
}

.marker-external-course {
    background-color: #7c3aed;
    color: #ffffff;
    font-weight: 700;
}

.month-cell button .marker-external-course {
    background-color: #7c3aed;
    color: #ffffff;
}

.month-cell.has-course button {
    background: #fff7ed;
}

.month-cell.has-external-course button {
    background: #ddd6fe;
}

.month-cell.has-standard.has-course button {
    background: linear-gradient(135deg, #eff6ff 50%, #fff7ed 50%);
}

.month-cell.has-standard.has-external-course:not(.has-course) button {
    background: linear-gradient(135deg, #eff6ff 50%, #ddd6fe 50%);
}

.month-cell.has-course.has-external-course button {
    background: linear-gradient(135deg, #fff7ed 45%, #ddd6fe 55%);
}

.month-cell.has-monthly.has-external-course:not(.has-standard):not(.has-course) button {
    background: linear-gradient(135deg, #f5f3ff 50%, #ddd6fe 50%);
}

.month-cell.has-course.has-mine button {
    box-shadow: inset 0 0 0 2px #fca5a5;
}

.month-cell.has-external-course.has-mine:not(.has-course) button {
    box-shadow: inset 0 0 0 2px #a78bfa;
}

.external-courses-day-block {
    border-left: 4px solid #7c3aed;
    background: #faf5ff;
}

.external-courses-day-block h4 {
    color: #5b21b6;
}

.external-course-day-card--editable {
    cursor: pointer;
}

.external-course-day-card--editable > h4 {
    cursor: pointer;
}

/* Day timetable (time vertical, roles horizontal) */
.day-timetable-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-bottom: 0.35rem;
}

.day-timetable-header h3 {
    margin-bottom: 0;
}

.day-timetable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.day-timetable th,
.day-timetable td {
    border: 1px solid #e5e7eb;
    padding: 0.35rem 0.5rem;
    vertical-align: top;
}

.day-timetable-time-col {
    min-width: 4rem;
    font-weight: 500;
    color: #4b5563;
    background: #f9fafb;
}

.day-timetable-time-corner {
    vertical-align: middle;
    text-align: center;
}

.day-timetable-event-heading {
    min-width: 6rem;
    background: var(--event-band-fill, #eef2ff);
    border-bottom: 3px solid var(--event-band-accent, #6366f1);
    padding: 0.5rem 0.65rem 0.55rem;
    text-align: center;
}

.day-timetable-event-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    word-break: break-word;
}

.day-timetable-role-col {
    min-width: 8rem;
    background: var(--shift-color, #f3f4f6);
    border-bottom: 2px solid var(--shift-accent, #d1d5db);
    font-size: 0.8rem;
}

.day-timetable-shift {
    display: block;
    color: #1f2937;
    font-weight: 600;
}

.day-timetable-role {
    font-weight: 600;
}

.day-timetable-count {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
}

.day-timetable-app-debtor-wrap {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.7rem;
    line-height: 1.25;
}

.day-timetable-cell {
    min-height: 2.5rem;
}

.day-timetable-cell.is-active {
    background: var(--shift-color, #eef2ff);
    border-left: 3px solid var(--shift-accent, #6366f1);
}

/* Remove inner hour lines for continuous blocks of same shift */
.day-timetable-cell.is-active.continued-from-prev {
    border-top-color: transparent;
}


.day-timetable-cell .assignments {
    margin: 0;
    padding: 0;
    list-style: none;
}

.event-list-compact {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.event-list-compact li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.attendance-link {
    display: inline-block;
    text-decoration: none;
    color: #1d4ed8;
    font-weight: 600;
}

button.attendance-link--danger {
    color: #b91c1c;
}

button.attendance-link--danger:hover {
    color: #991b1b;
}

.attendance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.5rem 0;
}

.attendance-label {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 1rem;
    margin: 0;
}

.attendance-overview {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.attendance-overview th,
.attendance-overview td {
    border: 1px solid #e5e7eb;
    padding: 0.45rem 0.5rem;
    text-align: center;
    white-space: nowrap;
}

.attendance-overview th:first-child,
.attendance-overview td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: #ffffff;
}

.attendance-overview .numeric-cell {
    text-align: right;
}

/* Yearly events report: same row colours as public /embed/…/events/ */
.events-year-report-table th,
.events-year-report-table td {
    text-align: left !important;
    white-space: normal;
    vertical-align: top;
}

.events-year-report-table th {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5c6370;
    background: #fff;
}

.events-year-report-table tbody tr.row-post-duty > td {
    background: #eef5ff;
}

.events-year-report-table tbody tr.row-post-duty > td:first-child {
    background: #eef5ff;
    border-left: 3px solid #2563eb;
}

.events-year-report-table tbody tr.row-monthly > td {
    background: #f0fdf4;
}

.events-year-report-table tbody tr.row-monthly > td:first-child {
    background: #f0fdf4;
    border-left: 3px solid #16a34a;
}

.events-year-report-table tbody tr.row-course > td {
    background: #fff7ed;
}

.events-year-report-table tbody tr.row-course > td:first-child {
    background: #fff7ed;
    border-left: 3px solid #ea580c;
}

.events-year-report-table tbody tr.row-external-course > td {
    background: #ede9fe;
}

.events-year-report-table tbody tr.row-external-course > td:first-child {
    background: #ede9fe;
    border-left: 3px solid #7c3aed;
}

.events-year-report-table .numeric-cell {
    text-align: right !important;
    white-space: nowrap;
}

/* Inventory article overview: invoice-like compact actions */
.attendance-overview.inventory-article-overview th:last-child,
.attendance-overview.inventory-article-overview td:last-child {
    white-space: nowrap;
    width: 1%;
}

.attendance-overview.inventory-article-overview .accounting-row-actions {
    flex-wrap: nowrap;
}

.inventory-article-overview-scroll {
    max-height: 26rem;
    overflow-y: auto;
    overflow-x: auto;
}

.inventory-article-photo-thumb {
    display: block;
    margin: 0 auto;
    max-width: 3rem;
    max-height: 3rem;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 0.25rem;
    border: 1px solid #e5e7eb;
}

/* Selected article editor: 2×2 cm preview (print-oriented physical size on screen) */
.inventory-article-photo-thumb.inventory-article-photo-thumb--editor {
    width: 2cm;
    height: 2cm;
    max-width: 2cm;
    max-height: 2cm;
    min-width: 2cm;
    min-height: 2cm;
    margin: 0;
    cursor: zoom-in;
}

/* Articles & units: full-size article photo (native pixels, bounded by viewport) */
.inventory-article-photo-dialog {
    max-width: min(calc(100vw - 2rem), 56rem);
    width: fit-content;
    border: none;
    border-radius: 0.6rem;
    padding: 0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
    background: transparent;
}

.inventory-article-photo-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.inventory-article-photo-dialog__inner {
    margin: 0;
    padding: 0.9rem 1rem 1rem;
}

.inventory-article-photo-dialog__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.inventory-article-photo-dialog__title {
    margin: 0;
    font-size: 1.05rem;
}

.inventory-article-photo-dialog__body {
    margin: 0;
    text-align: center;
    line-height: 0;
}

.inventory-article-photo-dialog__img {
    display: inline-block;
    max-width: min(90vw, 100%);
    max-height: min(85vh, 100%);
    width: auto;
    height: auto;
    vertical-align: middle;
    object-fit: contain;
    border-radius: 0.35rem;
    border: 1px solid #e5e7eb;
}

.inventory-article-overview__photo-col,
.inventory-article-overview__photo-cell {
    width: 1%;
    vertical-align: middle;
    text-align: center;
}

.inventory-photo-clear {
    display: block;
    margin-top: 0.35rem;
    font-weight: normal;
}

.inventory-article-delete-form {
    display: none;
}

.inventory-article-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
}

.inventory-article-toolbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.95rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.25;
}

button.inventory-article-toolbar__btn {
    appearance: none;
    -webkit-appearance: none;
}

.inventory-article-toolbar__btn--primary {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
}

.inventory-article-toolbar__btn--primary:hover {
    background: #1d4ed8;
}

.inventory-article-toolbar__btn--secondary {
    background: #ffffff;
    color: #1e40af;
    border-color: #93c5fd;
}

.inventory-article-toolbar__btn--secondary:hover {
    background: #eff6ff;
}

.inventory-article-toolbar__btn--danger {
    background: #dc2626;
    color: #ffffff;
    border-color: #b91c1c;
}

.inventory-article-toolbar__btn--danger:hover {
    background: #b91c1c;
}

a.inventory-article-toolbar__btn {
    text-decoration: none;
}

.inventory-article-toolbar__btn--compact {
    padding: 0.32rem 0.7rem;
    font-size: 0.84rem;
}

.inventory-article-toolbar__btn.is-current {
    cursor: default;
    pointer-events: none;
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.inventory-items-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.inventory-items-overview .app-filter-field--action > a.inventory-article-toolbar__btn {
    box-sizing: border-box;
    width: 100%;
}

.inventory-items-unit-editor__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.inventory-items-unit-editor__delete-form {
    margin: 0;
}

.inventory-items-detail__breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.35rem;
}

.inventory-items-detail__breadcrumb-sep {
    color: #94a3b8;
    font-size: 0.875rem;
    user-select: none;
}

.inventory-items-overview {
    overflow-x: auto;
}

.inventory-items-overview__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.inventory-items-overview__title {
    margin: 0;
}

.inventory-article-overview tr.inventory-article-overview__row--selected {
    background: #eff6ff;
    box-shadow: inset 3px 0 0 #2563eb;
}

.inventory-items-detail {
    margin-top: 1rem;
}

.inventory-items-detail__hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.65rem 1rem;
    padding-bottom: 0.85rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.inventory-items-detail__hero-main {
    flex: 1 1 14rem;
    min-width: 0;
}

.inventory-items-detail__breadcrumb {
    margin: 0 0 0.35rem;
    font-size: 0.875rem;
    color: #64748b;
}

.inventory-items-detail__breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.inventory-items-detail__breadcrumb a:hover {
    text-decoration: underline;
}

.inventory-items-detail__title {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
}

.inventory-items-detail__sku {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: #64748b;
}

.inventory-items-section {
    margin-top: 1rem;
    padding: 0.95rem 1rem 1rem 1.05rem;
    border: 1px solid #e5e7eb;
    border-left-width: 4px;
    border-radius: 0.6rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.inventory-items-section + .inventory-items-section {
    margin-top: 1rem;
}

.inventory-items-section__title {
    margin: 0 0 0.15rem;
}

.inventory-items-section__hint {
    margin: 0 0 0.75rem;
}

/* Article detail: same type scale as Inventarübersicht (h2 title, .hint, label 0.85rem, inputs 0.9rem). */
.inventory-items-detail .inventory-items-section > h2.inventory-items-section__title {
    margin: 0 0 0.15rem;
}

.inventory-items-detail .inventory-items-section > .hint.inventory-items-section__hint {
    margin: 0 0 0.75rem;
}

.inventory-items-section--catalog {
    border-left-color: #2563eb;
}

.inventory-items-section--units {
    border-left-color: #059669;
}

.inventory-items-section--sale {
    border-left-color: #d97706;
}

.inventory-items-units-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (min-width: 960px) {
    .inventory-items-units-layout--with-editor {
        grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
    }
}

.inventory-items-unit-editor {
    padding: 0.85rem 0.95rem;
    border: 1px solid #bbf7d0;
    border-radius: 0.55rem;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.inventory-items-unit-editor__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.inventory-article-card--highlight {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
}

.inventory-hub-workflow {
    margin-top: 1rem;
}

.inventory-hub-workflow__title {
    margin: 0 0 0.25rem;
}

.inventory-hub-workflow__intro {
    margin-bottom: 0;
}

.inventory-hub-workflow__tabbed {
    margin-top: 1rem;
}

.inventory-hub-workflow__tabs-wrap.dashboard-register-tabs-wrap {
    margin-bottom: 0;
    padding: 0.45rem 0.75rem 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.inventory-hub-workflow__tabs-wrap .dashboard-register-tab {
    background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
    border-color: #d8dee6;
    min-width: 6.5rem;
}

.inventory-hub-workflow__tabs-wrap .dashboard-register-tab:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-color: #cbd5e1;
}

.inventory-hub-workflow__tabs-wrap .dashboard-register-tab.is-active {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow:
        0 -1px 0 rgba(255, 255, 255, 1) inset,
        0 -2px 6px rgba(15, 23, 42, 0.04),
        0 1px 0 #ffffff;
}

.inventory-hub-workflow__tabs-wrap .dashboard-register-tab__label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.88rem;
}

.inventory-hub-workflow__body {
    margin-top: 0;
    padding: 1rem 1.25rem 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 1px solid #d1d5db;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.inventory-hub-workflow__borrower {
    margin-top: 0;
}

.inventory-hub-workflow__body .inventory-items-section--action {
    margin-top: 1rem;
}

.inventory-hub-sale-cart {
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.inventory-hub-sale-cart__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.65rem;
}

.inventory-hub-sale-cart__title {
    margin: 0;
    font-size: 0.95rem;
}

.inventory-hub-sale-cart__table {
    margin: 0;
}

.inventory-hub-sale-cart__clear-form {
    margin: 0;
}

.inventory-hub-catalog {
    margin-top: 1rem;
    overflow-x: auto;
}

.inventory-hub-catalog__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.65rem 1rem;
    margin-bottom: 0.75rem;
}

.inventory-hub-catalog__title {
    margin: 0;
}

.inventory-items-section--borrower {
    border-left-color: #7c3aed;
}

.inventory-items-section--action {
    border-left-color: #059669;
}

.inventory-items-section--reference {
    border-left-color: #64748b;
}

.inventory-unit-row--selected {
    background: #ecfdf5;
    box-shadow: inset 3px 0 0 #059669;
}

.inventory-unit-row__editing-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #047857;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
}

.status-present {
    background: #dcfce7;
}

.status-absent {
    background: #fee2e2;
}

.status-none {
    background: #f9fafb;
    color: #6b7280;
}

.qualification-row--expired {
    background: #fee2e2;
}

.qualification-row--near_expiry {
    background: #fef9c3;
}

.qualification-row--current {
    background: #dcfce7;
}

.qualification-expiry-cell--expired {
    color: #991b1b;
    font-weight: 600;
}

.qualification-expiry-cell--near_expiry {
    color: #854d0e;
    font-weight: 600;
}

.qualification-expiry-cell--current {
    color: #166534;
}

.member-qualifications-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
}

.member-qual-chip {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.85rem;
    line-height: 1.35;
    border: 1px solid transparent;
}

.member-qual-chip--expired {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.member-qual-chip--near_expiry {
    background: #fef9c3;
    border-color: #fde047;
    color: #854d0e;
}

.member-qual-chip--current {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.member-qual-chip--no_expiry {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #374151;
}

.recipient-drop-zone {
    border: 2px dashed #93c5fd;
    background: #eff6ff;
    border-radius: 0.45rem;
    padding: 0.65rem;
    margin-bottom: 0.8rem;
}

.recipient-drop-zone--hover {
    border-color: #2563eb;
    background: #dbeafe;
}

.recipient-drop-zone--mobile-tap {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(37, 99, 235, 0.15);
}

.recipient-drop-zone--mobile-tap:active {
    background: #dbeafe;
    border-color: #2563eb;
}

.incoming-invoice-drop-zone {
    border: 2px dashed #93c5fd;
    background: #eff6ff;
    border-radius: 0.45rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    cursor: default;
    /* Route drag events to the zone (not nested text); helps Safari/WebKit accept drops. */
    pointer-events: auto;
}

.incoming-invoice-drop-zone * {
    pointer-events: none;
}

.incoming-invoice-drop-zone--hover {
    border-color: #2563eb;
    background: #dbeafe;
}

.member-expense-receipt-drop-zone {
    border: 2px dashed #93c5fd;
    background: #eff6ff;
    border-radius: 0.45rem;
    padding: 0.75rem 1rem;
    margin-top: 0.35rem;
}

.member-expense-receipt-drop-zone--hover {
    border-color: #2563eb;
    background: #dbeafe;
}

.member-expense-receipt-drop-zone .member-expense-receipt-filename {
    margin: 0.35rem 0 0;
    font-weight: 600;
    color: #1e40af;
}

/* Full-window layer for Finder → Safari file drops (WebKit opens files otherwise). */
.incoming-file-drag-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200000;
    pointer-events: auto;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.35);
    box-sizing: border-box;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.incoming-file-drag-overlay__box {
    max-width: 28rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    border: 3px dashed #2563eb;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
    pointer-events: none;
}

body.incoming-file-drag-active {
    overflow: hidden;
}

/* Incoming documents: uploaded | file (flex) | actions (fixed min width for button row) */
table.data-table.incoming-docs-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    table-layout: fixed;
}

.incoming-docs-table col.incoming-docs-col--uploaded {
    width: 11rem;
}

.incoming-docs-table col.incoming-docs-col--filename {
    width: auto;
}

.incoming-docs-table col.incoming-docs-col--journal {
    width: 6.5rem;
}

/* Wide enough for DE: Öffnen + ISO 20022 + Neue Buchung aus QR + Löschen */
.incoming-docs-table col.incoming-docs-col--actions {
    width: 34rem;
}

.incoming-docs-table thead th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    text-align: left;
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-bottom: 2px solid #d1d5db;
    vertical-align: middle;
}

.incoming-docs-table tbody td {
    padding: 0.5rem 0.65rem;
    border: 1px solid #e5e7eb;
    vertical-align: middle;
}

.incoming-docs-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.incoming-docs-table tbody tr:hover {
    background: #f1f5f9;
}

.incoming-docs-cell--uploaded {
    white-space: nowrap;
    color: #4b5563;
    font-variant-numeric: tabular-nums;
}

.incoming-docs-cell--filename,
.incoming-docs-cell--filename-head {
    min-width: 0;
    overflow: hidden;
    max-width: 100%;
}

.incoming-docs-cell--filename {
    text-overflow: ellipsis;
    white-space: nowrap;
}

.incoming-docs-cell--journal {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.incoming-docs-cell--journal a {
    font-weight: 600;
}

.incoming-docs-cell--actions {
    text-align: left;
    vertical-align: middle;
}

/* Four fixed columns so Open / ISO / QR / Delete line up across document rows */
.incoming-doc-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    align-items: stretch;
    width: 100%;
}

.incoming-doc-actions-slot {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.incoming-doc-actions-slot form {
    display: flex;
    margin: 0;
    padding: 0;
    width: 100%;
    flex: 1 1 auto;
}

.incoming-doc-actions-slot .accounting-icon-btn {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
}

@media (max-width: 900px) {
    .incoming-docs-table col.incoming-docs-col--actions {
        width: auto;
    }

    .incoming-docs-table {
        table-layout: auto;
    }

    /* Stack the four logical slots vertically on narrow viewports */
    .incoming-docs-cell--actions {
        white-space: normal;
        vertical-align: top;
        min-width: 10.5rem;
        max-width: min(18rem, 92vw);
    }

    .incoming-docs-table .incoming-doc-actions-grid {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .incoming-docs-table .incoming-doc-actions-slot .accounting-icon-btn {
        min-height: 2.75rem;
        white-space: normal;
    }

    .incoming-docs-table .accounting-icon-btn__label {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
    }
}

/* Accounting tables: compact icon + label actions (incoming docs, invoices) */
.accounting-row-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.accounting-row-actions form {
    display: inline;
    margin: 0;
    padding: 0;
}

.accounting-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 0.35rem;
    border: 1px solid #c4c9d1;
    background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
    color: #1f2937;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
    vertical-align: middle;
    white-space: nowrap;
}

.accounting-icon-btn:hover {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
    color: #1d4ed8;
}

.accounting-icon-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.accounting-icon-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
    box-shadow: none;
}

.accounting-icon-btn:disabled:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
}

.accounting-icon-btn__icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    display: block;
}

.accounting-icon-btn__label {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 520px) {
    .accounting-icon-btn__label {
        max-width: 7rem;
    }
}

.accounting-icon-btn--danger {
    border-color: #e5b4b4;
    background: linear-gradient(180deg, #fffafa 0%, #fef2f2 100%);
    color: #7f1d1d;
}

.accounting-icon-btn--danger:hover {
    background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
    border-color: #f87171;
    color: #991b1b;
}

.accounting-icon-btn--success {
    border-color: #a7e9c9;
    background: linear-gradient(180deg, #f6fffb 0%, #ecfdf5 100%);
    color: #047857;
}

.accounting-icon-btn--success:hover {
    background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #6ee7b7;
    color: #047857;
}

/* Inventory lending history: invoice-like compact table and action row */
table.data-table.inventory-lending-history-table {
    width: 100%;
    table-layout: fixed;
    font-size: 0.9rem;
}

.inventory-lending-history-table thead th {
    font-weight: 700;
    font-size: 0.79rem;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.inventory-lending-history-table tbody td {
    vertical-align: middle;
}

.inventory-lending-history-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.inventory-lending-history-table tbody tr:hover {
    background: #f1f5f9;
}

.inventory-lending-open-invoice-btn {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    color: #0f172a;
    text-decoration: none;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    white-space: nowrap;
}

.inventory-lending-open-invoice-btn:hover {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: #94a3b8;
    color: #0f172a;
}

.inventory-lending-open-invoice-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.inventory-lending-history-table__actions .accounting-row-actions {
    flex-wrap: nowrap;
    gap: 0.4rem;
}

.inventory-article-card {
    margin-bottom: 1.2rem;
    border: 1px solid #d6d9de;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.inventory-article-card__header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem 0.75rem;
    border-bottom: 1px solid #edf0f4;
    background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
}

.inventory-article-card__photo {
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.inventory-article-card__header-text {
    flex: 1 1 auto;
    min-width: 0;
}

.inventory-article-card__title {
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: baseline;
}

.inventory-article-card__category {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: #4f5d75;
    background: #edf3ff;
    border: 1px solid #d8e4ff;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}

.inventory-article-card__meta {
    margin-top: 0.55rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.inventory-article-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.84rem;
    line-height: 1.3;
    color: #2a3344;
}

table.data-table.inventory-article-card__table {
    margin: 0;
    border: 0;
    border-radius: 0;
    font-size: 0.92rem;
}

/* Balances & reports: summary stat cards — one row; cards shrink; scroll on very narrow viewports */
.accounting-report-summary-cards {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.4rem 0.55rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
}

.accounting-report-summary-cards__card {
    flex: 1 1 0;
    min-width: 0;
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
}

.accounting-report-summary-cards__label {
    font-size: clamp(0.58rem, 0.65vw + 0.45rem, 0.88rem);
    line-height: 1.2;
    hyphens: auto;
    overflow-wrap: break-word;
}

.accounting-report-summary-cards__value {
    font-size: clamp(0.72rem, 1.1vw + 0.42rem, 1.05rem);
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.accounting-report-summary-cards__hint {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    white-space: normal;
}

.accounting-report-summary-cards__card--journal {
    border: 1px solid #c5d4e8;
    background: #f0f5fb;
}

.accounting-report-summary-cards__card--journal .accounting-report-summary-cards__label {
    color: #345;
}

.accounting-report-summary-cards__card--sum {
    border: 1px solid #c5d4e8;
    background: #f7f7f7;
}

.accounting-report-summary-cards__card--sum .accounting-report-summary-cards__label {
    color: #345;
}

.accounting-report-summary-cards__card--income {
    border: 1px solid #8bcf9a;
    background: #eaf8ee;
}

.accounting-report-summary-cards__card--income .accounting-report-summary-cards__label {
    color: #1f6b31;
}

.accounting-report-summary-cards__card--income .accounting-report-summary-cards__value {
    color: #145323;
}

.accounting-report-summary-cards__card--expense {
    border: 1px solid #e59a9a;
    background: #fdeeee;
}

.accounting-report-summary-cards__card--expense .accounting-report-summary-cards__label {
    color: #8d1f1f;
}

.accounting-report-summary-cards__card--expense .accounting-report-summary-cards__value {
    color: #6f1212;
}

.accounting-report-summary-cards__card--net {
    border: 1px solid #c9b8e8;
    background: #f3f0fb;
}

.accounting-report-summary-cards__card--net .accounting-report-summary-cards__label {
    color: #352d5c;
}

.accounting-report-summary-cards__card--net .accounting-report-summary-cards__value {
    color: #352d5c;
}

.accounting-report-summary-cards__card--mobile-api {
    border: 1px solid #7ec8e8;
    background: #eef9fd;
}

.accounting-report-summary-cards__card--mobile-api .accounting-report-summary-cards__label {
    color: #0c4a6e;
}

.accounting-report-summary-cards__card--mobile-api .accounting-report-summary-cards__value {
    color: #075985;
}

.accounting-report-summary-cards__card--mobile-users {
    border: 1px solid #93c5fd;
    background: #eff6ff;
}

.accounting-report-summary-cards__card--mobile-users .accounting-report-summary-cards__label {
    color: #1e3a8a;
}

.accounting-report-summary-cards__card--mobile-users .accounting-report-summary-cards__value {
    color: #1d4ed8;
}

.accounting-report-summary-cards__card--mobile-logins {
    border: 1px solid #67d4f0;
    background: #ecfeff;
}

.accounting-report-summary-cards__card--mobile-logins .accounting-report-summary-cards__label {
    color: #155e75;
}

.accounting-report-summary-cards__card--mobile-logins .accounting-report-summary-cards__value {
    color: #0e7490;
}

.support-ticket-status {
    display: inline-block;
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.support-ticket-status--open {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.support-ticket-status--in_progress {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #b45309;
}

.support-ticket-status--resolved {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
}

.support-ticket-status--closed {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #475569;
}

.support-ticket-row--unread td:first-child {
    font-weight: 600;
}

.support-ticket-row__unread-dot {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-left: 0.35rem;
    border-radius: 50%;
    background: #dc2626;
    vertical-align: middle;
}

.support-ticket-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.support-ticket-subnav__link {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 0.92rem;
}

.support-ticket-subnav__link.is-active {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1d4ed8;
    font-weight: 600;
}

.support-ticket-faq-page {
    margin-top: 1rem;
    max-width: 52rem;
}

.support-ticket-faq-page__intro {
    margin-bottom: 1rem;
}

.support-ticket-faq-page__intro h2 {
    margin: 0 0 0.45rem;
}

.support-ticket-faq-page__lede {
    margin: 0;
    color: #475569;
    line-height: 1.5;
    max-width: 42rem;
}

.support-ticket-faq-page__meta {
    margin: 0.65rem 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.support-ticket-faq-list {
    display: grid;
    gap: 0.75rem;
}

.support-ticket-faq-item {
    border: 1px solid #dbeafe;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.support-ticket-faq-item:hover {
    border-color: #93c5fd;
}

.support-ticket-faq-item[open] {
    border-color: #60a5fa;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.support-ticket-faq-item__summary {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    cursor: pointer;
    list-style: none;
}

.support-ticket-faq-item__summary::-webkit-details-marker {
    display: none;
}

.support-ticket-faq-item__chevron {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.05rem;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    position: relative;
}

.support-ticket-faq-item__chevron::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    left: 0.55rem;
    width: 0.4rem;
    height: 0.4rem;
    border-right: 2px solid #2563eb;
    border-bottom: 2px solid #2563eb;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}

.support-ticket-faq-item[open] .support-ticket-faq-item__chevron::before {
    top: 0.55rem;
    transform: rotate(45deg);
}

.support-ticket-faq-item__question {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.45;
    color: #0f172a;
}

.support-ticket-faq-item__content {
    padding: 0 1.1rem 1.1rem;
    display: grid;
    gap: 0.75rem;
}

.support-ticket-faq-block {
    border-radius: 0.65rem;
    padding: 0.85rem 1rem;
    border: 1px solid transparent;
}

.support-ticket-faq-block--message {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.support-ticket-faq-block--answer {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.support-ticket-faq-block__title {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.support-ticket-faq-block--answer .support-ticket-faq-block__title {
    color: #1d4ed8;
}

.support-ticket-faq-block__text {
    color: #334155;
    line-height: 1.55;
    white-space: pre-wrap;
}

.support-ticket-faq-empty {
    margin-top: 0.5rem;
    padding: 1.25rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    background: #f8fafc;
    text-align: center;
}

.support-ticket-faq-empty__title {
    margin: 0 0 0.35rem;
    font-weight: 600;
    color: #334155;
}

.support-ticket-faq-badge {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #86efac;
    vertical-align: middle;
}

.organization-report-table .organization-report-admin-list {
    margin: 0;
    padding-left: 1.1rem;
}

.organization-report-table .organization-report-federation-list {
    margin: 0;
    padding-left: 1.1rem;
}

.organization-report-kind {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.organization-report-kind--club {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.organization-report-kind--federation {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.federation-hierarchy-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.federation-hierarchy-tree--nested {
    margin: 0.35rem 0 0.15rem 1.15rem;
    padding-left: 0.85rem;
    border-left: 2px solid #bfdbfe;
}

.federation-hierarchy-node {
    margin: 0.35rem 0;
}

.federation-hierarchy-node__row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem 0.65rem;
    padding: 0.4rem 0.55rem;
    border-radius: 0.4rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.federation-hierarchy-node--inactive .federation-hierarchy-node__row {
    opacity: 0.72;
}

.federation-hierarchy-node__name {
    font-size: 0.95rem;
}

.federation-hierarchy-node__slug,
.federation-hierarchy-node__counts,
.federation-hierarchy-node__rep {
    margin: 0;
}

.federation-hierarchy-orphan-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.federation-hierarchy-orphan-list .federation-hierarchy-node {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem 0.65rem;
    padding: 0.4rem 0.55rem;
    border-radius: 0.4rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.organization-report-status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.organization-report-status--active {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #86efac;
}

.organization-report-status--inactive {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

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

.system-health-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid #dbeafe;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 55%, #f0fdf4 100%);
}

.system-health-hero--warning {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 55%, #fff7ed 100%);
}

.system-health-hero--error {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 55%, #fff1f2 100%);
}

.system-health-hero--unknown {
    border-color: #e5e7eb;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 55%, #f3f4f6 100%);
}

.system-health-hero__layout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.system-health-hero__lead {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    min-width: min(100%, 18rem);
}

.system-health-hero__pulse {
    width: 0.85rem;
    height: 0.85rem;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    animation: system-health-pulse 2s ease-out infinite;
    flex-shrink: 0;
}

.system-health-hero--warning .system-health-hero__pulse {
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45);
}

.system-health-hero--error .system-health-hero__pulse {
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
}

.system-health-hero--unknown .system-health-hero__pulse {
    background: #9ca3af;
    box-shadow: none;
    animation: none;
}

@keyframes system-health-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }
    70% {
        box-shadow: 0 0 0 0.55rem rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.system-health-hero__title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
    color: #0f172a;
}

.system-health-hero__meta {
    margin: 0.35rem 0 0;
    font-size: 0.92rem;
    color: #475569;
}

.system-health-hero__hint {
    margin: 0.5rem 0 0;
    max-width: 42rem;
}

.system-health-hero__status-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    text-align: right;
}

.system-health-hero__status-label {
    margin: 0;
}

.system-health-warnings {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.system-health-warnings__title {
    margin: 0 0 0.45rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #92400e;
}

.system-health-warnings__list {
    margin: 0;
    padding-left: 1.15rem;
    color: #78350f;
    font-size: 0.9rem;
    line-height: 1.45;
}

.system-health-warnings__list li + li {
    margin-top: 0.25rem;
}

.system-health-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.system-health-overview__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: rgba(255, 255, 255, 0.85);
    color: inherit;
    text-decoration: none;
    font-size: 0.82rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.system-health-overview__chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border-color: #93c5fd;
}

.system-health-overview__chip--warning {
    border-color: #fde68a;
}

.system-health-overview__chip--error {
    border-color: #fecaca;
}

.system-health-overview__chip--unknown {
    border-color: #e5e7eb;
}

.system-health-overview__dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.system-health-overview__chip--warning .system-health-overview__dot {
    background: #f59e0b;
}

.system-health-overview__chip--error .system-health-overview__dot {
    background: #ef4444;
}

.system-health-overview__chip--unknown .system-health-overview__dot {
    background: #9ca3af;
}

.system-health-overview__name {
    font-weight: 600;
    color: #1e293b;
}

.system-health-overview__state {
    color: #64748b;
}

.system-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: 1rem;
}

.system-health-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.1rem 1.05rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    scroll-margin-top: 1rem;
}

.system-health-card--ok {
    border-top: 3px solid #22c55e;
}

.system-health-card--warning {
    border-top: 3px solid #f59e0b;
}

.system-health-card--error {
    border-top: 3px solid #ef4444;
}

.system-health-card--unknown {
    border-top: 3px solid #94a3b8;
}

.system-health-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.system-health-card__title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.system-health-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.65rem;
    background: #eff6ff;
    color: #2563eb;
    flex-shrink: 0;
}

.system-health-card__icon svg {
    width: 1.2rem;
    height: 1.2rem;
}

.system-health-card__icon--database {
    background: #eff6ff;
    color: #2563eb;
}

.system-health-card__icon--scheduler {
    background: #faf5ff;
    color: #7c3aed;
}

.system-health-card__icon--redis {
    background: #fef2f2;
    color: #dc2626;
}

.system-health-card__icon--celery_worker,
.system-health-card__icon--celery_beat {
    background: #f0fdf4;
    color: #16a34a;
}

.system-health-card__icon--application {
    background: #ecfeff;
    color: #0891b2;
}

.system-health-card__icon--storage {
    background: #fff7ed;
    color: #ea580c;
}

.system-health-card__icon--email {
    background: #fdf2f8;
    color: #db2777;
}

.system-health-card__icon--cache {
    background: #eef2ff;
    color: #4f46e5;
}

.system-health-card__icon--background_jobs {
    background: #f0fdf4;
    color: #15803d;
}

.system-health-card__icon--security {
    background: #fefce8;
    color: #a16207;
}

.system-health-card__icon--tenants {
    background: #f5f3ff;
    color: #6d28d9;
}

.system-health-card__icon--backups {
    background: #ecfeff;
    color: #0e7490;
}

.system-health-card__title {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
    color: #0f172a;
}

.system-health-card__summary {
    margin: 0.75rem 0 0;
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.45;
}

.system-health-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.system-health-action-form {
    margin: 0;
}

.system-health-action-form__button {
    white-space: nowrap;
}

.system-health-card__actions-hint {
    margin: 0.55rem 0 0;
}

.system-health-status {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.system-health-status--lg {
    padding: 0.35rem 0.85rem;
    font-size: 0.95rem;
}

.system-health-status--ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #86efac;
}

.system-health-status--warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.system-health-status--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.system-health-status--unknown {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.system-health-metrics {
    display: grid;
    gap: 0.45rem;
    margin: 0.95rem 0 0;
}

.system-health-metrics__row {
    display: grid;
    grid-template-columns: minmax(7rem, 38%) 1fr;
    gap: 0.65rem;
    align-items: start;
    padding: 0.45rem 0.55rem;
    border-radius: 0.45rem;
    background: #f8fafc;
}

.system-health-metrics__row dt {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
}

.system-health-metrics__row dd {
    margin: 0;
    font-size: 0.88rem;
    color: #0f172a;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.system-health-metrics__value--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .system-health-hero__status-block {
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }

    .system-health-metrics__row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

.organization-report-action-form {
    margin: 0;
}

.organization-report-action-form__button {
    white-space: nowrap;
}

.organization-report-features-panel__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.organization-report-features-panel__hint {
    margin: 0 0 0.75rem;
}

.organization-report-features-panel__scroll {
    overflow-x: auto;
}

.organization-report-feature-matrix {
    min-width: 42rem;
}

.organization-report-feature-matrix__module-col {
    text-align: center;
    white-space: nowrap;
    font-size: 0.75rem;
    vertical-align: bottom;
}

.organization-report-feature-matrix__cell {
    text-align: center;
    vertical-align: middle;
    padding: 0.35rem 0.5rem;
}

.organization-report-feature-toggle {
    margin: 0;
    display: inline-flex;
    justify-content: center;
}

.organization-report-feature-toggle__label {
    display: inline-flex;
    cursor: pointer;
}

.organization-report-feature-toggle__checkbox {
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
}

.organization-report-row--inactive th,
.organization-report-row--inactive td {
    opacity: 0.85;
}

/* Accounting reports: canvas charts (bookkeeping-style visuals) */
.accounting-charts-panel {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%);
    border: 1px solid #e2e8f0;
}

.accounting-charts-panel > h2 {
    margin-top: 0;
    color: #0f172a;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.accounting-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.accounting-chart-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 1rem 1rem 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.accounting-chart-card--wide {
    grid-column: 1 / -1;
}

.accounting-chart-card__title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

@media (min-width: 901px) {
    .accounting-chart-card__title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.accounting-chart-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 200px;
}

.accounting-chart-canvas-wrap canvas {
    display: block;
    width: 100%;
    vertical-align: top;
}

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

    .accounting-chart-card--wide {
        grid-column: auto;
    }
}

/* Balances & reports: income statement (Erfolgsrechnung) */
.erfolgsrechnung-panel {
    margin-top: 1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%);
    border: 1px solid #e2e8f0;
}

.erfolgsrechnung-panel__head > h2 {
    margin-top: 0;
    margin-bottom: 0.35rem;
    color: #0f172a;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.erfolgsrechnung-panel__head > .hint {
    margin: 0;
    max-width: 52rem;
}

.erfolgsrechnung-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.1rem;
}

.erfolgsrechnung-block {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.erfolgsrechnung-block--income {
    border-top: 3px solid #3d9b57;
}

.erfolgsrechnung-block--expense {
    border-top: 3px solid #c94a4a;
}

.erfolgsrechnung-block__title {
    margin: 0;
    padding: 0.75rem 1rem 0.55rem;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.erfolgsrechnung-block--income .erfolgsrechnung-block__title {
    color: #145323;
    background: linear-gradient(180deg, #f3fbf5 0%, #fff 100%);
}

.erfolgsrechnung-block--expense .erfolgsrechnung-block__title {
    color: #6f1212;
    background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
}

.erfolgsrechnung-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.erfolgsrechnung-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.erfolgsrechnung-table thead th {
    padding: 0.45rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.erfolgsrechnung-table__amount-col,
.erfolgsrechnung-table__amount {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.erfolgsrechnung-table tbody td {
    padding: 0.55rem 1rem;
    vertical-align: top;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.35;
}

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

.erfolgsrechnung-table__code {
    display: inline-block;
    min-width: 2.75rem;
    margin-right: 0.45rem;
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.erfolgsrechnung-table__label {
    color: #64748b;
}

.erfolgsrechnung-table__row--zero .erfolgsrechnung-table__amount,
.erfolgsrechnung-table__row--zero .erfolgsrechnung-table__label {
    color: #94a3b8;
}

.erfolgsrechnung-table tfoot th,
.erfolgsrechnung-table tfoot td {
    padding: 0.7rem 1rem;
    font-weight: 600;
    border-top: 2px solid #e2e8f0;
    background: #f8fafc;
}

.erfolgsrechnung-block--income .erfolgsrechnung-table tfoot th,
.erfolgsrechnung-block--income .erfolgsrechnung-table tfoot td {
    color: #145323;
    background: #f3fbf5;
}

.erfolgsrechnung-block--expense .erfolgsrechnung-table tfoot th,
.erfolgsrechnung-block--expense .erfolgsrechnung-table tfoot td {
    color: #6f1212;
    background: #fff5f5;
}

.erfolgsrechnung-net {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-top: 1rem;
    padding: 0.85rem 1.1rem;
    border-radius: 0.65rem;
    border: 1px solid #c9b8e8;
    background: linear-gradient(135deg, #f8f5ff 0%, #f3f0fb 100%);
}

.erfolgsrechnung-net__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #352d5c;
}

.erfolgsrechnung-net__value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #352d5c;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

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

    .erfolgsrechnung-net__value {
        font-size: 1.1rem;
    }
}

/* Balances & reports: balance-by-account + monthly totals */
.accounting-report-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 20rem);
    gap: 1rem;
    margin-top: 1rem;
    align-items: start;
}

.accounting-report-table-panel {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%);
    border: 1px solid #e2e8f0;
    min-width: 0;
}

.accounting-report-table-panel__head > h2 {
    margin-top: 0;
    margin-bottom: 0.35rem;
    color: #0f172a;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.accounting-report-table-panel__head > .hint {
    margin: 0;
}

.accounting-report-table-wrap {
    margin-top: 0.85rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.accounting-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.accounting-report-table thead th {
    padding: 0.5rem 0.85rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.accounting-report-table tbody td {
    padding: 0.55rem 0.85rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.35;
}

.accounting-report-table tbody tr:last-child td {
    border-bottom: none;
}

.accounting-report-table__code-col {
    width: 4.5rem;
}

.accounting-report-table__count-col,
.accounting-report-table__amount-col,
.accounting-report-table__count,
.accounting-report-table__amount {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.accounting-report-table__count-col {
    width: 4rem;
}

.accounting-report-table__amount-col {
    width: 7rem;
}

.accounting-report-table__code {
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.accounting-report-table__label {
    color: #475569;
}

.accounting-report-table__month {
    font-weight: 500;
    color: #0f172a;
}

.accounting-report-table__empty {
    padding: 1.25rem 0.85rem !important;
    text-align: center;
    color: #64748b;
}

.accounting-report-table__row--income {
    background: linear-gradient(90deg, rgba(234, 248, 238, 0.55) 0%, #fff 12rem);
}

.accounting-report-table__row--expense {
    background: linear-gradient(90deg, rgba(253, 238, 238, 0.55) 0%, #fff 12rem);
}

.accounting-report-table__row--balance {
    background: linear-gradient(90deg, rgba(240, 245, 251, 0.7) 0%, #fff 12rem);
}

.accounting-report-table__row--zero .accounting-report-table__label,
.accounting-report-table__row--zero .accounting-report-table__count,
.accounting-report-table__row--zero .accounting-report-table__amount {
    color: #94a3b8;
}

.accounting-report-table__row--active .accounting-report-table__amount {
    font-weight: 600;
    color: #0f172a;
}

.accounting-report-table__row--active .accounting-report-table__count {
    font-weight: 600;
    color: #334155;
}

.accounting-report-table-panel--monthly .accounting-report-table tbody tr:nth-child(even):not(.accounting-report-table__row--active) {
    background: #fafbfc;
}

@media (max-width: 1100px) {
    .accounting-report-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard: event mode switcher — two large cards (not the compact accounting strip) */
.dashboard-mode-cards {
    margin: 0 0 1.25rem;
}

.dashboard-mode-cards__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: stretch;
}

@media (max-width: 520px) {
    .dashboard-mode-cards__grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-mode-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    margin: 0;
    padding: 1rem 1.15rem;
    min-height: 4rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.7rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 2px 8px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    font: inherit;
    text-align: left;
    color: #334155;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease,
        color 0.15s ease;
}

.dashboard-mode-card:hover {
    border-color: #94a3b8;
    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.07),
        0 4px 16px rgba(15, 23, 42, 0.06);
}

.dashboard-mode-card:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    z-index: 1;
}

.dashboard-mode-card.is-active {
    border-color: #3b82f6;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 55%);
    color: #1e3a8a;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.25),
        0 4px 18px rgba(37, 99, 235, 0.12);
}

.dashboard-mode-card__title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

button.dashboard-mode-card {
    cursor: pointer;
    font-family: inherit;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

/* Horizontal accounting sub-navigation (replaces sidebar accordion) */
.accounting-subnav {
    margin: 0 0 1rem;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.accounting-subnav__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.accounting-subnav__tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.4rem 0.5rem;
    min-height: 2.65rem;
}

.accounting-subnav__tab {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.4rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.35rem;
    background: transparent;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.25;
}

.accounting-subnav__tab:hover {
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
    border-color: #cbd5e1;
}

.accounting-subnav__tab.is-active {
    background: #fff;
    color: #1e40af;
    border-color: #bfdbfe;
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.08);
}

.accounting-subnav__tab:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

/*
 * Organization settings: section tabs — same visual language as .accounting-subnav
 * (pill buttons in a soft bar) so top booking tabs and in-form tabs match.
 */
.settings-form-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.15rem;
    margin: 0 0 1rem;
    padding: 0.4rem 0.5rem;
    min-height: 2.65rem;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.settings-form-tabs__tab {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.4rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.35rem;
    background: transparent;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.25;
}

.settings-form-tabs__tab:hover {
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
    border-color: #cbd5e1;
}

.settings-form-tabs__tab.is-active {
    background: #fff;
    color: #1e40af;
    border-color: #bfdbfe;
    box-shadow: 0 1px 2px rgba(30, 64, 175, 0.08);
}

.settings-form-tabs__tab:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.organization-settings-tab-panel[hidden] {
    display: none !important;
}

.mic-recipient-picker {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.mic-recipient-picker__panel {
    width: min(28rem, 100%);
    max-height: min(90vh, 100%);
    background: #ffffff;
    border-radius: 0.6rem;
    padding: 0.75rem 0.85rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    overflow: hidden;
}

.mic-recipient-picker__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.mic-recipient-picker__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.mic-recipient-picker__icon-close {
    flex-shrink: 0;
    border: none;
    background: #e5e7eb;
    color: #374151;
    width: 2rem;
    height: 2rem;
    border-radius: 0.35rem;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.mic-recipient-picker__icon-close:hover {
    background: #d1d5db;
}

.mic-recipient-picker__none {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.55rem;
    border-radius: 0.35rem;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
}

.mic-recipient-picker__none:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #334155;
}

.mic-recipient-picker__section-title {
    margin: 0.55rem 0 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.mic-recipient-picker__section-title:first-child {
    margin-top: 0;
}

.mic-recipient-picker__tree {
    overflow: auto;
    flex: 1;
    min-height: 0;
    border: 1px solid #e5e7eb;
    border-radius: 0.4rem;
    padding: 0.45rem 0.5rem;
    background: #f9fafb;
}

.mic-recipient-picker__tree .members-tree {
    margin: 0;
    padding: 0;
}

.mic-recipient-picker__tree summary.message-node-drag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    flex-wrap: wrap;
    list-style: none;
}

.mic-recipient-picker__tree summary.message-node-drag::-webkit-details-marker {
    display: none;
}

.mic-add-group-btn {
    flex-shrink: 0;
    font-size: 0.72rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    border: 1px solid #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
    font-weight: 600;
}

.mic-add-group-btn:hover {
    background: #dbeafe;
}

.mic-recipient-picker__tree .message-member-card {
    cursor: pointer;
    border-radius: 0.35rem;
}

.mic-recipient-picker__tree .message-member-card:hover {
    background: #e0f2fe;
}

.events-panel--drop-hover {
    outline: 3px solid #93c5fd;
    outline-offset: 4px;
}

.selected-recipients-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.recipient-chip {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    font-size: 0.82rem;
    white-space: normal;
    max-width: 100%;
}

.recipient-chip-text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.recipient-chip-main {
    line-height: 1.25;
}

.recipient-chip-address {
    display: block;
    font-size: 0.76rem;
    font-weight: normal;
    color: #6b7280;
    line-height: 1.25;
}

.recipient-remove-btn {
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.8rem;
    padding: 0;
}

.recipient-remove-btn:hover {
    color: #b91c1c;
    background: transparent;
}

.history-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.45rem;
    padding: 0.65rem;
    margin-bottom: 0.65rem;
    background: #f9fafb;
}

.history-title {
    margin: 0 0 0.35rem 0;
}

.history-body {
    margin: 0 0 0.45rem 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.history-body img,
.history-body table {
    max-width: 100%;
    height: auto;
}

.history-recipients-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.history-recipient-chip {
    display: inline-block;
    padding: 0.16rem 0.45rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    font-size: 0.8rem;
    white-space: nowrap;
}

.history-recipients-list--detailed {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
}

.history-recipient-item {
    padding: 0.55rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
}

.history-recipient-item__name {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.history-recipient-item__delivery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.mic-delivery-badge,
.mic-push-status {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid transparent;
    white-space: nowrap;
}

.mic-delivery-badge--email {
    color: #1e3a8a;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.mic-delivery-badge--read {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.mic-push-status--sent {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

.mic-push-status--failed {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

.mic-push-status--skipped,
.mic-push-status--na {
    color: #475569;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.mic-push-status--pending {
    color: #92400e;
    background: #fef3c7;
    border-color: #fcd34d;
}

.history-recipients-heading {
    margin-top: 0.65rem;
    margin-bottom: 0.25rem;
}

.member-news-panel {
    padding: 1.25rem 1.35rem;
}

.member-news-page {
    max-width: 44rem;
}

.member-news-page__header {
    margin-bottom: 1.25rem;
}

.member-news-page__title {
    margin: 0 0 0.45rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
}

.member-news-page__lede {
    margin: 0;
    max-width: 38rem;
    line-height: 1.55;
}

.member-news-page__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0.85rem 0 0;
}

.member-news-summary-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.18rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #b45309;
}

.member-news-summary-badge--read {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
}

.member-news-page__summary-total {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.member-news-inbox {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.member-news-inbox__item {
    border: 1px solid #dbeafe;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.member-news-inbox__item:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.member-news-inbox__item--unread {
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
}

.member-news-inbox__item--unread:hover {
    border-color: #fbbf24;
}

.member-news-inbox__details {
    display: block;
}

.member-news-inbox__summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    cursor: pointer;
    list-style: none;
    color: inherit;
}

.member-news-inbox__summary::-webkit-details-marker {
    display: none;
}

.member-news-inbox__link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    color: inherit;
    text-decoration: none;
}

.member-news-inbox__details[open] .member-news-inbox__chevron::before {
    transform: rotate(135deg);
    top: 0.38rem;
}

.member-news-inbox__item:has(.member-news-inbox__details[open]) {
    border-color: #93c5fd;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.member-news-inbox__panel {
    padding: 0 1rem 1.15rem;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

.member-news-article__meta--compact {
    margin: 0.85rem 0 0.75rem;
}

.member-news-inbox__panel .member-news-article__body {
    padding: 0;
    margin: 0;
}

.member-news-inbox__chevron {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    position: relative;
}

.member-news-inbox__chevron::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    left: 0.55rem;
    width: 0.4rem;
    height: 0.4rem;
    border-top: 2px solid #2563eb;
    border-right: 2px solid #2563eb;
    transform: rotate(45deg);
}

.member-news-inbox__item--unread .member-news-inbox__chevron {
    background: #fef3c7;
    border-color: #fcd34d;
}

.member-news-inbox__item--unread .member-news-inbox__chevron::before {
    border-color: #b45309;
}

.member-news-inbox__main {
    flex: 1 1 auto;
    min-width: 0;
}

.member-news-inbox__subject {
    display: block;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.member-news-inbox__item--unread .member-news-inbox__subject {
    font-weight: 700;
}

.member-news-inbox__date {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.84rem;
    color: #64748b;
}

.member-news-inbox__badge {
    flex-shrink: 0;
    display: inline-block;
    border-radius: 999px;
    padding: 0.14rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

.member-news-inbox__badge--unread {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #b45309;
}

.member-news-inbox__badge--read {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
}

.member-news-empty {
    margin-top: 0.25rem;
    padding: 1.5rem 1.25rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    background: #f8fafc;
    text-align: center;
}

.member-news-empty__title {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
}

.member-news-empty__hint {
    margin: 0 auto;
    max-width: 28rem;
}

.member-news-page--detail {
    max-width: 48rem;
}

.member-news-detail-nav {
    margin-bottom: 1rem;
}

.member-news-detail-nav__back {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.member-news-detail-nav__back:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.member-news-article {
    border: 1px solid #dbeafe;
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.member-news-article__header {
    padding: 1.15rem 1.25rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.member-news-article__subject {
    margin: 0 0 0.85rem;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    overflow-wrap: anywhere;
}

/* Keep .app-page-title typography consistent when combined with page-specific classes */
h1.app-page-title,
h2.app-page-title,
.member-news-page__title.app-page-title,
.member-news-article__subject.app-page-title,
.eo-agreement-pagehead__title.app-page-title,
.panel > h1.app-page-title:first-child,
.events-panel > h1.app-page-title:first-child,
.events-panel > h2.app-page-title:first-child {
    margin: 0 0 0.75rem;
    padding: 0;
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
}

.member-news-article__meta {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.member-news-article__meta-row {
    display: grid;
    grid-template-columns: minmax(5.5rem, 7rem) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: baseline;
}

.member-news-article__meta-row dt {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
}

.member-news-article__meta-row dd {
    margin: 0;
    font-size: 0.92rem;
    color: #334155;
    overflow-wrap: anywhere;
}

.member-news-article__meta-row--expires dd {
    color: #b45309;
    font-weight: 600;
}

.member-news-article__meta-row--read dd {
    color: #15803d;
    font-weight: 600;
}

.member-news-article__body {
    margin: 0;
    padding: 1.15rem 1.25rem 1.35rem;
    border: none;
    border-radius: 0;
    background: transparent;
}

.member-news-article__body--html {
    font-size: 1rem;
    line-height: 1.65;
    color: #1e293b;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.member-news-article__body--html p {
    margin: 0 0 1em;
}

.member-news-article__body--html p:last-child {
    margin-bottom: 0;
}

.member-news-article__body--html ul,
.member-news-article__body--html ol {
    margin: 0 0 1em;
    padding-left: 1.35rem;
}

.member-news-article__body--html a {
    color: #1d4ed8;
}

.member-news-article__body--html img,
.member-news-article__body--html table {
    max-width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    .member-news-panel {
        padding: 1rem;
    }

    .member-news-inbox__link,
    .member-news-inbox__summary {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .member-news-inbox__badge {
        margin-left: 2.35rem;
    }

    .member-news-article__meta-row {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

.mobile-user-picker {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.mobile-user-picker__panel {
    width: min(26rem, 100%);
    background: #ffffff;
    border-radius: 0.6rem;
    padding: 0.85rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
}

.mobile-user-picker__label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.mobile-user-picker__actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
}

.mobile-user-picker__cancel {
    background: #e5e7eb;
    color: #111827;
}

.mobile-user-picker__cancel:hover {
    background: #d1d5db;
}

.patient-report-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 0.85rem;
}

.patient-assessment-card summary {
    cursor: pointer;
    margin-bottom: 0.6rem;
}

.patient-paper-form {
    display: grid;
    gap: 0.85rem;
}

.patient-paper-save {
    justify-self: start;
}

.patient-sheet {
    border: 1px solid #1f2937;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.8rem;
    display: grid;
    gap: 0.7rem;
}

.patient-sheet__header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: center;
    border-bottom: 1px solid #1f2937;
    padding-bottom: 0.45rem;
}

.patient-sheet__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    color: #0f5132;
}

.patient-sheet__logo-icon {
    font-size: 1.25rem;
}

.patient-sheet__title {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.03em;
}

.patient-sheet__subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: #4b5563;
}

.patient-sheet__block {
    border: 1px solid #1f2937;
    border-radius: 6px;
    padding: 0.5rem;
    display: grid;
    gap: 0.45rem;
}

.patient-sheet__block-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
}

.patient-sheet__grid {
    display: grid;
    gap: 0.5rem 0.75rem;
    align-items: start;
}

.patient-sheet__grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.patient-sheet__field {
    display: grid;
    gap: 0.25rem;
    font-size: 0.78rem;
    min-width: 0;
}

.patient-sheet__field > span {
    font-weight: 600;
    color: #111827;
    line-height: 1.25;
}

.patient-sheet__field input,
.patient-sheet__field textarea,
.patient-sheet__field select,
.patient-sheet__opqrst-row textarea,
.patient-sheet__row input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    border: 1px solid #9ca3af;
    border-radius: 4px;
    min-height: 32px;
    font-size: 0.86rem;
}

.patient-sheet__field textarea,
.patient-sheet__opqrst-row textarea {
    min-height: 52px;
}

.patient-sheet__field--full {
    grid-column: 1 / -1;
}

.patient-sheet__rows {
    display: grid;
    gap: 0.35rem;
}

.patient-sheet__row {
    border: 1px dashed #9ca3af;
    border-radius: 4px;
    padding: 0.4rem 0.45rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    align-items: flex-start;
    font-size: 0.78rem;
}

.patient-sheet__row:not(.patient-sheet__row--inputs) strong {
    flex: 0 0 100%;
    width: 100%;
    margin: 0 0 0.1rem 0;
    line-height: 1.25;
}

.patient-sheet__row label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.patient-sheet__row--inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 0.45rem 0.6rem;
    align-items: end;
}

.patient-sheet__row--inputs strong {
    grid-column: 1 / -1;
    margin: 0;
    line-height: 1.25;
}

.patient-sheet__row--inputs label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    min-width: 0;
    margin: 0;
    font-size: 0.76rem;
}

.patient-sheet__row--inputs label input[type="text"] {
    width: 100%;
}

.patient-sheet__row--inputs label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
}

.patient-sheet__row input[type="checkbox"] {
    width: 15px;
    height: 15px;
}

.patient-sheet__summary-field {
    display: grid;
    gap: 0.2rem;
    font-size: 0.78rem;
}

.patient-sheet__summary-field > label {
    font-weight: 600;
}

.patient-sheet__block--workflow {
    background: #f8fafc;
    border-color: #334155;
}

.patient-workflow-lead {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #1e293b;
}

.patient-workflow-hint {
    margin: 0.5rem 0 0.75rem;
    font-size: 0.76rem;
    line-height: 1.4;
    color: #475569;
}

.patient-workflow-sealed {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    background: #fef3c7;
    border: 1px solid #d97706;
    font-size: 0.82rem;
    color: #78350f;
}

.patient-workflow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.75rem;
    align-items: center;
    margin-top: 0.25rem;
}

.patient-workflow-btn {
    cursor: pointer;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.patient-workflow-btn--handover {
    background: #0f766e;
    color: #f0fdfa;
    border-color: #0d9488;
}

.patient-workflow-btn--handover:hover {
    background: #0d9488;
}

.patient-workflow-btn--close {
    background: #b45309;
    color: #fffbeb;
    border-color: #d97706;
}

.patient-workflow-btn--close:hover {
    background: #c2410c;
}

.patient-workflow-btn--delete {
    flex-basis: 100%;
    margin-top: 0.15rem;
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.patient-workflow-btn--delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.patient-sheet__opqrst {
    display: grid;
    gap: 0.35rem;
}

.patient-sheet__opqrst-row {
    display: grid;
    grid-template-columns: minmax(9.5rem, 13.5rem) minmax(0, 1fr);
    gap: 0.5rem 0.65rem;
    align-items: start;
}

.patient-sheet__opqrst-row > span {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    padding-top: 0.35rem;
    hyphens: auto;
    word-break: break-word;
}

/* Desktop: optional collapse of the full left sidebar (#dashboard-sidebar) for more main area */
@media (min-width: 981px) {
    .sidebar-collapse-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 2rem;
        height: 2rem;
        padding: 0;
        border: 1px solid #d1d5db;
        border-radius: 0.375rem;
        background: #ffffff;
        color: #374151;
        font-size: 1rem;
        line-height: 1;
        cursor: pointer;
        font-family: inherit;
    }

    .sidebar-collapse-btn:hover {
        background: #eff6ff;
        border-color: #93c5fd;
        color: #1d4ed8;
    }

    body.dashboard-sidebar-collapsed .content {
        grid-template-columns: 0 minmax(0, 1fr);
        gap: 0;
    }

    body.dashboard-sidebar-collapsed .content #dashboard-sidebar {
        overflow: hidden;
        visibility: hidden;
        width: 0;
        min-width: 0;
        max-width: 0;
        padding: 0;
        margin: 0;
        opacity: 0;
        pointer-events: none;
    }

    .dashboard-sidebar-expand-tab {
        display: none;
        align-items: center;
        justify-content: center;
        position: fixed;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 8000;
        width: 2.25rem;
        min-height: 3rem;
        padding: 0.25rem 0.15rem;
        border: 1px solid #d1d5db;
        border-left: none;
        border-radius: 0 0.375rem 0.375rem 0;
        background: #ffffff;
        color: #374151;
        font-size: 1.15rem;
        line-height: 1;
        cursor: pointer;
        font-family: inherit;
        box-shadow: 2px 0 8px rgba(15, 23, 42, 0.12);
    }

    .dashboard-sidebar-expand-tab:hover {
        background: #eff6ff;
        border-color: #93c5fd;
        color: #1d4ed8;
    }

    body.dashboard-sidebar-collapsed .dashboard-sidebar-expand-tab:not([hidden]) {
        display: flex;
    }
}

@media (max-width: 980px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 9000;
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
    }

    .header {
        padding: 0.45rem 0.7rem;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 0.35rem 0.55rem;
    }

    .header-col--center {
        order: 3;
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .header-center-cluster {
        justify-content: flex-start;
        text-align: left;
    }

    .header-col--right {
        margin-left: 0;
    }

    .header-nav {
        gap: 0.3rem;
        flex-wrap: wrap;
    }

    .header-org-name {
        font-size: 0.95rem;
    }

    .header-account,
    .header-center-cluster .header-center-link {
        font-size: 0.8rem;
    }

    .header .language-switcher select,
    .header .organization-switcher select {
        min-width: 5.25rem;
        max-width: 9rem;
        font-size: 0.8rem;
        padding: 0.18rem 0.35rem;
    }

    .site-footer {
        padding: 0.45rem 0.7rem;
        font-size: 0.78rem;
    }

    .site-footer-inner {
        flex-wrap: wrap;
        gap: 0.35rem 0.55rem;
    }

    .site-footer-col--center {
        order: 3;
        flex: 1 1 100%;
        text-align: left;
    }

    .site-footer-col--right {
        margin-left: 0;
    }

    .content {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        padding: 1rem;
    }

    /* Desktop-only sidebar expand tab must never show in stacked layout */
    .dashboard-sidebar-expand-tab {
        display: none !important;
    }

    /* On phones/tablets, show main dashboard content before long member sidebar. */
    .content > section {
        order: 1;
    }

    .content > aside {
        order: 2;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        background: #374151;
        border: 1px solid #4b5563;
        color: #f9fafb;
        padding: 0.2rem 0.45rem;
        font-size: 0.8rem;
    }

    .mobile-menu-btn:hover {
        background: #4b5563;
    }

    .dashboard-mobile-hamburger-enabled #dashboard-sidebar {
        display: none;
    }

    .dashboard-mobile-hamburger-enabled.mobile-menu-open #dashboard-sidebar {
        display: block;
        position: fixed;
        top: 0.6rem;
        left: 0.6rem;
        right: 0.6rem;
        z-index: 10010;
        max-height: calc(100vh - 1.2rem);
        overflow: auto;
        background: #f3f4f6;
        border-radius: 0.6rem;
        padding: 0.85rem;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
    }

    .dashboard-mobile-hamburger-enabled.mobile-menu-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 10000;
    }

    .dashboard-mobile-hamburger-enabled.mobile-menu-open .layout {
        position: relative;
        z-index: 10001;
    }

    .mobile-quick-menu {
        display: none;
    }

    .mobile-quick-menu-open .mobile-quick-menu {
        display: block;
        position: fixed;
        top: 0.6rem;
        left: 0.6rem;
        right: 0.6rem;
        z-index: 10010;
        max-height: calc(100vh - 1.2rem);
        overflow: auto;
        background: #f3f4f6;
        border-radius: 0.6rem;
        padding: 0.85rem;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
    }

    .mobile-quick-menu ul {
        display: grid;
        gap: 0.45rem;
    }

    .mobile-quick-menu a,
    .mobile-quick-menu button {
        display: block;
        width: 100%;
        text-align: left;
        text-decoration: none;
        color: #1f2937;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 0.375rem;
        padding: 0.45rem 0.55rem;
        font-size: 0.9rem;
    }

    .mobile-quick-menu-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 10000;
    }

    .mobile-quick-menu-open .layout {
        position: relative;
        z-index: 10001;
    }

    .mobile-quick-menu .menu-submenu {
        background: #ffffff;
        border-color: #e5e7eb;
    }

    .mobile-quick-menu .menu-submenu__summary {
        background: #f3f4f6;
        border-radius: 0.375rem;
    }

    .mobile-quick-menu .menu-submenu[open] > .menu-submenu__summary:not([class*="menu-submenu__summary--group-"]) {
        background: #eef0f3;
        color: #1f2937;
        border-radius: 0.375rem 0.375rem 0 0;
    }

    .mobile-quick-menu .menu-submenu[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary:not([class*="menu-submenu__summary--group-"]) {
        background: #dbeafe;
        color: #1e3a8a;
    }

    .mobile-quick-menu .menu-submenu__summary:hover {
        background: #e5e7eb;
    }

    .mobile-quick-menu .menu-submenu[open] > .menu-submenu__summary:not([class*="menu-submenu__summary--group-"]):hover {
        background: #e5e7eb;
    }

    .mobile-quick-menu .menu-submenu[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary:not([class*="menu-submenu__summary--group-"]):hover {
        background: #bfdbfe;
    }

    .mobile-quick-menu .menu-box-list--sub {
        background: #ffffff;
        padding-left: 0.5rem;
    }

    .mobile-quick-menu .menu-submenu--nested > .menu-submenu__summary--nested {
        background: #f3f4f6;
    }

    .mobile-quick-menu .menu-submenu--nested[open] > .menu-submenu__summary--nested:not([class*="menu-submenu__summary--group-"]) {
        background: #eef0f3;
    }

    .mobile-quick-menu .menu-submenu--nested[open]:has(.menu-nav-btn.is-active) > .menu-submenu__summary--nested:not([class*="menu-submenu__summary--group-"]) {
        background: #dbeafe;
    }

    .mobile-quick-menu .menu-box-list--nested {
        background: #ffffff;
    }

    .mobile-quick-menu .menu-box-list--sub a,
    .mobile-quick-menu .menu-box-list--sub button.menu-nav-btn:not([class*="menu-nav-btn--group-"]) {
        background: #ffffff;
    }

    .mobile-quick-menu .menu-box-list button.menu-nav-btn[class*="menu-nav-btn--group-"] {
        border-left-width: 4px;
        border-left-style: solid;
    }
    .mobile-quick-menu .menu-box-list button.menu-nav-btn.menu-nav-btn--group-scheduling {
        background: #dbeafe;
        border-color: #60a5fa;
        border-left-color: #1d4ed8;
    }
    .mobile-quick-menu .menu-box-list button.menu-nav-btn.menu-nav-btn--group-education {
        background: #ede9fe;
        border-color: #a78bfa;
        border-left-color: #6d28d9;
    }
    .mobile-quick-menu .menu-box-list button.menu-nav-btn.menu-nav-btn--group-member {
        background: #cffafe;
        border-color: #22d3ee;
        border-left-color: #0891b2;
    }
    .mobile-quick-menu .menu-box-list button.menu-nav-btn.menu-nav-btn--group-mic {
        background: #f5d0fe;
        border-color: #e879f9;
        border-left-color: #a21caf;
    }
    .mobile-quick-menu .menu-box-list button.menu-nav-btn.menu-nav-btn--group-reports {
        background: var(--menu-group-reports-bg);
        border-color: var(--menu-group-reports-border);
        border-left-color: var(--menu-group-reports-accent);
    }
    .mobile-quick-menu .menu-box-list button.menu-nav-btn.menu-nav-btn--group-superuser {
        background: #e0e7ff;
        border-color: #818cf8;
        border-left-color: #4338ca;
    }
    .mobile-quick-menu .menu-box-list button.menu-nav-btn.menu-nav-btn--group-accounting {
        background: #dcfce7;
        border-color: #4ade80;
        border-left-color: #15803d;
    }
    .mobile-quick-menu .menu-box-list button.menu-nav-btn.menu-nav-btn--group-inventory {
        background: #ffedd5;
        border-color: #fb923c;
        border-left-color: #c2410c;
    }
    .mobile-quick-menu .menu-box-list button.menu-nav-btn.menu-nav-btn--group-event-offering {
        background: #fce7f3;
        border-color: #f472b6;
        border-left-color: #be185d;
    }
    .mobile-quick-menu .menu-box-list button.menu-nav-btn.menu-nav-btn--group-admin {
        background: #e2e8f0;
        border-color: #94a3b8;
        border-left-color: #334155;
    }
    .mobile-quick-menu .menu-submenu--group-reports > .menu-submenu__summary--group-reports {
        background: var(--menu-group-reports-submenu-bg);
        border-left: 4px solid var(--menu-group-reports-accent);
    }
    .mobile-quick-menu .menu-submenu--group-superuser > .menu-submenu__summary--group-superuser {
        background: #c7d2fe;
        border-left: 4px solid #4338ca;
        color: var(--menu-group-superuser-text);
    }
    .mobile-quick-menu .menu-submenu--group-accounting > .menu-submenu__summary--group-accounting,
    .mobile-quick-menu .menu-submenu--group-accounting > .menu-box-list--sub .menu-submenu--nested > .menu-submenu__summary--group-accounting {
        background: #bbf7d0;
        border-left: 4px solid #15803d;
    }
    .mobile-quick-menu .menu-submenu--group-inventory > .menu-submenu__summary--group-inventory,
    .mobile-quick-menu .menu-submenu--group-inventory > .menu-box-list--sub .menu-submenu--nested > .menu-submenu__summary--group-inventory {
        background: #fed7aa;
        border-left: 4px solid #c2410c;
    }
}

@media (max-width: 720px) {
    .members-panel,
    .events-panel,
    .panel {
        padding: 0.8rem 0.9rem;
    }

    .dashboard-register-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.1rem;
    }

    .dashboard-register-tab {
        min-width: 6.6rem;
        padding: 0.48rem 0.8rem 0.56rem;
    }

    .dashboard-register-tab.is-active {
        padding-left: 1rem;
    }

    .members-panel .member-menu-trigger {
        opacity: 1;
        pointer-events: auto;
    }

    .member-info-content {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .dashboard-scroll-region .month-table,
    .dashboard-scroll-region .day-timetable {
        width: max-content;
        min-width: 100%;
    }

    .dashboard-scroll-region .month-table th,
    .dashboard-scroll-region .month-table td,
    .dashboard-scroll-region .day-timetable th,
    .dashboard-scroll-region .day-timetable td {
        white-space: nowrap;
    }

    .day-event-name {
        max-width: 56px;
    }

    .patient-report-form-grid {
        grid-template-columns: 1fr;
    }

    .patient-sheet__grid--two,
    .patient-sheet__opqrst-row {
        grid-template-columns: 1fr;
    }
}

@media print {
    .layout .header,
    .layout .header-nav {
        display: none !important;
    }

    .layout main {
        padding: 0 !important;
    }

    .patient-sheet {
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    .patient-paper-save {
        display: none;
    }
}

/* Member information / partner mail: evaluated preview dialog */
.mic-mail-preview-dialog {
    max-width: min(42rem, calc(100vw - 2rem));
    width: 100%;
    border: none;
    border-radius: 0.6rem;
    padding: 0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
}

.mic-mail-preview-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}

.mic-mail-preview-dialog__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.mic-mail-preview-body {
    margin: 0;
    max-height: min(60vh, 28rem);
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    background: #ffffff;
}

/* My profile: read-only club directory fields */
.profile-readonly-dl {
    display: grid;
    grid-template-columns: minmax(9rem, 15rem) minmax(0, 1fr);
    gap: 0.4rem 1.25rem;
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    align-items: baseline;
}

.profile-readonly-dl dt {
    margin: 0;
    color: #4b5563;
    font-weight: 600;
}

.profile-readonly-dl dd {
    margin: 0;
    min-width: 0;
    word-break: break-word;
}

.profile-readonly-subheading {
    margin: 1.25rem 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
}

.profile-edit-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    max-width: 42rem;
}

.profile-edit-form .app-filter-field {
    min-width: 0;
    gap: 0.45rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fafafa;
}

.profile-edit-form .app-filter-field--action {
    border: 0;
    background: transparent;
    padding: 0.2rem 0 0;
    justify-content: flex-start;
}

.profile-edit-form .profile-edit-subheading {
    grid-column: 1 / -1;
}

.profile-edit-subheading {
    margin: 0.5rem 0 0.1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
}

@media (max-width: 720px) {
    .profile-edit-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-readonly-dl {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.25rem 0;
    }

    .profile-readonly-dl dt {
        margin-top: 0.8rem;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #6b7280;
    }

    .profile-readonly-dl dd {
        margin-bottom: 0.15rem;
        padding: 0.45rem 0.55rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.45rem;
        background: #f9fafb;
        color: #111827;
    }
}

/* Full protocol: injury sketch modal (Patient-Skizze) */
.patient-injury-sketch-root {
    margin-top: 0.35rem;
}

.patient-sketch-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.patient-injury-sketch-thumb {
    display: block;
    max-width: min(200px, 100%);
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.35rem;
    background: #fff;
    object-fit: contain;
}

.patient-sketch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font: inherit;
    background: #111827;
    color: #fff;
}

.patient-sketch-btn:hover {
    opacity: 0.88;
}

.patient-sketch-btn--ghost {
    background: #e5e7eb;
    color: #374151;
}

.patient-injury-sketch-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.patient-injury-sketch-backdrop[hidden] {
    display: none !important;
}

.patient-injury-sketch-dialog {
    width: 100%;
    max-width: 42rem;
    background: #fff;
    border-radius: 0.375rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 900px);
    overflow: auto;
}

.patient-sketch-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.patient-sketch-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.patient-sketch-modal-body {
    padding: 1rem;
}

.patient-sketch-modal-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.patient-sketch-canvas-wrap {
    position: relative;
    display: inline-block;
    vertical-align: top;
    max-width: 100%;
    line-height: 0;
}

.patient-sketch-canvas-wrap canvas[data-sketch-bg] {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    border: 1px solid #111;
    max-width: 100%;
    height: auto;
}

.patient-sketch-canvas-wrap canvas[data-sketch-draw] {
    position: relative;
    z-index: 1;
    border: 1px solid #111;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
}

.patient-sketch-side-panel {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}

.patient-sketch-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

/* Patient signing: keep QR comfortable on phones, compact on desktop */
.patient-signing-qr {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

@media (min-width: 768px) {
    .patient-signing-qr {
        width: 120px;
    }
}

.patient-sheet__unterschrift-qr {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e5e7eb;
}

/* Medium protocol: three columns — QR, link, saved image, name field */
.patient-signing-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 0.35rem;
}

@media (min-width: 960px) {
    .patient-signing-columns {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }
}

.patient-signing-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.65rem 0.6rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
}

.patient-signing-column-title {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.patient-signing-cell {
    min-width: 0;
}

.patient-signing-row-label {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.01em;
}

.patient-signing-cell-placeholder {
    margin: 0;
    font-size: 0.88rem;
}

.patient-signing-name-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
}

.patient-signing-name-field span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
}

.patient-signing-name-field input,
.patient-signing-name-field textarea,
.patient-signing-name-field select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.patient-signing-qr--column {
    width: 140px;
    max-width: 100%;
    height: auto;
}

.patient-signing-saved-img {
    display: block;
    max-width: min(100%, 360px);
    height: auto;
    max-height: 220px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

/* Platform billing (superuser) */
.platform-billing-invoices {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.platform-billing-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.platform-billing-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.platform-billing-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.75rem;
}

.platform-billing-summary__card {
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.platform-billing-summary__card--open {
    border-color: #9ec9a8;
    background: linear-gradient(180deg, #f6fdf8 0%, #eef8f0 100%);
}

.platform-billing-summary__card--overdue {
    border-color: #e59a9a;
    background: linear-gradient(180deg, #fffafa 0%, #fdeeee 100%);
}

.platform-billing-summary__label {
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.platform-billing-summary__card--open .platform-billing-summary__label {
    color: #145323;
}

.platform-billing-summary__card--overdue .platform-billing-summary__label {
    color: #6f1212;
}

.platform-billing-summary__value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.platform-billing-detail {
    border: 1px solid #cbd5e1;
    border-radius: 0.65rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.platform-billing-detail__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.platform-billing-detail__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.platform-billing-detail__subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    color: #64748b;
}

.platform-billing-detail__amount {
    text-align: right;
}

.platform-billing-detail__amount-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.platform-billing-detail__amount-label {
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.platform-invoice-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    line-height: 1.2;
    white-space: nowrap;
    border: 1px solid transparent;
}

.platform-invoice-status--draft {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

.platform-invoice-status--open {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.platform-invoice-status--overdue {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.platform-invoice-status--paid {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.platform-invoice-status--cancelled {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #d1d5db;
}

.platform-billing-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.65rem 1.25rem;
    padding: 1rem 1.15rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.platform-billing-meta__item {
    margin: 0;
}

.platform-billing-meta__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.platform-billing-meta__value {
    font-size: 0.92rem;
    color: #0f172a;
    word-break: break-word;
}

.platform-billing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1.15rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.platform-billing-actions form {
    margin: 0;
    display: inline;
}

.platform-billing-form {
    padding: 1rem 1.15rem 1.15rem;
    background: #fff;
}

.platform-billing-form__section-title {
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.platform-billing-form__section-title:first-child {
    margin-top: 0;
}

.platform-billing-lines-table input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.35rem;
    font-size: 0.9rem;
}

.platform-billing-lines-table input[type="text"]:focus {
    outline: 2px solid #2563eb;
    outline-offset: 0;
    border-color: #60a5fa;
}

.platform-billing-lines-table tfoot td {
    font-weight: 600;
    background: #f8fafc;
}

.platform-billing-readonly-block {
    padding: 1rem 1.15rem;
    background: #fff;
}

.platform-billing-readonly-block h3 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.platform-billing-readonly-text {
    margin: 0;
    white-space: pre-wrap;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.5;
}

.platform-billing-list-panel {
    overflow-x: auto;
}

.platform-billing-list-panel .platform-billing-filter {
    margin-bottom: 0.85rem;
}

.platform-billing-table tbody tr.platform-billing-table__row--selected {
    background: #eff6ff;
}

.platform-billing-table tbody tr.platform-billing-table__row--selected td {
    border-top-color: #93c5fd;
    border-bottom-color: #93c5fd;
}

.platform-billing-table tbody tr[data-nav-url] {
    cursor: pointer;
}

.platform-billing-table tbody tr[data-nav-url]:hover {
    background: #f8fafc;
}

.platform-billing-table .platform-invoice-status {
    font-size: 0.7rem;
}

.platform-billing-compose-toggle[hidden] {
    display: none !important;
}

.platform-billing-matrix-panel {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.platform-billing-matrix-panel h2 {
    margin: 0;
    font-size: 1.05rem;
}

.platform-billing-matrix-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.platform-billing-matrix-filter {
    margin: 0;
    gap: 0.45rem;
}

.platform-billing-matrix-filter .app-filter-field label {
    font-size: 0.72rem;
}

.platform-billing-matrix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.platform-billing-matrix-scroll {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    background: #fff;
}

.platform-billing-matrix {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.78rem;
}

.platform-billing-matrix__org-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #f8fafc;
    text-align: left;
    min-width: 9rem;
    max-width: 12.5rem;
    padding: 0.22rem 0.5rem;
    border-right: 1px solid #e2e8f0;
    font-weight: 600;
    vertical-align: middle;
}

.platform-billing-matrix__org-name {
    display: inline;
    overflow-wrap: anywhere;
}

.platform-billing-matrix__kind {
    margin-left: 0.3rem;
    padding: 0.05rem 0.35rem;
    font-size: 0.62rem;
    vertical-align: middle;
    letter-spacing: 0.01em;
}

.platform-billing-matrix__inactive {
    display: inline;
    margin-left: 0.25rem;
    font-size: 0.68rem;
}

.platform-billing-matrix thead th.platform-billing-matrix__year-col {
    text-align: center;
    min-width: 2.75rem;
    padding: 0.28rem 0.2rem;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.72rem;
}

.platform-billing-matrix__cell {
    text-align: center;
    padding: 0.15rem 0.12rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.platform-billing-matrix__row--federation .platform-billing-matrix__org-col {
    background: #f8fbff;
}

.platform-matrix-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    min-height: 1.45rem;
    padding: 0.1rem 0.28rem;
    border-radius: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
}

.platform-matrix-cell--amount {
    min-width: 2.1rem;
    padding: 0.12rem 0.3rem;
}

.platform-matrix-cell--price {
    min-width: 2.35rem;
    padding: 0.14rem 0.55rem 0.14rem 0.35rem;
    border-radius: 0.2rem 0.55rem 0.55rem 0.2rem;
    position: relative;
}

.platform-matrix-cell--price::after {
    content: "";
    position: absolute;
    right: 0.28rem;
    top: 50%;
    width: 0.28rem;
    height: 0.28rem;
    margin-top: -0.14rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

button.platform-matrix-cell {
    cursor: pointer;
}

button.platform-matrix-cell:hover {
    filter: brightness(0.97);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.platform-matrix-cell--legend {
    min-width: auto;
    min-height: auto;
    padding: 0.12rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
}

.platform-matrix-cell--legend.platform-matrix-cell--price {
    padding-right: 0.7rem;
}

.platform-matrix-cell--paid {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.platform-matrix-cell--open {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.platform-matrix-cell--draft {
    background: #e2e8f0;
    color: #475569;
    border-color: #cbd5e1;
}

.platform-matrix-cell--missing {
    background: #fff;
    color: #cbd5e1;
    border-color: #e2e8f0;
    font-weight: 400;
}

.platform-matrix-cell--cancelled {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #d1d5db;
    font-weight: 400;
}

.platform-matrix-cell--federation.platform-matrix-cell--paid {
    background: #dbeafe;
    color: #1e3a8a;
    border-color: #93c5fd;
}

.platform-matrix-cell--federation.platform-matrix-cell--open {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #a5b4fc;
}

.platform-matrix-cell--federation.platform-matrix-cell--draft {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.platform-matrix-cell--federation.platform-matrix-cell--cancelled {
    background: #e2e8f0;
    color: #64748b;
    border-color: #cbd5e1;
}

.platform-billing-matrix tbody tr:hover td:not(.platform-billing-matrix__org-col) {
    background: #fafbfc;
}

.platform-billing-matrix tbody tr.platform-billing-matrix__row--federation:hover td:not(.platform-billing-matrix__org-col) {
    background: #f5f9ff;
}

@media (min-width: 1100px) {
    .platform-billing-invoices--has-detail {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        grid-template-areas:
            "toolbar toolbar"
            "summary summary"
            "detail list";
        align-items: start;
    }

    .platform-billing-invoices--has-detail .platform-billing-toolbar {
        grid-area: toolbar;
    }

    .platform-billing-invoices--has-detail .platform-billing-summary {
        grid-area: summary;
    }

    .platform-billing-invoices--has-detail .platform-billing-detail-wrap {
        grid-area: detail;
    }

    .platform-billing-invoices--has-detail .platform-billing-list-panel {
        grid-area: list;
        margin-top: 0;
    }
}

textarea.single-invoice-line-description {
    width: 100%;
    min-width: 14rem;
    max-width: 22rem;
    min-height: 4.5rem;
    box-sizing: border-box;
    font-size: inherit;
    line-height: 1.35;
    resize: vertical;
}

/* Compensation (Spesen & Entschädigungen) */
.compensation-page__intro {
    margin-bottom: 0;
}

.compensation-page__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.compensation-page__title-row .app-page-title {
    margin: 0;
}

.compensation-page__lede {
    margin: 0.55rem 0 0;
    max-width: 44rem;
    color: #4b5563;
    line-height: 1.5;
    font-size: 0.95rem;
}

.compensation-page__section {
    margin-top: 1rem;
}

.compensation-page__section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 0.85rem;
}

.compensation-page__section-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.compensation-page__section-head .hint {
    margin: 0;
}

.compensation-page__empty {
    margin: 0;
}

/* Member self-service: My compensations */
.my-compensations-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
}

.my-compensations-hero__text {
    flex: 1 1 16rem;
    min-width: 0;
}

.my-compensations-hero__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.my-compensations-hero .app-page-title {
    margin: 0;
}

.my-compensations-summary {
    flex: 0 1 22rem;
    max-width: 100%;
    margin: 0;
}

.my-compensations-summary__total {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.my-compensations-summary__total .accounting-report-summary-cards__label {
    color: #047857;
}

.my-compensations-summary__total .accounting-report-summary-cards__value {
    color: #065f46;
}

.my-compensations-list {
    margin-top: 1rem;
}

.my-compensations-event {
    background: #ffffff;
    border-color: #dbeafe;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.my-compensations-event__totals {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem 0.85rem;
    flex: 0 0 auto;
}

.my-compensations-event__count {
    font-size: 0.85rem;
    color: #64748b;
}

.my-compensations-event__amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}

.my-compensations-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.my-compensations-line {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.45rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.my-compensations-line__main {
    flex: 1 1 14rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.my-compensations-line__shift {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.55rem;
}

.my-compensations-line__shift strong {
    font-size: 0.98rem;
}

.my-compensations-line__rule {
    color: #334155;
    font-size: 0.92rem;
}

.my-compensations-line__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin-top: 0.15rem;
    font-size: 0.82rem;
    color: #64748b;
}

.my-compensations-line__amount {
    flex: 0 0 auto;
    text-align: right;
    line-height: 1.15;
}

.my-compensations-line__chf {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #065f46;
}

.my-compensations-line__currency {
    font-size: 0.75rem;
    font-weight: 600;
    color: #047857;
    letter-spacing: 0.02em;
}

.my-compensations-empty {
    margin-top: 1rem;
    text-align: center;
    padding: 2rem 1.25rem;
    border: 1px dashed #cbd5e1;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.my-compensations-empty__mark {
    width: 2.75rem;
    height: 2.75rem;
    margin: 0 auto 0.85rem;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    position: relative;
}

.my-compensations-empty__mark::after {
    content: "";
    position: absolute;
    inset: 0.7rem;
    border-radius: 0.2rem;
    border: 2px solid #10b981;
    border-top-color: transparent;
    border-left-color: transparent;
    transform: rotate(45deg) translate(-1px, -2px);
}

.my-compensations-empty__title {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
}

.my-compensations-empty__hint {
    margin: 0 auto;
    max-width: 28rem;
}

@media (max-width: 640px) {
    .my-compensations-summary {
        flex-basis: 100%;
    }

    .my-compensations-line__amount {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 0.35rem;
    }

    .my-compensations-line__chf {
        display: inline;
        font-size: 1.05rem;
    }
}

.compensation-event-block {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fafafa;
    padding: 0.65rem 0.85rem 0.75rem;
    margin-top: 0.65rem;
}

.compensation-event-block:first-of-type {
    margin-top: 0;
}

.compensation-event-block__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.85rem;
    cursor: pointer;
    list-style: none;
}

.compensation-event-block__summary::-webkit-details-marker {
    display: none;
}

.compensation-event-block__summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 0.35rem;
    color: #64748b;
    transition: transform 0.15s ease;
    flex: 0 0 auto;
}

.compensation-event-block[open] > .compensation-event-block__summary::before {
    transform: rotate(90deg);
}

.compensation-event-block__summary-main {
    flex: 1 1 12rem;
    min-width: 0;
}

.compensation-event-block__body {
    margin-top: 0.55rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.compensation-event-block__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.85rem;
    margin-bottom: 0.5rem;
}

.compensation-event-block__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.compensation-event-block__meta {
    margin: 0.15rem 0 0;
    color: #6b7280;
    font-size: 0.85rem;
}

.compensation-event-block__totals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    font-size: 0.88rem;
    color: #374151;
}

.compensation-total-pill {
    display: inline-flex;
    flex-direction: column;
    gap: 0.05rem;
    padding: 0.25rem 0.55rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.4rem;
    background: #f9fafb;
    line-height: 1.25;
    min-width: 5.5rem;
}

a.compensation-total-pill--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-color: #cbd5e1;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

a.compensation-total-pill--link:hover,
a.compensation-total-pill--link:focus-visible {
    border-color: #0d9488;
    background: #f0fdfa;
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.25);
    outline: none;
}

a.compensation-total-pill--link .compensation-total-pill__label {
    color: #0f766e;
}

.compensation-total-pill__label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #6b7280;
}

.compensation-total-pill strong {
    font-variant-numeric: tabular-nums;
    color: #111827;
}

.compensation-margin--gain {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.compensation-margin--gain .compensation-total-pill__label,
.compensation-margin--gain strong {
    color: #047857;
}

.compensation-margin--loss {
    background: #fef2f2;
    border-color: #fecaca;
}

.compensation-margin--loss .compensation-total-pill__label,
.compensation-margin--loss strong {
    color: #b91c1c;
}

.compensation-margin--even {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.compensation-event-block__totals form {
    margin: 0;
}

.compensation-event-block__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
}

.compensation-event-block__subtitle {
    margin: 0.65rem 0 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
}

.compensation-event-block__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    margin-top: 0.55rem;
}

.compensation-event-block__actions--secondary {
    margin-top: 0.4rem;
    margin-bottom: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px dashed #e5e7eb;
}

.compensation-event-block--finalized {
    background: #f9fafb;
    border-style: solid;
    border-color: #d1d5db;
}

.compensation-event-state {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid transparent;
    white-space: nowrap;
}

.compensation-event-state--open {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.compensation-event-state--finalized {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #d1d5db;
}

.compensation-event-state--booked {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.compensation-event-state--partial-booked {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.compensation-event-state--not-booked {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.compensation-bank-payment {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    line-height: 1.25;
    white-space: normal;
    max-width: 100%;
}

.compensation-bank-payment--ready {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.compensation-bank-payment--blocked {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.compensation-bank-payment__iban {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
}

.compensation-payout-cell {
    vertical-align: top;
}

.compensation-payout-cell__value {
    display: block;
    font-size: 0.8rem;
    line-height: 1.35;
    word-break: break-word;
}

.compensation-payout-cell--iban .compensation-payout-cell__value {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    white-space: normal;
    overflow-wrap: break-word;
}

.compensation-payout-cell__empty {
    display: inline-block;
    min-width: 0.75rem;
    text-align: center;
    color: #9ca3af;
}

.compensation-bank-payment-summary {
    margin: 0.35rem 0 0;
    max-width: 22rem;
}

.compensation-table {
    width: 100%;
    background: #fff;
    font-size: 0.9rem;
}

.compensation-table th,
.compensation-table td {
    vertical-align: top;
    padding: 0.45rem 0.55rem;
}

/* Cashier payout table: rem columns + horizontal scroll (same idea as incoming-docs). */
.compensation-table-scroll {
    width: 100%;
    max-width: 100%;
}

.compensation-table-scroll--cashier {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

table.data-table.compensation-table--cashier {
    table-layout: fixed;
    width: 92rem;
    min-width: 92rem;
    max-width: none;
    border-collapse: collapse;
}

table.data-table.compensation-table--cashier th,
table.data-table.compensation-table--cashier td {
    text-align: left;
    vertical-align: top;
    overflow-wrap: break-word;
    word-break: break-word;
    /* Stop header/body text bleeding into the next column. */
    overflow: hidden;
}

table.data-table.compensation-table--cashier thead th {
    font-weight: 600;
    white-space: normal;
    line-height: 1.25;
    hyphens: auto;
}

table.data-table.compensation-table--cashier .compensation-table__num {
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
}

table.data-table.compensation-table--cashier col.compensation-col--member { width: 9rem; }
table.data-table.compensation-table--cashier col.compensation-col--shift { width: 10rem; }
table.data-table.compensation-table--cashier col.compensation-col--rule { width: 11rem; }
table.data-table.compensation-table--cashier col.compensation-col--hours { width: 4.5rem; }
table.data-table.compensation-table--cashier col.compensation-col--amount { width: 6.5rem; }
table.data-table.compensation-table--cashier col.compensation-col--status { width: 6.5rem; }
table.data-table.compensation-table--cashier col.compensation-col--iban { width: 11rem; }
table.data-table.compensation-table--cashier col.compensation-col--address { width: 11rem; }
/* Wide enough for DE “Bankzahlung” / “Bereit für Bankdatei”. */
table.data-table.compensation-table--cashier col.compensation-col--bank { width: 9.5rem; }
/* Wide enough for DE “Als bezahlt markieren”. */
table.data-table.compensation-table--cashier col.compensation-col--actions { width: 11.5rem; }

.compensation-member-cell,
.compensation-rule-cell {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.compensation-status-cell {
    white-space: nowrap;
}

.compensation-bank-payment-cell {
    vertical-align: top;
}

.compensation-table__num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.compensation-table__amount {
    font-weight: 600;
}

.compensation-table__actions {
    white-space: nowrap;
}

table.data-table.compensation-table--cashier .compensation-table__bank,
table.data-table.compensation-table--cashier .compensation-table__actions,
table.data-table.compensation-table--cashier .compensation-bank-payment-cell,
table.data-table.compensation-table--cashier .compensation-cashier-actions {
    white-space: normal;
    overflow: hidden;
}

table.data-table.compensation-table--cashier .compensation-bank-payment,
table.data-table.compensation-table--cashier .compensation-action-btn {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    text-align: left;
    box-sizing: border-box;
}

.compensation-shift-cell {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.3;
    min-width: 0;
}

.compensation-shift-cell__name {
    font-size: 0.88rem;
    font-weight: 600;
}

.compensation-shift-cell__when {
    color: #4b5563;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.compensation-rule-select {
    min-width: 12rem;
    max-width: 100%;
}

.compensation-line-edit-form {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
    margin: 0;
    max-width: 100%;
}

.compensation-line-edit-form--role {
    width: 100%;
}

.compensation-line-edit-form--amount {
    justify-content: flex-end;
}

.compensation-amount-prefix {
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 500;
}

.compensation-amount-input {
    width: 4.75rem;
    padding: 0.28rem 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 0.35rem;
    text-align: right;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    background: #fff;
}

.compensation-amount-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.compensation-role-select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 0.28rem 0.45rem;
    border: 1px solid #d1d5db;
    border-radius: 0.35rem;
    font-size: 0.85rem;
    line-height: 1.3;
    background: #fff;
    color: #111827;
}

.compensation-role-select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.compensation-line-save-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: 1px solid #86efac;
    border-radius: 0.35rem;
    background: #ecfdf5;
    color: #15803d;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.compensation-line-save-btn:hover {
    background: #d1fae5;
    border-color: #4ade80;
}

.compensation-rule-roles--active {
    padding: 0.75rem;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    border-radius: 6px;
}

.compensation-status {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid transparent;
    white-space: nowrap;
}

.compensation-status--calculated,
.compensation-status--draft {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.compensation-status--pending_review {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.compensation-status--approved {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.compensation-status--rejected,
.compensation-status--cancelled {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.compensation-status--paid {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.compensation-page__actions {
    margin: 0.4rem 0 0;
}

.compensation-cashier-actions {
    vertical-align: middle;
}

.compensation-cashier-actions__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.compensation-cashier-actions__row .compensation-action-btn {
    text-decoration: none;
}

.compensation-inline-form {
    display: inline;
    margin: 0;
}

.compensation-action-btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1.15;
    border-radius: 0.3rem;
}

/* Manager Accept / Deny: side-by-side pill pair */
.compensation-manager-actions {
    vertical-align: middle;
    white-space: nowrap;
}

.compensation-review-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 0.45rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.compensation-review-actions .compensation-inline-form {
    display: flex;
    margin: 0;
}

.compensation-review-btn {
    appearance: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0.35rem 0.7rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.compensation-review-btn--accept {
    background: #ecfdf5;
    color: #047857;
}

.compensation-review-btn--accept:hover,
.compensation-review-btn--accept:focus-visible {
    background: #d1fae5;
    color: #065f46;
    outline: none;
}

.compensation-review-btn--deny {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 1px solid #e5e7eb;
}

.compensation-review-btn--deny:hover,
.compensation-review-btn--deny:focus-visible {
    background: #fee2e2;
    color: #991b1b;
    outline: none;
}

.compensation-review-actions .compensation-inline-form:only-child .compensation-review-btn--deny {
    border-left: 0;
}

.compensation-event-block__actions .accounting-icon-btn,
.compensation-event-block__totals .accounting-icon-btn,
.compensation-page__actions .accounting-icon-btn {
    margin: 0;
    padding: 0.22rem 0.5rem;
    font-size: 0.78rem;
}

.compensation-reject-reason {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    max-width: 12rem;
}

@media (max-width: 720px) {
    .compensation-event-block__totals {
        width: 100%;
        justify-content: flex-start;
    }

    .compensation-rule-select {
        min-width: 0;
        width: 100%;
    }

    .compensation-cashier-actions,
    .compensation-table__actions {
        white-space: normal;
    }

    .compensation-cashier-actions__row {
        flex-wrap: wrap;
    }
}


.accounting-list-report-page__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.accounting-list-report-page__exports {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.accounting-list-report-hero {
    border: 1px solid #dbe7dd;
    background: linear-gradient(180deg, #f4fbf6 0%, #ffffff 42%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.accounting-list-report-hero__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem 1.25rem;
}

.accounting-list-report-hero__text {
    flex: 1 1 16rem;
    min-width: 0;
}

.accounting-list-report-hero__eyebrow {
    margin: 0 0 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #15803d;
}

.accounting-list-report-hero .app-page-title {
    margin: 0;
}

.accounting-list-report-hero__lede .hint {
    margin: 0.45rem 0 0;
    max-width: 42rem;
    line-height: 1.5;
    color: #4b5563;
}

.accounting-list-report-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    border-radius: 0.4rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
}

.accounting-list-report-export:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.accounting-list-report-export--primary {
    border-color: #86efac;
    background: #ecfdf5;
    color: #166534;
}

.accounting-list-report-export--primary:hover {
    background: #d1fae5;
    border-color: #4ade80;
}

.accounting-list-report-summary {
    margin-top: 1rem;
}

.accounting-list-report-summary__total {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.accounting-list-report-summary__total .accounting-report-summary-cards__label {
    color: #047857;
}

.accounting-list-report-summary__total .accounting-report-summary-cards__value {
    color: #065f46;
}

.accounting-list-report-summary__period {
    border: 1px solid #dbeafe;
    background: #eff6ff;
}

.accounting-list-report-summary__period .accounting-report-summary-cards__label {
    color: #1d4ed8;
}

.accounting-list-report-summary__period-value {
    font-size: 0.85rem !important;
    white-space: normal !important;
}

.accounting-list-report-filters {
    margin-top: 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.55rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.accounting-list-report-filters .app-filter-row {
    margin: 0;
}

.accounting-list-report-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    min-height: 2.1rem;
    color: #334155;
    font-size: 0.9rem;
}

.accounting-list-report-presets {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 0.75rem;
    padding: 0.2rem;
    border-radius: 0.5rem;
    background: #e2e8f0;
}

.accounting-list-report-preset {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 0.35rem;
    color: #334155;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.accounting-list-report-preset:hover {
    background: rgba(255, 255, 255, 0.55);
}

.accounting-list-report-preset.is-active {
    background: #fff;
    color: #14532d;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.accounting-list-report-results {
    margin-top: 1rem;
}

.accounting-list-report-table thead th {
    background: #f1f5f9;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
}

.accounting-list-report-table tbody tr:hover {
    background: #f8fafc;
}

.accounting-list-report-table__row--muted {
    color: #94a3b8;
}

.accounting-list-report-table tfoot td {
    border-top: 1px solid #cbd5e1;
    padding-top: 0.65rem;
    background: #f8fafc;
}

.accounting-list-report-ref {
    font-weight: 600;
    text-decoration: none;
}

.accounting-list-report-ref:hover {
    text-decoration: underline;
}

.accounting-list-report-code {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 0.3rem;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

.accounting-list-report-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.list-report-status {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.3;
    border: 1px solid transparent;
    white-space: nowrap;
}

.list-report-status--draft,
.list-report-status--submitted,
.list-report-status--calculated,
.list-report-status--pending_review {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.list-report-status--sent,
.list-report-status--accepted,
.list-report-status--approved {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.list-report-status--overdue,
.list-report-status--rejected,
.list-report-status--cancelled {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.list-report-status--paid,
.list-report-status--booked {
    background: #f0fdf4;
    color: #166534;
    border-color: #86efac;
}

.accounting-list-report-empty {
    text-align: center;
    padding: 2rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.55rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.accounting-list-report-empty__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
}

.accounting-list-report-empty .hint {
    margin: 0 auto;
    max-width: 28rem;
}

.accounting-list-report-inline-list {
    margin: 0;
    padding-left: 1.1rem;
}

.accounting-list-report-inline-list li + li {
    margin-top: 0.25rem;
}

.counterparty-report-results__count {
    margin: 0 0 0.75rem;
}

.counterparty-report-list {
    grid-template-columns: repeat(auto-fill, minmax(18.5rem, 1fr));
}

.counterparty-directory-card__name a {
    color: inherit;
    text-decoration: none;
}

.counterparty-directory-card__name a:hover {
    text-decoration: underline;
}

.counterparty-report-card__dl {
    margin-top: 0.65rem;
}

.counterparty-report-card__notes {
    white-space: normal;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

/* Long notes / contact chips: label above content so text never bleeds into the next card. */
.counterparty-report-card__dl .counterparty-report-notes-dt,
.counterparty-report-card__dl .counterparty-report-notes-dd,
.counterparty-report-card__dl .counterparty-report-contacts-dt,
.counterparty-report-card__dl .counterparty-report-contacts-dd {
    grid-column: 1 / -1;
}

.counterparty-report-card__dl .counterparty-report-notes-dt,
.counterparty-report-card__dl .counterparty-report-contacts-dt {
    padding-top: 0.45rem;
}

.counterparty-report-contacts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.counterparty-report-contacts li {
    padding: 0.4rem 0.55rem;
    border-radius: 0.35rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.35;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.invoice-report-summary .accounting-report-summary-cards__value {
    font-size: clamp(0.7rem, 0.95vw + 0.4rem, 0.98rem);
}

.invoice-report-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 0.85rem;
}

.invoice-report-list-head__title {
    margin: 0;
    font-size: 1.05rem;
}

.invoice-report-list-head .hint {
    margin: 0;
}

.invoice-report-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.invoice-report-card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.6rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    border-left: 4px solid #94a3b8;
}

.invoice-report-card--draft {
    border-left-color: #94a3b8;
}

.invoice-report-card--sent {
    border-left-color: #3b82f6;
}

.invoice-report-card--overdue {
    border-left-color: #ef4444;
    background: #fffbfb;
}

.invoice-report-card--paid {
    border-left-color: #22c55e;
}

.invoice-report-card--cancelled {
    border-left-color: #f59e0b;
    opacity: 0.9;
}

.invoice-report-card--submitted {
    border-left-color: #64748b;
}

.invoice-report-card--accepted {
    border-left-color: #3b82f6;
}

.invoice-report-card--booked {
    border-left-color: #22c55e;
}

.invoice-report-card--rejected {
    border-left-color: #ef4444;
    background: #fffbfb;
}

.invoice-report-card--rejected .invoice-report-card__chf {
    color: #b91c1c;
}

.invoice-report-card--calculated {
    border-left-color: #64748b;
}

.invoice-report-card--approved {
    border-left-color: #3b82f6;
}

.invoice-report-card--pending_review {
    border-left-color: #f59e0b;
}

.invoice-report-card__main {
    flex: 1 1 14rem;
    min-width: 0;
}

.invoice-report-card__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
}

.invoice-report-card__ref {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    word-break: break-word;
}

.invoice-report-card__ref:hover {
    text-decoration: underline;
    color: #166534;
}

.invoice-report-card__debtor {
    margin: 0.35rem 0 0;
    font-size: 0.98rem;
    color: #1e293b;
}

.invoice-report-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.85rem;
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: #64748b;
}

.invoice-report-card__amount {
    flex: 0 0 auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    min-width: 6.5rem;
}

.invoice-report-card__chf {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #065f46;
    line-height: 1.1;
}

.invoice-report-card--overdue .invoice-report-card__chf {
    color: #b91c1c;
}

.invoice-report-card__currency {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.03em;
}

.invoice-report-card__open {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #166534;
    text-decoration: none;
}

.invoice-report-card__open:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .invoice-report-card__amount {
        width: 100%;
        flex-direction: row;
        align-items: baseline;
        justify-content: flex-start;
        gap: 0.4rem;
        text-align: left;
    }

    .invoice-report-card__open {
        margin-top: 0;
        margin-left: auto;
    }
}

@media print {
    .accounting-list-report-page .header,
    .accounting-list-report-page .sidebar-column,
    .accounting-list-report-page .site-footer,
    .accounting-list-report-page .dashboard-sidebar-expand-tab,
    .accounting-list-report-page .app-filter-row,
    .accounting-list-report-page .accounting-list-report-presets,
    .accounting-list-report-page .accounting-list-report-page__exports,
    .accounting-list-report-page .accounting-list-report-filters {
        display: none !important;
    }

    .accounting-list-report-page .content {
        display: block;
    }

    .accounting-list-report-page .events-panel {
        width: 100%;
        max-width: none;
    }
}

/* Federation membership (Verbände Phase 1) */
.federation-page__intro {
    margin-bottom: 0;
}

.federation-page__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1.25rem;
}

.federation-page__title-row .app-page-title {
    margin: 0;
}

.federation-page__settings-link {
    flex-shrink: 0;
}

.federation-page__lede {
    margin: 0.55rem 0 0;
    max-width: 52rem;
    color: #4b5563;
    line-height: 1.5;
    font-size: 0.95rem;
}

.federation-page__messages {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.federation-page__section {
    margin-top: 0.95rem;
}

.federation-page__section-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 650;
    color: #0f172a;
}

.federation-page__section-hint {
    margin: 0 0 0.85rem;
    max-width: 42rem;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.federation-apply-form,
.federation-rep-form,
.federation-policy-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    max-width: 36rem;
}

.federation-apply-form--inline {
    max-width: 40rem;
}

@media (min-width: 640px) {
    .federation-apply-form--inline {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.75rem 1rem;
        align-items: end;
    }

    .federation-apply-form--inline .federation-apply-form__field {
        margin: 0;
    }

    .federation-apply-form--inline .federation-apply-form__actions {
        padding-bottom: 0.05rem;
    }
}

.federation-page__section--compact .federation-page__section-title {
    margin-bottom: 0.55rem;
}

.federation-apply-form .app-filter-field input,
.federation-rep-form .app-filter-field select,
.federation-policy-form .app-filter-field select,
.federation-rep-form--compact select,
.federation-policy-form--compact select {
    width: 100%;
    max-width: none;
}

.federation-membership-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.federation-membership-list--cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 900px) {
    .federation-membership-list--cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.federation-membership-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.federation-membership-card--compact {
    display: flex;
    flex-direction: column;
}

.federation-membership-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.65rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-bottom: 1px solid #eef2f7;
}

.federation-membership-card__identity {
    min-width: 0;
    flex: 1 1 10rem;
}

.federation-membership-card__name {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 650;
    color: #0f172a;
    line-height: 1.25;
}

.federation-membership-card__meta {
    margin: 0.1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.3rem;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.3;
}

.federation-membership-card__meta code {
    font-size: 0.84em;
}

.federation-membership-card__meta-sep {
    color: #cbd5e1;
}

.federation-membership-card__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.federation-membership-card__toolbar--wrap {
    margin-top: auto;
    border-bottom: none;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
    gap: 0.35rem 0.5rem;
}

.federation-membership-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.65rem;
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.federation-membership-card__stat {
    min-width: 0;
}

.federation-membership-card__stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.15rem;
}

.federation-membership-card__stat-value {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.35;
    word-break: break-word;
}

.federation-membership-card__token {
    margin: 0;
    padding: 0.3rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.78rem;
}

.federation-membership-card__wait {
    flex: 1 1 12rem;
    margin: 0;
    line-height: 1.35;
}

.federation-rep-form--compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 0.45rem;
    align-items: center;
    max-width: none;
    margin: 0;
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.federation-rep-form--compact select {
    min-width: 0;
    font-size: 0.85rem;
    padding-block: 0.3rem;
}

.federation-membership-card__details {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f1f5f9;
}

.federation-membership-card__details:not([open]) {
    border-bottom: none;
}

.federation-membership-card__details > summary {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.78rem;
    font-weight: 650;
    color: #475569;
    user-select: none;
    line-height: 1.25;
}

.federation-membership-card__details > summary::-webkit-details-marker {
    display: none;
}

.federation-membership-card__details > summary::before {
    content: "▸";
    display: inline-block;
    flex: 0 0 auto;
    margin-right: 0;
    color: #94a3b8;
    transition: transform 0.12s ease;
}

.federation-membership-card__details[open] > summary::before {
    transform: rotate(90deg);
}

.federation-membership-card__details > summary > span:first-of-type {
    flex: 0 0 auto;
}

.federation-membership-card__summary-meta {
    font-weight: 500;
    font-size: 0.74rem;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.federation-membership-card__details .federation-policy-form--compact {
    padding: 0 0.75rem 0.65rem;
    max-width: none;
    gap: 0.5rem;
}

.federation-membership-card__block {
    padding: 0.9rem 1.1rem;
    border-top: 1px solid #f1f5f9;
}

.federation-membership-card__block:first-of-type,
.federation-membership-card__head + .federation-membership-card__block {
    border-top: none;
}

.federation-membership-card__block-title {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.federation-membership-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.9rem;
}

.federation-policy-form__title {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
}

.federation-policy-form__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

@media (min-width: 520px) {
    .federation-policy-form__grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem 0.65rem;
    }
}

.federation-policy-form__hint {
    margin: 0;
    font-size: 0.8rem;
}

.federation-policy-fields {
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    margin: 0;
    padding: 0.45rem 0.7rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.federation-policy-fields legend {
    padding: 0 0.2rem;
    font-size: 0.85rem;
    color: #334155;
}

.federation-policy-fields__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.28rem 0.75rem;
}

@media (min-width: 520px) {
    .federation-policy-fields__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.federation-share-member-list {
    list-style: none;
    margin: 0.45rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.federation-share-member {
    padding: 0.65rem 0.75rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #f8fafc;
}

.federation-share-member__head {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    margin: 0 0 0.5rem;
}

.federation-share-member__salutation {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: #64748b;
}

.federation-share-member__name {
    display: block;
    font-size: 0.95rem;
    font-weight: 650;
    color: #0f172a;
    line-height: 1.25;
}

.federation-share-member__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem 0.85rem;
    margin: 0;
}

@media (min-width: 520px) {
    .federation-share-member__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.federation-share-member__item {
    min-width: 0;
    margin: 0;
}

.federation-share-member__item--wide {
    grid-column: 1 / -1;
}

.federation-share-member__item dt {
    display: block;
    margin: 0 0 0.12rem;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #94a3b8;
}

.federation-share-member__item dd {
    margin: 0;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.35;
    word-break: break-word;
}

.federation-share-member__item a {
    color: inherit;
    text-decoration: none;
}

.federation-share-member__item a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.federation-share-member__address {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.federation-share-qual-list {
    list-style: none;
    margin: 0.45rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.federation-share-qual {
    padding: 0.65rem 0.75rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #f8fafc;
}

.federation-share-qual__name {
    display: block;
    font-size: 0.95rem;
    font-weight: 650;
    color: #0f172a;
    line-height: 1.25;
}

.federation-share-qual__chips {
    list-style: none;
    margin-top: 0.45rem;
    padding: 0;
}

.federation-share-qual__chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.08rem;
    min-width: 7.25rem;
    padding: 0.4rem 0.55rem;
}

.federation-share-qual__title {
    font-size: 0.85rem;
    font-weight: 650;
    line-height: 1.25;
}

.federation-share-qual__meta,
.federation-share-qual__status {
    font-size: 0.75rem;
    line-height: 1.25;
}

.federation-share-qual__status {
    font-weight: 650;
}

.federation-share-attendance {
    margin: 0.45rem 0 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #f8fafc;
    overflow: hidden;
}

.federation-share-attendance__head,
.federation-share-attendance__row {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr) 3.25rem;
    gap: 0.45rem 0.65rem;
    align-items: baseline;
}

.federation-share-attendance__head {
    padding: 0.4rem 0.7rem 0.35rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #94a3b8;
}

.federation-share-attendance__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.federation-share-attendance__row {
    padding: 0.42rem 0.7rem;
    border-bottom: 1px solid #eef2f7;
    font-size: 0.88rem;
    color: #334155;
}

.federation-share-attendance__row:last-child {
    border-bottom: 0;
}

.federation-share-attendance__date {
    color: #64748b;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.federation-share-attendance__title {
    font-weight: 600;
    color: #0f172a;
    min-width: 0;
    overflow-wrap: anywhere;
}

.federation-share-attendance__count {
    justify-self: end;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    color: #0f172a;
}

@media (max-width: 520px) {
    .federation-share-attendance__head,
    .federation-share-attendance__row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "title count"
            "date count";
        gap: 0.08rem 0.65rem;
    }

    .federation-share-attendance__head {
        display: none;
    }

    .federation-share-attendance__date {
        grid-area: date;
        font-size: 0.75rem;
    }

    .federation-share-attendance__title {
        grid-area: title;
    }

    .federation-share-attendance__count {
        grid-area: count;
        align-self: center;
    }
}

.federation-audit-list,
.federation-share-detail-list {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #334155;
}

.federation-audit-list__item {
    display: grid;
    grid-template-columns: minmax(7rem, auto) minmax(5rem, 8rem) 1fr;
    gap: 0.35rem 0.65rem;
    align-items: baseline;
}

.federation-audit-list__when,
.federation-audit-list__who {
    color: #64748b;
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .federation-audit-list__item {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }
}

.federation-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #334155;
}

.federation-membership-card__footer {
    padding: 0.3rem 0.75rem 0.4rem;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.federation-leave-form {
    margin: 0;
}

.federation-page__empty {
    margin-top: 0.35rem;
    padding: 0.85rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.federation-page__empty-title {
    margin: 0 0 0.25rem;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.federation-page__empty .hint {
    margin: 0;
}

.federation-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.35;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    white-space: nowrap;
}

.federation-status-badge--active {
    color: #145323;
    background: #eaf8ee;
    border-color: #8bcf9a;
}

.federation-status-badge--pending,
.federation-status-badge--invited {
    color: #92400e;
    background: #fffbeb;
    border-color: #fcd34d;
}

.federation-status-badge--pending_representative {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.federation-status-badge--rejected,
.federation-status-badge--left {
    color: #64748b;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.federation-status-badge--suspended {
    color: #9a3412;
    background: #fff7ed;
    border-color: #fdba74;
}

.mic-audience-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.85rem;
    padding: 0.25rem;
    border-radius: 0.5rem;
    background: #f1f5f9;
}

.mic-audience-switch__link {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.4rem 0.65rem;
    border-radius: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
}

.mic-audience-switch__link:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.mic-audience-switch__link.is-active {
    color: #0f172a;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.mic-federation-audience {
    margin: 0 0 0.75rem;
}

.mic-federation-audience__fieldset {
    margin: 0;
    padding: 0.55rem 0.7rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mic-federation-audience__fieldset legend {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    padding: 0 0.25rem;
}

.mic-federation-audience__option {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #334155;
    cursor: pointer;
}

.mic-representative-hint {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e40af;
}

.federation-mic-club-item__label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.federation-mic-club-item__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.federation-mic-club-item__club {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.55rem;
}

.federation-mic-club-item__audience,
.federation-mic-club-item__detail {
    display: block;
    line-height: 1.35;
}

.badge-federation {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    vertical-align: middle;
}

.event-card--federation {
    border-left: 4px solid #3b82f6;
}

.dashboard-calendar-fed-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.9rem;
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.7rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

.dashboard-calendar-fed-filter__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.dashboard-calendar-fed-filter__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0f172a;
    cursor: pointer;
}

.dashboard-calendar-fed-filter__item--own {
    cursor: default;
    color: #64748b;
}

.dashboard-calendar-fed-filter__apply {
    margin-left: auto;
}



