﻿/* Settings Actions: Buttons rechts, einheitliche Größen */
/* ==========================================================================
   HFW Anwesenheitstool - Stylesheet Struktur
   1. Settings / Backup Helpers
   2. Mitgliederliste / Buttons / Badges
   3. Custom Dropdowns / Formular-Spezialfälle
   4. Theme Variablen / Layout / Header / Navigation
   5. Verleselisten / Formulare / Kategorien
   6. Anwesenheit / Tabellen / Filter / Login
   7. Einstellungen / Hilfe / Benutzerverwaltung
   8. Responsive Regeln
   ========================================================================== */

/* ==========================================================================
   1. Settings / Backup Helpers
   ========================================================================== */
.settings-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

/* Quick Entry */
.quick-page {
    min-height: 100vh;
}

.quick-shell {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.quick-header,
.quick-card {
    background: var(--card-background, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.quick-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding: 26px 24px;
    margin-bottom: 22px;
}

.quick-brand {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 auto;
    min-width: 0;
}

.quick-brand-copy {
    flex: 1 1 auto;
    max-width: 100%;
    min-width: 0;
}

.quick-brand-copy h1 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    white-space: normal;
}

.quick-brand-title {
    display: inline-block;
}

.quick-brand-accent {
    color: #111111;
    display: inline-block;
    font-size: 0.68em;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.quick-logo {
    width: 88px;
    height: auto;
    flex-shrink: 0;
}

.quick-brand h1 {
    margin: 0 0 8px;
    color: var(--primary-color);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.quick-brand p,
.quick-subtitle {
    margin: 0;
    color: var(--text-muted, #666666);
    line-height: 1.45;
}

.quick-brand p {
    max-width: 24ch;
    font-size: 1.05rem;
}

.quick-header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    flex: 0 0 220px;
    min-width: 220px;
    padding-top: 18px;
}

.quick-user-menu {
    align-self: flex-start;
}

.quick-user-toggle {
    min-width: 176px;
    min-height: 42px;
    padding: 9px 14px;
    justify-content: space-between;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.035);
    color: #444444;
    font-size: 0.95rem;
    font-weight: 600;
}

.quick-user-toggle:hover {
    background: rgba(211, 47, 47, 0.06);
}

.quick-user-dropdown {
    min-width: 210px;
}

.quick-user-dropdown .dropdown-item {
    text-decoration: none;
}

.quick-user-toggle .user-menu-arrow,
.quick-user-dropdown .dropdown-icon {
    font-size: 0;
    line-height: 1;
}

.quick-user-toggle .user-menu-arrow::before {
    content: "▼";
    font-size: 10px;
}

.quick-user-dropdown .dropdown-item:nth-of-type(1) .dropdown-icon::before,
.quick-user-dropdown .dropdown-icon[data-icon="moon"]::before {
    content: "◐";
    font-size: 14px;
}

.quick-user-dropdown .dropdown-item:nth-of-type(2) .dropdown-icon::before,
.quick-user-dropdown .dropdown-icon[data-icon="home"]::before {
    content: "⌂";
    font-size: 14px;
}

.quick-user-dropdown .dropdown-item:last-of-type .dropdown-icon::before,
.quick-user-dropdown .dropdown-icon[data-icon="logout"]::before {
    content: "↦";
    font-size: 14px;
}

.quick-card {
    padding: 26px 22px 24px;
    margin-bottom: 20px;
}

.quick-login-form,
.quick-form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-form-actions {
    justify-content: center;
    align-items: center;
}

.quick-login-form {
    align-items: flex-end;
}

.quick-login-form .form-group {
    flex: 1 1 240px;
}

.quick-login-submit,
.quick-login-form .btn-primary {
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
    min-height: 48px;
    align-self: flex-end;
    padding: 10px 16px;
}

.quick-form-actions .btn-primary,
.quick-form-actions .btn-secondary {
    flex: 0 0 auto;
    width: 230px;
    min-width: 230px;
    max-width: 230px;
    min-height: 46px;
    justify-content: center;
    text-align: center;
}

.quick-card-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.quick-card-copy {
    max-width: 560px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

#quickEntryForm .quick-grid .form-group:last-child {
    grid-column: 1 / 2;
}

#quickEntryForm .form-group label,
.quick-login-form .form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-color, #1f1f1f);
}

#quickEntryForm input[type="date"],
#quickEntryForm input[type="text"],
#quickEntryForm input[type="search"],
#quickEntryForm select,
.quick-login-form input[type="text"],
.quick-login-form input[type="password"] {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.2;
    box-sizing: border-box;
    background: #ffffff;
    color: #1f1f1f;
    appearance: none;
    -webkit-appearance: none;
}

#quickEntryForm select {
    background-image:
        linear-gradient(45deg, transparent 50%, #666 50%),
        linear-gradient(135deg, #666 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(50% - 3px),
        calc(100% - 14px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

#quickEntryForm input[type="date"]:focus,
#quickEntryForm input[type="text"]:focus,
#quickEntryForm input[type="search"]:focus,
#quickEntryForm select:focus,
.quick-login-form input[type="text"]:focus,
.quick-login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.14);
}

#quickEntryForm input[type="search"]::-webkit-search-decoration,
#quickEntryForm input[type="search"]::-webkit-search-cancel-button,
#quickEntryForm input[type="search"]::-webkit-search-results-button,
#quickEntryForm input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.quick-member-search {
    display: block;
}

.quick-member-search-meta {
    margin-top: 10px;
    display: flex;
    justify-content: flex-start;
}

.quick-category-dropdown {
    position: relative;
}

.quick-category-selected {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    box-sizing: border-box;
    background: #ffffff;
    color: #1f1f1f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}

.quick-category-dropdown.open .quick-category-selected,
.quick-category-selected:hover {
    border-color: var(--primary-color);
}

.quick-category-arrow {
    flex-shrink: 0;
    color: #666666;
    font-size: 0;
    line-height: 1;
}

.quick-category-arrow::before {
    content: "▼";
    font-size: 0.9rem;
}

.quick-category-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.quick-category-options.open {
    display: block;
}

.quick-category-search-wrap {
    padding: 10px;
    border-bottom: 1px solid #eeeeee;
}

.quick-category-search {
    width: 100%;
}

.quick-category-list {
    max-height: 280px;
    overflow-y: auto;
}

.quick-category-no-results {
    display: none;
    padding: 14px;
    color: #777777;
}

.quick-category-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.quick-category-option:hover,
.quick-category-option.selected {
    background: rgba(211, 47, 47, 0.08);
}

.quick-category-option.quick-category-option-placeholder {
    color: #666666;
    cursor: default;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.03);
}

.quick-category-option.quick-category-option-placeholder:hover {
    background: rgba(0, 0, 0, 0.03);
}

.quick-category-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.quick-category-indent {
    display: inline-block;
    flex-shrink: 0;
}

#quickEntryForm .quick-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
}

#quickEntryForm .quick-grid .form-group:last-child {
    grid-column: auto;
}

.quick-member-search input {
    min-width: 0;
}

.quick-member-limit {
    min-width: 0;
    text-align: left;
    color: var(--text-muted, #666666);
    font-weight: 600;
}

.quick-member-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
    gap: 10px;
    margin-top: 14px;
    align-items: stretch;
}

.quick-selected-members {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.quick-member-result,
.quick-member-chip {
    border-radius: 14px;
    padding: 10px 14px;
}

.quick-member-result {
    width: 100%;
    min-height: 82px;
    border: 1px solid rgba(25, 118, 210, 0.2);
    background: rgba(25, 118, 210, 0.08);
    color: #0f4f92;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    font-size: 0.96rem;
    line-height: 1.25;
    text-align: left;
}

.quick-member-result:hover {
    transform: translateY(-1px);
    background: rgba(25, 118, 210, 0.14);
}

.quick-member-chip {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.22);
}

.quick-member-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-member-chip-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-dive-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #455064;
}

.quick-dive-time input {
    width: 76px;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--border-color, #d8dee8);
    border-radius: 8px;
    font: inherit;
    text-align: right;
}

.quick-member-name {
    font-weight: 700;
    color: #1f1f1f;
}

.quick-member-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: auto;
}

.quick-member-badges .zugehoerigkeit-badge,
.quick-member-badges .badge-status {
    margin-left: 0;
}

.quick-member-rank {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: #333333;
    font-size: 0.84rem;
    font-weight: 600;
}

.quick-chip-remove {
    border: 0;
    background: transparent;
    color: #b71c1c;
    font-weight: 700;
    cursor: pointer;
}

.quick-empty-state {
    color: var(--text-muted, #666666);
    padding: 6px 0 2px;
    font-size: 1rem;
}

.quick-status {
    margin-top: 12px;
    min-height: 24px;
    font-weight: 600;
}

.quick-status.is-error {
    color: #d32f2f;
}

.quick-status.is-success {
    color: #2e7d32;
}

.quick-status.is-info {
    color: #1976d2;
}

.quick-success-actions {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.quick-footer {
    text-align: center;
    padding: 12px 12px 0;
    color: var(--text-muted, #666666);
}

.quick-footer p {
    margin: 8px 0 0;
    font-size: 0.95rem;
}

.quick-footer-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quick-footer-logo {
    width: 180px;
    max-width: 100%;
    height: auto;
    filter: grayscale(1) contrast(1.05);
    opacity: 0.9;
}

.quick-footer a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.quick-footer a:hover {
    text-decoration: underline;
}

[data-theme="dark"] .quick-header,
[data-theme="dark"] .quick-card {
    background: rgba(16, 28, 67, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .quick-brand p,
[data-theme="dark"] .quick-subtitle,
[data-theme="dark"] .quick-member-limit,
[data-theme="dark"] .quick-empty-state,
[data-theme="dark"] .quick-footer {
    color: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .quick-brand-accent {
    color: #f2f4fb;
}

[data-theme="dark"] .quick-user-toggle {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f3f5ff;
}

[data-theme="dark"] .quick-user-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .quick-footer-logo {
    filter: grayscale(1) brightness(1.85) contrast(0.92);
    opacity: 0.96;
}

[data-theme="dark"] .quick-member-result {
    color: #d5e7ff;
    background: rgba(25, 118, 210, 0.18);
    border-color: rgba(144, 202, 249, 0.28);
}

[data-theme="dark"] .quick-member-name {
    color: #f5f7ff;
}

[data-theme="dark"] .quick-member-rank {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
}

[data-theme="dark"] #quickEntryForm input[type="date"],
[data-theme="dark"] #quickEntryForm input[type="text"],
[data-theme="dark"] #quickEntryForm input[type="search"],
[data-theme="dark"] #quickEntryForm select,
[data-theme="dark"] .quick-login-form input[type="text"],
[data-theme="dark"] .quick-login-form input[type="password"] {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

[data-theme="dark"] #quickEntryForm select {
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.76) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.76) 50%, transparent 50%);
}

[data-theme="dark"] #quickEntryForm .form-group label,
[data-theme="dark"] .quick-login-form .form-group label {
    color: #f3f5ff;
}

[data-theme="dark"] .quick-category-selected,
[data-theme="dark"] .quick-category-options {
    background: rgba(19, 31, 72, 0.98);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

[data-theme="dark"] .quick-category-arrow {
    color: rgba(255, 255, 255, 0.76);
}

[data-theme="dark"] .quick-category-search-wrap {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .quick-category-option:hover,
[data-theme="dark"] .quick-category-option.selected {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .quick-category-option.quick-category-option-placeholder,
[data-theme="dark"] .quick-category-option.quick-category-option-placeholder:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.78);
}

[data-theme="dark"] .quick-category-no-results {
    color: rgba(255, 255, 255, 0.68);
}

[data-theme="dark"] .quick-member-chip {
    background: rgba(76, 175, 80, 0.16);
    border-color: rgba(129, 199, 132, 0.28);
}
.settings-actions-left {
    flex: 1 1 220px;
    min-width: 200px;
}
.settings-actions-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 1 1 320px;
    flex-wrap: wrap;
}
.settings-actions-right .btn-primary,
.settings-actions-right .btn-secondary,
.settings-actions-right .btn-success,
.settings-actions-right .btn-danger {
    padding: 10px 18px;
    border-width: 2px;
    min-height: 44px;
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.backup-actions {
    align-items: stretch;
}

.backup-actions .btn-primary,
.backup-actions .btn-secondary,
.backup-actions .btn-success {
    width: min(100%, 260px);
    min-width: min(100%, 260px);
}
.backup-file-input {
    width: 100%;
    max-width: 260px;
}

.backup-list-wrap {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e0e0e0;
}

.backup-list-wrap h4 {
    margin-bottom: 10px;
    color: #444;
}

.backup-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.backup-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.backup-list-meta {
    min-width: 0;
}

.backup-list-name {
    font-weight: 600;
    color: #333;
    overflow-wrap: anywhere;
}

.backup-list-details {
    color: #666;
    font-size: 0.9em;
    margin-top: 2px;
}

.backup-list-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
/* Dashboard Status & Ladeindikator */
.dashboard-status {
    background: #fff3e0;
    color: #D32F2F;
    border: 1.5px solid #FF9800;
    border-radius: 7px;
    padding: 10px 18px;
    font-size: 1.08em;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(255,152,0,0.08);
}
.dashboard-loading {
    background: #e3f2fd;
    color: #1976D2;
    border: 1.5px solid #1976D2;
    border-radius: 7px;
    padding: 10px 18px;
    font-size: 1.08em;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(25,118,210,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}
.loading-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #1976D2;
    border-top: 3px solid #e3f2fd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Mitglieder-Zeilenliste */
/* ==========================================================================
   2. Mitgliederliste / Buttons / Badges
   ========================================================================== */
.mitglied-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mitglied-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    font-size: 1.05em;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.mitglied-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    flex-wrap: wrap;
}
.mitglied-contact-line {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}
.mitglied-contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f4f4f4;
    color: #555;
    font-size: 0.82em;
    line-height: 1.2;
}
.mitglied-qualification-line {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}
.mitglied-qualification-badge,
.mitglied-qualification-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.82em;
    font-weight: 700;
    line-height: 1.15;
}
.mitglied-qualification-badge {
    background: #e8f5e9;
    color: #16732b;
    border: 1px solid rgba(22, 115, 43, 0.14);
}
.mitglied-qualification-more {
    background: #eef2ff;
    color: #1d4ed8;
    border-color: rgba(29, 78, 216, 0.16);
}
.mitglied-qualification-empty {
    background: #f4f4f4;
    color: #777;
    flex-basis: 100%;
    width: fit-content;
}
.mitglied-status-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.mitglied-status-badges .badge-hfw,
.mitglied-status-badges .badge-gast,
.mitglied-status-badges .badge-sonstiges,
.mitglied-status-badges .badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 600;
    line-height: 1.2;
    min-width: 48px;
}
.mitglied-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.mitglied-index {
    min-width: 32px;
    color: #888;
    font-family: monospace;
    text-align: right;
    margin-right: 10px;
}
.mitglied-dienstgrad,
.member-dienstgrad {
    color: #888;
    font-size: 0.95em;
    margin-left: 8px;
    font-weight: 400;
    letter-spacing: 0.5px;
    vertical-align: middle;
}
.mitglied-dienstgrad.dienstgrad-kdt,
.member-dienstgrad.dienstgrad-kdt {
    background: #D32F2F;
    color: #fff;
    border-radius: 6px;
    padding: 2px 6px;
    font-weight: 600;
}
.mitglied-dienstgrad.dienstgrad-gk,
.member-dienstgrad.dienstgrad-gk {
    background: #333;
    color: #fff;
    border-radius: 6px;
    padding: 2px 6px;
    font-weight: 600;
}
.mitglied-dienstgrad.dienstgrad-zk,
.member-dienstgrad.dienstgrad-zk {
    background: #1976D2;
    color: #fff;
    border-radius: 6px;
    padding: 2px 6px;
    font-weight: 600;
}

.member-inline-charge-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.member-inline-charge-badges .member-charge-badge {
    font-size: 0.85em;
    line-height: 1.1;
}
.mitglied-name {
    font-weight: 600;
    margin-right: 6px;
}
.mitglied-vorname {
    color: #555;
    margin-right: 6px;
}
.badge-hfw, .badge-status {
    margin-right: 0;
}
.btn-status {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    min-height: 36px;
}
.btn-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.btn-icon {
    font-size: 1.1em;
    font-weight: bold;
}
.btn-anwesend {
    background: #4CAF50;
    color: #fff;
}
.btn-anwesend:hover {
    background: #45a049;
}
.btn-entschuldigt {
    background: #FFC107;
    color: #333;
}
.btn-entschuldigt:hover {
    background: #ffb300;
}
.btn-sonstiges {
    background: #1976D2;
    color: #fff;
}
.btn-sonstiges:hover {
    background: #1565c0;
}
    margin-left: auto;
    display: flex;
    gap: 8px;
}
.btn-status {
    padding: 6px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 1em;
}
.btn-anwesend { background: #4CAF50; color: #fff; }
.btn-entschuldigt { background: #FFC107; color: #333; }
.btn-sonstiges { background: #1976D2; color: #fff; }

.btn-edit {
    background: #E3F2FD;
    color: #1976D2;
    padding: 6px 14px;
    border-radius: 8px;
    border: 2px solid #1976D2;
    font-weight: 600;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    min-height: 36px;
}

.btn-edit:hover {
    background: #BBDEFB;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(25,118,210,0.2);
}

.btn-delete {
    background: #FFEBEE;
    color: #D32F2F;
    padding: 6px 14px;
    border-radius: 8px;
    border: 2px solid #D32F2F;
    font-weight: 600;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    min-height: 36px;
    min-width: 146px;
    justify-content: center;
}

.btn-delete:hover {
    background: #FFCDD2;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(211,47,47,0.2);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 600;
}
.badge-hfw { background: #D32F2F; color: #fff; }
.badge-status { background: #eee; color: #333; border: 1px solid #ccc; }
/* ==========================================================================
   3. Custom Dropdowns / Formular-Spezialfälle
   ========================================================================== */
/* --- Custom Dropdown für Kategorieauswahl (Verleseliste) --- */
.dropdown-category {
    position: relative;
    width: 100%;
    max-width: 350px;
    font-size: 1rem;
    user-select: none;
    margin-bottom: 1em;
}
.dropdown-category-selected {
    background: #fff;
    border: 1.5px solid #bdbdbd;
    border-radius: 6px;
    padding: 0.5em 2em 0.5em 1em;
    cursor: pointer;
    min-height: 2.2em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: border 0.2s;
}
.dropdown-category-selected.open {
    border-color: #1976d2;
    box-shadow: 0 4px 16px rgba(25,118,210,0.08);
}
.dropdown-category-arrow {
    margin-left: 1em;
    font-size: 1.2em;
    color: #888;
    pointer-events: none;
}
.dropdown-category-options {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1.5px solid #bdbdbd;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    z-index: 1000;
    max-height: 260px;
    overflow-y: auto;
    display: none;
}
.dropdown-category-options.open {
    display: block;
}
.dropdown-category-search-wrap {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px;
    background: #fff;
    border-bottom: 1px solid #ececec;
}
.dropdown-category-search {
    width: 100%;
    border: 1px solid #c7c7c7;
    border-radius: 6px;
    padding: 0.5em 0.65em;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.dropdown-category-search:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25,118,210,0.12);
}
.dropdown-category-list {
    display: block;
}
.dropdown-category-no-results {
    display: none;
    padding: 0.75em 1em;
    color: #777;
    font-size: 0.95em;
}
.dropdown-category-option {
    padding: 0.5em 1em;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
}
.dropdown-category-option:hover, .dropdown-category-option.selected {
    background: #e3f2fd;
}
.dropdown-category-option.dropdown-category-option-placeholder {
    cursor: default;
    background: #f8f8f8;
    color: #666;
    font-weight: 600;
}
.dropdown-category-option.dropdown-category-option-placeholder:hover {
    background: #f8f8f8;
}
.dropdown-category-option .color-dot {
    width: 1em;
    height: 1em;
    border-radius: 50%;
    margin-right: 0.7em;
    flex-shrink: 0;
    border: 1px solid #bbb;
}
.dropdown-category-option .indent {
    display: inline-block;
    width: 1.2em;
}
/* --- Ende Custom Dropdown --- */

/* Spezifische Breiten für Formularfelder */
.category-width {
    max-width: 350px;
}

/* Einheitliche Breite für Status-Sortierung */
#status_sortierung {
    width: 100%;
    max-width: 350px;
    min-width: 0;
    box-sizing: border-box;
}

.startzeit-width {
    max-width: 300px;
}

.startzeit-width-large {
    max-width: 860px;
}

#createForm .form-row {
    align-items: flex-end;
}

#createForm input[type="date"],
#createForm input[type="text"],
#createForm select,
#createForm .dropdown-category-selected {
    min-height: 48px;
    height: 48px;
    box-sizing: border-box;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 1em;
    font-weight: 400;
}

#createForm .dropdown-category {
    margin-bottom: 0;
    max-width: none;
}

