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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

header {
    background: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

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

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

.auth-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5aa0;
}

.nav-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 0;
    border-top: 1px solid #eee;
}

/* Hamburger menu styles */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #2c5aa0;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Navigation styles */
.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: #f0f0f0;
}

.nav-menu li.active a {
    color: #2c5aa0;
    border-bottom: 3px solid #2c5aa0;
    background-color: #f8f9fa;
}

.hero {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c5aa0;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.sections {
    padding: 3rem 0;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.section-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.section-card:hover {
    transform: translateY(-5px);
}

.section-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.section-card h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.section-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: #2c5aa0;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background: #1e3f73;
}

footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

.social-links a {
    color: #fff;
    
    margin: 0 0.5rem;
    text-decoration: none;
}

.login-btn {
    background: #2c5aa0;
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.login-btn:hover {
    background: #1e3f73;
}

.logout-btn {
    background: #dc3545;
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background: #c82333;
}

.user-info {
    color: #2c5aa0;
    font-weight: bold;
    margin-right: 1rem;
}

.user-info.clickable {
    cursor: pointer;
    transition: color 0.3s;
}

.user-info.clickable:hover {
    color: #1e3f73;
    text-decoration: underline;
}

/* User details modal styles */
.user-details {
    margin: 1rem 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row label {
    font-weight: bold;
    color: #2c5aa0;
}

.detail-row span {
    color: #333;
}

.modal-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    position: relative;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.form-group {
    display: table-row;
    margin-bottom: 1rem;
}

.form-group label {
    display: table-cell;
    width: 150px;
    padding: 0.5rem 1rem 0.5rem 0;
    font-weight: bold;
    vertical-align: top;
    white-space: nowrap;
}

.form-group input,
.form-group select,
.form-group textarea {
    display: table-cell;
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    vertical-align: top;
}

.form-group select {
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

/* Container for form groups to act as table */
.modal-body form {
    display: table;
    width: 100%;
    border-spacing: 0;
}

/* Special handling for complex form groups */
.form-group.complex {
    display: block;
    margin-bottom: 1rem;
}

.form-group.complex label {
    display: block;
    width: auto;
    padding: 0 0 0.5rem 0;
    white-space: normal;
}

/* Checkbox groups for multiple selections */
.checkbox-group {
    display: block;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    background-color: #fff;
}

.checkbox-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: normal;
    cursor: pointer;
    user-select: none;
}

.checkbox-label:last-child {
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.checkbox-label:hover {
    background-color: #f5f5f5;
    border-radius: 3px;
    padding: 0.2rem;
}

/* Form-row should remain block layout */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    display: block;
    flex: 1;
    margin-bottom: 0;
}

.form-row .form-group label {
    display: block;
    width: auto;
    padding: 0 0 0.5rem 0;
    white-space: normal;
}

.form-row .form-group input,
.form-row .form-group select,
.form-row .form-group textarea {
    display: block;
    width: 100%;
}

/* Apply mobile-style layout for all screen sizes */
.form-group {
    display: block;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    width: auto;
    padding: 0 0 0.5rem 0;
    white-space: normal;
}

.form-group input,
.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
}

.modal-body form {
    display: block;
}

@media (max-width: 768px) {
    /* Mobile styles now redundant since applied globally */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 1rem;
    }
    
    /* Filter section mobile styles */
    .filter-section {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .filter-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Filter toggle mobile styles */
    .filter-toggle-btn {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Content area styling */
.content-area {
    padding: 2rem 0;
}

.action-buttons {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Filter section */
.filter-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-subgroup {
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.filter-subgroup h4 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.filter-label {
    font-weight: bold;
    color: #2c5aa0;
    margin-bottom: 0.5rem;
}

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

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Filter toggle button */
.filter-toggle-container {
    margin: 1rem 0;
}

.filter-toggle-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #2c5aa0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    width: auto;
    font-size: 0.9rem;
}

.filter-toggle-btn:hover {
    background: #e9ecef;
    border-color: #2c5aa0;
    transform: translateY(-1px);
}

.filter-toggle-btn:active {
    transform: translateY(0);
}

#filter-toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Meine Gruppen filter styling */
.my-groups-filter {
    background: #e8f4fd !important;
    border-color: #2c5aa0 !important;
    font-weight: 500;
}

.my-groups-filter:hover {
    background: #d1ecf1 !important;
    border-color: #1a4480 !important;
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #2c5aa0;
}

.data-table th a {
    color: #2c5aa0;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    transition: color 0.2s ease;
}

.data-table th a:hover {
    color: #1e4088;
    background: rgba(44, 90, 160, 0.1);
}

/* Administration Styles */
.admin-nav {
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
}

.admin-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0;
}

.admin-nav-list li {
    margin: 0;
}

.admin-nav-list li a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.admin-nav-list li a:hover {
    color: #2c5aa0;
    background: #f8f9fa;
}

.admin-nav-list li.active a {
    color: #2c5aa0;
    border-bottom-color: #2c5aa0;
    background: #f8f9fa;
}

/* Dropdown Styles */
.admin-nav-dropdown {
    position: relative;
}

.admin-nav-dropdown .dropdown-toggle {
    cursor: pointer;
}

.admin-nav-dropdown .dropdown-arrow {
    font-size: 0.8em;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.admin-nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
    border-bottom: none;
    transition: all 0.3s ease;
}

.dropdown-menu li a:hover {
    background: #f8f9fa;
    color: #2c5aa0;
}

.dropdown-menu li.active a {
    background: #2c5aa0;
    color: white;
}

.dropdown-menu li:first-child a {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.dropdown-menu li:last-child a {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.admin-overview {
    margin-top: 2rem;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.admin-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.admin-card h4 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.admin-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.admin-section {
    margin-top: 2rem;
}

.config-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.config-section h4 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.config-item:last-child {
    border-bottom: none;
}

.config-item label {
    font-weight: bold;
    color: #333;
}

.config-item span {
    color: #666;
}

.config-item input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.footer-text-wrapper {
    position: relative;
    display: inline-block;
}

.footer-text-tooltip {
    position: absolute;
    top: -35px;
    left: 0;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

.footer-text-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 20px;
    border: 5px solid transparent;
    border-top-color: #333;
}

.footer-text-wrapper:hover .footer-text-tooltip {
    opacity: 1;
    visibility: visible;
}

.permissions-overview,
.roles-overview {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.permissions-overview h4,
.roles-overview h4 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.functions-list {
    display: grid;
    gap: 1rem;
}

.function-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.function-name {
    font-weight: bold;
    color: #2c5aa0;
    font-family: monospace;
}

.function-description {
    color: #666;
}

.roles-table {
    margin-top: 1rem;
}

.templates-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.templates-section h4 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.template-list {
    display: grid;
    gap: 1rem;
}

.template-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-content {
    flex: 1;
}

.template-item h5 {
    color: #2c5aa0;
    margin: 0 0 0.5rem 0;
}

.template-item p {
    color: #666;
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
}

/* Textarea styling */
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
}

/* Form Row Layout - Mobile-style for all screens */
.form-row {
    display: block;
    margin-bottom: 1rem;
}

.form-row .form-group {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 1rem;
    }
}

/* Target Audience Layout */
.target-audience-horizontal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.radio-buttons-group label {
    display: flex !important;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    flex-direction: row;
    width: auto !important;
    padding: 0 !important;
}

.radio-buttons-group input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: #2c5aa0;
}

/* Horizontal Checkboxes - Below radio buttons */
.horizontal-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    margin-top: 0.5rem;
}

.checkbox-item {
    display: flex !important;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
    padding: 0.25rem 0.5rem !important;
    background: #f8f9fa;
    border-radius: 3px;
    border: 1px solid #ddd;
    white-space: nowrap;
    font-size: 0.9rem;
    flex-direction: row;
    width: auto !important;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin-right: 0.4rem;
    accent-color: #2c5aa0;
}

.checkbox-item:hover {
    background: #f0f8ff;
    border-color: #2c5aa0;
}

.radio-item {
    display: flex !important;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 3px;
    border: 1px solid #ddd;
    font-size: 0.9rem;
}

.radio-item input[type="radio"] {
    width: auto;
    margin-right: 0.4rem;
    accent-color: #2c5aa0;
}

.radio-item:hover {
    background: #f0f8ff;
    border-color: #2c5aa0;
}

@media (max-width: 768px) {
    .target-audience-horizontal {
        flex-direction: column;
        gap: 1rem;
    }
    
    .radio-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .horizontal-checkboxes {
        margin-left: 1rem;
    }
}

/* Legacy Radio Group Styles (for compatibility) */
.radio-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
    white-space: nowrap;
}

.radio-group input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: #2c5aa0;
}

@media (max-width: 768px) {
    .radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Checkbox Group Styles */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    max-height: 150px;
    overflow-y: auto;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    background: #fff;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: #2c5aa0;
}

.checkbox-group label:hover {
    background: #f0f8ff;
    border-color: #2c5aa0;
}

@media (max-width: 768px) {
    .checkbox-group {
        flex-direction: column;
        max-height: 120px;
        gap: 0.5rem;
    }
    
    .checkbox-group label {
        padding: 0.5rem;
    }
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
}

/* Alert Styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Event specific styles */
.no-events {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

.target-audience {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.termin-type {
    margin-top: 0.5rem;
}

.termin-details h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.termin-details p {
    margin-bottom: 0.75rem;
}

.termin-details strong {
    color: #495057;
}

/* Mobile responsiveness for admin navigation */
@media (max-width: 1250px) {
    .admin-nav-list {
        flex-direction: column;
    }
    
    .admin-nav-list li a {
        padding: 0.75rem 1rem;
    }
    
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-left: 3px solid #2c5aa0;
        margin-left: 1rem;
        background: #f8f9fa;
    }
    
    .admin-nav-dropdown.open .dropdown-menu {
        display: block;
    }
    
    .admin-cards {
        grid-template-columns: 1fr;
    }
    
    .config-item,
    .template-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .function-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.btn-small {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.status {
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status.active,
.status.good {
    background: #d4edda;
    color: #155724;
}

.status.fair {
    background: #fff3cd;
    color: #856404;
}

.status.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Role badges */
.role-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.role-user {
    background: #e2e3e5;
    color: #495057;
}

.role-member {
    background: #cce5ff;
    color: #004085;
}

.role-admin {
    background: #f8d7da;
    color: #721c24;
}

/* Clickable name styling */
.clickable-name {
    cursor: pointer;
    color: #2c5aa0;
    text-decoration: underline;
    transition: color 0.3s;
}

.clickable-name:hover {
    color: #1e3f73;
}

/* Permission badges */
.permissions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.permission-badge {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid #dee2e6;
}

.group-badge {
    background: #d1ecf1;
    color: #0c5460;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid #b8daff;
}

/* Status badges for MFA */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* MFA Setup Steps */
.mfa-setup-step {
    margin-bottom: 1rem;
}

.mfa-setup-step h3 {
    color: #2c5aa0;
    margin-bottom: 0.5rem;
}

.mfa-setup-step ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.mfa-setup-step li {
    margin-bottom: 0.25rem;
}

/* Force hide modals */
.modal.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Event styling */
.calendar-view {
    margin-top: 1rem;
}

.event-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    padding: 1rem;
    align-items: center;
}

.event-date {
    text-align: center;
    margin-right: 1rem;
    min-width: 60px;
}

.event-date .day {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5aa0;
    display: block;
}

.event-date .month {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
}

.event-details {
    flex: 1;
    margin-right: 1rem;
}

.event-details h4 {
    margin: 0 0 0.5rem 0;
    color: #2c5aa0;
}

.event-details p {
    margin: 0.2rem 0;
    color: #666;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 1200px) {
    .hamburger {
        display: flex;
    }
    
    .nav-section {
        justify-content: flex-end;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: #fff;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        padding-top: 80px;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }
    
    .nav-menu li {
        border-bottom: 1px solid #eee;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        color: #333;
        border-radius: 0;
    }
    
    .nav-menu a:hover {
        background-color: #f8f9fa;
    }
    
    .header-content {
        position: relative;
    }
    
    .auth-section {
        justify-content: flex-end;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        margin: 1rem auto;
        width: 95%;
        max-height: calc(100vh - 2rem);
        /* Override all custom modal widths on mobile */
        max-width: none !important;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .event-item {
        flex-direction: column;
        text-align: center;
    }
    
    .event-date {
        margin: 0 0 1rem 0;
    }
    
    .event-details {
        margin: 0 0 1rem 0;
    }
}

/* Details Menu Styles */
.details-menu {
    margin: 1rem 0;
}

.detail-menu-item h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.detail-page-list {
    list-style: none;
    padding: 0;
}

.detail-page-list li {
    margin-bottom: 1rem;
}

.detail-page-btn {
    width: 100%;
    text-align: left;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.detail-page-btn:hover {
    border-color: #2c5aa0;
    background: #e3f2fd;
    transform: translateY(-2px);
}

.detail-page-btn strong {
    color: #2c5aa0;
    font-size: 1.1rem;
}

.detail-page-btn span {
    display: block;
    margin-top: 0.5rem;
}

/* Modal size variations for different types */

/* Large modals for complex forms and data */
#stammdatenModal .modal-content,
#stammdatenEditModal .modal-content,
#editMemberModal .modal-content,
#newMemberModal .modal-content,
#editTerminModal .modal-content,
#newTerminModal .modal-content,
#editInventarModal .modal-content,
#newInventarModal .modal-content {
    max-width: 800px;
}

/* Extra large modals for MFA setup with QR codes */
#mfaSetupModal .modal-content {
    max-width: 900px;
}

/* Medium modals for user details and viewing */
#userModal .modal-content,
#memberDetailsModal .modal-content,
#terminDetailsModal .modal-content,
#inventarDetailsModal .modal-content {
    max-width: 750px;
}

#stammdatenContent {
    min-height: 200px;
}

/* Tablet responsive adjustments for modals */
@media (max-width: 1024px) and (min-width: 769px) {
    .modal-content {
        width: 85%;
    }
    
    /* Slightly reduce modal sizes on tablets */
    #stammdatenModal .modal-content,
    #stammdatenEditModal .modal-content,
    #editMemberModal .modal-content,
    #newMemberModal .modal-content,
    #editTerminModal .modal-content,
    #newTerminModal .modal-content,
    #editInventarModal .modal-content,
    #newInventarModal .modal-content {
        max-width: 750px;
    }
    
    #mfaSetupModal .modal-content {
        max-width: 800px;
    }
    
    #userModal .modal-content,
    #memberDetailsModal .modal-content,
    #terminDetailsModal .modal-content,
    #inventarDetailsModal .modal-content {
        max-width: 700px;
    }
}

/* Form layout improvements for stammdaten */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Details grid for inventory and other detail views */
.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #2c5aa0;
}

