/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #1a4c26;
    --dark-green: #143a1d;
    --light-green: #2f6b40;
    --brand-700: #1a4c26;
    --brand-800: #143a1d;
    --black: #1a1a1a;
    --white: #ffffff;
    --gray: #f8f9fa;
    --dark-gray: #6c757d;
    --light-gray: #e9ecef;
    --border-color: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --radius-surface: 14px;
    --shadow-surface: 0 8px 24px rgba(26, 26, 26, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --danger: #e74c3c;
    --warning: #f39c12;
    --success: #27ae60;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--black);
    background: var(--gray);
    overflow: hidden;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 20px;
    background: var(--black);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 6px;
    z-index: 2000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 20px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
    border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

body::-webkit-scrollbar {
    width: 0;
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mobile Menu Toggle - Hidden by default */
.mobile-menu-toggle {
    display: none;
}

/* Login Page Styles */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--black);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--black);
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-green);
}

.error-message {
    background: #fee;
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.success-message {
    background: #e8f8ee;
    color: var(--success);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.login-logo-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.login-form-meta {
    margin-top: 14px;
    text-align: center;
}

.login-link {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-link:hover {
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--brand-700);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.btn-primary:hover {
    background: var(--brand-800);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(31, 122, 67, 0.3);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.demo-info {
    color: var(--dark-gray);
    font-size: 0.85rem;
    background: var(--gray);
    padding: 10px;
    border-radius: 8px;
}

/* Admin Page Styles */
.admin-page {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 0;
    display: none;
}

.sidebar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: var(--transition);
}

.sidebar-close:hover {
    color: var(--danger);
}

.sidebar-header .logo-icon {
    font-size: 1.8rem;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    color: var(--black);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--dark-gray);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.nav-item:hover {
    background: var(--gray);
    color: var(--black);
}

.nav-item.active {
    background: var(--light-green);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(31, 122, 67, 0.3);
}

.nav-icon {
    font-size: 1.3rem;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: var(--gray);
    border-radius: 8px;
}

.user-icon {
    font-size: 1.5rem;
}

.user-name {
    font-weight: 500;
    color: var(--black);
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    display: block;
    text-decoration: none;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--gray);
}

.content-header {
    background: var(--white);
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.content-header h1 {
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    color: var(--black);
    word-break: break-word;
    line-height: 1.2;
}

.date-display {
    color: var(--dark-gray);
    font-size: 0.95rem;
}

/* Page Content */
.page-content {
    display: none;
    padding: 36px 34px 40px;
}

.page-content.active {
    display: block;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius-surface);
    display: flex;
    align-items: center;
    gap: 22px;
    box-shadow: var(--shadow-surface);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    background: var(--light-green);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stat-content h3 {
    font-size: 0.9rem;
    color: var(--dark-gray);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-700);
}

/* Dashboard Section */
.dashboard-section {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-surface);
    box-shadow: var(--shadow-surface);
}

.dashboard-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--black);
}

.shifts-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shift-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary-green);
}

.shift-preview-info {
    flex: 1;
}

.shift-preview-date {
    font-weight: 600;
    color: var(--black);
    margin-bottom: 5px;
}

.shift-preview-details {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    color: var(--black);
    line-height: 1.2;
}

.page-header .btn-primary {
    width: auto;
    max-width: 250px;
    margin-left: auto;
}

.shift-requests-section-spaced {
    margin-bottom: 40px;
}

.section-title-row {
    margin-bottom: 20px;
    color: var(--brand-700);
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid var(--light-green);
    padding-left: 10px;
    line-height: 1.2;
}

.section-title-row-warning {
    color: var(--warning);
}

.section-title-row-top {
    margin-top: 40px;
}

.section-title-simple {
    margin: 10px 0 15px;
    color: var(--brand-700);
}

.table-container-spaced {
    margin-bottom: 30px;
}

.table-container-spaced-lg {
    margin-bottom: 40px;
}

.table-cell-loading {
    text-align: center;
    padding: 30px;
}

.stats-grid-spaced {
    margin-bottom: 30px;
}

.stat-card-highlight {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: var(--white);
}

.nuki-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.nuki-action-btn {
    flex: 1;
    padding: 20px;
    font-size: 1.1rem;
}

.nuki-action-btn-danger {
    background: var(--danger);
}

.badge-role-admin {
    background: var(--dark-green);
}

.badge-role-member {
    background: var(--brand-700);
}

.badge-role-guest {
    background: var(--warning);
    color: #000;
}

.badge-status-active,
.badge-status-success {
    background: var(--success);
}

.badge-status-expired {
    background: var(--dark-gray);
}