#createForm input[type="date"]::-webkit-datetime-edit,
#createForm input[type="date"]::-webkit-datetime-edit-fields-wrapper,
#createForm input[type="date"]::-webkit-datetime-edit-text,
#createForm input[type="date"]::-webkit-datetime-edit-day-field,
#createForm input[type="date"]::-webkit-datetime-edit-month-field,
#createForm input[type="date"]::-webkit-datetime-edit-year-field {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* Kompakteres Startzeit-Dropdown */
#startzeit {
    width: 90px;
    min-width: 0;
    max-width: 100px;
}

/* Mitgliederliste Anwesenheit */
.attendance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.member-badges {
    display: grid;
    grid-auto-rows: 1fr;
    gap: 4px;
    align-items: stretch;
    justify-items: end;
    width: auto;
    min-width: 64px;
}

.member-badges .badge-status,
.member-badges .member-charge-badge,
.member-badges .zugehoerigkeit-badge {
    min-width: 64px;
    text-align: center;
    padding: 2px 8px;
}

.member-charge-badge {
    display: inline-block;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    color: #fff;
}

.member-charge-badge.dienstgrad-gk {
    background: #333;
}

.member-charge-badge.dienstgrad-zk {
    background: #1976D2;
}

.member-charge-badge.dienstgrad-kdt {
    background: #D32F2F;
}

@media (min-width: 601px) {
    .attendance-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        column-gap: 12px;
    }

    .member-info {
        flex-wrap: nowrap;
        white-space: nowrap;
        min-width: 0;
        gap: 8px;
    }

    .status-buttons {
        justify-self: end;
        align-items: center;
    }

    .member-badges {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }

    .member-name {
        flex: 0 1 auto;
        max-width: 420px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.member-number {
    font-size: 1.1em;
    color: #888;
    min-width: 32px;
    text-align: right;
    font-family: monospace;
}

.member-name {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.zugehoerigkeit-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 500;
    margin-left: 4px;
}
.badge-hfw {
    background: #D32F2F;
    color: #fff;
}
.badge-gast {
    background: #FFC107;
    color: #333;
}
.badge-sonstiges {
    background: #9E9E9E;
    color: #fff;
}
.badge-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 500;
    margin-left: 4px;
    background: #eee;
    color: #333;
}
.badge-reserve {
    background: #1976D2;
    color: #fff;
}
.badge-inactive {
    background: #888;
    color: #fff;
}
.badge-other {
    background: #bbb;
    color: #fff;
}

.status-buttons {
    display: flex;
    gap: 6px;
}

.dive-time-field {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 8px 0 0;
    color: #455064;
    font-size: 0.92rem;
}

.dive-time-field label {
    font-weight: 700;
    color: var(--feuerwehr-rot);
}

.dive-time-input-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dive-time-input {
    width: 96px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font: inherit;
    text-align: right;
}

.dive-time-unit {
    font-weight: 700;
}

.dive-time-field small {
    color: #777;
}

.deep-analysis-section {
    margin-top: 28px;
}

.deep-analysis-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 16px;
}

.deep-analysis-head h3 {
    margin-bottom: 6px;
}

.deep-analysis-status {
    min-width: 180px;
    color: #607D8B;
    font-size: 0.92rem;
    text-align: right;
}

.deep-analysis-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.deep-analysis-kpi,
.deep-analysis-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.deep-analysis-kpi {
    padding: 14px;
}

.deep-analysis-kpi strong {
    display: block;
    font-size: 1.35rem;
    color: var(--feuerwehr-rot, #D32F2F);
    line-height: 1.2;
}

.deep-analysis-kpi span {
    display: block;
    margin-top: 4px;
    color: #607D8B;
    font-size: 0.9rem;
}

.deep-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 16px;
}

.deep-analysis-card {
    padding: 16px;
    overflow: hidden;
}

.deep-analysis-card h4 {
    margin: 0 0 12px;
}

.deep-analysis-table-wrap {
    overflow-x: visible;
}

.deep-analysis-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 0.9rem;
}

.deep-analysis-table th,
.deep-analysis-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.deep-analysis-table th {
    color: #455064;
    font-weight: 700;
    background: rgba(25, 118, 210, 0.06);
}

.deep-analysis-table td.is-number,
.deep-analysis-table th.is-number {
    text-align: right;
    white-space: nowrap;
}

.deep-analysis-empty {
    color: #777;
    padding: 10px 0;
}

.deep-quality-list {
    display: grid;
    gap: 10px;
}

.deep-quality-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(25, 118, 210, 0.06);
}

.deep-quality-item strong {
    color: #273142;
}

.deep-quality-item span {
    color: var(--feuerwehr-rot, #D32F2F);
    font-weight: 800;
}

.sonstiges-detail {
    margin-top: 6px;
    font-size: 0.85em;
    color: #555;
    word-break: break-word;
}
.status-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    background: #f5f5f5;
    color: #333;
    transition: background 0.2s, color 0.2s;
    outline: none;
}
.status-btn.anwesend {
    background: #E8F5E9;
    color: #388E3C;
    border: 2px solid #2E7D32;
}
.status-btn.entschuldigt {
    background: #FFF8E1;
    color: #FFA000;
    border: 2px solid #F57C00;
}
.status-btn.sonstiges {
    background: #E3F2FD;
    color: #0D47A1;
    border: 2px solid #1976D2;
}
.status-btn.active {
    box-shadow: 0 0 0 2px #1976D233;
    border: 1.5px solid #1976D2;
    background: #1976D2;
    color: #fff;
}
/**
 * HFW Villach - Anwesenheitstool
 * Stylesheet (CSS)
 * 
 * © 2026 IT-Solutions by Stefan Regenfelder
 * https://www.it-solutions.at
 * 
 * Alle Rechte vorbehalten.
 */

/* ==========================================================================
   4. Theme Variablen / Layout / Header / Navigation
   ========================================================================== */
:root {
    --primary-color: #D32F2F;
    --secondary-color: #C62828;
    --success-color: #4CAF50;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-color: #ddd;
    --feuerwehr-rot: #D32F2F;
    --feuerwehr-dunkelrot: #B71C1C;
    --feuerwehr-gold: #FFC107;
    --shadow-color: rgba(0,0,0,0.1);
    --table-stripe: #f9f9f9;
    --input-bg: #ffffff;
}

/* Dark Mode Variablen */
[data-theme="dark"] {
    --bg-color: #141729;
    --card-bg: #182544;
    --text-color: #eef2ff;
    --border-color: #31456f;
    --shadow-color: rgba(0,0,0,0.35);
    --table-stripe: #223257;
    --input-bg: #223257;
}

[data-theme="dark"] body {
    background-color: var(--bg-color);
}

[data-theme="dark"] header {
    background: var(--card-bg);
    border-bottom-color: var(--feuerwehr-rot);
}

[data-theme="dark"] .header-text h1 {
    color: var(--feuerwehr-rot);
}

[data-theme="dark"] .header-text p {
    color: #c6d0e3;
}

[data-theme="dark"] section {
    background: var(--card-bg);
}