.detail-item strong {
    color: #555;
    font-weight: 600;
    margin-right: 1rem;
    min-width: 120px;
}

.detail-item span {
    text-align: right;
    flex: 1;
    color: #333;
}

/* Responsive details grid */
@media (min-width: 768px) {
    .details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Item link styling for inventory */
.item-link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
}

.item-link:hover {
    text-decoration: underline;
    color: #1e3d72;
}

/* Statistics Dashboard Styles */
.statistics-dashboard {
    margin: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stats-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #2c5aa0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stats-card h4 {
    margin: 0 0 1rem 0;
    color: #2c5aa0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.stats-content {
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}

.stat-value.active {
    color: #28a745;
}

.stat-value.inactive {
    color: #6c757d;
}

.stat-value.upcoming {
    color: #007bff;
}

.stat-value.defect {
    color: #dc3545;
}

.stats-chart {
    margin-top: 1rem;
    text-align: center;
}

.detailed-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.chart-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-container h4 {
    margin: 0 0 1rem 0;
    color: #2c5aa0;
    text-align: center;
    font-size: 1.1rem;
}

/* Icon styles for statistics */
.icon-users::before {
    content: "👥";
    font-style: normal;
}

.icon-calendar::before {
    content: "📅";
    font-style: normal;
}

.icon-archive::before {
    content: "📦";
    font-style: normal;
}