.badge-status-error {
    background: var(--danger);
}

.btn-secondary-compact {
    padding: 5px 10px;
    font-size: 0.85rem;
}

.section-block-spaced {
    margin-bottom: 40px;
}

.heading-green {
    margin-bottom: 20px;
    color: var(--brand-700);
}

.checkbox-inline-label-admin {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: #666;
}

.event-recurrence-until-hidden {
    display: none;
}

.event-recurrence-hint {
    margin: -5px 0 15px;
    color: #3f4b57;
    font-size: 0.96rem;
}

.event-occurrence-hint {
    display: none;
    margin-bottom: 15px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f6f8fb;
    color: #3f4b57;
    font-size: 0.96rem;
}

.modal-content-lg {
    max-width: 700px;
}

.modal-content-md {
    max-width: 600px;
}

.input-readonly {
    background: #f0f0f0;
}

.modal-section {
    border-top: 2px solid var(--border-color);
    margin: 25px 0;
    padding-top: 25px;
}

.modal-section-heading {
    margin-bottom: 15px;
    color: var(--dark-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-section-heading-danger {
    color: var(--danger);
}

.btn-primary-compact {
    padding: 5px 12px;
    font-size: 0.9rem;
}

.modal-actions-spaced {
    margin-top: 30px;
}

.form-helper-muted {
    color: #666;
    font-size: 12px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-input-auto {
    width: auto;
    cursor: pointer;
}

.checkbox-help {
    color: #666;
    font-size: 12px;
    margin-left: 30px;
    display: block;
    margin-top: 4px;
}

.kasse-details-content-padding {
    padding: 20px;
}

.empty-state-text {
    color: var(--dark-gray);
}

.empty-state-text-muted {
    color: #666;
    font-style: italic;
}

.empty-state-text-danger {
    color: var(--danger);
}

.shift-requests-table-wrapper {
    overflow-x: auto;
}

.shift-requests-table-enhanced {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shift-requests-table-enhanced thead tr {
    background: linear-gradient(to right, var(--dark-green), var(--light-green));
    color: var(--white);
}

.shift-requests-table-enhanced th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
}

.shift-requests-table-enhanced th.center,
.shift-requests-table-enhanced td.center {
    text-align: center;
}

.shift-request-row {
    background: var(--request-row-bg, var(--white));
    border-left: 4px solid var(--request-row-border, var(--primary-green));
}

.shift-request-cell {
    padding: 16px;
}

.shift-request-cell-strong {
    font-weight: 500;
}

.shift-request-cell-muted {
    color: #666;
    font-size: 14px;
}

.shift-request-cell-subtle {
    color: #666;
    font-size: 13px;
}

.shift-request-nowrap {
    white-space: nowrap;
}

.inline-icon-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.shift-request-time-muted {
    color: #999;
}

.shift-request-notes {
    max-width: 200px;
}

.shift-request-notes-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
    font-size: 14px;
}

.shift-request-notes-empty {
    color: #999;
}

.shift-request-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--status-bg, #fff3cd);
    color: var(--status-color, #856404);
}

.verification-ok {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #198754;
    font-weight: 500;
}

.verification-pending {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6c757d;
}

.verification-icon {
    font-size: 18px;
}

.shift-request-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.shift-request-action-btn {
    padding: 10px 14px;
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shift-request-action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.shift-request-action-edit {
    background: #0d6efd;
}

.shift-request-action-approve {
    background: #198754;
}

.shift-request-action-reject {
    background: #dc3545;
}

.shift-request-action-delete {
    background: #6c757d;
}

.user-row {
    background: var(--user-row-bg, var(--white));
}

.user-role-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #d1e7dd;
    color: #0f5132;
}

.user-notification-on {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #198754;
}

.user-notification-off {
    color: #6c757d;
}

.user-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-action-btn {
    padding: 8px 16px;
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}

.user-action-edit {
    background: #0d6efd;
}

.user-action-credentials {
    background: #b36b00;
}

.user-action-credentials:hover {
    background: #8f5600;
}

.user-action-delete {
    background: #dc3545;
}

/* Table Styles */
.table-container {
    background: var(--white);
    border-radius: var(--radius-surface);
    overflow: hidden;
    box-shadow: var(--shadow-surface);
    transition: var(--transition);
}

.table-container:hover {
    box-shadow: 0 12px 28px rgba(26, 26, 26, 0.12);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--brand-700);
    color: var(--white);
}

.data-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--gray);
}