[data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 {
    color: var(--feuerwehr-rot);
}

[data-theme="dark"] input, 
[data-theme="dark"] select, 
[data-theme="dark"] textarea {
    background: var(--input-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] table {
    background: var(--card-bg);
}

[data-theme="dark"] th {
    background: var(--feuerwehr-dunkelrot);
    color: white;
}

[data-theme="dark"] td {
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] tr:nth-child(even) {
    background: var(--table-stripe);
}

[data-theme="dark"] .verleseliste-card,
[data-theme="dark"] .member-item {
    background: var(--table-stripe);
    border-color: var(--border-color);
}

[data-theme="dark"] .member-item .member-name {
    color: var(--text-color);
}

[data-theme="dark"] .nav-tab {
    color: var(--text-color);
}

[data-theme="dark"] .nav-tab:hover {
    background: #223257;
}

[data-theme="dark"] .nav-tab.active {
    background: var(--feuerwehr-rot);
    color: #fff;
}

[data-theme="dark"] .login-container {
    background: var(--card-bg);
}

[data-theme="dark"] .login-modal h2 {
    color: var(--feuerwehr-rot);
}

[data-theme="dark"] .app-footer {
    background: var(--card-bg);
    color: #b8c3da;
}

[data-theme="dark"] .dashboard-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-category-selected {
    background: var(--input-bg);
    color: var(--text-color);
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .dropdown-category-selected.open {
    border-color: #6da3ff;
    box-shadow: 0 0 0 2px rgba(109, 163, 255, 0.14);
}

[data-theme="dark"] .dropdown-category-options {
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

[data-theme="dark"] .dropdown-category-search-wrap {
    background: var(--card-bg);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .dropdown-category-search {
    background: var(--input-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-category-search::placeholder {
    color: #9fb0cf;
}

[data-theme="dark"] .dropdown-category-arrow {
    color: #b9c6df;
}

[data-theme="dark"] .dropdown-category-option {
    color: var(--text-color);
}

[data-theme="dark"] .dropdown-category-option:hover,
[data-theme="dark"] .dropdown-category-option.selected {
    background: #2a3d66;
}

[data-theme="dark"] .form-hint,
[data-theme="dark"] .help-subtitle,
[data-theme="dark"] .help-status,
[data-theme="dark"] .help-search-status,
[data-theme="dark"] .current-user,
[data-theme="dark"] .verleseliste-meta span {
    color: #b8c3da;
}

[data-theme="dark"] .help-card,
[data-theme="dark"] .settings-section,
[data-theme="dark"] .filter-controls,
[data-theme="dark"] .attendance-filters {
    border-color: var(--border-color);
}

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 400;
}

html[data-app-base-path="testsystem"] body {
    padding-top: 60px;
    box-shadow: inset 0 0 0 6px #2563eb;
}

.testsystem-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.testsystem-banner strong {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.83rem;
    letter-spacing: 0.08em;
}

.testsystem-banner span {
    font-weight: 600;
}

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

header {
    background: white;
    color: var(--text-color);
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-bottom: 4px solid var(--feuerwehr-rot);
}

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

.header-logo {
    height: 90px;
    width: auto;
    flex-shrink: 0;
}

.header-text {
    flex: 1;
    text-align: center;
}

.header-text h1 {
    color: var(--feuerwehr-rot);
    font-size: 2.2em;
    margin-bottom: 8px;
    font-weight: 700;
}

.header-text p {
    color: #666;
    font-size: 1.05em;
    margin: 0;
    font-weight: 400;
}

.header-text p strong {
    font-weight: 600;
    color: #555;
}

[data-theme="dark"] .header-text p strong {
    color: #ccc;
}

.header-branding {
    text-align: right;
    flex-shrink: 0;
    color: #999;
    font-size: 0.85em;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.header-branding .it-logo {
    height: 40px;
    width: auto;
    display: block;
    opacity: 0.8;
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.user-menu-toggle:hover {
    background: rgba(0,0,0,0.05);
}

.user-menu-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.user-menu.open .user-menu-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 160px;
    padding: 6px 0;
    display: none;
    z-index: 1000;
}

.user-menu.open .user-dropdown {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 15px;
    background: transparent;
    border: none;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item.logout-item {
    color: var(--feuerwehr-rot);
}

.dropdown-item.logout-item:hover {
    background: #fff5f5;
}

.dropdown-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 4px 0;
}

/* Dark Mode Dropdown Styles */
[data-theme="dark"] .user-menu-toggle {
    color: #aaa;
}

[data-theme="dark"] .user-menu-toggle:hover {
    background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .user-dropdown {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-color);
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--table-stripe);
}

[data-theme="dark"] .dropdown-divider {
    border-color: var(--border-color);
}

.admin-button {
    padding: 8px 16px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    font-family: 'Roboto', sans-serif;
}

.admin-button:hover {
    background-color: #555;
    transform: translateY(-1px);
}

.admin-button.admin-active {
    background-color: var(--feuerwehr-rot);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.header-branding strong {
    color: var(--feuerwehr-rot);
    display: block;
    font-size: 1.1em;
    margin-bottom: 2px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.nav-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 8px 0 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-color);
    font-size: 0.96em;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav-tab-label-full {
    display: inline;
}

.nav-tab-label-short {
    display: none;
}

.nav-tab:hover {
    background: rgba(211, 47, 47, 0.08);
    border-color: rgba(211, 47, 47, 0.18);
    color: var(--feuerwehr-dunkelrot);
}

.nav-tab.active {
    color: white;
    background: var(--feuerwehr-rot);
    border-color: var(--feuerwehr-dunkelrot);
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.16);
}

@media (max-width: 1180px) and (min-width: 769px) {
    .nav-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .nav-tab {
        flex: 0 0 auto;
        padding-inline: 12px;
    }
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

section {
    background: var(--card-bg);
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-color);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-primary,
.btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    font-weight: 600;
}

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

.btn-primary:hover {
    background-color: var(--feuerwehr-dunkelrot);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: #757575;
    color: white;
    margin-top: 15px;
}

.btn-secondary:hover {
    background-color: #616161;
}

.verleseliste-card {
    border: 1px solid var(--border-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    background: #fafafa;
    transition: box-shadow 0.3s;
}

.verleseliste-card.card-abgeschlossen {
    border-left: 4px solid var(--success-color);
    background: linear-gradient(to right, #f1f8e9, #fafafa);
}

.verleseliste-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.verleseliste-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.verleseliste-datum {
    color: #000 !important; /* Schwarz für Datum */
    font-weight: normal;
}

.verleseliste-kategorie {
    color: #d32f2f !important; /* Rot für Kategorie */
    font-weight: bold;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.card-header-row h3 {
    margin: 0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-abgeschlossen {
    background-color: var(--success-color);
    color: white;
}

.status-offen {
    background-color: #ff9800;
    color: white;
}

.status-info {
    background-color: #e3f2fd;
    color: #1976D2;
    border: 1px solid #90caf9;
}

.status-anwesend {
    background-color: #E8F5E9;
    color: #2E7D32;
    border-color: #A5D6A7;
}

.status-entschuldigt {
    background-color: #FFF8E1;
    color: #F57C00;
    border-color: #FFE082;
}

.status-sonstiges {
    background-color: #E3F2FD;
    color: #0D47A1;
    border-color: #90CAF9;
}

.verleseliste-card p {
    margin: 5px 0;
    color: #666;
}

.verleseliste-card button {
    margin-top: 10px;
    padding: 8px 15px;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.verleseliste-card button:hover {
    background-color: #2e7d32;
}

/* Additional button variants to match original styling */
.btn {
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.08s, box-shadow 0.12s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary-color); color: #fff; border-color: var(--feuerwehr-dunkelrot); }
.btn-secondary { background: #f0f0f0; color: #333; border-color: #e0e0e0; }
.btn-info { background: #0277bd; color: #fff; border-color: #01579b; }
.btn-warning { background: #ffb300; color: #222; border-color: #ff8f00; }
.btn-danger { background: #d32f2f; color: #fff; border-color: #b71c1c; }
.btn-finalize { background: #c62828; color: #fff; border-color: #8e0000; }
.btn-finalize:hover { background: #b71c1c; }

/* ==========================================================================
   5. Verleselisten / Formulare / Kategorien
   ========================================================================== */
/* Kategorien-Baum Darstellung */
.category-tree-row {
    transition: background-color 0.2s;
}

.category-tree-row:hover {
    background-color: #f8f9fa;
}

.category-tree-row-clickable {
    cursor: pointer;
}

.category-tree-row-clickable .category-name {
    text-decoration-thickness: 1px;
}

.category-tree-cell {
    padding: 8px 12px;
}

.category-tree-content {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
}

.tree-lines {
    color: #666;
    white-space: pre;
    font-weight: normal;
    user-select: none;
}

.category-tree-toggle,
.category-tree-toggle-placeholder {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.category-tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.2s, border-color 0.2s, transform 0.12s;
}

.category-tree-toggle:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
}

.category-tree-toggle-placeholder {
    display: inline-block;
}

.tree-icon {
    font-size: 16px;
    margin-right: 2px;
}

.category-name {
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-color);
}

.category-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid #ddd;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Dark mode für Baum */
[data-theme="dark"] .category-tree-row:hover {
    background-color: #2a2a3e;
}

[data-theme="dark"] .category-tree-row-clickable:hover {
    background-color: #2a2a3e;
}

[data-theme="dark"] .tree-lines {
    color: #888;
}

[data-theme="dark"] .category-tree-toggle {
    background: #23232f;
    border-color: #4a4a5e;
    color: #f5f5f5;
}

[data-theme="dark"] .category-edit-input {
    background: var(--input-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Card-specific tweaks to match earlier look */
.verleseliste-card {
    border: 1px solid var(--border-color);
    padding: 18px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: linear-gradient(180deg,#fff,#fbfbfb);
}
.verleseliste-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.verleseliste-meta span { display: inline-block; margin-right: 12px; color: #666; }
.verleseliste-desc {
    margin-top: 8px;
    color: #444;
    font-weight: 700;
}

.verleselisten-view-hint {
    margin: 4px 0 12px 0;
    color: #555;
    font-weight: 600;
    font-size: 0.95rem;
}

.verleselisten-overflow {
    margin-top: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8f8f8;
}

.verleselisten-overflow-summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 14px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.verleselisten-overflow-summary::-webkit-details-marker {
    display: none;
}

.verleselisten-overflow-summary::before {
    content: ">";
    transition: transform 0.15s ease;
}

.verleselisten-overflow[open] .verleselisten-overflow-summary::before {
    transform: rotate(90deg);
}

.verleselisten-overflow-content {
    padding: 0 10px 10px 10px;
}

[data-theme="dark"] .verleselisten-overflow {
    background: var(--table-stripe);
}

/* Form Row für nebeneinander */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-status {
    margin-top: 8px;
    font-size: 0.95em;
    color: #666;
    min-height: 1.2em;
}

.form-status.info {
    color: #1976D2;
}

.form-status.success {
    color: #2e7d32;
}

.form-status.error {
    color: #d32f2f;
}

/* Endzeit-Sektion in Anwesenheit */
.endzeit-section {
    background: #fff3e0;
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.endzeit-section h4 {
    margin: 0 0 10px 0;
    color: #e65100;
}

.endzeit-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.endzeit-controls input[type="time"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.btn-abschliessen {
    background-color: var(--success-color) !important;
    padding: 10px 20px !important;
}

.btn-abschliessen:hover {
    background-color: #2e7d32 !important;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    gap: 15px;
}

.member-item .member-name {
    flex: 1;
    font-weight: 600;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-number {
    font-weight: 700;
    color: var(--feuerwehr-dunkelrot);
    min-width: 35px;
    font-size: 1em;
}

.member-grade {
    font-weight: 600;
    color: var(--feuerwehr-rot);
    margin-right: 4px;
}

/* ==========================================================================
   6. Anwesenheit / Tabellen / Filter
   ========================================================================== */
/* Attendance Filters */
.attendance-filters {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #ddd;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-row:last-child {
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.filter-group select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    min-width: 120px;
}

.chargen-filter-group {
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 420px;
}

.chargen-label {
    font-weight: 600;
    color: #333;
}

.chargen-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #333;
    font-weight: 500;
    user-select: none;
}

.chargen-option input[type=checkbox] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.search-container {
    position: relative;
    flex: 1 1 340px;
    min-width: 320px;
    max-width: 460px;
}

.filter-row-main .filter-group {
    flex: 1 1 340px;
}

.filter-row-main .filter-group select {
    width: 100%;
    min-width: 0;
}

.search-container input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    padding: 2px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    background: #eee;
    color: #333;
}

.member-counter {
    font-size: 14px;
    color: #666;
    font-weight: 600;
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 12px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--feuerwehr-rot);
}

.filter-label input[type="radio"],
.filter-toggle input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.processed-counter {
    font-size: 14px;
    color: #666;
}

.filter-row-main .filter-group {
    flex-wrap: wrap;
}

.filter-row-bottom {
    justify-content: space-between;
    align-items: center;
}

.attendance-toggle-group {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.attendance-counter-group {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.member-item .status-buttons {
    display: flex;
    gap: 10px;
}

.status-btn {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.status-btn:hover {
    transform: scale(1.05);
}

.status-btn.active.anwesend {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.status-btn.active.entschuldigt {
    background: var(--feuerwehr-gold);
    color: #333;
    border-color: var(--feuerwehr-gold);
}

.status-btn.active.sonstiges {
    background: var(--feuerwehr-dunkelrot);
    color: white;
    border-color: var(--feuerwehr-dunkelrot);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

table tr:hover {
    background: #f5f5f5;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge.anwesend {
    background: var(--success-color);
    color: white;
}

.badge.entschuldigt {
    background: var(--feuerwehr-gold);
    color: #333;
}

.badge.sonstiges {
    background: var(--feuerwehr-dunkelrot);
    color: white;
}

.member-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
}

#attendanceDetails {
    background: #ffebee;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid var(--feuerwehr-rot);
}

/* Tabellen-Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--feuerwehr-rot);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.data-table tr:hover {
    background: #f5f5f5;
}

.data-table td:last-child {
    text-align: right;
}

/* Inaktive Zeilen */
.data-table .inactive-row {
    background-color: #f9f9f9;
    opacity: 0.7;
}

.data-table .inactive-row td {
    color: #999;
}

.kamerad-stats-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.kamerad-stats-search {
    flex: 1 1 340px;
    min-width: 320px;
    max-width: 460px;
}

.kamerad-stats-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-weight: 700;
    white-space: nowrap;
}

.kamerad-stats-sort select {
    min-height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: #333;
    padding: 0 10px;
    font: inherit;
}

.kamerad-stats-count {
    display: inline-flex;
    align-items: center;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(211, 47, 47, 0.08);
    border: 1px solid rgba(211, 47, 47, 0.14);
}

.kamerad-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
}

.kamerad-table-empty {
    margin-top: 14px;
    padding: 18px 16px;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    background: rgba(211, 47, 47, 0.04);
    color: #666;
}

.statistik-row {
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.statistik-row:hover {
    background: #fff3f3 !important;
}

.statistik-row:focus-visible {
    outline: 3px solid rgba(211, 47, 47, 0.35);
    outline-offset: -3px;
    background: #fff3f3 !important;
}

.statistik-row.is-selected {
    background: #ffebee !important;
    box-shadow: inset 4px 0 0 var(--feuerwehr-rot);
}

.kamerad-master-table,
.kamerad-detail-table {
    margin-top: 0;
    box-shadow: none;
}

.kamerad-master-table {
    min-width: 760px;
}

.kamerad-detail-card {
    margin-top: 22px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 6px 18px var(--shadow-color);
    overflow: hidden;
}

.kamerad-detail-card-shell {
    padding: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,250,252,0.98));
}

.kamerad-detail-empty {
    padding: 28px 22px;
    color: #666;
    font-weight: 500;
    border: 1px dashed var(--border-color);
    border-radius: 14px;
    background: rgba(211, 47, 47, 0.03);
}

.kamerad-detail-empty.is-error {
    color: #b71c1c;
    background: rgba(183, 28, 28, 0.06);
    border-color: rgba(183, 28, 28, 0.18);
}

.kamerad-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.kamerad-detail-eyebrow {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--feuerwehr-rot);
    margin-bottom: 6px;
}

.kamerad-detail-title h4 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--text-color);
}

.kamerad-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.kamerad-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(25, 118, 210, 0.08);
    border: 1px solid rgba(25, 118, 210, 0.15);
    color: #335;
    font-size: 0.9rem;
    font-weight: 600;
}

.kamerad-meta-pill.is-muted {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
    color: #666;
}

.kamerad-detail-summary {
    min-width: 150px;
    text-align: right;
    padding: 16px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--feuerwehr-rot), var(--feuerwehr-dunkelrot));
    color: #fff;
}

.kamerad-detail-summary-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.kamerad-detail-summary-label {
    margin-top: 6px;
    font-weight: 700;
}

.kamerad-detail-summary-sub {
    margin-top: 4px;
    opacity: 0.9;
    font-size: 0.92rem;
}

.kamerad-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.kamerad-kpi-card {
    border-radius: 12px;
    padding: 18px 16px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.kamerad-kpi-card.is-green {
    background: linear-gradient(135deg, #2e7d32, #43a047);
}

.kamerad-kpi-card.is-gold {
    background: linear-gradient(135deg, #ef6c00, #fb8c00);
}

.kamerad-kpi-card.is-dark {
    background: linear-gradient(135deg, #6a1b1a, #8e2424);
}

.kamerad-kpi-card.is-blue {
    background: linear-gradient(135deg, #1565c0, #1e88e5);
}

.kamerad-kpi-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.kamerad-kpi-label {
    font-size: 0.92rem;
    opacity: 0.94;
}

.kamerad-detail-section + .kamerad-detail-section {
    margin-top: 24px;
}

.kamerad-detail-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--feuerwehr-rot);
    font-size: 1.05rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.kamerad-detail-toggle-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.kamerad-detail-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(211, 47, 47, 0.1);
    color: var(--feuerwehr-rot);
    font-size: 0.86rem;
    font-weight: 700;
}

.kamerad-detail-toggle:focus-visible {
    outline: 3px solid rgba(211, 47, 47, 0.25);
    outline-offset: 4px;
    border-radius: 8px;
}

.kamerad-detail-toggle-icon {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.kamerad-detail-section[data-expanded="false"] .kamerad-detail-toggle-icon {
    transform: rotate(-90deg);
}

.kamerad-detail-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
}

.kamerad-detail-section[data-expanded="false"] [data-section-body] {
    display: none;
}

.kamerad-detail-table {
    min-width: 700px;
}

.kamerad-detail-text {
    display: inline-block;
    max-width: 320px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.kamerad-stunden-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.kamerad-stunden-pill.is-dive {
    background: rgba(21, 101, 192, 0.1);
    color: #1565c0;
}

.kamerad-detail-action-cell {
    text-align: right !important;
}

.kamerad-detail-table-empty {
    text-align: center;
    color: #777;
    padding: 18px 12px;
}

.kamerad-detail-table-empty::before {
    content: none !important;
}

/* Button Styles für Tabellen */
.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
    margin-left: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--feuerwehr-rot);
    color: white;
}

.btn-danger:hover {
    background: var(--feuerwehr-dunkelrot);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #2e7d32;
}

.filter-controls {
    margin: 15px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.filter-controls .filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-controls .archive-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-controls .archive-filter label {
    font-weight: 600;
    color: #555;
    margin-right: 5px;
}

.filter-controls .archive-filter select {
    padding: 6px 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

[data-theme="dark"] .filter-controls {
    background: var(--table-stripe);
}

[data-theme="dark"] .filter-controls .archive-filter select {
    background: var(--input-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

#closedOwnerFilterWrap {
    flex: 1 1 260px;
}

#closedOwnerFilter {
    min-width: 220px;
}

#listDisplayFilter {
    min-width: 210px;
}

#monthFilter {
    min-width: 170px;
}

#yearFilter {
    min-width: 110px;
}

@media (min-width: 1100px) {
    .list-section .filter-controls {
        justify-content: flex-start;
        align-items: flex-end;
        gap: 12px;
    }

    .list-section .filter-controls > .filter-group:first-child {
        flex: 0 0 auto;
        align-self: flex-end;
    }

    .list-section .filter-controls .archive-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        flex: 1 1 180px;
        min-width: 150px;
    }

    .list-section .filter-controls .archive-filter label {
        margin-right: 0;
        white-space: nowrap;
    }

    .list-section .filter-controls .archive-filter select {
        width: 100%;
        min-width: 0;
        padding: 6px 10px;
    }

    #closedOwnerFilterWrap {
        flex: 1.15 1 220px;
        min-width: 190px;
    }

    #closedOwnerFilter,
    #listDisplayFilter,
    #monthFilter,
    #yearFilter {
        min-width: 0;
    }
}

.filter-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.quick-add {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 10px;
    border-radius: 6px;
}

.quick-add input,
.quick-add select {
    min-width: 140px;
}

@media (max-width: 600px) {
    .quick-add {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-add input,
    .quick-add select,
    .quick-add button {
        width: 100%;
    }
}

.import-section {
    padding: 15px;
    background: #fff9e6;
    border-radius: 5px;
    border-left: 4px solid var(--feuerwehr-gold);
}

.filter-section {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid var(--feuerwehr-rot);
}

.filter-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--feuerwehr-rot);
    font-size: 1.1em;
}

.auswertung-kategorie-dropdown {
    position: relative;
    width: 100%;
}

.auswertung-kategorie-selected {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
}

#auswertung-kategorie-selected-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auswertung-kategorie-selected.open,
.auswertung-kategorie-dropdown.open .auswertung-kategorie-selected {
    border-color: var(--feuerwehr-rot);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.auswertung-kategorie-arrow {
    flex-shrink: 0;
    color: #666666;
}

.auswertung-kategorie-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    display: none;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.14);
    overflow: hidden;
}

.auswertung-kategorie-options.open {
    display: block;
}

.auswertung-kategorie-search-wrap {
    padding: 10px;
    border-bottom: 1px solid #eeeeee;
}

.auswertung-kategorie-search {
    width: 100%;
}

.auswertung-kategorie-actions {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid #eeeeee;
}

.auswertung-kategorie-list {
    max-height: 280px;
    overflow-y: auto;
}

.auswertung-kategorie-no-results,
.auswertung-kategorie-loading {
    display: none;
    padding: 14px;
    color: #777777;
}

.auswertung-kategorie-loading {
    display: block;
}

.auswertung-kategorie-option {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.auswertung-kategorie-option:hover {
    background: rgba(211, 47, 47, 0.06);
}

.auswertung-kategorie-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.auswertung-kategorie-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.auswertung-kategorie-label {
    flex: 1;
    min-width: 0;
}

.auswertung-kategorie-parent {
    color: #777777;
    font-size: 0.85em;
    white-space: normal;
    flex-basis: 100%;
    padding-left: 28px;
}

.auswertung-kategorie-summary {
    margin-top: 8px;
    color: #666666;
    font-size: 0.92em;
    line-height: 1.4;
    word-break: break-word;
}

.auswertung-kategorie-actions .btn-small {
    margin-left: 0;
}

.inline-action-field {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-action-field input {
    flex: 1;
}

.ranking-settings-picker {
    margin-top: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
}

.ranking-settings-picker-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.ranking-settings-picker-head h4 {
    margin: 0 0 4px;
}

.ranking-settings-picker-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ranking-settings-search-wrap {
    margin-bottom: 10px;
}

.ranking-categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.ranking-category-option {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fff;
    cursor: pointer;
}

.ranking-category-option:hover {
    border-color: rgba(211, 47, 47, 0.35);
    box-shadow: 0 8px 18px rgba(211, 47, 47, 0.08);
}

.ranking-category-option input[type="checkbox"] {
    margin-top: 2px;
}

.ranking-category-option-main {
    flex: 1;
    min-width: 0;
}

.ranking-category-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    line-height: 1.35;
}

.ranking-category-parent {
    margin-top: 4px;
    color: #6a6a6a;
    font-size: 0.9em;
    line-height: 1.35;
}

.ranking-preview-box {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(25, 118, 210, 0.08);
}

.ranking-preview-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.ranking-preview-links a {
    font-weight: 600;
}

.ranking-page-manager {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ranking-page-manager-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.ranking-page-manager-head h4 {
    margin: 0 0 4px;
}

.ranking-page-form {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.86);
}

.ranking-color-row input[type="color"] {
    width: 100%;
    min-height: 44px;
    padding: 4px;
}

.ranking-page-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 16px;
    margin: 12px 0 16px;
}

.ranking-page-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

#rankingPageCategories {
    min-height: 190px;
}

.ranking-pages-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.ranking-page-card {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: #fff;
}

.ranking-page-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ranking-color-preview {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ranking-page-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
    color: #5f6368;
    font-size: 0.92rem;
}

.ranking-page-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-end;
}

.auswertung-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.auswertung-data-table {
    min-width: 760px;
}

[data-theme="dark"] .auswertung-kategorie-selected,
[data-theme="dark"] .auswertung-kategorie-options {
    background: var(--card-bg);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .auswertung-kategorie-search-wrap,
[data-theme="dark"] .auswertung-kategorie-actions {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .auswertung-kategorie-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .auswertung-kategorie-parent,
[data-theme="dark"] .auswertung-kategorie-summary,
[data-theme="dark"] .auswertung-kategorie-arrow,
[data-theme="dark"] .auswertung-kategorie-no-results,
[data-theme="dark"] .auswertung-kategorie-loading {
    color: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .ranking-settings-picker,
[data-theme="dark"] .ranking-category-option,
[data-theme="dark"] .ranking-page-form,
[data-theme="dark"] .ranking-page-card {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .ranking-category-parent {
    color: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .ranking-preview-box {
    background: rgba(25, 118, 210, 0.16);
}

@media (max-width: 680px) {
    .inline-action-field,
    .ranking-settings-picker-head,
    .ranking-page-manager-head,
    .ranking-page-card {
        flex-direction: column;
        align-items: stretch;
    }

    .ranking-categories-list {
        grid-template-columns: 1fr;
    }

    .ranking-category-option {
        padding: 12px 10px;
    }

    .ranking-page-card-actions {
        justify-content: stretch;
    }

    .ranking-page-card-actions .btn-small {
        width: 100%;
    }

    .member-permissions-panel {
        padding: 12px;
    }

    .member-permissions-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .member-permission-options {
        grid-template-columns: 1fr;
    }

    .ranking-preview-links {
        flex-direction: column;
        gap: 8px;
    }
}

/* Alte Mobile-Regeln durch die konsolidierten Overrides am Dateiende ersetzt. */

.filter-controls input[type="radio"] {
    cursor: pointer;
    accent-color: var(--feuerwehr-rot);
    width: 18px;
    height: 18px;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 10px 18px;
    background-color: white;
    color: var(--feuerwehr-rot);
    border: 2px solid var(--feuerwehr-rot);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background-color: var(--feuerwehr-rot);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

/* Badges für Zugehörigkeit */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-primary {
    background-color: var(--feuerwehr-rot);
    color: white;
}

.badge-warning {
    background-color: var(--feuerwehr-gold);
    color: #333;
}

/* Weitere alte Mobile-Regeln durch die konsolidierten Overrides am Dateiende ersetzt. */

/* Footer */
.app-footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    font-size: 14px;
}

.app-footer a {
    color: var(--feuerwehr-rot);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.app-footer a:hover {
    color: var(--feuerwehr-gold);
    text-decoration: underline;
}

.app-footer p {
    margin: 0;
}

.app-footer-meta {
    margin-top: 10px !important;
    font-size: 12px;
    color: #d9d9d9;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.app-version-info {
    color: #d9d9d9;
}

.app-version-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.app-version-status.is-loading {
    background: #546e7a;
    color: #ffffff;
}

.app-version-status.is-ok {
    background: #2e7d32;
    color: #ffffff;
}

.app-version-status.is-warn {
    background: #c62828;
    color: #ffffff;
}

.app-version-status.is-unknown {
    background: #8d6e63;
    color: #ffffff;
}

.app-online-users,
.login-online-users,
.app-footer-feedback {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

button.app-online-users,
button.app-footer-feedback {
    border: 0;
}

button.app-online-users {
    cursor: default;
}

button.app-online-users.is-admin {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button.app-online-users.is-admin:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.app-online-users.is-loading,
.login-online-users.is-loading {
    background: #546e7a;
    color: #ffffff;
}

.app-online-users.is-ok,
.login-online-users.is-ok {
    background: #2e7d32;
    color: #ffffff;
}

.app-footer-feedback {
    background: #c62828;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.app-footer-feedback:hover {
    background: var(--feuerwehr-rot);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.app-online-users.is-warn,
.login-online-users.is-warn {
    background: #c62828;
    color: #ffffff;
}

.online-users-list {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.online-user-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.03);
    align-items: center;
}

.online-user-name {
    font-weight: 700;
}

.online-user-role {
    font-size: 0.9rem;
    color: #666;
}

/* ==========================================================================
   Login / Auth UI
   ========================================================================== */
/* Login Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--feuerwehr-dunkelrot) 0%, var(--feuerwehr-rot) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
}

.login-container h2 {
    color: var(--feuerwehr-rot);
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.login-container .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-container input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.btn-login {
        margin-bottom: 16px;
    padding: 15px;
    font-size: 18px;
    margin-top: 10px;
}

.login-container .btn-secondary.btn-login {
    padding: 8px 16px;
    font-size: 0.95rem;
    width: auto;
    min-width: 0;
    margin: 10px auto 16px;
    display: inline-flex;
    justify-content: center;
}

.login-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Login Footer mit IT-Solutions */
.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: #999;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: var(--feuerwehr-rot);
}

.login-it-logo {
    height: 30px;
    width: auto;
    filter: invert(1) grayscale(1) brightness(0.3);
    transition: filter 0.2s;
}

/* Mitglied bearbeiten Modal */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.edit-container {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.edit-container h2 {
    color: var(--feuerwehr-rot);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5rem;
}

#editMitgliedForm .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

#editMitgliedForm .form-row .form-group {
    flex: 1;
}

#editMitgliedForm .form-group {
    margin-bottom: 15px;
}

#editMitgliedForm label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-color);
}

#editMitgliedForm input,
#editMitgliedForm select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 14px;
}

#editMitgliedForm input:focus,
#editMitgliedForm select:focus {
    outline: none;
    border-color: var(--feuerwehr-rot);
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

.member-permissions-panel {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
}

.member-permissions-panel-create {
    margin-top: 22px;
    margin-bottom: 18px;
}

.member-permissions-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    color: var(--feuerwehr-rot);
    font-weight: 700;
    list-style: none;
}

.member-permissions-summary::-webkit-details-marker {
    display: none;
}

.member-permissions-summary::after {
    content: '+';
    color: #777;
    font-weight: 800;
    margin-left: auto;
}

.member-permissions-panel-create[open] .member-permissions-summary {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.member-permissions-panel-create[open] .member-permissions-summary::after {
    content: '-';
}

.member-permissions-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.member-permissions-head h3 {
    margin: 0;
    color: var(--feuerwehr-rot);
    font-size: 1.05rem;
}

.member-permissions-status {
    color: #666;
    font-size: 0.88rem;
    font-weight: 600;
}

.member-permissions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.member-permissions-section {
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-color);
    overflow: hidden;
}

.member-permissions-section-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 800;
    list-style: none;
}

.member-permissions-section-summary::-webkit-details-marker {
    display: none;
}

.member-permissions-section-summary::after {
    content: '+';
    margin-left: auto;
    color: #777;
    font-weight: 900;
}

.member-permissions-section[open] .member-permissions-section-summary {
    border-bottom: 1px solid var(--border-color);
}

.member-permissions-section[open] .member-permissions-section-summary::after {
    content: '-';
}

.member-permission-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    padding: 12px;
}

.member-permission-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
}

.member-permission-card-main {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.member-permission-card input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
}

.member-permission-card input[type="date"] {
    min-height: 34px;
    font-size: 13px;
}

.member-permission-card strong,
.member-permission-card small {
    display: block;
}

.member-permission-card small {
    margin-top: 2px;
    color: #666;
    font-size: 0.78rem;
    line-height: 1.25;
}

.member-vehicle-section {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.form-actions .btn-primary,
.form-actions .btn-secondary,
.form-actions .btn-danger {
    padding: 10px 18px;
    border-width: 2px;
    box-sizing: border-box;
    min-height: 44px;
    width: 180px;
    min-width: 180px;
    flex: 0 0 180px;
    max-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.form-actions .btn-primary {
    border: 2px solid transparent;
}

.login-footer a:hover .login-it-logo {
    filter: none;
}

.login-footer p {
    margin-top: 8px;
    font-size: 12px;
    color: #bbb;
}

.login-version-info {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.4;
    color: #888;
    word-break: break-word;
}
.login-version-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.login-version-status.is-loading {
    background: #eceff1;
    color: #455a64;
}

.login-version-status.is-ok {
    background: #e8f5e9;
    color: #1b5e20;
}

.login-version-status.is-warn {
    background: #ffebee;
    color: #b71c1c;
}

.login-version-status.is-unknown {
    background: #fff8e1;
    color: #8d6e63;
}


/* iPhone/Small Screen: Status-Buttons groesser und besser bedienbar */
@media (max-width: 600px) {
    .mitglied-row {
        align-items: stretch;
        gap: 10px;
        padding: 14px 0;
    }

    .mitglied-info,
    .mitglied-status-badges,
    .mitglied-actions {
        width: 100%;
    }

    .mitglied-info {
        min-width: 0;
    }

    .mitglied-status-badges {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .mitglied-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .mitglied-actions button {
        width: 100%;
        justify-content: center;
    }

    .mitglied-contact-pill {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .mitglied-qualification-line {
        gap: 4px;
    }

    .mitglied-qualification-badge {
        font-size: 0.78em;
        min-height: 22px;
        padding: 3px 7px;
    }

    .member-permissions-panel {
        padding: 12px;
    }

    .member-permissions-summary {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .member-permission-options {
        grid-template-columns: 1fr;
    }

    .member-permission-card {
        padding: 10px 9px;
    }

    .card-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .card-header-row > div {
        flex-wrap: wrap;
        gap: 6px;
    }
    .attendance-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 0;
    }

    .member-info {
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .status-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        width: 100%;
    }

    .status-btn {
        min-height: 42px;
        padding: 8px 6px;
        font-size: 14px;
        font-weight: 600;
    }

    .dive-time-field {
        width: 100%;
        justify-content: space-between;
        align-items: flex-start;
        flex-wrap: wrap;
        padding-top: 10px;
    }

    .dive-time-input {
        width: 110px;
        min-height: 42px;
    }

    .dive-time-field small {
        width: 100%;
        text-align: right;
    }

    .mitglied-status-badges {
        display: none;
    }

    .mitglied-contact-line {
        gap: 4px;
    }

    .mitglied-contact-pill {
        font-size: 0.74em;
        padding: 2px 7px;
    }

    .member-badges {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        width: auto;
        min-width: 0;
        gap: 3px;
    }

    .member-badges .zugehoerigkeit-badge,
    .member-badges .badge-status,
    .member-badges .member-charge-badge {
        flex: 0 0 auto;
        min-width: 48px;
        padding: 1px 6px;
        font-size: 0.7em;
        border-radius: 10px;
    }

    .member-inline-charge-badges {
        gap: 3px;
    }

    .member-inline-charge-badges .member-charge-badge {
        min-width: 0;
        padding: 1px 6px;
        font-size: 0.7em;
        border-radius: 10px;
    }
}

@media (max-width: 420px) {
    .status-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .status-btn {
        min-height: 38px;
        padding: 6px 4px;
        font-size: 12px;
        font-weight: 600;
    }

    .member-badges {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        width: auto;
        min-width: 0;
        gap: 2px;
    }

    .member-badges .zugehoerigkeit-badge,
    .member-badges .badge-status,
    .member-badges .member-charge-badge {
        flex: 0 0 auto;
        min-width: 42px;
        padding: 1px 5px;
        font-size: 0.65em;
    }

    .member-inline-charge-badges {
        gap: 2px;
    }

    .member-inline-charge-badges .member-charge-badge {
        min-width: 0;
        padding: 1px 5px;
        font-size: 0.65em;
    }
}

/* Current User Display */
.current-user {
    color: #666;
    font-size: 13px;
}

[data-theme="dark"] .current-user {
    color: #aaa;
}

/* Settings Section */
/* ==========================================================================
   7. Einstellungen / Hilfe / Benutzerverwaltung
   ========================================================================== */
.settings-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.settings-section h3 {
    color: var(--feuerwehr-rot);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--feuerwehr-rot);
}

.settings-section h4 {
    margin-bottom: 15px;
    color: #555;
}

/* Collapse Sections */
.collapse-section {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 16px 16px;
    background: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.collapse-summary {
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    padding: 14px 0;
    color: var(--feuerwehr-rot);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.collapse-summary::-webkit-details-marker {
    display: none;
}
.collapse-summary::after {
    content: '+';
    color: #999;
    font-size: 1.1em;
    font-weight: 700;
    flex: 0 0 auto;
}
details[open] > .collapse-summary::after {
    content: '-';
}

.settings-collapse {
    margin-top: 20px;
}

.settings-collapse:first-of-type {
    margin-top: 0;
}

.settings-collapse > .settings-section {
    margin-top: 6px;
    padding: 18px 6px 6px;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

.settings-collapse > .settings-section h3 {
    display: none;
}

/* Hilfe */
.help-section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.help-subtitle {
    color: #666;
    margin-bottom: 16px;
}
.help-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.help-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.help-search-bar input {
    flex: 1 1 320px;
    max-width: 520px;
}
.help-search-status {
    font-size: 0.92em;
    color: #666;
}
.help-status {
    font-size: 0.9em;
    color: #666;
}

.help-feedback-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    margin: 18px 0 16px;
    border: 1px solid rgba(211, 47, 47, 0.16);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.08), rgba(255, 255, 255, 0.96));
}

.help-feedback-entry div {
    display: grid;
    gap: 4px;
}

.help-feedback-entry strong {
    color: var(--feuerwehr-rot);
    font-size: 1.05rem;
}

.help-feedback-entry span {
    color: var(--text-muted);
}

.help-feedback-entry .btn-primary {
    flex: 0 0 auto;
}

.help-editor {
    margin: 8px 0 18px;
}
.help-editor textarea {
    width: 100%;
    min-height: 240px;
    resize: vertical;
}
.help-editor-hint {
    margin-top: 6px;
    font-size: 0.85em;
    color: #888;
}
.help-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    background: var(--bg-color);
    margin-bottom: 16px;
}
.help-card h3 {
    margin-top: 0;
    color: var(--feuerwehr-rot);
}
.help-markdown {
    font-family: "Roboto", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}
.help-markdown h1,
.help-markdown h2,
.help-markdown h3 {
    color: var(--feuerwehr-rot);
    margin: 16px 0 8px;
}
.help-markdown p {
    margin: 8px 0;
}
.help-markdown ul,
.help-markdown ol {
    margin: 8px 0 8px 20px;
    padding: 0;
}
.help-markdown li {
    margin: 4px 0;
}
.help-markdown code {
    background: #f0f0f0;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: "Courier New", monospace;
    font-size: 0.95em;
}
.help-markdown pre {
    background: #f7f7f7;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    overflow-x: auto;
    font-family: "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.5;
}
.help-markdown blockquote {
    border-left: 3px solid var(--feuerwehr-rot);
    padding-left: 10px;
    color: #666;
    margin: 8px 0;
}
.help-search-hit {
    background: #ffeb3b;
    color: #111;
    padding: 0 2px;
    border-radius: 2px;
}

/* Dark Mode ist jetzt im Dropdown integriert */

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.kpi-icon {
    font-size: 2em;
    opacity: 0.8;
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--feuerwehr-rot);
    line-height: 1;
}

.kpi-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Dashboard Grid für Statistik-Charts */

/* Neues Dashboard-Grid: Flexibel, responsive, keine festen Spalten */
.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    justify-content: stretch;
}
.dashboard-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow-color);
    flex: 1 1 400px;
    min-width: 320px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.dashboard-card h4 {
    color: var(--feuerwehr-rot);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    font-size: 1.1em;
}
.dashboard-card canvas {
    width: 100% !important;
    height: 320px !important;
    max-width: 100%;
    border-radius: 8px;
    background: var(--card-bg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.dashboard-chart-empty {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 20px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    background: color-mix(in srgb, var(--card-bg) 92%, #f3f4f6 8%);
    color: #666;
    text-align: center;
    line-height: 1.5;
}

[data-theme="dark"] .dashboard-chart-empty {
    color: #c5d0e6;
    background: color-mix(in srgb, var(--card-bg) 88%, #1b2233 12%);
}
@media (max-width: 900px) {
    .dashboard-grid {
        flex-direction: column;
        gap: 16px;
    }
    .dashboard-card {
        min-width: 0;
        width: 100%;
        padding: 12px;
    }
    .dashboard-card canvas {
        height: 220px !important;
    }
}
@media (max-width: 600px) {
    .dashboard-card {
        padding: 10px;
    }

    .dashboard-grid {
        gap: 12px;
    }

    .dashboard-card h4 {
        font-size: 1rem;
        line-height: 1.3;
    }

    .dashboard-card canvas {
        height: 210px !important;
    }

    .dashboard-chart-empty {
        min-height: 170px;
        padding: 14px;
    }
}

/* Stats Summary Cards */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, var(--feuerwehr-rot), var(--feuerwehr-dunkelrot));
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.stat-card.green {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.stat-card.orange {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.stat-card.blue {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.stat-card .stat-number {
    font-size: 2.5em;
    font-weight: 700;
    display: block;
}

.stat-card .stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-top: 5px;
}

/* Responsive Dashboard */
@media (max-width: 900px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

@media (max-width: 900px) {
    .kamerad-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .kamerad-detail-header {
        flex-direction: column;
    }

    .kamerad-detail-summary {
        width: 100%;
        text-align: left;
    }

    .kamerad-stats-toolbar {
        align-items: stretch;
    }

    .kamerad-stats-count {
        white-space: normal;
    }

    .kamerad-stats-sort {
        justify-content: space-between;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .kamerad-kpi-grid {
        grid-template-columns: 1fr;
    }

    .kamerad-detail-card-shell {
        padding: 16px;
    }

    .kamerad-stats-search {
        min-width: 0;
    }

    .kamerad-stats-count {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .kamerad-stats-sort select {
        flex: 1 1 auto;
        min-width: 0;
    }

    .kamerad-master-table th,
    .kamerad-master-table td,
    .kamerad-detail-table th,
    .kamerad-detail-table td {
        padding: 10px 9px;
        font-size: 0.92rem;
    }

    .kamerad-detail-table-wrap {
        overflow: visible;
        border: none;
        background: transparent;
    }

    .kamerad-detail-table {
        min-width: 0;
        background: transparent;
    }

    .kamerad-detail-table thead {
        display: none;
    }

    .kamerad-detail-table,
    .kamerad-detail-table tbody,
    .kamerad-detail-table tr,
    .kamerad-detail-table td {
        display: block;
        width: 100%;
    }

    .kamerad-detail-table tr {
        margin-bottom: 12px;
        border: 1px solid var(--border-color);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
        overflow: hidden;
    }

    .kamerad-detail-table td {
        display: grid;
        grid-template-columns: minmax(92px, 110px) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        border-bottom: 1px solid var(--border-color);
        text-align: left !important;
    }

    .kamerad-detail-table td:last-child {
        border-bottom: none;
    }

    .kamerad-detail-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #666;
    }

    .kamerad-detail-action-cell .kamerad-detail-open-btn {
        width: 100%;
        justify-content: center;
    }

    .kamerad-detail-text {
        max-width: none;
    }
}

/* Custom Select für Kategorien */
.custom-select-container {
    position: relative;
    width: 100%;
    z-index: 100;
}

.custom-select-selected {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    min-height: 36px;
    min-width: 120px;
}

.custom-select-selected:hover {
    border-color: #999;
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-height: 40px;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 9999 !important;
    display: none;
}

.custom-select-container.open .custom-select-options {
    display: block !important;
}

.custom-select-option {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.custom-select-option:hover {
    background: #f5f5f5;
}

.custom-select-option:last-child {
    border-bottom: none;
}

/* --- Fix: Custom Select Dropdown für Kategorien --- */
.custom-select-container {
    position: relative;
    width: 100%;
    z-index: 100;
}

.custom-select-selected {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    min-height: 36px;
    min-width: 120px;
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-height: 40px;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 9999 !important;
    display: none;
}

.custom-select-container.open .custom-select-options {
    display: block !important;
}

.custom-select-option {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.custom-select-option:hover {
    background: #f5f5f5;
}

.custom-select-option:last-child {
    border-bottom: none;
}

/* Benutzerverwaltung */
.tool-user-intro {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.tool-user-intro h3 {
    margin: 0 0 6px;
    color: var(--text-primary, #1f2937);
}

.tool-user-intro p {
    margin: 0;
    color: #5f6b7a;
    line-height: 1.45;
    max-width: 760px;
}

.tool-user-kpis {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tool-user-kpis span,
.user-role-badge,
.user-status-badge,
.user-rights-badge {
    border: 1px solid #f1c9c9;
    border-radius: 999px;
    background: #fff6f6;
    color: #9f1118;
    padding: 7px 11px;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1;
    white-space: nowrap;
}

.tool-user-kpis strong {
    font-size: 1rem;
}

.tool-user-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 420px) 1fr;
    gap: 14px;
    align-items: end;
    margin: 14px 0 18px;
    padding: 14px;
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 14px;
}

.tool-user-search label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.tool-user-search input {
    width: 100%;
    border-radius: 12px;
    min-height: 46px;
}

.tool-user-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.tool-user-filter {
    border: 1px solid #e1e5ea;
    background: #ffffff;
    color: #1f2937;
    border-radius: 999px;
    padding: 10px 13px;
    font-weight: 700;
    cursor: pointer;
}

.tool-user-filter.active {
    border-color: #d32f2f;
    background: #d32f2f;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(211, 47, 47, 0.18);
}

.tool-user-create {
    margin: 0 0 18px;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    background: #ffffff;
}

.tool-user-create summary {
    cursor: pointer;
    padding: 16px 18px;
    font-weight: 800;
    color: #d32f2f;
}

.tool-user-create form {
    padding: 0 18px 18px;
}

.tool-user-empty {
    padding: 18px;
    border: 1px dashed #dddddd;
    border-radius: 12px;
    color: #666666;
    background: #fafafa;
}

.user-list {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.user-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    align-items: center;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.04);
}

.user-card-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.user-card-title,
.user-card-meta,
.user-card-rights {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.user-card-title strong {
    font-size: 1.05rem;
    color: #111827;
}

.user-meta {
    color: #666;
    font-size: 12px;
}

.user-card-meta {
    color: #5f6b7a;
    font-size: 0.9rem;
}

.user-role-badge {
    border-color: #d7e5ff;
    background: #f2f7ff;
    color: #2456a6;
}

.user-status-badge.is-active,
.user-rights-badge.is-on {
    border-color: #cdebd5;
    background: #edf8f0;
    color: #177c34;
}

.user-status-badge.is-inactive {
    border-color: #e6e6e6;
    background: #f5f5f5;
    color: #666666;
}

.user-rights-badge {
    border-color: #e6e6e6;
    background: #f7f7f7;
    color: #666666;
}

.user-rights-badge.is-danger {
    border-color: #f1c9c9;
    background: #fff0f0;
    color: #b91c1c;
}

.user-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.user-actions .btn-secondary,
.user-actions .btn-danger {
    margin-top: 0;
    padding: 8px 14px;
    font-size: 0.9em;
}

.user-edit {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px;
    margin: 8px 0 12px;
}

.user-edit .form-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.user-edit .form-group {
    min-width: 0;
    margin-bottom: 0;
}

.user-edit .user-field-username,
.user-edit .user-field-password,
.user-edit .user-field-email {
    grid-column: span 3;
}

.user-edit .user-field-role {
    grid-column: span 3;
}

.user-edit .user-mail {
    grid-column: span 4;
}

.user-edit .user-active {
    grid-column: span 2;
}

.user-edit-actions {
    grid-column: span 6;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    min-width: 0;
}

.user-edit-actions .btn-primary,
.user-edit-actions .btn-secondary {
    margin-top: 0;
    padding: 8px 14px;
    font-size: 0.9em;
    min-width: 96px;
    width: auto;
    max-width: none;
    flex: 0 0 auto;
}

.user-edit .user-mail,
.user-edit .user-active {
    display: flex;
    align-self: end;
}

.user-edit .user-mail label,
.user-edit .user-active label {
    min-height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.35;
    white-space: normal;
}

.user-edit .user-mail input[type="checkbox"],
.user-edit .user-active input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 18px;
}

@media (max-width: 1180px) {
    .tool-user-intro {
        flex-direction: column;
    }

    .tool-user-kpis {
        justify-content: flex-start;
    }

    .tool-user-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .tool-user-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .tool-user-filter {
        flex: 0 0 auto;
    }

    .user-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-actions {
        width: 100%;
        justify-content: stretch;
    }

    .user-actions .btn-secondary,
    .user-actions .btn-danger {
        flex: 1 1 0;
    }

    .user-edit .form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .user-edit .form-row > * {
        grid-column: auto;
    }

    .user-edit-actions {
        grid-column: 1 / -1;
    }
}





/* Form hints and readonly */
.form-hint {
    margin-top: -6px;
    margin-bottom: 8px;
    color: #666;
    font-size: 0.9em;
}
input[readonly] {
    background: #f5f5f5;
    color: #555;
}
.user-mail label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.user-mail input[type="checkbox"] {
    margin: 0;
}




/* Ausgetretene Mitglieder (Admin) */
.exited-members-list {
    margin-top: 8px;
}

.exited-member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.exited-member-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exited-member-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #666;
    font-size: 0.9em;
}

.exited-member-actions .btn-primary {
    margin-top: 0;
    padding: 8px 14px;
    font-size: 0.9em;
}

.exited-member-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.exited-member-actions .btn-danger {
    margin-top: 0;
    padding: 8px 14px;
    font-size: 0.9em;
}

.exited-visibility {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.85em;
    font-weight: 600;
}

.exited-visibility.is-visible {
    color: #1b5e20;
    background: #e8f5e9;
}

.exited-visibility.is-hidden {
    color: #5d4037;
    background: #efebe9;
}

/* ==========================================================================
   8. Responsive Regeln
   ========================================================================== */
/* Konsolidierte Mobile Overrides */
@media (max-width: 768px) {
    html[data-app-base-path="testsystem"] body {
        padding-top: 72px;
        box-shadow: inset 0 0 0 4px #2563eb;
    }

    .testsystem-banner {
        gap: 8px;
        min-height: 56px;
        padding: 10px 12px;
        font-size: 0.85rem;
        line-height: 1.3;
        flex-wrap: wrap;
    }

    .container {
        padding: 10px;
    }

    header {
        padding: 14px 14px;
        margin-bottom: 14px;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        text-align: center;
    }

    .header-content > a {
        justify-content: center;
    }

    .header-logo {
        width: auto !important;
        height: 74px !important;
        max-width: min(38vw, 136px);
        object-fit: contain;
        margin: 0 auto;
    }

    .header-text {
        text-align: center;
    }

    .header-text h1 {
        font-size: 1.65rem;
        line-height: 1.15;
        margin-bottom: 4px;
    }

    .header-text p {
        font-size: 0.92rem;
        line-height: 1.3;
    }

    .header-branding {
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .header-branding .it-logo,
    .it-logo {
        width: auto !important;
        height: 28px !important;
        max-width: min(52vw, 200px);
        object-fit: contain;
        margin: 0 auto;
    }

    .user-menu {
        width: 100%;
    }

    .user-menu-toggle {
        justify-content: center;
        width: 100%;
        min-height: 42px;
        font-size: 15px;
    }

    .user-dropdown {
        left: 0;
        right: 0;
        min-width: 0;
    }

    .nav-tabs {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(132px, 1fr);
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 2px 8px;
        margin: 0 0 14px;
        border-bottom: none;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
        align-items: stretch;
    }

    .nav-tab {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        min-height: 50px;
        padding: 10px 12px;
        border-radius: 8px;
        border-bottom: none;
        text-align: center;
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: anywhere;
        font-size: 0.93rem;
        scroll-snap-align: start;
    }

    .nav-tab.active {
        border-radius: 8px;
    }

    section,
    .create-section,
    .list-section,
    .attendance-section {
        padding: 16px;
    }

    .attendance-filters {
        padding: 12px;
    }

    .quick-add {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    .quick-add strong {
        display: block;
        width: 100%;
        margin-bottom: 0;
    }

    .quick-add input,
    .quick-add select,
    .quick-add button {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .filter-row,
    .filter-row-main,
    .filter-row-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-group,
    .search-container {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 0 1 auto;
    }

    .filter-group {
        display: grid;
        gap: 6px;
    }

    .filter-group label {
        white-space: normal;
    }

    .filter-group select {
        width: 100%;
        min-width: 0;
    }

    .filter-row-main .filter-group,
    .chargen-filter-group,
    .attendance-toggle-group,
    .attendance-counter-group {
        flex: 0 1 auto;
    }

    #createUserForm .form-row,
    #emailSettingsForm .form-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: stretch;
    }

    #createUserForm .form-group,
    #emailSettingsForm .form-group {
        min-width: 0;
        width: 100%;
    }

    #createUserForm input,
    #createUserForm select,
    #emailSettingsForm input,
    #emailSettingsForm select {
        width: 100%;
        min-width: 0;
    }

    #createUserForm label,
    #emailSettingsForm label {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    #createUserForm .user-mail label,
    #emailSettingsForm .form-group[style*="align-items:center"] label {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        line-height: 1.35;
    }

    #emailSettingsForm .form-group[style*="align-items:center"] {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    #emailSettingsForm .form-group[style*="align-items:center"] input[type="checkbox"] {
        width: 18px;
        min-width: 18px;
        height: 18px;
        margin-top: 3px;
        flex: 0 0 18px;
    }

    #emailSettingsForm .form-group[style*="align-items:center"] label {
        display: block;
        margin: 0 !important;
        flex: 1 1 auto;
    }

    #createUserForm .form-actions,
    #emailSettingsForm .form-actions {
        justify-content: stretch;
    }

    #createUserForm .form-actions .btn-primary,
    #emailSettingsForm .form-actions .btn-primary {
        width: 100%;
    }

    .chargen-filter-group {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
        width: 100%;
        flex: 1 1 auto;
    }

    .chargen-label {
        flex: 0 0 auto;
        margin-bottom: 0;
        margin-right: 4px;
    }

    .chargen-filter-group .btn-small {
        min-height: 34px;
        padding: 5px 9px;
    }

    .chargen-option {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        min-height: 34px;
        padding: 3px 1px;
        font-size: 0.95em;
    }

    .search-container input {
        font-size: 16px;
    }

    .attendance-toggle-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-toggle {
        width: 100%;
        align-items: flex-start;
        line-height: 1.3;
    }

    .attendance-counter-group {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .member-counter,
    .processed-counter {
        font-size: 13px;
    }

    .member-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 12px;
    }

    .member-item .member-name {
        flex-wrap: wrap;
        gap: 6px;
        line-height: 1.25;
    }

    .member-item .status-buttons {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .status-btn {
        display: flex;
        align-items: center;
        min-width: 0;
        min-height: 42px;
        padding: 8px 6px;
        font-size: 13px;
        justify-content: center;
        text-align: center;
    }

    .user-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

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

    .user-meta {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .user-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .user-actions .btn-secondary,
    .user-actions .btn-danger {
        flex: 1 1 140px;
        justify-content: center;
        min-width: 0;
    }

    .user-edit-actions {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .user-edit-actions .btn-primary,
    .user-edit-actions .btn-secondary {
        flex: 1 1 140px;
        justify-content: center;
    }

    .user-edit .form-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .form-actions .btn-danger {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 1 1 100%;
    }

    .quick-header,
    .quick-card-head,
    .quick-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .quick-brand-copy {
        max-width: 100%;
    }

    .quick-brand-copy h1 {
        white-space: normal;
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .quick-header-actions {
        width: 100%;
        justify-content: stretch;
        padding-top: 0;
    }

    .quick-login-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: stretch;
    }

    .quick-login-form .form-group {
        margin: 0;
    }

    .quick-user-menu,
    .quick-user-toggle {
        width: 100%;
    }

    .quick-user-dropdown {
        left: 0;
        right: 0;
        min-width: 0;
    }

    .quick-login-form .btn-primary {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }

    .quick-grid,
    #quickEntryForm .quick-grid {
        grid-template-columns: 1fr;
    }

    #quickEntryForm .quick-grid .form-group:last-child {
        grid-column: auto;
    }

    .quick-form-actions .btn-primary,
    .quick-form-actions .btn-secondary {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 1 1 100%;
    }

    .help-section,
    .settings-section,
    .help-card,
    .collapse-section {
        padding-left: 14px;
        padding-right: 14px;
    }

    .help-actions,
    .help-search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .help-actions .btn,
    .help-actions .btn-primary,
    .help-actions .btn-secondary,
    .help-search-bar .btn,
    .help-search-bar .btn-primary,
    .help-search-bar .btn-secondary,
    .help-search-bar input {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .help-editor textarea {
        min-height: 180px;
    }

    .kpi-grid,
    .stats-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .kpi-card,
    .stat-card,
    .dashboard-card {
        padding: 14px;
    }

    .kpi-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .kpi-icon {
        font-size: 1.7em;
    }

    .kpi-content {
        width: 100%;
    }

    .kpi-value {
        font-size: 1.8em;
    }

    .kpi-label,
    .kpi-sub,
    .kpi-status {
        word-break: break-word;
    }

    .dashboard-card h4 {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .quick-member-limit {
        text-align: left;
        min-width: 0;
    }

    #createForm .form-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        align-items: stretch;
    }

    #createForm .form-row .form-group {
        min-width: 0;
    }

    #createForm .dropdown-category,
    #createForm .dropdown-category-selected,
    #createForm input[type="date"],
    #createForm input[type="text"],
    #createForm select,
    #startzeit {
        width: 100%;
        max-width: none;
    }

    #createForm input[type="date"] {
        min-height: 48px;
        height: 48px;
        line-height: 1.2;
        padding: 10px 14px;
    }

    #createForm input[type="date"]::-webkit-date-and-time-value {
        text-align: left;
    }

    #mitgliedForm .form-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        align-items: stretch;
    }

    #mitgliedForm .form-row .form-group {
        min-width: 0;
    }

    #mitgliedForm input[type="text"],
    #mitgliedForm input[type="date"],
    #mitgliedForm input[type="tel"],
    #mitgliedForm input[type="email"],
    #mitgliedForm select {
        width: 100%;
        max-width: none;
    }

    #mitgliedForm .btn-primary {
        width: 100%;
        max-width: none;
    }

    #tab-mitglieder .filter-controls {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 14px !important;
        align-items: stretch !important;
    }

    #tab-mitglieder .filter-controls .filter-group {
        width: 100%;
        min-width: 0;
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    #tab-mitglieder .filter-controls .filter-group label {
        white-space: normal;
    }

    #tab-mitglieder .filter-controls .filter-group input[type="text"],
    #tab-mitglieder .filter-controls .filter-group select {
        width: 100% !important;
        max-width: none !important;
        min-width: 0;
    }

    #tab-mitglieder .filter-controls .filter-group:last-child label {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

    #tab-auswertung .filter-section .form-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        align-items: stretch;
    }

    #tab-auswertung .filter-section .form-row .form-group {
        min-width: 0;
    }

    #tab-auswertung .filter-section input[type="date"] {
        width: 100%;
        max-width: none;
    }

    #tab-auswertung .filter-section .form-group[style*="align-items: end"] {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 10px !important;
        align-items: stretch !important;
    }

    #tab-auswertung .filter-section .form-group[style*="align-items: end"] .btn-primary,
    #tab-auswertung .filter-section .form-group[style*="align-items: end"] .btn-secondary {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    #tab-auswertung .auswertung-kategorie-options {
        position: static;
        margin-top: 8px;
    }

    #tab-auswertung .auswertung-kategorie-actions {
        flex-direction: column;
    }

    #tab-auswertung .auswertung-table-wrap {
        overflow: visible;
    }

    #tab-auswertung .auswertung-data-table {
        min-width: 0;
        background: transparent;
        box-shadow: none;
        margin-top: 0;
    }

    #tab-auswertung .auswertung-data-table thead {
        display: none;
    }

    #tab-auswertung .auswertung-data-table,
    #tab-auswertung .auswertung-data-table tbody,
    #tab-auswertung .auswertung-data-table tr,
    #tab-auswertung .auswertung-data-table td {
        display: block;
        width: 100%;
    }

    #tab-auswertung .auswertung-data-table tr {
        margin-bottom: 12px;
        border: 1px solid var(--border-color);
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
        overflow: hidden;
    }

    #tab-auswertung .auswertung-data-table td {
        display: grid;
        grid-template-columns: minmax(92px, 118px) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        border-bottom: 1px solid var(--border-color);
        text-align: left !important;
        word-break: break-word;
    }

    #tab-auswertung .auswertung-data-table td:last-child {
        border-bottom: none;
    }

    #tab-auswertung .auswertung-data-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #666;
    }

    #tab-auswertung .dashboard-card canvas {
        height: 220px !important;
    }

    #tab-auswertung .filter-section .filter-toggle {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        line-height: 1.4;
    }

    #kategorienListe .data-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #kategorienListe table {
        width: 100%;
        table-layout: auto;
    }

    #kategorienListe th:nth-child(3),
    #kategorienListe th:nth-child(4),
    #kategorienListe td:nth-child(3),
    #kategorienListe td:nth-child(4) {
        display: none;
    }

    #kategorienListe .category-tree-content {
        min-width: 0;
        flex-wrap: wrap;
        gap: 6px;
    }

    #kategorienListe .category-name {
        min-width: 0;
        overflow-wrap: anywhere;
        white-space: normal;
        font-size: 0.96rem;
    }

    #kategorienListe td,
    #kategorienListe th {
        padding: 10px 8px;
        vertical-align: middle;
        font-size: 0.92rem;
    }

    #kategorienListe th {
        padding-top: 8px;
        padding-bottom: 8px;
        font-size: 0.9rem;
    }

    #kategorienListe td:nth-child(2) {
        white-space: normal;
        overflow-wrap: anywhere;
        font-size: 0.88rem;
    }

    #kategorienListe .expand-toggle {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        padding: 0;
    }

    #kategorienListe .category-color-dot {
        width: 14px;
        height: 14px;
        min-width: 14px;
    }

    #kategorienListe .category-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    #statusListe .data-table,
    #kategorienListe .data-table {
        overflow: visible;
        background: transparent;
        box-shadow: none;
        margin-top: 0;
    }

    #statusListe table,
    #statusListe tbody,
    #statusListe tr,
    #statusListe td,
    #kategorienListe table,
    #kategorienListe tbody,
    #kategorienListe tr,
    #kategorienListe td {
        width: 100%;
    }

    #statusListe table,
    #kategorienListe table {
        border-collapse: separate;
        border-spacing: 0;
        background: transparent;
    }

    #statusListe thead,
    #kategorienListe thead {
        display: none;
    }

    #statusListe tbody,
    #kategorienListe tbody {
        display: grid;
        gap: 12px;
    }

    #statusListe tr,
    #kategorienListe tr {
        display: block;
        border: 1px solid var(--border-color);
        border-radius: 14px;
        background: var(--card-bg);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
        overflow: hidden;
    }

    #statusListe td,
    #kategorienListe td {
        display: grid;
        grid-template-columns: minmax(96px, 118px) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 12px 14px;
        border-bottom: 1px solid var(--border-color);
        text-align: left !important;
        word-break: break-word;
    }

    #statusListe td:last-child,
    #kategorienListe td:last-child {
        border-bottom: none;
    }

    #statusListe td::before,
    #kategorienListe td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #666;
    }

    #statusListe td[data-label="Aktionen"],
    #kategorienListe td[data-label="Aktionen"] {
        align-items: stretch;
    }

    #statusListe td[data-label="Aktionen"] > *,
    #kategorienListe td[data-label="Aktionen"] > * {
        min-width: 0;
    }

    #statusListe td[data-label="Aktionen"] .btn-small,
    #kategorienListe td[data-label="Aktionen"] .btn-small {
        min-height: 36px;
        margin-top: 0;
    }

    .settings-actions {
        align-items: stretch;
    }

    .settings-actions-left,
    .settings-actions-right {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
    }

    .settings-actions-right {
        justify-content: flex-start;
    }

    .settings-actions-right .btn-primary,
    .settings-actions-right .btn-secondary,
    .settings-actions-right .btn-success,
    .settings-actions-right .btn-danger,
    .backup-file-input {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .backup-list-row {
        flex-direction: column;
        align-items: stretch;
    }

    .backup-list-actions {
        width: 100%;
        justify-content: stretch;
    }

    .backup-list-actions .btn-secondary,
    .backup-list-actions .btn-danger {
        flex: 1 1 140px;
        min-width: 0;
    }

    .help-status,
    .help-search-status {
        line-height: 1.4;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .nav-tabs {
        grid-auto-columns: minmax(118px, 1fr);
        gap: 6px;
        padding-bottom: 6px;
    }

    .nav-tab {
        min-height: 46px;
        padding: 9px 10px;
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    header {
        padding: 12px;
    }

    .header-logo {
        height: 64px !important;
        max-width: 120px;
    }

    .header-text h1 {
        font-size: 1.45rem;
    }

    .header-text p {
        font-size: 0.86rem;
    }

    .header-branding .it-logo,
    .it-logo {
        height: 24px !important;
    }

    .nav-tabs {
        gap: 6px;
        margin-bottom: 12px;
    }

    .nav-tab {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 0.88rem;
    }

    section,
    .create-section,
    .list-section,
    .attendance-section,
    .attendance-filters {
        padding-left: 14px;
        padding-right: 14px;
    }

    .chargen-filter-group {
        gap: 5px 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .chargen-option {
        min-height: 32px;
        gap: 4px;
        font-size: 0.92em;
        flex: 0 0 auto;
    }

    .chargen-filter-group .btn-small {
        min-height: 32px;
        padding: 4px 8px;
        font-size: 0.92em;
        flex: 0 0 auto;
    }

    .chargen-option input[type=checkbox] {
        width: 15px;
        height: 15px;
    }

    .chargen-label {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .attendance-counter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .help-section,
    .settings-section,
    .help-card,
    .collapse-section,
    .dashboard-card,
    .kpi-card,
    .stat-card {
        padding-left: 12px;
        padding-right: 12px;
    }

    .member-item .status-buttons {
        gap: 6px;
    }

    .status-btn {
        min-height: 40px;
        font-size: 12px;
        padding: 7px 4px;
    }

    .user-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .user-actions .btn-secondary,
    .user-actions .btn-danger,
    .user-edit-actions .btn-primary,
    .user-edit-actions .btn-secondary {
        width: 100%;
        padding: 8px 10px;
        font-size: 0.88em;
    }

    .exited-member-row {
        flex-direction: column;
        align-items: stretch;
    }

    .exited-member-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .collapse-summary {
        font-size: 0.96rem;
        line-height: 1.35;
    }

    #statusListe td,
    #kategorienListe td {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 11px 12px;
    }

    #statusListe td::before,
    #kategorienListe td::before {
        font-size: 0.85rem;
    }

    .backup-list-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/**
 * HFW Villach - Anwesenheitstool
 * Frontend Stylesheet
 *
 * © 2026 IT-Solutions by Stefan Regenfelder
 * https://it-villach.at
 */

html[data-app-base-path="testsystem"][data-command-center="admin"] {
    --test-shell-bg: #f4f1ec;
    --test-shell-bg-soft: #fbf8f4;
    --test-surface: rgba(255, 255, 255, 0.9);
    --test-surface-strong: #ffffff;
    --test-border: rgba(31, 41, 55, 0.08);
    --test-border-strong: rgba(31, 41, 55, 0.14);
    --test-shadow: 0 24px 48px rgba(33, 38, 45, 0.08);
    --test-shadow-soft: 0 14px 30px rgba(33, 38, 45, 0.06);
    --test-text: #16202f;
    --test-muted: #667085;
    --test-accent: #a61d24;
    --test-accent-dark: #7f1218;
    --test-blue: #2563eb;
    --test-blue-soft: rgba(37, 99, 235, 0.10);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(166, 29, 36, 0.09), transparent 28%),
        linear-gradient(180deg, var(--test-shell-bg-soft) 0%, var(--test-shell-bg) 100%);
    color: var(--test-text);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .container {
    max-width: 1360px;
    padding: 26px 22px 44px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .app-shell-header {
    position: relative;
    overflow: visible;
    z-index: 90;
    padding: 28px 32px;
    border-radius: 28px;
    border: 1px solid var(--test-border);
    border-bottom: 1px solid var(--test-border);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(251, 247, 242, 0.96) 100%);
    box-shadow: var(--test-shadow);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .app-shell-header::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 8px;
    background: linear-gradient(180deg, var(--test-blue) 0%, var(--test-accent) 100%);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .header-content {
    align-items: center;
    gap: 26px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .header-logo {
    height: 96px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .header-text {
    text-align: left;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .header-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 14px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--test-blue-soft);
    color: var(--test-blue);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .header-text h1 {
    margin-bottom: 10px;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 0.98;
    color: #141c28;
    letter-spacing: -0.03em;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .header-text p,
html[data-app-base-path="testsystem"][data-command-center="admin"] .header-text p strong {
    color: var(--test-muted);
    font-size: 1.02rem;
    font-weight: 600;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .header-branding {
    min-width: 220px;
    gap: 12px;
    color: var(--test-muted);
    position: relative;
    z-index: 95;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .header-status-pills {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .header-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    background: rgba(255, 255, 255, 0.75);
    color: var(--test-text);
    font-size: 0.82rem;
    font-weight: 700;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .header-branding .it-logo {
    height: 34px;
    opacity: 0.72;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .user-menu-toggle {
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 12px;
    border: 1px solid var(--test-border);
    background: rgba(255, 255, 255, 0.86);
    color: var(--test-text);
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: var(--test-shadow-soft);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .user-menu-toggle:hover {
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.22);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .user-dropdown {
    margin-top: 10px;
    border-radius: 16px;
    border-color: var(--test-border);
    box-shadow: var(--test-shadow);
    z-index: 1400;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tabs {
    position: sticky;
    top: 112px;
    z-index: 50;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 16px 12px;
    margin: 18px 0 0;
    border: 1px solid var(--test-border);
    border-bottom: 1px solid var(--test-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    box-shadow: var(--test-shadow-soft);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tab-label-short {
    display: none;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tab {
    width: 100%;
    justify-content: flex-start;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--test-muted);
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: all 0.18s ease;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tab:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--test-text);
    border-color: var(--test-border);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tab.active {
    background: linear-gradient(135deg, #ffffff 0%, #eff5ff 100%);
    color: var(--test-blue);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.06);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .app-main {
    display: grid;
    gap: 22px;
    min-width: 0;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .tab-content.active {
    display: grid;
    gap: 22px;
}

@media (max-width: 1100px) {
    html[data-app-base-path="testsystem"][data-command-center="admin"] .command-shell {
        grid-template-columns: 1fr;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tabs {
        position: sticky;
        top: 60px;
        display: flex;
        overflow-x: auto;
        align-items: center;
        gap: 10px;
        margin: 18px 0 24px;
        padding: 12px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tab {
        width: auto;
        flex: 0 0 auto;
    }
}

html[data-app-base-path="testsystem"][data-command-center="admin"] section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .create-section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .list-section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .attendance-section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .help-section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .settings-section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .dashboard-card,
html[data-app-base-path="testsystem"][data-command-center="admin"] .stat-card,
html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-card,
html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-card,
html[data-app-base-path="testsystem"][data-command-center="admin"] .collapse-section {
    border: 1px solid var(--test-border);
    border-radius: 24px;
    background: var(--test-surface);
    box-shadow: var(--test-shadow-soft);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .create-section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .list-section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .attendance-section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .help-section,
html[data-app-base-path="testsystem"][data-command-center="admin"] .settings-section {
    padding: 24px 24px 26px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .create-section h2,
html[data-app-base-path="testsystem"][data-command-center="admin"] .list-section h2,
html[data-app-base-path="testsystem"][data-command-center="admin"] .attendance-section h2,
html[data-app-base-path="testsystem"][data-command-center="admin"] .help-section h2,
html[data-app-base-path="testsystem"][data-command-center="admin"] .settings-section h2 {
    margin-bottom: 6px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] h2,
html[data-app-base-path="testsystem"][data-command-center="admin"] h3,
html[data-app-base-path="testsystem"][data-command-center="admin"] h4 {
    color: #16202f;
    letter-spacing: -0.02em;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] h2 {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    margin-bottom: 8px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] h3 {
    font-size: clamp(1.25rem, 2.1vw, 1.55rem);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .section-lead {
    margin: 0 0 20px;
    max-width: 72ch;
    color: var(--test-muted);
    font-size: 1rem;
    line-height: 1.55;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .filter-controls,
html[data-app-base-path="testsystem"][data-command-center="admin"] .attendance-filters,
html[data-app-base-path="testsystem"][data-command-center="admin"] .filter-section {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(250, 247, 242, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .filter-controls,
html[data-app-base-path="testsystem"][data-command-center="admin"] .attendance-filters {
    padding: 16px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .filter-section {
    padding: 20px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .filter-controls {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .filter-controls .filter-group {
    min-width: 0;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #toggleClosedBtn {
    width: 100%;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #createForm,
html[data-app-base-path="testsystem"][data-command-center="admin"] #mitgliedForm,
html[data-app-base-path="testsystem"][data-command-center="admin"] #createUserForm,
html[data-app-base-path="testsystem"][data-command-center="admin"] #emailSettingsForm {
    display: grid;
    gap: 18px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #createForm .form-row,
html[data-app-base-path="testsystem"][data-command-center="admin"] #mitgliedForm .form-row,
html[data-app-base-path="testsystem"][data-command-center="admin"] #createUserForm .form-row,
html[data-app-base-path="testsystem"][data-command-center="admin"] #emailSettingsForm .form-row,
html[data-app-base-path="testsystem"][data-command-center="admin"] #tab-auswertung .filter-section .form-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #tab-auswertung .filter-section .form-row:last-of-type,
html[data-app-base-path="testsystem"][data-command-center="admin"] #tab-auswertung .filter-section .form-row:nth-of-type(2) {
    grid-template-columns: 1fr;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #createForm .form-group,
html[data-app-base-path="testsystem"][data-command-center="admin"] #mitgliedForm .form-group,
html[data-app-base-path="testsystem"][data-command-center="admin"] #createUserForm .form-group,
html[data-app-base-path="testsystem"][data-command-center="admin"] #emailSettingsForm .form-group,
html[data-app-base-path="testsystem"][data-command-center="admin"] #tab-auswertung .filter-section .form-group {
    min-width: 0;
    margin-bottom: 0;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #createForm .form-row + .form-row,
html[data-app-base-path="testsystem"][data-command-center="admin"] #mitgliedForm .form-row + .form-row,
html[data-app-base-path="testsystem"][data-command-center="admin"] #createUserForm .form-row + .form-row,
html[data-app-base-path="testsystem"][data-command-center="admin"] #emailSettingsForm .form-row + .form-row {
    margin-top: -2px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #verleselistenCounter {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--test-blue) !important;
    font-weight: 700;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .search-container,
html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-stats-search {
    border-radius: 16px;
    border: 1px solid var(--test-border);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--test-shadow-soft);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .search-container input,
html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-stats-search input {
    min-height: 50px;
    border: none;
    background: transparent;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.08);
    font-size: 1.4rem;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-value {
    color: #111827;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-label,
html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-sub,
html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-status {
    color: var(--test-muted) !important;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .dashboard-card h4 {
    margin-bottom: 14px;
    font-size: 1.02rem;
    color: #17212f;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-empty {
    color: var(--test-muted);
    line-height: 1.6;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .collapse-summary {
    min-height: 56px;
    padding: 18px 22px;
    font-weight: 700;
    color: #17212f;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .collapse-section[open] > .collapse-summary {
    border-bottom: 1px solid var(--test-border);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .form-group label,
html[data-app-base-path="testsystem"][data-command-center="admin"] .filter-group label {
    margin-bottom: 8px;
    color: #425066;
    font-size: 0.92rem;
    font-weight: 700;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] input,
html[data-app-base-path="testsystem"][data-command-center="admin"] select,
html[data-app-base-path="testsystem"][data-command-center="admin"] textarea,
html[data-app-base-path="testsystem"][data-command-center="admin"] .dropdown-category-selected,
html[data-app-base-path="testsystem"][data-command-center="admin"] .auswertung-kategorie-selected {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] textarea {
    min-height: 120px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #createForm textarea,
html[data-app-base-path="testsystem"][data-command-center="admin"] #mitgliedForm textarea,
html[data-app-base-path="testsystem"][data-command-center="admin"] #emailSettingsForm textarea {
    min-height: 132px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] input:focus,
html[data-app-base-path="testsystem"][data-command-center="admin"] select:focus,
html[data-app-base-path="testsystem"][data-command-center="admin"] textarea:focus,
html[data-app-base-path="testsystem"][data-command-center="admin"] .dropdown-category-selected:focus-within,
html[data-app-base-path="testsystem"][data-command-center="admin"] .auswertung-kategorie-selected:focus {
    border-color: rgba(37, 99, 235, 0.38);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
    outline: none;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .btn-primary,
html[data-app-base-path="testsystem"][data-command-center="admin"] .btn-secondary,
html[data-app-base-path="testsystem"][data-command-center="admin"] .btn-danger,
html[data-app-base-path="testsystem"][data-command-center="admin"] .btn-small,
html[data-app-base-path="testsystem"][data-command-center="admin"] .admin-button {
    min-height: 44px;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: none;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .btn-primary {
    background: linear-gradient(135deg, var(--test-accent) 0%, var(--test-accent-dark) 100%);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .btn-secondary,
html[data-app-base-path="testsystem"][data-command-center="admin"] .btn-small {
    border-color: var(--test-border-strong);
    background: rgba(255, 255, 255, 0.88);
    color: var(--test-text);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .btn-secondary:hover,
html[data-app-base-path="testsystem"][data-command-center="admin"] .btn-small:hover {
    border-color: rgba(37, 99, 235, 0.24);
    background: #ffffff;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .form-actions,
html[data-app-base-path="testsystem"][data-command-center="admin"] .action-buttons {
    gap: 12px;
    margin-top: 4px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #verleselistenCounter,
html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-stats-count,
html[data-app-base-path="testsystem"][data-command-center="admin"] .auswertung-kategorie-summary,
html[data-app-base-path="testsystem"][data-command-center="admin"] .verleselisten-view-hint {
    color: var(--test-muted) !important;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-card,
html[data-app-base-path="testsystem"][data-command-center="admin"] .dashboard-card,
html[data-app-base-path="testsystem"][data-command-center="admin"] .stat-card {
    background: var(--test-surface-strong);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-card {
    padding: 18px 20px;
    border-radius: 20px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .dashboard-card {
    padding: 20px;
    border-radius: 22px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-stats-toolbar {
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-card {
    padding: 22px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .verleseliste-card,
html[data-app-base-path="testsystem"][data-command-center="admin"] .member-item,
html[data-app-base-path="testsystem"][data-command-center="admin"] .user-item {
    border-radius: 20px;
    border-color: var(--test-border);
    box-shadow: var(--test-shadow-soft);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] table {
    border-radius: 18px;
    overflow: hidden;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] th {
    background: linear-gradient(135deg, var(--test-accent) 0%, #c52b32 100%);
}

html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] body {
    background: linear-gradient(180deg, #0f1724 0%, #111c2e 100%);
}

html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .app-shell-header,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] section,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .create-section,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .list-section,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .attendance-section,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .help-section,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .settings-section,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .dashboard-card,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .stat-card,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .kpi-card,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .kamerad-detail-card,
html[data-app-base-path="testsystem"][data-command-center="admin"][data-theme="dark"] .collapse-section {
    background: rgba(24, 37, 68, 0.9);
    border-color: rgba(130, 156, 199, 0.14);
}

@media (max-width: 1024px) {
    html[data-app-base-path="testsystem"][data-command-center="admin"] .filter-controls,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-grid,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .dashboard-grid,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #createForm .form-row,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #mitgliedForm .form-row,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #createUserForm .form-row,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #emailSettingsForm .form-row,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #tab-auswertung .filter-section .form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .header-content {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .header-branding {
        width: 100%;
        align-items: flex-start;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .header-status-pills {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    html[data-app-base-path="testsystem"][data-command-center="admin"] .container {
        padding: 16px 12px 34px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .app-shell-header {
        padding: 22px 18px;
        border-radius: 22px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .header-content,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .header-text,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .header-branding {
        text-align: left;
        align-items: flex-start;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .header-logo {
        height: 76px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .header-text h1 {
        font-size: 2rem;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tabs {
        top: 72px;
        overflow-x: auto;
        gap: 8px;
        padding: 8px;
        border-radius: 18px;
        scroll-padding-inline: 8px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        min-height: 42px;
        padding: 9px 14px;
        font-size: 0.9rem;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .filter-controls,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .kpi-grid,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .dashboard-grid,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #createForm .form-row,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #mitgliedForm .form-row,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #createUserForm .form-row,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #emailSettingsForm .form-row,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #tab-auswertung .filter-section .form-row {
        grid-template-columns: 1fr;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .create-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .list-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .attendance-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .help-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .settings-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .dashboard-card,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-card {
        border-radius: 20px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .create-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .list-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .attendance-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .help-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .settings-section {
        padding: 18px 16px 20px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .section-lead {
        font-size: 0.94rem;
        margin-bottom: 16px;
    }
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-dashboard-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-dashboard-headline h2 {
    margin-bottom: 8px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-dashboard-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-dashboard-panel,
html[data-app-base-path="testsystem"][data-command-center="admin"] .command-member-table-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,249,252,0.98));
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-panel-header h4 {
    margin: 0;
    font-size: 1.05rem;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-panel-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.14);
    color: #3157ad;
    font-weight: 700;
    font-size: 0.84rem;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-metric-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-metric-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-metric-label {
    color: #667085;
    font-size: 0.94rem;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-metric-row strong {
    color: #101828;
    text-align: right;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255,255,255,0.95);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    text-align: left;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-item:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-item-main,
html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-item-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-item-main span,
html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-item-meta span {
    color: #667085;
    font-size: 0.9rem;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-status {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-status.is-open {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-status.is-closed {
    background: rgba(217, 45, 32, 0.12);
    color: #b42318;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-empty-state {
    padding: 18px;
    border-radius: 16px;
    border: 1px dashed rgba(15, 23, 42, 0.16);
    background: rgba(247, 249, 252, 0.9);
    color: #667085;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 18px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-member-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(460px, 1fr);
    gap: 20px;
    align-items: start;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardMemberToolbarHost {
    margin-bottom: 18px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardMemberToolbarHost .kamerad-stats-toolbar {
    margin-bottom: 0;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikTableHost .kamerad-table-wrap {
    margin-top: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-detail-card {
    margin-top: 0;
    border-radius: 22px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardChartsHost .dashboard-grid {
    margin-top: 0;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(220, 38, 38, 0.14));
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.72);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-title {
    min-width: 0;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-title h4 {
    font-size: clamp(1.7rem, 1.8vw, 2.2rem);
    line-height: 1.08;
    margin-bottom: 12px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-meta-list {
    gap: 10px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-header {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary {
    min-width: 0;
    width: 100%;
    padding: 20px 22px;
    border-radius: 20px;
    text-align: left;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "value label"
        "value sub";
    align-items: center;
    column-gap: 18px;
    row-gap: 6px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary-value {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    line-height: 0.95;
    grid-area: value;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary-number {
    font-size: clamp(2.8rem, 3vw, 3.7rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary-unit {
    margin-top: 0.2em;
    font-size: 1.45rem;
    font-weight: 700;
    opacity: 0.96;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary-label {
    grid-area: label;
    margin-top: 0;
    font-size: 1.04rem;
    text-align: right;
    align-self: end;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary-sub {
    grid-area: sub;
    font-size: 0.98rem;
    text-align: right;
    align-self: start;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-kpi-card {
    min-height: 118px;
    padding: 18px 16px 16px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-kpi-number {
    font-size: clamp(2.1rem, 2.2vw, 2.5rem);
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-kpi-label {
    font-size: 0.98rem;
    line-height: 1.15;
    text-wrap: balance;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-fact {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    min-width: 0;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-fact-label {
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-fact strong {
    display: block;
    color: #101828;
    font-size: 1rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-fact-wide {
    grid-column: 1 / -1;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table {
    min-width: 0;
    background: transparent;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table thead {
    display: none;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table,
html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table tbody,
html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table tr {
    display: block;
    width: 100%;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table tr {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    text-align: left;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table td::before {
    content: attr(data-label);
    color: #667085;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex: 0 0 auto;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table td:first-child {
    grid-column: 1 / -1;
    padding-bottom: 12px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table td:first-child::before {
    font-size: 0.76rem;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table td:first-child {
    font-size: 1.02rem;
    font-weight: 700;
    color: #101828;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table td:last-child {
    grid-column: 1 / -1;
}

html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table .kamerad-stunden-pill {
    min-width: 0;
    margin-left: auto;
}

@media (max-width: 1100px) {
    html[data-app-base-path="testsystem"][data-command-center="admin"] .command-dashboard-summary-grid,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .command-member-grid {
        grid-template-columns: 1fr;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-header {
        gap: 16px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary {
        grid-template-columns: 1fr;
        grid-template-areas:
            "value"
            "label"
            "sub";
        row-gap: 8px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary-value {
        justify-content: flex-start;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary-label,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary-sub {
        text-align: left;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table tr {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    html[data-app-base-path="testsystem"][data-command-center="admin"] .command-dashboard-intro,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .command-section-header,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-header {
        flex-direction: column;
        align-items: stretch;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .command-dashboard-actions {
        justify-content: flex-start;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-summary {
        width: 100%;
        text-align: left;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-kpi-grid,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .kamerad-detail-facts {
        grid-template-columns: 1fr;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table td {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table tr {
        padding: 12px;
        gap: 8px 10px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table td::before {
        font-size: 0.76rem;
        letter-spacing: 0.03em;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-category-summary-table .kamerad-stunden-pill {
        padding: 3px 9px;
        font-size: 0.84rem;
    }
}

@media (max-width: 640px) {
    html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tabs {
        top: 66px;
        gap: 6px;
        margin: 14px 0 20px;
        padding: 7px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tab-label-full {
        display: none;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tab-label-short {
        display: inline;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .nav-tab {
        min-height: 40px;
        padding: 8px 11px;
        font-size: 0.84rem;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .command-dashboard-panel,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .command-member-table-panel,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #adminDashboardStatistikDetailHost .kamerad-detail-card {
        border-radius: 18px;
        padding: 16px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .create-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .list-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .attendance-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .help-section,
    html[data-app-base-path="testsystem"][data-command-center="admin"] .settings-section {
        padding: 16px 14px 18px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] #createForm,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #mitgliedForm,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #createUserForm,
    html[data-app-base-path="testsystem"][data-command-center="admin"] #emailSettingsForm {
        gap: 14px;
    }

    html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

html[data-app-base-path="testsystem"][data-command-center="admin"] .command-list-item-meta {
        width: 100%;
    }
}

.feedback-shell {
    display: grid;
    gap: 24px;
}

.feedback-head,
.feedback-list-head,
.feedback-detail-head,
.feedback-item-head,
.feedback-event-head,
.feedback-attachment-head,
.feedback-detail-actions,
.feedback-comment-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.feedback-head {
    align-items: flex-start;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--border-color);
}

.feedback-head h2 {
    margin-bottom: 8px;
}

.feedback-head .section-lead {
    margin: 0;
    max-width: 760px;
}

.feedback-export-action {
    flex: 0 0 auto;
    align-self: center;
    min-width: 96px;
}

.feedback-grid {
    display: grid;
    grid-template-columns: minmax(0, 1120px);
    justify-content: center;
    gap: 22px;
    align-items: start;
}

.feedback-card,
.feedback-detail {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 24px;
}

.feedback-form-card,
.feedback-list-card {
    display: grid;
    gap: 18px;
}

.feedback-list-card {
    order: 1;
}

.feedback-form-card {
    order: 2;
    width: 100%;
    max-width: 680px;
    justify-self: center;
}

.feedback-form-card h3,
.feedback-list-card h3 {
    margin: 0;
}

#feedbackForm {
    display: grid;
    gap: 18px;
}

.feedback-dropzone {
    position: relative;
    border: 2px dashed rgba(181, 18, 27, 0.24);
    border-radius: 16px;
    min-height: 128px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,246,246,0.98));
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.feedback-dropzone.is-dragover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.feedback-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.feedback-dropzone-copy {
    display: grid;
    gap: 6px;
    color: var(--text-muted);
}

.feedback-file-list,
.feedback-list,
.feedback-attachment-list,
.feedback-timeline,
.feedback-metrics,
.feedback-filters,
.feedback-detail-body,
.feedback-detail-side {
    display: grid;
    gap: 12px;
}

.feedback-file-item,
.feedback-attachment-item,
.feedback-event,
.feedback-item,
.feedback-metric {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(255,255,255,0.92);
}

.feedback-file-item,
.feedback-attachment-item {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.feedback-file-item strong,
.feedback-attachment-item a {
    display: block;
}

.feedback-file-item span,
.feedback-attachment-item span,
.feedback-item-meta,
.feedback-detail-meta,
.feedback-detail-dates,
.feedback-file-hint,
.feedback-loading,
.feedback-empty-detail {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.feedback-item {
    text-align: left;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.feedback-item:hover,
.feedback-item.is-active {
    border-color: rgba(181, 18, 27, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.feedback-item p,
.feedback-detail-text,
.feedback-event p {
    margin: 0;
    line-height: 1.6;
}

.feedback-item-meta,
.feedback-detail-meta,
.feedback-detail-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.feedback-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.feedback-badge.is-new {
    background: rgba(181, 18, 27, 0.12);
    color: var(--primary-color);
}

.feedback-badge.is-progress {
    background: rgba(249, 115, 22, 0.14);
    color: #c2410c;
}

.feedback-badge.is-high {
    background: rgba(220, 38, 38, 0.16);
    color: #b91c1c;
}

.feedback-badge.is-done {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.feedback-badge.is-muted {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.feedback-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feedback-metric {
    min-height: 92px;
    padding: 16px;
    display: grid;
    align-content: space-between;
    gap: 6px;
    background: linear-gradient(180deg, #ffffff 0%, #fffafa 100%);
}

.feedback-metric strong {
    font-size: 1.55rem;
    line-height: 1;
    color: var(--primary-color);
}

.feedback-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(250, 250, 250, 0.82);
}

.feedback-filters > * {
    min-width: 0;
}

.feedback-filters > input[type="search"] {
    grid-column: 1 / -1;
}

.feedback-filters input,
.feedback-filters select,
.feedback-manager-form input,
.feedback-manager-form select,
.feedback-manager-form textarea,
.feedback-comment-form textarea {
    width: 100%;
}

.feedback-filters input,
.feedback-filters select {
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #ffffff;
    font-size: 0.96rem;
}

.feedback-open-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid rgba(181, 18, 27, 0.16);
    border-radius: 999px;
    background: rgba(181, 18, 27, 0.06);
    color: var(--text-color);
    font-weight: 700;
    white-space: normal;
    text-align: left;
    cursor: pointer;
}

.feedback-open-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    min-width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid rgba(181, 18, 27, 0.35);
    border-radius: 6px;
    background: #ffffff;
    display: inline-grid;
    place-items: center;
    flex: 0 0 20px;
    transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.feedback-open-toggle input[type="checkbox"]::after {
    content: '';
    width: 6px;
    height: 11px;
    border-right: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
    transition: transform 0.14s ease;
}

.feedback-open-toggle input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(181, 18, 27, 0.12);
}

.feedback-open-toggle input[type="checkbox"]:checked::after {
    transform: rotate(45deg) scale(1);
}

.feedback-open-toggle span {
    flex: 1 1 auto;
}

.feedback-detail-body {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    margin-top: 18px;
}

.feedback-detail {
    width: 100%;
    max-width: 1120px;
    justify-self: center;
}

.feedback-detail-side {
    align-content: start;
}

.feedback-manager-form {
    display: grid;
    gap: 10px;
}

.feedback-comment-box,
.feedback-timeline {
    margin-top: 18px;
}

.feedback-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 34px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(181, 18, 27, 0.08);
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .feedback-grid,
    .feedback-detail-body {
        grid-template-columns: 1fr;
    }

    .feedback-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feedback-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feedback-open-toggle {
        justify-self: start;
    }
}

@media (max-width: 680px) {
    .feedback-card,
    .feedback-detail {
        padding: 16px;
        border-radius: 16px;
    }

    .feedback-head,
    .feedback-list-head,
    .feedback-detail-head,
    .feedback-item-head,
    .feedback-event-head,
    .feedback-attachment-head,
    .feedback-detail-actions,
    .feedback-comment-form {
        flex-direction: column;
        align-items: stretch;
    }

    .feedback-metrics,
    .feedback-filters {
        grid-template-columns: 1fr;
    }

    .feedback-file-item,
    .feedback-attachment-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .help-feedback-entry {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }
}

.feedback-head-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.feedback-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.feedback-inbox,
.feedback-detail {
    min-width: 0;
}

.feedback-inbox {
    width: min(100%, 1180px);
    justify-self: center;
}

.feedback-create-panel,
.feedback-list-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.feedback-create-panel {
    margin-bottom: 16px;
    overflow: hidden;
}

.feedback-create-panel > summary {
    cursor: pointer;
    padding: 16px 18px;
    font-size: 1.05rem;
    font-weight: 800;
    list-style: none;
    border-bottom: 1px solid var(--border-color);
}

.feedback-create-panel > summary::-webkit-details-marker {
    display: none;
}

.feedback-create-panel > summary::after {
    content: '+';
    float: right;
    color: var(--primary-color);
}

.feedback-create-panel[open] > summary::after {
    content: '-';
}

.feedback-create-panel form {
    padding: 18px;
}

.feedback-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.feedback-form-wide,
.feedback-form-footer {
    grid-column: 1 / -1;
}

.feedback-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.feedback-submit {
    min-width: 130px;
}

.feedback-list-panel {
    padding: 18px;
    min-width: 0;
    overflow: hidden;
}

.feedback-inbox {
    display: grid;
    align-content: start;
    gap: 0;
}

.feedback-list {
    max-height: 840px;
    overflow: auto;
    padding-right: 4px;
}

.feedback-item {
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    gap: 14px;
}

.feedback-item.is-active {
    border-color: var(--primary-color);
    box-shadow: inset 4px 0 0 var(--primary-color), 0 8px 18px rgba(15, 23, 42, 0.08);
}

.feedback-item-head {
    justify-content: space-between;
    align-items: flex-start;
}

.feedback-item-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    min-width: 0;
}

.feedback-item-title strong {
    font-size: 1.05rem;
    line-height: 1.35;
}

.feedback-item-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(181, 18, 27, 0.08);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 800;
    white-space: nowrap;
}

.feedback-ticket {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 28px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
    font-weight: 800;
}

.feedback-priority {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.feedback-priority.is-critical {
    background: rgba(185, 28, 28, 0.14);
    color: #991b1b;
}

.feedback-priority.is-high {
    background: rgba(234, 88, 12, 0.14);
    color: #c2410c;
}

.feedback-priority.is-normal {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.feedback-priority.is-low {
    background: rgba(71, 85, 105, 0.12);
    color: #475569;
}

body.feedback-modal-open {
    overflow: hidden;
}

.feedback-modal[hidden] {
    display: none !important;
}

.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.feedback-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.feedback-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    display: grid;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--card-bg);
    box-shadow: 0 24px 72px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.feedback-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 246, 246, 0.94));
}

.feedback-modal-head strong {
    display: block;
    color: var(--text-color);
    font-size: 1.02rem;
}

.feedback-modal-subline {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.feedback-detail {
    max-height: calc(100vh - 124px);
    overflow: auto;
    padding: 22px;
    background: var(--card-bg);
}

.feedback-detail-kicker {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
}

.feedback-detail h3 {
    margin: 0 0 10px;
    font-size: 1.45rem;
}

.feedback-detail-body {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.8fr);
    gap: 18px;
}

.feedback-main-column,
.feedback-detail-side,
.feedback-detail-section,
.feedback-manager-grid,
.feedback-manager-form {
    display: grid;
    gap: 12px;
}

.feedback-detail-section {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
}

.feedback-detail-section h4,
.feedback-timeline h4 {
    margin: 0;
    font-size: 1rem;
}

.feedback-manager-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feedback-manager-form label {
    display: grid;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.feedback-mail-toggle {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
    color: var(--text-color) !important;
}

.feedback-mail-toggle-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(181, 18, 27, 0.16);
    border-radius: 10px;
    background: rgba(181, 18, 27, 0.04);
    color: var(--text-color) !important;
}

.feedback-mail-toggle-card input {
    margin-top: 3px;
}

.feedback-mail-toggle-card.is-disabled {
    opacity: 0.62;
}

.feedback-mail-toggle-copy {
    display: grid;
    gap: 3px;
}

.feedback-mail-toggle-copy strong {
    font-size: 0.95rem;
    line-height: 1.2;
}

.feedback-mail-toggle-copy span {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.feedback-mail-box {
    gap: 10px;
}

.feedback-mail-row {
    display: grid;
    gap: 3px;
}

.feedback-mail-row span {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.feedback-mail-row strong {
    overflow-wrap: anywhere;
    font-size: 0.95rem;
}

.feedback-detail-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-content: stretch;
}

.feedback-detail-actions .btn-primary,
.feedback-detail-actions .btn-secondary {
    min-height: 48px;
    width: 100%;
}

.feedback-delete-action {
    min-height: 42px;
    justify-self: stretch;
}

.feedback-timeline {
    gap: 10px;
}

.feedback-timeline-list {
    display: grid;
    gap: 10px;
    max-height: 680px;
    overflow: auto;
    padding-right: 4px;
}

.feedback-event {
    border-radius: 10px;
    padding: 12px 14px;
}

.feedback-event.is-mail-ok {
    border-color: rgba(22, 163, 74, 0.24);
    background: rgba(240, 253, 244, 0.84);
}

.feedback-event.is-mail-error {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(254, 242, 242, 0.86);
}

.feedback-event.is-mail-muted {
    border-color: rgba(100, 116, 139, 0.22);
    background: rgba(248, 250, 252, 0.9);
}

.feedback-event.is-status {
    border-color: rgba(37, 99, 235, 0.22);
    background: rgba(239, 246, 255, 0.86);
}

.feedback-event-head {
    align-items: start;
    gap: 10px 14px;
}

.feedback-event-head strong {
    font-size: 0.95rem;
    line-height: 1.3;
}

.feedback-event-head span {
    color: var(--text-muted);
    font-size: 0.84rem;
    white-space: nowrap;
}

.feedback-event p {
    color: #334155;
    font-size: 0.94rem;
    line-height: 1.5;
}

.feedback-event-diff {
    margin-top: 6px;
    padding: 7px 9px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-muted);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.feedback-metric.is-alert strong {
    color: #b91c1c;
}

@media (max-width: 1180px) {
    .feedback-detail-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .feedback-head-actions,
    .feedback-form-footer {
        justify-content: stretch;
    }

    .feedback-head-actions > *,
    .feedback-form-footer > button {
        width: 100%;
    }

    .feedback-form-grid,
    .feedback-manager-grid {
        grid-template-columns: 1fr;
    }

    .feedback-modal {
        padding: 10px;
    }

    .feedback-modal-dialog {
        width: calc(100vw - 12px);
        max-height: calc(100vh - 12px);
        border-radius: 16px;
    }

    .feedback-modal-head {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .feedback-detail {
        max-height: calc(100vh - 140px);
        padding: 16px;
    }

    .feedback-detail-section {
        padding: 14px;
    }

    .feedback-event-head span {
        white-space: normal;
    }
}

