* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f6f8;
    color: #20252b;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 10px 35px rgba(0,0,0,.10);
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 35px;
}

.brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #263238;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.brand h1 {
    margin: 0;
    font-size: 22px;
}

.brand p {
    margin: 4px 0 0;
    color: #6d747b;
}

label {
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd1d6;
    border-radius: 7px;
    font-size: 16px;
}

button {
    width: 100%;
    margin-top: 24px;
    padding: 12px;
    border: 0;
    border-radius: 7px;
    background: #263238;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.error {
    background: #fbeaea;
    border: 1px solid #e5b4b4;
    padding: 12px;
    border-radius: 7px;
    margin-bottom: 20px;
}

.topbar {
    min-height: 64px;
    background: #263238;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.topbar strong {
    margin-right: 20px;
}

.topbar span {
    opacity: .85;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 18px;
}

.user-area form {
    margin: 0;
}

.logout {
    width: auto;
    margin: 0;
    padding: 8px 13px;
    background: #455a64;
}

.container {
    max-width: 1200px;
    margin: 35px auto;
    padding: 0 20px;
}

.container h1 {
    margin-bottom: 2px;
}

.subtitle {
    margin-top: 0;
    color: #727b83;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 30px;
}

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

.card span {
    display: block;
    color: #697178;
    margin-bottom: 8px;
}

.card strong {
    font-size: 25px;
}