.data-table td {
    padding: 18px 20px;
    color: var(--black);
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-geplant {
    background: #fff3cd;
    color: #856404;
}

.status-bestätigt {
    background: #d4edda;
    color: #155724;
}

.status-abgeschlossen {
    background: #d1ecf1;
    color: #0c5460;
}

.status-abgesagt {
    background: #f8d7da;
    color: #721c24;
}

.status-ausstehend {
    background: #fff3cd;
    color: #856404;
}

.status-verifiziert {
    background: #cfe2ff;
    color: #084298;
}

.status-genehmigt {
    background: #d1e7dd;
    color: #0f5132;
}

.status-abgelehnt {
    background: #f8d7da;
    color: #842029;
}

.status-vom_mitglied_abgesagt {
    background: #dc3545;
    color: #ffffff;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-edit, .btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-edit {
    background: var(--primary-green);
    color: var(--white);
}

.btn-edit:hover {
    background: var(--dark-green);
}

.btn-delete {
    background: var(--danger);
    color: var(--white);
}

.btn-delete:hover {
    background: #c0392b;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--light-gray);
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Modal Styles */
/* Verhindert Hintergrund-Scroll wenn Modal offen */
body.modal-open {
    overflow: hidden;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overscroll-behavior: contain;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.3rem;
    color: var(--black);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark-gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--black);
}

.modal-content form {
    padding: 25px;
    overflow-x: hidden;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--black);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.modal-actions button {
    flex: 1;
}

/* Occurrences List Styles */
.occurrences-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.occurrence-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}

.occurrence-item:hover {
    border-color: var(--primary-green);
    background: #f0f8f4;
}

.occurrence-item-info {
    flex: 1;
}

.occurrence-date {
    font-weight: 600;
    color: var(--black);
    margin-bottom: 4px;
}

.occurrence-time {
    font-size: 0.9em;
    color: var(--dark-gray);
}

.occurrence-action {
    background: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: var(--transition);
}

.occurrence-action:hover {
    background: var(--dark-green);
}

.occurrence-item-past {
    opacity: 0.7;
}

.occurrence-past-badge {
    display: inline-block;
    background: var(--warning);
    color: var(--white);
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 600;
}

.modal-body {
    padding: 20px 24px 18px;
    max-height: 500px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }

    .sidebar .logo-text,
    .sidebar .nav-link span,
    .sidebar .user-info h4,
    .sidebar .user-info p {
        display: none;
    }

    .sidebar .nav-link {
        justify-content: center;
        padding: 15px;
    }

    .sidebar .nav-link i {
        margin-right: 0;
    }

    .main-content {
        margin-left: 70px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        transition: left 0.3s ease;
        z-index: 1100;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-header h2 {
        font-size: 1rem;
    }

    .sidebar-logo {
        width: 35px !important;
        height: 35px !important;
    }

    .main-content {
        margin-left: 0;
        padding: 0;
    }

    .content-header {
        padding: 15px 20px;
        padding-left: 70px;
    }

    .content-header h1 {
        font-size: 1rem;
    }

    .date-display {
        display: none;
    }

    .page-content {
        padding: 20px 15px;
    }

    .sidebar-close {
        display: block;
    }

    /* Hamburger Menu Button */
    .mobile-menu-toggle {
        display: flex !important;
        position: fixed;
        top: 12px;
        left: 15px;
        z-index: 1200;
        width: 45px;
        height: 45px;
        background: var(--primary-green);
        border: none;
        border-radius: 10px;
        color: var(--white);
        font-size: 1.5rem;
        cursor: pointer;
        box-shadow: 0 4px 12px var(--shadow-lg);
        align-items: center;
        justify-content: center;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .page-header h2 {
        font-size: 1.5rem;
    }

    .page-header .btn-primary {
        width: 100%;
        max-width: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-card h3 {
        font-size: 1.75rem;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 600px;
    }

    .data-table.mobile-cards {
        min-width: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 25px 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }

    /* Login Page Mobile */
    .login-container {
        padding: 15px;
    }

    .login-card {
        padding: 30px 25px;
    }

    .login-logo {
        font-size: 1.75rem;
    }
}

/* ========================================
   Smartphone Optimierungen (Admin)
   ======================================== */
@media (max-width: 768px) {
    body,
    .admin-page {
        height: auto;
        overflow: auto;
    }

    .content-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: var(--white);
    }

    .page-content {
        padding-bottom: 80px;
    }

    .stat-card {
        flex-direction: row;
        gap: 12px;
    }

    .stat-icon {
        width: 52px;
        height: 52px;
        font-size: 1.8rem;
    }

    .data-table {
        min-width: 0;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Tabellen als Karten auf Smartphone */
    .data-table.mobile-cards thead {
        display: none;
    }

    .data-table.mobile-cards,
    .data-table.mobile-cards tbody,
    .data-table.mobile-cards tr,
    .data-table.mobile-cards td {
        display: block;
        width: 100%;
    }

    .data-table.mobile-cards tr {
        margin-bottom: 16px;
        background: var(--white);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 8px 10px;
        box-shadow: 0 2px 8px var(--shadow);
    }

    .data-table.mobile-cards td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 6px;
        border-bottom: 1px dashed var(--light-gray);
        text-align: left;
        align-items: flex-start;
        white-space: normal;
        word-break: break-word;
    }

    .data-table.mobile-cards td:last-child {
        border-bottom: none;
    }

    .data-table.mobile-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--dark-gray);
        min-width: 90px;
    }

    .data-table.mobile-cards .action-buttons {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    .data-table.mobile-cards .btn-primary,
    .data-table.mobile-cards .btn-secondary,
    .data-table.mobile-cards .btn-edit,
    .data-table.mobile-cards .btn-delete {
        width: 100%;
    }

    .table-container {
        overflow-x: visible;
    }

    .shift-requests-section > div {
        overflow-x: visible !important;
    }
}