.icon-photo::before {
    content: "🖼️";
    font-style: normal;
}

/* Responsive adjustments for statistics */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .detailed-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
}

/* Statistics loading states */
.stats-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.stats-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

/* Chart responsive canvas */
.chart-container canvas {
    max-width: 100%;
    height: auto !important;
}

/* RSVP Interface Styles */
.rsvp-section {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.rsvp-user-interface {
    margin-bottom: 1rem;
}

.rsvp-prompt {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.rsvp-current-response {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #e3f2fd;
    border-radius: 4px;
    color: #1565c0;
    font-size: 0.9rem;
}

.rsvp-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.rsvp-btn {
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    border-radius: 4px;
    background: #f8f9fa;
    color: #495057;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.rsvp-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.rsvp-btn.active {
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rsvp-zusagen {
    border-color: #28a745;
    color: #28a745;
}

.rsvp-zusagen.active {
    background: #28a745;
    color: white;
}

.rsvp-absagen {
    border-color: #dc3545;
    color: #dc3545;
}

.rsvp-absagen.active {
    background: #dc3545;
    color: white;
}

.rsvp-eventuell {
    border-color: #ffc107;
    color: #856404;
}

.rsvp-eventuell.active {
    background: #ffc107;
    color: #212529;
}

.rsvp-delete {
    border-color: #6c757d;
    color: #6c757d;
}

.rsvp-delete:hover {
    background: #6c757d;
    color: white;
}

.rsvp-user-response {
    margin: 0.5rem 0;
    padding: 0.75rem;
    background: #d1ecf1;
    border-radius: 4px;
    color: #0c5460;
}

.rsvp-deadline-passed {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #f8d7da;
    border-radius: 4px;
    color: #721c24;
}

.rsvp-admin-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.rsvp-statistics {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.rsvp-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.rsvp-settings {
    margin-top: 0.5rem;
}

/* RSVP Edit Styles */
.rsvp-edit-container {
    max-height: 60vh;
    overflow-y: auto;
}

.rsvp-edit-table-container {
    margin: 1rem 0;
}

.rsvp-edit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.rsvp-edit-table th,
.rsvp-edit-table td {
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    text-align: left;
}

.rsvp-edit-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.rsvp-edit-table tbody tr:hover {
    background-color: #f8f9fa;
}

.member-name {
    font-weight: 500;
}

.current-response {
    text-align: center;
}

.rsvp-status-zusagen {
    color: #28a745;
}

.rsvp-status-absagen {
    color: #dc3545;
}

.rsvp-status-eventuell {
    color: #ffc107;
}

.rsvp-status-none {
    color: #6c757d;
    font-style: italic;
}

.new-response select {
    width: 100%;
    padding: 0.25rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.action-cell {
    text-align: center;
    width: 100px;
}

.rsvp-save-btn {
    min-width: 80px;
}

.rsvp-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rsvp-edit-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.rsvp-edit-actions .btn {
    margin: 0.25rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .rsvp-buttons {
        flex-direction: column;
    }
    
    .rsvp-btn {
        width: 100%;
        text-align: center;
    }
    
    .rsvp-statistics {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* RSVP Edit Mobile Styles */
    .rsvp-edit-container {
        max-height: 50vh;
    }
    
    .rsvp-edit-table {
        font-size: 0.8rem;
    }
    
    .rsvp-edit-table th,
    .rsvp-edit-table td {
        padding: 0.3rem;
    }
    
    .action-cell {
        width: 80px;
    }
    
    .rsvp-save-btn {
        min-width: 60px;
        font-size: 0.8rem;
    }
    
    .rsvp-edit-actions .btn {
        font-size: 0.8rem;
        margin: 0.2rem;
    }
}

/* Print Styles für Kalender-Druck */
@media print {
    /* Verstecke alle anderen Elemente */
    body > *:not(#printTable):not(#memberPrintTable) {
        display: none !important;
    }
    
    /* Print-Tabellen sichtbar machen */
    #printTable,
    #memberPrintTable {
        display: block !important;
        position: static !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        height: auto !important;
    }
    
    /* Body für Druck optimieren */
    body {
        margin: 0 !important;
        padding: 0 !important;
        font-family: Arial, sans-serif !important;
        line-height: 1.2 !important;
    }
    
    /* Print-Header Styling */
    #printHeader {
        margin-bottom: 20px !important;
        text-align: center !important;
    }
    
    #printHeader h2 {
        font-size: 18px !important;
        margin-bottom: 10px !important;
        color: #000 !important;
        font-weight: bold !important;
    }
    
    #printHeader p {
        font-size: 12px !important;
        margin: 0 !important;
        color: #666 !important;
    }
    
    /* Tabellen-Styling für Druck */
    #calendarPrintTable {
        width: 100% !important;
        border-collapse: collapse !important;
        font-family: Arial, sans-serif !important;
        font-size: 10px !important;
        margin: 0 !important;
    }
    
    #calendarPrintTable th,
    #calendarPrintTable td {
        border: 1px solid #333 !important;
        padding: 4px 6px !important;
        text-align: left !important;
        vertical-align: top !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    #calendarPrintTable th {
        background-color: #f0f0f0 !important;
        font-weight: bold !important;
        font-size: 10px !important;
        color: #000 !important;
    }
    
    /* Spaltenbreiten für A4-optimale Darstellung */
    #calendarPrintTable th:nth-child(1),
    #calendarPrintTable td:nth-child(1) { /* Datum */
        width: 15% !important;
        min-width: 80px !important;
    }
    
    #calendarPrintTable th:nth-child(2),
    #calendarPrintTable td:nth-child(2) { /* Zeit */
        width: 12% !important;
        min-width: 60px !important;
    }
    
    #calendarPrintTable th:nth-child(3),
    #calendarPrintTable td:nth-child(3) { /* Titel */
        width: 25% !important;
        min-width: 120px !important;
    }
    
    #calendarPrintTable th:nth-child(4),
    #calendarPrintTable td:nth-child(4) { /* Ort */
        width: 18% !important;
        min-width: 90px !important;
    }
    
    #calendarPrintTable th:nth-child(5),
    #calendarPrintTable td:nth-child(5) { /* Typ */
        width: 12% !important;
        min-width: 60px !important;
    }
    
    #calendarPrintTable th:nth-child(6),
    #calendarPrintTable td:nth-child(6) { /* Beschreibung */
        width: 18% !important;
        min-width: 90px !important;
    }
    
    /* Tabelle zusammenhalten */
    #calendarPrintTable thead {
        display: table-header-group !important;
    }
    
    /* A4-Seitenformat ohne zusätzliche Header/Footer */
    @page {
        size: A4 !important;
        margin: 15mm !important;
    }
    
    /* Keine Hintergründe oder Schatten */
    * {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Linkfarben für Druck */
    a,
    a:visited {
        text-decoration: underline !important;
        color: #000 !important;
    }
    
    /* Mitgliederliste Print-Styles */
    #memberPrintTable,
    #memberPrintTable * {
        visibility: visible !important;
    }
    
    #memberPrintTable {
        display: block !important;
        position: static !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        height: auto !important;
    }
    
    /* Member Print-Header Styling */
    #memberPrintHeader {
        margin-bottom: 20px !important;
        text-align: center !important;
    }
    
    #memberPrintHeader h2 {
        font-size: 18px !important;
        margin-bottom: 5px !important;
        color: #000 !important;
        font-weight: bold !important;
    }
    
    #memberPrintHeader h3 {
        font-size: 14px !important;
        margin-bottom: 10px !important;
        color: #000 !important;
        font-weight: normal !important;
    }
    
    #memberPrintHeader p {
        font-size: 12px !important;
        margin: 0 !important;
        color: #666 !important;
    }
    
    /* Member Tabellen-Styling für Druck */
    #memberListPrintTable {
        width: 100% !important;
        border-collapse: collapse !important;
        font-family: Arial, sans-serif !important;
        font-size: 10px !important;
        margin: 0 !important;
    }
    
    #memberListPrintTable th,
    #memberListPrintTable td {
        border: 1px solid #333 !important;
        padding: 4px 6px !important;
        text-align: left !important;
        vertical-align: top !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    #memberListPrintTable th {
        background-color: #f0f0f0 !important;
        font-weight: bold !important;
        font-size: 10px !important;
        color: #000 !important;
    }
    
    /* Spaltenbreiten für Mitgliederliste A4-optimiert */
    #memberListPrintTable th:nth-child(1),
    #memberListPrintTable td:nth-child(1) { /* Vorname */
        width: 25% !important;
        min-width: 100px !important;
    }
    
    #memberListPrintTable th:nth-child(2),
    #memberListPrintTable td:nth-child(2) { /* Nachname */
        width: 30% !important;
        min-width: 120px !important;
    }
    
    #memberListPrintTable th:nth-child(3),
    #memberListPrintTable td:nth-child(3) { /* Instrument */
        width: 25% !important;
        min-width: 100px !important;
    }
    
    #memberListPrintTable th:nth-child(4),
    #memberListPrintTable td:nth-child(4) { /* Gruppe */
        width: 20% !important;
        min-width: 80px !important;
    }
    
    /* Member Tabelle zusammenhalten */
    #memberListPrintTable thead {
        display: table-header-group !important;
    }
}