.panel {
    margin-top: 25px;
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

@media (max-width: 800px) {
    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .topbar {
        padding: 12px 18px;
    }
}

@media (max-width: 500px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    color: #d5dde1;
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 6px;
}

.main-nav a:hover,
.main-nav a.active {
    background: #455a64;
    color: white;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.button-link {
    display: inline-block;
    background: #263238;
    color: white;
    text-decoration: none;
    padding: 11px 16px;
    border-radius: 7px;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 25px;
}

.account-card {
    background: white;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.account-card h2 {
    margin: 5px 0 0;
    font-size: 20px;
}

.account-type {
    color: #778088;
    font-size: 14px;
}

.account-balance {
    margin-top: 30px;
    font-size: 28px;
    font-weight: 700;
}

.account-meta {
    margin-top: 10px;
    color: #727b83;
}

.status {
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 12px;
}

.status-active {
    background: #e5f4ea;
    color: #277443;
}

.status-inactive {
    background: #eeeeee;
    color: #666666;
}

.empty-state {
    text-align: center;
    padding: 50px 25px;
}

.empty-state .button-link {
    margin-top: 15px;
}

.form-container {
    max-width: 700px;
}

.back-link {
    color: #526169;
    text-decoration: none;
}

.data-form {
    margin-top: 25px;
    background: white;
    padding: 28px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.data-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd1d6;
    border-radius: 7px;
    font-size: 16px;
    background: white;
}

.money-input {
    position: relative;
}

.money-input input {
    padding-right: 45px;
}

.money-input span {
    position: absolute;
    right: 15px;
    top: 12px;
    color: #68737a;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-actions button {
    width: auto;
    margin: 0;
    padding-left: 22px;
    padding-right: 22px;
}

.secondary-button {
    padding: 12px 18px;
    text-decoration: none;
    color: #35434a;
    border: 1px solid #cbd1d6;
    border-radius: 7px;
}

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

    .main-nav {
        display: none;
    }
}

@media (max-width: 600px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

.account-actions {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #edf0f2;
}

.account-edit-button {
    display: inline-block;
    text-decoration: none;
    color: #263238;
    border: 1px solid #cbd1d6;
    padding: 8px 13px;
    border-radius: 6px;
    font-weight: 600;
}

.account-edit-button:hover {
    background: #f1f4f5;
}

.locked-field {
    border: 1px solid #d6dce0;
    background: #f6f8f9;
    border-radius: 7px;
    padding: 14px 15px;
}

.locked-field strong {
    font-size: 18px;
}

.locked-field p {
    margin: 7px 0 0;
    color: #68737a;
    font-size: 14px;
}

.category-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 25px;
}

.category-panel {
    background: white;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.category-panel h2 {
    margin-top: 0;
    margin-bottom: 22px;
}

.category-group {
    border-top: 1px solid #edf0f2;
    padding: 16px 0;
}

.category-group:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.category-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.category-main strong {
    font-size: 17px;
}

.category-children {
    margin-top: 10px;
    margin-left: 18px;
    padding-left: 14px;
    border-left: 2px solid #edf0f2;
}

.category-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    color: #4f5960;
}

@media (max-width: 800px) {
    .category-columns {
        grid-template-columns: 1fr;
    }
}

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

.category-edit-button {
    text-decoration: none;
    color: #35434a;
    border: 1px solid #d4dadd;
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 13px;
    background: white;
}

.category-edit-button:hover {
    background: #f1f4f5;
}

.budget-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.budget-form {
    max-width: 420px;
    margin-top: 20px;
}

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

@media (max-width: 500px) {
    .budget-summary {
        grid-template-columns: 1fr;
    }
}

.transaction-list {
    margin-top: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    overflow: hidden;
}

.transaction-row {
    display: grid;
    grid-template-columns: 110px 1fr 160px;
    gap: 20px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #edf0f2;
}

.transaction-row:last-child {
    border-bottom: 0;
}

.transaction-date {
    color: #68737a;
    font-size: 14px;
}

.transaction-main strong {
    display: block;
    font-size: 16px;
}

.transaction-details {
    margin-top: 5px;
    color: #68737a;
    font-size: 14px;
}

.transaction-description {
    margin-top: 5px;
    color: #7a848a;
    font-size: 13px;
}

.transaction-right {
    text-align: right;
}

.transaction-amount {
    font-size: 18px;
    font-weight: 700;
}

.amount-income {
    color: #267346;
}

.amount-expense {
    color: #9b3030;
}

.amount-transfer {
    color: #455a64;
}

.transaction-status {
    margin-top: 5px;
    color: #7a848a;
    font-size: 12px;
}

.disabled-button {
    opacity: .55;
    pointer-events: none;
}

@media (max-width: 700px) {

    .transaction-row {
        grid-template-columns: 1fr auto;
        gap: 8px 15px;
    }

    .transaction-date {
        grid-column: 1 / -1;
    }
}

.data-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd1d6;
    border-radius: 7px;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
}

.form-hint {
    margin: 6px 0 0;
    color: #7a848a;
    font-size: 13px;
}

.data-form button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.receipt-link {
    color: #415a66;
    text-decoration: none;
    font-weight: 600;
}

.receipt-link:hover {
    text-decoration: underline;
}

.transaction-actions {
    margin-top: 8px;
}

.transaction-edit-link {
    display: inline-block;
    color: #415a66;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.transaction-edit-link:hover {
    text-decoration: underline;
}

.dashboard-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.dashboard-heading h1 {
    margin-bottom: 5px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 22px;
}

.dashboard-panel {
    margin: 0;
}

.dashboard-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-panel-header h2 {
    margin: 0;
}

.dashboard-panel-header a {
    color: #415a66;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

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

.dashboard-account-list,
.dashboard-list {
    display: flex;
    flex-direction: column;
}

.dashboard-account-row,
.dashboard-list-row,
.dashboard-transaction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f2;
}

.dashboard-account-row:last-child,
.dashboard-list-row:last-child,
.dashboard-transaction-row:last-child {
    border-bottom: 0;
}

.dashboard-transaction-row {
    color: inherit;
    text-decoration: none;
}

.dashboard-transaction-row:hover {
    background: #f8f9fa;
}

.dashboard-muted {
    margin-top: 4px;
    color: #758087;
    font-size: 13px;
    font-weight: 400;
}

.dashboard-budget-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.dashboard-budget-grid div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dashboard-budget-grid span {
    color: #68737a;
    font-size: 13px;
}

.dashboard-budget-grid strong {
    font-size: 18px;
}

.dashboard-progress {
    display: block;
    width: 100%;
    height: 10px;
    margin-top: 22px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #e5e9eb;
    appearance: none;
    -webkit-appearance: none;
}

.dashboard-progress::-webkit-progress-bar {
    background: #e5e9eb;
    border-radius: 999px;
}

.dashboard-progress::-webkit-progress-value {
    background: #455f69;
    border-radius: 999px;
}

.dashboard-progress::-moz-progress-bar {
    background: #455f69;
    border-radius: 999px;
}

@media (max-width: 900px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 650px) {

    .dashboard-heading {
        flex-direction: column;
    }

    .dashboard-budget-grid {
        grid-template-columns: 1fr;
    }

}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.month-navigation strong {
    min-width: 150px;
    text-align: center;
    font-size: 17px;
}

.month-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #d5dadd;
    border-radius: 7px;
    background: white;
    color: #35434a;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
}

.month-button:hover {
    background: #eef1f2;
}

.month-current-link {
    margin-left: 5px;
    color: #415a66;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.month-current-link:hover {
    text-decoration: underline;
}

@media (max-width: 650px) {

    .month-navigation {
        flex-wrap: wrap;
    }

    .month-navigation strong {
        min-width: 120px;
    }

}

.user-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.user-list {
    display: flex;
    flex-direction: column;
}

.user-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    padding: 18px 0;
    border-bottom: 1px solid #e7ebed;
}

.user-list-row:last-child {
    border-bottom: 0;
}