@media (max-width: 480px) {
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .page-header h2 {
        font-size: 1.25rem;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }

    .stat-card p {
        font-size: 0.9rem;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .badge {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}

/* Sidebar Overlay for Mobile */
@media (max-width: 768px) {
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1050;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* Dynamische Felder Styling */
#getraenkeContainer .form-row,
#sonderausgabenContainer .form-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa;
}

#getraenkeContainer .form-row:hover,
#sonderausgabenContainer .form-row:hover {
    background: #e9ecef;
    border-color: var(--dark-green);
}

#getraenkeContainer .form-row .form-group,
#sonderausgabenContainer .form-row .form-group {
    margin-bottom: 0;
}

#getraenkeContainer .form-row label,
#sonderausgabenContainer .form-row label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

#getraenkeContainer .form-row input,
#sonderausgabenContainer .form-row input {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* =====================================================
   MEMBERSHIP APPLICATIONS STYLES
   ===================================================== */

.header-filter {
    display: flex;
    gap: 10px;
}

.header-filter .form-control {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    font-size: 0.95rem;
    cursor: pointer;
}

.header-filter .form-control:focus {
    outline: none;
    border-color: var(--dark-green);
    box-shadow: 0 0 0 3px rgba(45, 122, 68, 0.1);
}

#membersPage .header-filter {
    align-items: center;
    flex-wrap: wrap;
}

#membersPage .header-filter .btn-primary,
#membersPage .header-filter .btn-secondary {
    width: auto;
    white-space: nowrap;
}

.member-relation-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.member-relation-badge {
    text-transform: none;
    letter-spacing: normal;
}

.member-related-list {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    background: #f8fbf9;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-related-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.member-related-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.member-related-main strong,
.member-related-main a {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.member-related-item a {
    color: var(--brand-700);
    text-decoration: none;
}

.member-related-item a:hover {
    text-decoration: underline;
}

.member-related-empty {
    color: var(--dark-gray);
    margin: 0;
}

@media (max-width: 768px) {
    .member-related-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* Application Detail Modal */
#applicationDetailContent {
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.application-detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.application-detail-section:last-child {
    border-bottom: none;
}

.application-detail-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--dark-green);
    font-size: 1.05rem;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item label {
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: #333;
    font-size: 0.95rem;
    word-break: break-word;
}

.detail-item span a {
    color: var(--dark-green);
    text-decoration: none;
}

.detail-item span a:hover {
    text-decoration: underline;
}

.iban-masked {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: #666;
}

.message-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--dark-green);
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Edit-Modus Eingabefelder im Detail-Modal */
.edit-field {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.93rem;
    font-family: 'Poppins', sans-serif;
    background: var(--white);
    color: var(--black);
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.edit-field:focus {
    outline: none;
    border-color: var(--primary-green);
}

.edit-field-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-info {
    background: #d4edff;
    color: #0066cc;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* Modal Buttons */
.btn-warning {
    background: #ff9800;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-warning:hover {
    background: #e68900;
}

.btn-success {
    background: var(--dark-green);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-success:hover {
    background: #1a4c26;
}

/* Modal Content Sizing */
.modal-content-lg {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    flex: 1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Table Actions for mobile */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content-lg {
        max-width: 90vw;
    }
    
    .application-detail-section {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
}



/* CSP Compliance: Utility Classes */

/* Hide element without inline styles */
.event-society-hidden {
    display: none;
}

/* Nuki not implemented button styling (no special inline styles) */
.nuki-not-implemented {
    /* Alert triggered via JavaScript event listener */
}