.user-list-main {
    min-width: 0;
}

.user-list-name {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 17px;
    font-weight: 700;
}

.user-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    background: #edf1f2;
    font-size: 11px;
    font-weight: 700;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 9px;
    color: #68747a;
    font-size: 13px;
}

.form-divider {
    width: 100%;
    margin: 28px 0 18px;
    border: 0;
    border-top: 1px solid #e3e7e9;
}

@media (max-width: 700px) {

    .user-page-header,
    .user-list-row {
        flex-direction: column;
        align-items: stretch;
    }

}

/* ============================================================
   Benutzerverwaltung – Layoutkorrektur
   ============================================================ */

.user-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 32px;
    padding: 20px 24px;
    border-bottom: 1px solid #e7ebed;
}

.user-list-row:last-child {
    border-bottom: 0;
}

.user-list-main {
    min-width: 0;
}

.user-list-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 17px;
    font-weight: 700;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e9eef0;
    color: #45545b;
    font-size: 11px;
    font-weight: 700;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    margin-top: 10px;
    color: #68747a;
    font-size: 13px;
    line-height: 1.5;
}

.user-list-row > div:last-child {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: center;
}

.user-list-row .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    margin: 0;
}

@media (max-width: 700px) {

    .user-list-row {
        grid-template-columns: 1fr;
        row-gap: 18px;
    }

    .user-list-row > div:last-child {
        justify-content: flex-start;
    }
}

/* ============================================================
   Auswertungsfilter – Haushalt / Gemeinsam / Person
   ============================================================ */

.scope-filter-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 22px 0;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 10px;
    box-sizing: border-box;
}

.scope-filter-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.scope-filter-form label {
    align-self: center;
    margin: 0 4px 0 0;
    font-weight: 600;
}

.scope-filter-form select {
    min-width: 210px;
    height: 40px;
    margin: 0;
}

.scope-filter-form button {
    width: auto;
    min-width: 100px;
    height: 40px;
    margin: 0;
}

.scope-current {
    color: #68747a;
    font-size: 13px;
    white-space: nowrap;
}

.scope-current strong {
    color: #26373f;
}

.scope-reset-link {
    display: inline-flex;
    align-items: center;
    height: 40px;
    color: #415a66;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.scope-reset-link:hover {
    text-decoration: underline;
}

@media (max-width: 800px) {

    .scope-filter-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .scope-current {
        white-space: normal;
    }

}

.scope-filter-form input[type="number"] {
    width: 100px;
    height: 40px;
    margin: 0;
    box-sizing: border-box;
}

.transaction-month-navigation {
    margin: 0 0 18px 0;
}

/* ============================================================
   Auswertungen
   ============================================================ */

.reports-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.reports-year-navigation {
    margin: 0 0 20px 0;
}

.reports-panel {
    margin-top: 20px;
}

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

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

.reports-table th,
.reports-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #e7ebed;
    text-align: left;
    white-space: nowrap;
}

.reports-table thead th {
    color: #5f6b71;
    font-size: 13px;
    font-weight: 700;
}

.reports-table tbody tr:hover {
    background: #f7f9fa;
}

.reports-table tbody a {
    color: #26373f;
    font-weight: 600;
    text-decoration: none;
}

.reports-table tbody a:hover {
    text-decoration: underline;
}

.reports-table tfoot th {
    padding-top: 16px;
    border-bottom: 0;
    font-weight: 700;
}

.reports-number {
    text-align: right !important;
}

.reports-category-grid {
    align-items: start;
}

.reports-category-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reports-category-item {
    display: block;
}

.reports-category-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 7px;
}

.reports-category-heading span {
    font-weight: 700;
    white-space: nowrap;
}

.reports-category-bar {
    display: block;
    width: 100%;
    height: 8px;
    overflow: hidden;
    margin-bottom: 5px;
    border: 0;
    border-radius: 999px;
    background: #edf0f1;
    appearance: none;
    -webkit-appearance: none;
}

.reports-category-bar::-webkit-progress-bar {
    background: #edf0f1;
    border-radius: 999px;
}

.reports-category-bar::-webkit-progress-value {
    background: #607d8b;
    border-radius: 999px;
}

.reports-category-bar::-moz-progress-bar {
    background: #607d8b;
    border-radius: 999px;
}

@media (max-width: 800px) {

    .reports-table {
        min-width: 650px;
    }

}

/* === Abschnitt 43: Mobile Navigation === */

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

.mobile-nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 8px;
    background: #455a64;
    color: white;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus-visible {
    background: #546e7a;
}

.mobile-nav-toggle:focus-visible {
    outline: 3px solid rgba(255,255,255,.65);
    outline-offset: 2px;
}

.mobile-nav-toggle-icon {
    font-size: 25px;
    line-height: 1;
}

@media (max-width: 900px) {

    .topbar {
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 12px;
        padding: 12px 16px;
    }

    .topbar-left {
        order: 1;
        flex: 1 1 calc(100% - 60px);
        min-width: 0;
        gap: 10px;
    }

    .topbar-left .brand-link {
        flex: 0 0 auto;
    }

    .topbar-left span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        order: 2;
        margin-left: auto;
    }

    .user-area {
        order: 3;
        flex: 1 1 100%;
        justify-content: space-between;
        gap: 12px;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,.12);
    }

    .main-nav {
        order: 4;
        display: none;
        flex: 1 1 100%;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,.12);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 12px 14px;
    }

    .logout {
        min-height: 44px;
    }
}

/* === Abschnitt 43.7B: Mobile Monatsübersicht === */

@media (max-width: 650px) {

    .reports-table-wrapper {
        overflow-x: visible;
    }

    .reports-table {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .reports-table thead {
        display: none;
    }

    .reports-table tbody,
    .reports-table tfoot {
        display: block;
        width: 100%;
    }

    .reports-table tbody tr,
    .reports-table tfoot tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 18px;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 14px;
        padding: 14px 16px;
        border: 1px solid #e7ebed;
        border-radius: 10px;
        background: #ffffff;
    }

    .reports-table tbody tr:hover {
        background: #ffffff;
    }

    .reports-table td,
    .reports-table tfoot th {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        min-width: 0;
        padding: 7px 0;
        border-bottom: 0;
        white-space: normal;
        text-align: left;
    }

    .reports-table td::before,
    .reports-table tfoot th:not(.reports-total-title)::before {
        content: attr(data-label);
        color: #6b747a;
        font-size: 12px;
        font-weight: 600;
    }

    .reports-table .reports-number {
        text-align: left !important;
    }

    .reports-table .reports-month-cell {
        grid-column: 1 / -1;
        display: block;
        margin-bottom: 5px;
        padding: 0 0 10px 0;
        border-bottom: 1px solid #e7ebed;
    }

    .reports-table .reports-month-cell::before {
        display: none;
    }

    .reports-table .reports-month-cell a {
        display: inline-block;
        font-size: 18px;
        font-weight: 700;
    }

    .reports-table tfoot {
        margin-top: 18px;
    }

    .reports-table tfoot tr {
        background: #f7f9fa;
    }

    .reports-table .reports-total-title {
        grid-column: 1 / -1;
        display: block;
        margin-bottom: 5px;
        padding: 0 0 10px 0;
        border-bottom: 1px solid #dfe4e7;
        font-size: 18px;
        text-align: left;
    }
}

/* === Abschnitt 43.9B: Mobile Formularaktionen === */

@media (max-width: 500px) {

    .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .form-actions button,
    .form-actions .secondary-button {
        width: 100%;
        min-height: 48px;
        box-sizing: border-box;
        margin: 0;
        text-align: center;
    }

    .form-actions .secondary-button {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* === Abschnitt 43.11B: Mobile Kategorieaktionen === */

@media (max-width: 650px) {

    .category-edit-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        min-height: 44px;
        box-sizing: border-box;
        padding: 9px 12px;
        font-size: 14px;
    }
}

/* === Abschnitt 44.9c2: Benutzerverwaltung CSP === */

.hb-user-list {
    display: flex;
    flex-direction: column;
}

.hb-user-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 130px !important;
    column-gap: 32px !important;
    align-items: center !important;
    padding: 22px 24px !important;
    min-height: 90px;
    border-bottom: 1px solid #e6eaec;
    box-sizing: border-box;
}

.hb-user-row:last-child {
    border-bottom: 0;
}

.hb-user-main {
    min-width: 0;
    display: block !important;
}

.hb-user-name {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 6px 0 !important;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.hb-user-badge {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e9eef0;
    color: #45545b;
    font-size: 11px;
    font-weight: 700;
}

.hb-user-meta {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 10px 0 0 0 !important;
    padding: 0 !important;
    color: #68747a;
    font-size: 13px;
    line-height: 1.5;
}

.hb-user-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hb-user-edit-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: static !important;
    width: auto !important;
    min-width: 110px;
    height: 40px;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 1px solid #cbd3d7;
    border-radius: 7px;
    background: #ffffff;
    color: #26373f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-sizing: border-box;
}

.hb-user-edit-button:hover {
    background: #f2f5f6;
}

@media (max-width: 700px) {

    .hb-user-row {
        grid-template-columns: 1fr !important;
        row-gap: 20px !important;
    }

    .hb-user-actions {
        justify-content: flex-start !important;
        margin-top: 4px !important;
    }
}
