html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column; 
    background-color: #fdf8f1;
}

h1 {
    padding-left: 20px;
}


nav {
    background-color: #DD3333;
    color: #fff;
    padding: 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 10px;
    display: block;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: #C02A2A;
}

button {
    padding: 12px;
    background-color: #DD3333;
    color: white;
    border: 1px solid #DD3333;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #C02A2A;
}

.button-group {
    display: inline-flex;
    gap: 10px;
}

textarea {
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    font-family: inherit; 
    font-size: 14px; 
    resize: vertical;
    box-sizing: border-box;
}

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

select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}
/* Registrierungformular-spezifische Styles */

/* Geburtsdatum-Selectboxen Styling */
.address-birthday {
    position: relative;
}

.birthday-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #f8f9fa;
    padding: 0 5px;
    font-size: 12px;
    color: #6c757d;
    z-index: 2;
    font-weight: 500;
    transition: color 0.3s ease;
}

.birthday-select-container {
    display: flex;
    gap: 8px;
    width: 100%;
}

.birthday-select {
    flex: 1;
    padding: 12px 10px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 14px;
    /* background: #f8f9fa; */
    background: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.birthday-select:focus {
    outline: none;
    border-color: #DD3333;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.1);
}

.birthday-select:focus + .birthday-label {
    color: #DD3333;
}

.birthday-select option {
    padding: 8px;
}

/* Placeholder-Stil für leere Selectboxen */
.birthday-select:invalid {
    color: #6c757d;
}

.birthday-select option[value=""] {
    color: #6c757d;
}

.birthday-select option:not([value=""]) {
    color: #000;
}

/* Hamburger Menu Button */
.hamburger-container {
    display: none;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.hamburger {
    display: flex;
    flex-direction: column;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger-label {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    user-select: none;
}

.dashboard-welcome {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}


/* Mobile Styles */
@media (max-width: 767px) {
    .hamburger-container {
        display: flex;
    }

    .dashboard-welcome {
       text-align: center;
       margin-bottom: 0;
    }
    
    nav ul {
        display: none;
        position: fixed;
        top: 60px; /* Höhe der Navigation */
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        padding: 0;
        margin: 0;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin-right: 0;
        border-bottom: 1px solid #DD3333;
        width: 100%;
        background-color: #ffffff;
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }
    
    nav ul li a {
        padding: 15px 20px;
        color: #333333;
        text-align: left;
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    nav ul li a:hover {
        background-color: #f5f5f5;
        color: #DD3333;
    }
    
    /* Hamburger Animation */
    .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);
    }

    .button-group {
        display:flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-bottom: 20px;
    }
}

main {
    flex: 1;
    padding: 20px;
    margin-top: 60px; /* Platz für fixierte Navigation */
}

footer {
    background-color: #ffffff;
    color: #000000;
    padding: 10px;
    text-align: center;
    margin-top: auto;
}

/* Login/Register Styles */
.login-container, .register-container {
    background-color: #fff;
    max-width: 800px;
    width: 100%;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}


.login-container form, .register-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-container input, .register-container, .edit-modal input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.login-container button, .register-container, .edit-modal button {
    padding: 12px;
    background-color: #DD3333;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-container button:hover, .register-container, .edit-modal button:hover {
    background-color: #C02A2A;
}

.login-container button[type="submit"], .register-container, .edit-modal button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: #DD3333;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(221, 51, 51, 0.3);
}

.login-container button[type="submit"]:hover, .register-container, .edit-modal button[type="submit"]:hover {
    transform: translateY(-2px);
    background: #C02A2A;
    box-shadow: 0 6px 20px rgba(221, 51, 51, 0.4);
}

.login-container button[type="submit"]:active, .register-container, .edit-modal button[type="submit"]:active {
    transform: translateY(0);
}

.message {
    margin: 20px 0;
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
    line-height: 1.5;
}

.error-message {
    color: #DD3333;
    padding: 15px 20px;
    border: 1px solid #DD3333;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 15px rgba(221, 51, 51, 0.3);
}

.success-message {
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.info-message {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.info-card {
    background: white;
    border-left: 5px solid #667eea;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 50px;
}

.info-card .header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}


.info-card h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.info-card p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.info-card a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.info-card a:hover {
    border-bottom-color: #667eea;
}

.info-card ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.info-card ul li {
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Tab-Navigation Styles */
.filter-tabs {
    display: flex;
    gap: 0;
    background: white;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.filter-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-tab:hover {
    background: #f8f9fa;
    color: #333;
}

.filter-tab.active {
    background: #DD3333;
    color: white;
    box-shadow: 0 2px 8px rgba(221, 51, 51, 0.3);
}

.filter-tab .badge {
    display: inline-block;
    background: rgba(221, 51, 51, 0.1);
    color: #DD3333;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.filter-tab.active .badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .filter-tabs {
        flex-direction: column;
    }
    
    .filter-tab {
        width: 100%;
    }
}

.responsive {
    max-width: 100%;
    height: auto;
}

.btn-link {
    display: block;
    text-align: center;
    color: black;
    text-decoration: none;
    padding: 12px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    background: #f8f9fa;
    margin:0;
}

.btn-link:hover {
    color: white;
    border-color: #DD3333;
    background: #DD3333;
    transform: translateY(-1px);
}

.btn.green {
    background: #10b981;
    color: white;
}

.inline-link {
    padding: 8px 16px;
    border-radius: 20px;
    background: #dbeafe;
    color: #1e40af;
    font-weight: bold; 
    display: inline-block; 
    text-decoration: none;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    /* background: #f8f9fa; */
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group.oicon input {
    padding-left: 15px;
}

/* Chrome Passwort-Vorschläge unterdrücken */
.input-group input[type="password"] {
    -webkit-text-security: disc;
    -webkit-autofill: none;
}

.input-group input:focus {
    outline: none;
    border-color: #DD3333;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.1);
}

.input-group .icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 18px;
    z-index: 1;
}


.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important; 
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 1;
}

.password-toggle:hover {
    background: transparent;
}

.password-toggle:active {
    background: transparent;
}

.password-toggle span {
    font-size: 16px;
    color: #6c757d;
    transition: color 0.3s ease;
}

.password-toggle:hover span {
    color: #DD3333;
}

.success-icon {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 20px;
}

.error-icon {
    font-size: 64px;
    color: #dc3545;
    margin-bottom: 20px;
}

.info-icon {
    font-size: 64px;
    color: #17a2b8;
    margin-bottom: 20px;
}



.pwa-install-btn {
    background: linear-gradient(135deg, #DD3333 0%, #C02A2A 100%); 
    color: white; 
    border: 1px solid white; 
    padding: 12px 24px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-size: 14px; 
    display: none; 
    box-shadow: 0 4px 6px rgba(221, 51, 51, 0.3); 
    transition: all 0.3s;
    margin: 0;
    display: none;
    align-self: center;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    background: #C02A2A;
    box-shadow: 0 6px 20px rgba(221, 51, 51, 0.4);
}

/* Push Notification Banner */
.push-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.4s ease-out;
    position: fixed;
    top: 60px; /* Direkt unterhalb der Navigation */
    left: 0;
    right: 0;
    z-index: 999; /* Unterhalb der Navigation */
}


/* Installationshinweise PWA */
#manual-install-hint {
    background: #ea6666;
    color: white;
    padding: 20px;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    font-size: 14px;
    line-height: 1.6;
}

#manual-install-hint h3 {
    margin: 0 0 15px 0; 
    font-size: 18px; 
    font-weight: 600;
}

#manual-install-hint ol {
    margin: 0; 
    padding-left: 20px;
    list-style-position: inside; /* Zahlen nach innen */
}

#manual-install-hint ol li {
    margin-bottom: 8px;
}

/* Installationsanweisungen Schließen Button */
#manual-install-hint-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#manual-install-hint-close:hover {
    background:rgba(255,255,255,0.3);
}



@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.push-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.push-banner-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    animation: bellRing 2s ease-in-out infinite;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
}

.push-banner-text {
    flex: 1;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.push-banner-text strong {
    font-size: 16px;
    font-weight: 600;
}

.push-banner-text span {
    font-size: 14px;
    opacity: 0.9;
}

.push-banner-btn {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.push-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: #f8f9fa;
}

.push-banner-btn:active {
    transform: translateY(0);
}

.push-banner-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    flex-shrink: 0;
    padding: 0;
}

.push-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        margin: 20px 0;
        padding: 40px 30px;
        width: calc(100% - 40px);
        max-width: calc(100vw - 40px);
    }
    
    .login-container h1 {
        font-size: 24px;
    }
}

/* Extra kleine Bildschirme */
@media (max-width: 360px) {
    .login-container {
        margin: 15px 0;
        padding: 30px 20px;
        width: calc(100% - 30px);
        max-width: calc(100vw - 30px);
    }
    
    .login-container h1 {
        font-size: 20px;
    }
    
    .input-group input {
        padding: 14px 18px 14px 45px;
        font-size: 15px;
    }
    
    .login-container button[type="submit"] {
        padding: 14px;
        font-size: 15px;
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .push-banner-content {
        flex-wrap: wrap;
        padding: 14px 16px;
        gap: 12px;
    }
    
    .push-banner-icon {
        padding: 10px;
    }
    
    .push-banner-text {
        flex: 1 1 100%;
        order: 2;
    }
    
    .push-banner-text strong {
        font-size: 15px;
    }
    
    .push-banner-text span {
        font-size: 13px;
    }
    
    .push-banner-btn {
        order: 3;
        flex: 1;
        padding: 10px 16px;
    }
    
    .push-banner-close {
        order: 1;
        margin-left: auto;
    }
}

/* ============================================
   UNIVERSELLE RESPONSIVE DATA-TABLE STYLES
   ============================================ */

/* Responsive Tabellen-Container */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    table-layout: auto;
}

.data-table thead {
    background:  #DD3333 0%;
    color: white;
}



/* ✅ NEU: Abgerundete Ecken für erste und letzte th */
.data-table thead tr:first-child th:first-child {
    border-top-left-radius: 8px;
}

.data-table thead tr:first-child th:last-child {
    border-top-right-radius: 8px;
}

.data-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    position: relative;
    white-space: nowrap;
    cursor: pointer;
    width: 1%; /* Trick: Startet minimal, wächst gleichmäßig */
}

/* Inhalts-Zellen folgen der Header-Breite */
.data-table td {
    padding: 12px;
    white-space: nowrap; /* Verhindert Umbruch, Spalte wird breiter */
    overflow: hidden;
    text-overflow: ellipsis; /* Optional: Zeigt ... bei zu langem Text */
}

/* Ausnahme für Spalten, die umbrechen dürfen (z.B. Email, Text) */
.data-table td.wrap-content {
    white-space: normal; /* Erlaubt Umbruch */
    word-break: break-word;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table th.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.data-table th.sortable::after {
    content: ' ⇅';
    opacity: 0.5;
    font-size: 12px;
}

.data-table th.sorted-asc::after {
    content: ' ▲';
    opacity: 1;
}

.data-table th.sorted-desc::after {
    content: ' ▼';
    opacity: 1;
}

.editable-record-table thead {
    background: none !important;
    color: #000 !important;
}

.action-buttons {
    margin-top: 10px;
}

.hidden-column {
    visibility: hidden;
}

.image-select-container {
    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: left;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .image-select-container {
        align-items: center;
        justify-content: center;
    }

    h2 {
        font-size: 20px;
        margin-bottom: 10px;
        margin-top: 10px;
        text-align: center;
    }
}

.image-container {
    font-size: 100px;
    width: 300px;
    height: 300px;
    max-width: 300px;
    max-height: 300px;
    border-radius: 5%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.image-container:hover {
    border-color: #DD3333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 51, 51, 0.15);
}

.image-container.active {
    border-color: #DD3333;
    background: #fff5f5;
}

.image-container-actions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 5%;
    display: none;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.image-container.active .image-container-actions {
    display: flex;
}

.image-action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.image-action-btn.edit {
    background: transparent;
    border: 1px solid orange;
    color: orange;
}

.image-action-btn.edit:hover {
    background: orange;
    color: white;
}

.image-action-btn.delete {
    background: #dc3545;
    color: white;
}

.image-action-btn.delete:hover {
    background: #c82333;
}

.image-action-btn.avatar {
    background: transparent;
    border: 1px solid orange;
    color: orange;
}

.image-action-btn.avatar:hover {
    background: orange;
    color: white;
}

/* Avatar-Modal Styles */
.avatars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
    max-height: 500px;
    overflow-y: auto;
}

.avatar-item {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.avatar-item:hover {
    transform: scale(1.1);
}

.avatar-display {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.avatar-display:hover {
    border-color: #DD3333;
    background: #fff5f5;
    box-shadow: 0 4px 12px rgba(221, 51, 51, 0.15);
}

/* Mobile Responsive für Avatar-Grid */
@media (max-width: 768px) {
    .avatars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px 0;
    }
    
    .avatar-display {
        font-size: 60px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .avatars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px 0;
    }
    
    .avatar-display {
        font-size: 50px;
        padding: 10px;
    }
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.image-container > * {
    font-size: 200px;
    line-height: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .image-container {
        width: 300px;
        height: 300px;
        max-width: 300px;
        max-height: 300px;
    }
    
    .image-container > * {
        font-size: 120px;
    }
}

@media (max-width: 480px) {
    .image-container {
        width: 200px;
        height: 200px;
        max-width: 200px;
        max-height: 200px;
    }
    
    .image-container > * {
        font-size: 80px;
    }
}

/* Such-Eingabefelder */
.search-row input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.search-row input[type="date"] {
    width: 100%;
    padding: 8px;
    height: 33px;  /* ✨ NEU: Feste Höhe */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1;  /* ✨ NEU: Line-height reduzieren */
    box-sizing: border-box;
}

.search-row input:focus {
    outline: none;
    border-color: #DD3333;
    box-shadow: 0 0 0 2px rgba(221, 51, 51, 0.1);
}

.search-row select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.search-row td {
    padding: 10px 12px;
    background: #f8f9fa;
}

.mobile-label {
    cursor: pointer;
}

.mobile-label:hover {
    color: #DD3333;
}

/* Tabellen-Zeilen */
.data-table tbody tr {
    border-bottom: 1px solid #e1e5e9;
    transition: background-color 0.2s;
}

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

.data-table tbody tr.hidden {
    display: none;
}

.data-table td {
    padding: 12px;
}

/* Status-Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active {
    background: #d4edda;
    color: #155724;
}

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

.badge-admin {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-user {
    background: #e7e7e7;
    color: #383d41;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    display: none;
}

/* Mobile Search */
.mobile-search {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .data-table {
        min-width: 100%;
    }
 
    .mobile-content {
        margin-right: 15px;
    }

    .data-table thead {
        display: none;
    }

    .hidden-column {
        display: none !important;
    }

    .search-row {
        display: none;
    }

    .data-table tbody tr {
        display: block;
        margin-bottom: 15px;
        margin-right: 15px;
        border: 1px solid #e1e5e9;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        max-width: 100%;
        overflow-x: hidden;
    }

    .data-table tbody tr:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .data-table td {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 20px;
        border-bottom: 1px solid #f0f0f0;
        align-items: flex-start;
        white-space: normal !important; /* Überschreibt white-space: nowrap */
        overflow-wrap: break-word;
        word-break: break-word;
        overflow-x: hidden;
        max-width: 100%;
        text-overflow: clip; /* Überschreibt text-overflow: ellipsis */
    }

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

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #DD3333;
    }

    .editable-record-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 10px;
        padding: 10px;
        border: 1px solid #e1e5e9;
        border-radius: 8px;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        margin-right: 15px;
    }

    .editable-record-row .field-label {
        width: 100%;
    }

    .editable-record-row .field-value {
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .editable-record-row .function-row {
        background: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .table-container {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* Mobile Filter */
    .mobile-search {
        display: block;
        margin-bottom: 15px;
    }

    .mobile-search input {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 14px;
    }
}

/* ============================================
   INLINE-EDITING STYLES
   ============================================ */

/* Editable Cell Hover */
.editable-cell {
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
}

.editable-cell:hover {
    background-color: #fff9e6 !important;
}

.editable-cell:hover::before {
    content: '✎';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 12px;
    color: #DD3333;
    opacity: 0.6;
}

/* Editing State */
.editable-cell.editing {
    background-color: #f0f8ff !important;
    padding: 4px !important;
}

/* Inline Edit Input */
.inline-edit-input {
    width: 100%;
    padding: 6px 8px;
    border: 2px solid #DD3333;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 4px;
}

.inline-edit-input:focus {
    outline: none;
    border-color: #B82828;
    box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.1);
}

textarea.inline-edit-input {
    resize: vertical;
    min-height: 60px;
}

/* Inline Edit Buttons */
.inline-edit-buttons {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.inline-edit-save,
.inline-edit-cancel {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
}

.inline-edit-save {
    background: #28a745;
    color: white;
}

.inline-edit-save:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.inline-edit-cancel {
    background: #6c757d;
    color: white;
}

.inline-edit-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Loading State */
.inline-edit-loading {
    color: #DD3333;
    font-style: italic;
    animation: pulse 1s infinite;
}

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

/* Success State */
.editable-cell.edit-success {
    background-color: #d4edda !important;
    animation: successFade 2s ease-out;
}

@keyframes successFade {
    0% { background-color: #28a745; }
    100% { background-color: #d4edda; }
}

/* Error State */
.editable-cell.edit-error {
    background-color: #f8d7da !important;
    animation: errorShake 0.5s;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Actions Cell */
.actions-cell {
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
}

.actions-cell button {
    padding: 8px 16px;
    margin: 0 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 40px;
    height: 36px;
    vertical-align: middle;
}

.actions-cell button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.action-btn-edit {
    background: #007bff;
    color: white;
}

.action-btn-edit:hover {
    background: #0056b3;
}

.action-btn-delete {
    background: #dc3545;
    color: white;
    font-size: 24px !important;
    font-weight: bold;
}

.action-btn-delete:hover {
    background: #bd2130;
}

.action-btn-view {
    background: #6c757d;
    color: white;
}

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

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

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

/* Mobile Responsive für Inline-Editing */
@media (max-width: 768px) {
    .editable-cell:hover::before {
        display: none;
    }
    
    .inline-edit-input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }
    
    .actions-cell button {
        padding: 8px 12px;
        font-size: 12px;
        margin: 2px 0;
        height: 36px;
    }
    
    .actions-cell button:not(:last-child) {
        margin-right: 1px;
    }
}

/* ============================================
   SYSTEM SETTINGS STYLES
   ============================================ */

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

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

.setting-item .setting-label {
    flex: 1;
    margin-right: 20px;
}

.setting-item .setting-label strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.setting-item .setting-label span {
    font-size: 14px;
    color: #666;
}

/* Text Setting Container */
.text-setting-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-setting-buttons {
    display: flex;
    gap: 4px;
}

.text-setting-buttons button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.text-setting-buttons .save-text-setting:hover {
    background-color: #d4edda;
    border-color: #28a745;
}

.text-setting-buttons .cancel-text-setting:hover {
    background-color: #f8d7da;
    border-color: #dc3545;
}

.text-setting-buttons button:active {
    transform: scale(0.95);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #DD3333;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Input Fields */
.setting-text-input,
.setting-number-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}

.setting-text-input:focus,
.setting-number-input:focus {
    outline: none;
    border-color: #DD3333;
    box-shadow: 0 0 0 2px rgba(221, 51, 51, 0.1);
}

.setting-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    min-width: 150px;
}

.setting-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Address Fields Styling */
.form-section {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Filter List */
.filter-list {
    display: flex;
    gap: 20px;
}

.filter-list li {
    list-style-type: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Date Input Label Styling */
.date-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #f8f9fa;
    padding: 0 5px;
    font-size: 12px;
    color: #6c757d;
    z-index: 2;
    font-weight: 500;
    transition: color 0.3s ease;
}

.input-group:has(input[type="date"]:focus) .date-label {
    color: #DD3333;
}

/* Date Input Styling */
input[type="date"] {
    position: relative;
    cursor: pointer;
    line-height: 50px; /* Wichtig: gleiche HÃ¶he wie das Input-Feld */
}

/* Date Picker Icon besser positionieren */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    padding: 5px;
    transition: opacity 0.3s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Placeholder-Ersatz fÃ¼r leere Date-Inputs */
input[type="date"] {
    position: relative;
}

input[type="date"]:invalid::-webkit-datetime-edit,
input[type="date"][data-empty="true"]:not(:focus)::-webkit-datetime-edit {
    color: transparent;
}

/* Sichtbar machen wenn Wert vorhanden */
input[type="date"][data-empty="false"]::-webkit-datetime-edit,
input[type="date"]:valid:not([data-empty="true"])::-webkit-datetime-edit {
    color: #212529 !important;
}

input[type="date"]:focus::-webkit-datetime-edit {
    color: inherit !important;
}

input[type="date"]:invalid::before,
input[type="date"][data-empty="true"]:not(:focus)::before {
    content: 'TT.MM.JJJJ';
    color: #6c757d;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

input[type="date"]:focus::before,
input[type="date"]:valid::before,
input[type="date"][data-empty="false"]::before,
input[type="date"]:not([data-empty="true"])::before {
    content: '' !important;
}

/* Zeitraum-Auswahl */
.timeframe-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.timeframe-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.timeframe-option label {
    cursor: pointer;
    font-size: 16px;
}

.date-range-container {
    display: none;
    gap: 15px;
    margin-top: 15px;
}

.date-range-container.active {
    display: flex;
    flex-wrap: wrap;
}

.date-range-container .input-group {
    flex: 1;
    min-width: 200px;
}

.address-row {
    display: flex;
    gap: 15px;
    align-items: stretch; /* Alle Elemente gleich hoch */
}

.address-row:last-child {
    margin-bottom: 0;
}

/* Alle Input-Felder in address-row gleich hoch machen */
.address-row .input-group,
.address-row .floating-label {
    display: flex;
    align-items: center;
}

.address-row .input-group input,
.address-row .floating-label input {
    height: 50px !important;
    line-height: normal;
    box-sizing: border-box;
}

/* Speziell für Date-Input */
.address-row input[type="date"] {
    height: 50px !important;
    line-height: normal;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Selectboxen in address-row bündig mit Input-Feldern */
.address-row .birthday-select {
    height: 50px !important;
    line-height: normal;
    padding: 0 40px 0 15px !important;
    box-sizing: border-box;
    background-position: right 15px center;
}

.address-street,
.address-number,
.address-postal,
.address-city,
.address-firstname,
.address-lastname,
.address-birthday,
.address-gender {
    flex: 1; /* Alle gleich groß */
}

/* Responsive Address Fields */
@media (max-width: 768px) {
    .address-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .address-street,
    .address-number,
    .address-postal,
    .address-city {
        flex: 1;
    }
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 0 20px;
}

.dashboard-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
    padding: 24px;
    display: flex;
    padding: 0;
    min-height: 260px;
    user-select: none;  /* NEU: Verhindert Textauswahl */
    -webkit-user-select: none;  /* Für Safari/WebKit */
    -moz-user-select: none;  /* Für Firefox */
    -ms-user-select: none;  /* Für IE/Edge */
}

.dashboard-card-content-wrapper {
    margin-bottom: 10px;
}

.dashboard-card-content {
    margin: 0;
    font-size: 16px;
    
}

.dashboard-card--inbox .dashboard-card-content {
    margin: 0;
    overflow: hidden;
    max-width: 100%;
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    word-break: break-word;
    margin-bottom: 0px;
}

@media (max-width: 768px) {
    .dashboard-card--inbox .dashboard-card-content {
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        -webkit-box-orient: unset;
        overflow: visible;
    }

    #confirmSingleMessageBtn {
        display: block !important;
    }

    #dashboard-show-full-message {
        display: none !important;
    }
}

.dashboard_highlight {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    margin-bottom: 5px;
}

.dashboard_highlight.open-requests {
    background: #fef3c7;
    color: #854d0e;
}

.dashboard_highlight.accepted-requests {
    background: green;
    color: white;
}

.dashboard_highlight.rejected-requests {
    background: #fee2e2;
    color: red;
}

.dashboard-card-content ul li {
    margin-left: 0px;
    margin-bottom: 0;
    padding-left: 0;
}

#dashboard-show-full-message {
    margin-top: 10px;
}


@media (max-width: 768px) {
    .dashboard-card-content {
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        -webkit-box-orient: unset;
        overflow: visible;
    }
    
    #dashboard-show-full-message {
        display: none !important;
    }
    .dashboard-card-actions {
        display: flex !important;
    }
}


.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.dashboard-card.clickable-card {
    cursor: pointer;
}

.dashboard-card.clickable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.dashboard-card-icon {
    width: 120px;
    min-height: 100%;
    height: 48px;
    border-right: 1px solid #e5e7eb;
    border-radius: 16px 0 0 16px;
    display: flex;
    align-items: center;
    align-self: stretch;
    justify-content: center;
    font-size: 48px;
    margin: 0;
    flex-shrink: 0;
    color: #fff;
    background: radial-gradient(circle, #ede7df 50px, transparent 50px);
}

.dashboard-card-body {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 0;
}

.dashboard-card-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}


.dashboard-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.dashboard-card-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 4px 0 0 0;
}




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

.dashboard-card-stat {
    text-align: center;
}

.dashboard-card-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    display: block;
}

.dashboard-card-stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.dashboard-card-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dashboard-card-btn-primary {
    background: #DD3333;
    color: white;
}

.dashboard-card-btn-primary:hover {
    background: #C02A2A;
    transform: translateY(-1px);
}

.dashboard-card-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.dashboard-card-btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.dashboard-card-btn-success {
    background: #10b981;
    color: white;
}

.dashboard-card-btn-success:hover {
    background: #059669;
}

/* System Status Styles */
.system-status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.system-status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.status-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.status-icon.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-icon.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.status-text {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* Back Button Styles */
.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
    margin-right: 16px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M12 19l-7-7 7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px;
}

.back-button:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231f2937' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M12 19l-7-7 7-7'/%3E%3C/svg%3E");
}

.back-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.page-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header .page-title-wrapper {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 0;
}

.page-header h1 {
    margin: 0;
    text-align: left;
}

.page-header .back-button {
    grid-column: 1;
    margin-right: 0; /* gap wird durch grid gap gehandhabt */
}

.page-header .info-toggle-btn {
    margin-left: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.page-header .info-toggle-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.page-header .info-toggle-btn:active {
    transform: translateY(0);
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #667eea;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #667eea;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design für Dashboard Cards */
@media (max-width: 1200px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 10px;
    }
    
    .dashboard-card {
        flex-direction: column;
        height: auto;
    }
    
    .dashboard-card-icon {
        width: 100%;
        min-height: 80px;
        font-size: 40px;
        border-bottom: 1px solid #e5e7eb;
        border-right: none;
        border-radius: 16px 16px 0 0;
        background: radial-gradient(circle, #ede7df 35px, transparent 35px);
    }
    
    .dashboard-card-body {
        padding: 20px;
    }

    .dashboard-card-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .dashboard-card-stat {
        padding: 8px 0;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .dashboard-card-stat:nth-child(3n) {
        border-bottom: none;
    }
    
    .dashboard-card-actions {
        flex-direction: column;
    }
    
    .dashboard-card-btn {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dashboard-cards {
        padding: 0 5px;
    }
    
    .dashboard-card-body {
        padding: 18px;
    }

    .dashboard-card-title {
        font-size: 20px;
    }

    .dashboard-card-subtitle {
        font-size: 16px;
    }

    .dashboard-card-content {
        font-size: 16px;
    }
}

/* ========================================
   MODAL STYLES
   ======================================== */

/* ============================================
   UNIVERSAL MODAL STYLES
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    padding: 10px;
    box-sizing: border-box;
    /* Zentriertes Layout mit Flexbox - nur wenn aktiv */
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fefefe;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: calc(100vh - 20px);
    animation: slideDown 0.3s ease;
    /* Flexbox für Header/Body/Footer Layout */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    flex-shrink: 0;
}

.modal-header h2,
.modal-header h3 {
    margin: 0;
    font-size: 22px;
    color: #333;
    font-weight: 600;
}

.modal-header h3 {
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.modal-close:hover,
.modal-close:focus {
    color: #DD3333;
    background-color: #f8f9fa;
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.modal-body label .required {
    color: #DD3333;
    margin-left: 3px;
}

/* Universelle Form-Felder in Modals */
.modal input[type="text"],
.modal input[type="number"],
.modal input[type="email"],
.modal input[type="tel"],
.modal input[type="password"],
.modal input[type="date"],
.modal textarea,
.modal select,
.modal .form-control {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #fff;
}

.modal input[type="text"]:focus,
.modal input[type="number"]:focus,
.modal input[type="email"]:focus,
.modal input[type="tel"]:focus,
.modal input[type="password"]:focus,
.modal input[type="date"]:focus,
.modal textarea:focus,
.modal select:focus,
.modal .form-control:focus {
    outline: none;
    border-color: #DD3333;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.1);
}

.modal input[type="text"].readonly,
.modal input[type="number"].readonly,
.modal input[type="email"].readonly,
.modal input[type="tel"].readonly,
.modal textarea.readonly,
.modal .form-control.readonly {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #dee2e6;
}

.modal textarea {
    resize: vertical;
    min-height: 120px;
}

.modal input[type="date"] {
    min-height: 40px;
}

/* Safari-spezifisch: Zeige Kalender-Icon immer an */
.modal input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 1;
    cursor: pointer;
    width: 20px;
    height: 20px;
    margin-left: 8px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
}

.modal-footer .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #DD3333 0%, #C02A2A 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(221, 51, 51, 0.3);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(221, 51, 51, 0.4);
}

.modal-footer .btn-primary:active {
    transform: translateY(0);
}

.modal-footer .btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.modal-footer .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.4);
}

.modal-footer .btn-secondary:active {
    transform: translateY(0);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
    flex-shrink: 0;
}

/* Modal responsive */
@media (max-width: 600px) {
    .modal {
        padding: 10px;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 20px);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }

    .modal-header h2,
    .modal-header h3 {
        font-size: 18px;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* ============================================
   RENDER TABLE FUNCTION STYLES
   ============================================ */

   .action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #6c757d;
}
.action-btn:hover {
    color: #007bff;
}
.action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}
.action-btn:active {
    transform: scale(0.95);
}

.action-btn.small {
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 10px;
    padding: 15px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid #DD3333;
    background: #fff;
    color: #DD3333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: #DD3333;
    color: #fff;
    border-color: #DD3333;
}

.pagination-btn:active:not(:disabled) {
    background: #C02A2A;
    border-color: #C02A2A;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #ddd;
    color: #999;
}

.pagination-btn.active {
    background: #DD3333;
    color: #fff;
    border-color: #DD3333;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(221, 51, 51, 0.3);
}

.pagination-info {
    font-size: 14px;
    color: #DD3333;
    margin: 0 10px;
    font-weight: 500;
}

.pagination-browser-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-page-buttons {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}


/* Mobile Label für Tabellenzellen */
.mobile-label {
    display: none;
    font-weight: bold;
    color: #DD3333;
    margin-right: 8px;
}


.toggle-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    align-items: flex-end; /* Desktop: Alle Items unten ausrichten */
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.filter-control-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-control-item label {
    font-size: 14px;
    color: #444;
}

.filter-controls button {
    height: 40px;
    padding: 0 10px;
}

.filter-controls select {
    width: auto !important;
    height: 40px;
    padding: 0 10px;
}

/* Reset-Button spezifisch */
#reset-filters-btn {
    margin-left: 0 !important; /* Überschreibt inline-style */
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {

    h1 {
        text-align: center;
    }

    .two-column-layout {
        grid-template-columns: 1fr; /* Eine Spalte */
        gap: 20px;
    }

    #clear-all-search-btn {
        display: block;
        align-self: center;      /* ✅ Überschreibt align-items: stretch */
        width: auto;             /* ✅ Nimmt nur benötigte Breite */
    }

    .pagination-btn-text {
        display: none;
    }

    /* Pagination Controls untereinander anordnen */
    .pagination-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .pagination-browser-buttons {
        width: 100%;
        justify-content:center;
        margin-left: 0;
    }

    .pagination-page-buttons {
        width: 100%;
        justify-content:center;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .pagination-btn {
        padding: 5px;
        font-size: 20px;
    }
    
    
    /* Infos untereinander anzeigen statt verstecken */
    .pagination-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
        font-size: 12px;
        line-height: 1.3;
        text-align: center;
    }
    .pagination-page-info {
        display: block;
    }
    .pagination-entry-info {
        display: block;
        font-size: 11px;
    }
    
    /* Mobile Label sichtbar machen */
    .mobile-label {
        text-align: left;
        display: inline-block;
        flex-shrink: 0; /* Label wird nicht kleiner */
    }
    
    .mobile-content {
        text-align: left; /* Content linksbündig */
        flex-shrink: 1; /* Content kann schrumpfen */
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        min-width: 0; /* Wichtig für Flex-Items, damit sie schrumpfen können */
        max-width: 100%;
        white-space: normal !important; /* Überschreibt white-space: nowrap */
        overflow-wrap: break-word;
        word-break: break-word;
        overflow-x: hidden;
        text-overflow: clip; /* Überschreibt text-overflow: ellipsis */
    }
    
    /* Optional: Tabelle für Mobile optimieren */
    .data-table thead {
        display: none;
    }
    
    .data-table tr {
        display: block;
        margin-bottom: 15px;
        border: 2px solid #DD3333;
        border-radius: 8px;
        padding: 10px;
        background: #fff;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .data-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 5px;
        border: none;
        width: 100%; /* Volle Breite nutzen */
        max-width: 100%;
        white-space: normal !important; /* Überschreibt white-space: nowrap */
        overflow-x: hidden;
        overflow-wrap: break-word;
        word-break: break-word;
        text-overflow: clip; /* Überschreibt text-overflow: ellipsis */
    }
    
    .data-table td .mobile-label {
        flex-shrink: 0;
        width: 100%;
        max-width: 100%;
        white-space: normal !important; /* Überschreibt white-space: nowrap */
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    .data-table td .mobile-content {
        width: 100%;
        max-width: 100%;
        min-width: 0; /* Wichtig für Flex-Items, damit sie schrumpfen können */
        text-align: left;
        justify-content: flex-start;
        white-space: normal !important; /* Überschreibt white-space: nowrap */
        overflow-wrap: break-word;
        word-break: break-word;
        overflow-x: hidden;
        text-overflow: clip; /* Überschreibt text-overflow: ellipsis */
    }
    
    .search-row {
        background: #f8f9fa;
        margin-bottom: 20px !important;
    }

    .filter-controls {
        border-top: 1px solid black;
        padding-top: 20px;
        margin-top: 10px;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center; /* ✅ NEU: Zentriert die Filter-Items */
    }
    
    .filter-control-item {
        position: relative;
        flex-direction: column;
        min-width: 0; /* Wichtig für flex-shrink */
    }
    
    .filter-control-item label {
        position: absolute;
        top: -10px;
        left: 8px;
        background: #DD3333;
        color: white;
        font-size: 10px;
        font-weight: 600;
        padding: 2px 8px;
        border-radius: 10px;
        white-space: nowrap;
        z-index: 1;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        box-shadow: 0 2px 4px rgba(221, 51, 51, 0.2);
    }
    
    .filter-control-item select {
        padding-top: 8px;
        font-size: 13px;
        min-width: 140px;
    }
    
    .filter-controls button {
        height: 38px;
        font-size: 13px;
        padding: 0 12px;
        margin-top: 8px; /* Ausrichtung mit den Selectboxen */
    }
}

/* ============================================
   EDITABLE RECORD FUNCTION STYLES
   ============================================ */
   
.editable-record-fieldset {
    border: 1px solid #e9ecef;
    border-radius: 8px;

    margin: 20px 0;
    background: #f8f9fa;
}

.editable-record-fieldset:first-child {
    margin-top: 0;
}

.editable-record-fieldset legend {
    font-weight: 600;
    color: #DD3333;
    padding: 0 10px;
    font-size: 18px;
}

.editable-record-table {
    width: 100%;
    border-collapse: collapse;
    margin-left:10px;
}

.editable-record-row {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
    
}

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

.editable-record-row:hover {
    background-color: #fff;
}

.field-label {
    font-weight: 600;
    color: #495057;
    width: 200px;
    vertical-align: middle;
}

.field-value {
    padding: 15px 12px;
    vertical-align: middle;
}

/* .editable-field-value,
.readonly-field-value {
    display: inline-block;
    color: #212529;
    word-break: break-word;
    vertical-align: top;
    margin: 0; 
    padding: 0; 
} */

.edit-field-btn {
    padding-left: 10px;
    border-radius: 5px;
    margin-left: 10px;
    padding: 5px;
    background:transparent;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.9);
}

.edit-field-btn:hover {
    background:transparent;
    transform: scale(1.1);
}

.editable-record-row:hover .edit-field-btn {
    opacity: 1;
    transform: scale(1);
}



/* Modal Date Wrapper Layout */
.modal-date-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-date-wrapper label {
    font-weight: 500;
    color: #333;
}




/* ========================================
   Floating Labels für Formulare
   ======================================== */

.floating-label {
    position: relative;
    margin-bottom: 25px;
}

.floating-label input,
.floating-label textarea,
.floating-label select {
    width: 100%;
    padding: 20px 16px 8px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    /* background: #f8f9fa; */
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.floating-label input:focus,
.floating-label textarea:focus,
.floating-label select:focus {
    outline: none;
    border-color: #DD3333;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.1);
}

.floating-label label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #6c757d;
    pointer-events: none;
    transition: all 0.2s ease;
    background: transparent;
    padding: 0 4px;
    font-weight: 400;
}

/* Label gleitet nach oben wenn Input fokussiert oder befüllt */
.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label textarea:focus + label,
.floating-label textarea:not(:placeholder-shown) + label,
.floating-label select:focus + label,
.floating-label select:not([value=""]) + label {
    top: 8px;
    transform: translateY(0);
    font-size: 12px;
    color: #DD3333;
    font-weight: 600;
}

/* Label bleibt oben wenn befüllt (aber nicht fokussiert) */
.floating-label input:not(:focus):not(:placeholder-shown) + label,
.floating-label textarea:not(:focus):not(:placeholder-shown) + label {
    color: #2c3e50;
}

/* Spezielle Behandlung für Date Inputs */
.floating-label input[type="date"] {
    padding-top: 8px;
    padding-bottom: 8px;
}

.floating-label input[type="date"] + label {
    top: 8px;
    transform: translateY(0);
    font-size: 12px;
    color: #2c3e50;
    font-weight: 600;
}

.floating-label input[type="date"]:focus + label {
    color: #DD3333;
}

/* Textarea spezifische Anpassungen */
.floating-label textarea {
    min-height: 120px;
    resize: vertical;
    padding-top: 24px;
}

.floating-label textarea + label {
    top: 20px;
    transform: translateY(0);
}

.floating-label textarea:focus + label,
.floating-label textarea:not(:placeholder-shown) + label {
    top: 8px;
}

/* Select spezifische Anpassungen */
.floating-label select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.floating-label select + label {
    top: 8px;
    transform: translateY(0);
    font-size: 12px;
    color: #2c3e50;
    font-weight: 600;
}

.floating-label select:focus + label {
    color: #DD3333;
}

/* Floating Label mit Icon (Email) */
.floating-label.with-icon input {
    padding-left: 50px;
}

.floating-label.with-icon label {
    left: 50px;
}

.floating-label.with-icon .icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 18px;
    z-index: 1;
}

.floating-label.with-icon input:focus ~ .icon {
    color: #DD3333;
}

/* Floating Label mit Password-Toggle */
.floating-label.with-toggle input {
    padding-right: 50px;
}

.floating-label.with-toggle .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    color: #6c757d;
    transition: color 0.3s ease;
    z-index: 2;
}

.floating-label.with-toggle .password-toggle:hover {
    color: #DD3333;
}

/* Floating Label mit Icon UND Password-Toggle */
.floating-label.with-icon.with-toggle input {
    padding-left: 50px;
    padding-right: 50px;
}

/* ========================================
   Two-Column Form Layout
   ======================================== */

.form-two-column-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    /* max-width: 1200px; */
    margin: 20px auto;
}

.form-column-left,
.form-column-right {
    min-width: 0; /* Verhindert Overflow bei langen Inhalten */
}

/* Bei Bildschirmbreite < 1200px: Einspaltig */
@media (max-width: 768px) {
    .form-two-column-container {
        grid-template-columns: 1fr;
    }
}

/* Form Button Container - Submit, Submit & Close und Abbrechen */
.form-button-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto;
    gap: 20px;
    /* max-width: 1200px; */
    margin: 20px auto;
}

/* Linke Spalte: "Speichern" Button nimmt komplette linke Hälfte */
.form-button-container .btn-submit:first-of-type {
    grid-column: 1;
    grid-row: 1;
}

/* Rechte Spalte: "Speichern & schließen" Button (erste Hälfte der rechten Seite) */
.form-button-container .btn-submit:nth-of-type(2) {
    grid-column: 2;
    grid-row: 1;
}

/* Rechte Spalte: "Abbrechen" Button (zweite Hälfte der rechten Seite) */
.form-button-container .btn-cancel {
    grid-column: 3;
    grid-row: 1;
}

.form-button-container .btn-submit {
    padding: 16px;
    background: linear-gradient(135deg, #DD3333 0%, #c62828 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(221, 51, 51, 0.3);
}

.form-button-container .btn-submit:hover {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(221, 51, 51, 0.4);
}

/* Grüner Button für "Speichern & schließen" */
.form-button-container .btn-submit.btn-save-close {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.form-button-container .btn-submit.btn-save-close:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.form-button-container .btn-cancel {
    display: block;
    text-align: center;
    color: #6c757d;
    text-decoration: none;
    padding: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
    background: #f8f9fa;
    font-size: 16px;
}

.form-button-container .btn-cancel:hover {
    color: #DD3333;
    border-color: #DD3333;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Bei Bildschirmbreite < 768px: Buttons untereinander */
@media (max-width: 768px) {
    .form-button-container {
        grid-template-columns: 1fr;
    }
    
    /* Überschreibe grid-column Zuweisungen für mobile */
    .form-button-container .btn-submit:first-of-type,
    .form-button-container .btn-submit:nth-of-type(2),
    .form-button-container .btn-cancel {
        grid-column: 1;
        grid-row: auto;
    }
}


/* ============================================
   USER MESSAGE FORM
   ============================================ */
.user-message-form {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid #e1e5e9;
}

.user-message-form .form-group {
    margin-bottom: 20px;
}

.user-message-form label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.user-message-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #f8f9fa;
}

.user-message-form .form-control:focus {
    outline: none;
    border-color: #DD3333;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(221, 51, 51, 0.1);
}

.user-message-form textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.message-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.message-buttons button {
    flex: 1;
    min-width: 200px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.message-buttons .btn-primary {
    background: linear-gradient(135deg, #DD3333 0%, #c22222 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(221, 51, 51, 0.3);
}

.message-buttons .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #c22222 0%, #a11111 100%);
    box-shadow: 0 6px 20px rgba(221, 51, 51, 0.4);
    transform: translateY(-2px);
}

.message-buttons .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.message-buttons .btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268 0%, #4e555b 100%);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    transform: translateY(-2px);
}

.message-buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

@media (max-width: 768px) {
    .message-buttons {
        flex-direction: column;
    }
    
    .message-buttons button {
        width: 100%;
        min-width: auto;
    }
}

/* ========= Style für my_advertisements.php und advertisement_portal.php ====================== */
.advertisements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.advertisement-tile.inactive {
    opacity: 0.5;
}

.advertisement-tile.deleted {
    opacity: 0.5;
    background: #f8fafc;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

/* Inaktive Kacheln sollen beim Öffnen (active) nicht abgeblendet sein,
   damit die Buttons vollständig sichtbar sind */
.advertisement-tile.inactive.active {
    opacity: 1;
}

.advertisement-tile {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    overflow: visible;
    user-select: none;  /* NEU: Verhindert Textauswahl */
    -webkit-user-select: none;  /* Für Safari/WebKit */
    -moz-user-select: none;  /* Für Firefox */
    -ms-user-select: none;  /* Für IE/Edge */
}

.advertisement-tile:hover {
    border-color: #DD3333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 51, 51, 0.15);
}

.advertisement-tile.active {
    border-color: #DD3333;
    background: #fff5f5;
}

.advertisement-tile {
    text-decoration: none;
    color: inherit;
}

.advertisement-tile-new {
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    justify-content: center;
    align-items: center;
}

.advertisement-tile-new:hover {
    border-color: #DD3333;
    background: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 51, 51, 0.15);
}

.advertisement-tile-header {
    margin-bottom: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.advertisement-tile-title {
    font-size: 25px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}


.advertisement-tile-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    /* display: flex;
    justify-content: center;
    align-items: center; */
    display:block;
}

.advertisement-tile-description {
    border: 1px dotted #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #666;
    margin: 10px;
    padding: 20px;
    padding-top: 10px;
    text-align: center;
    
    
}

.advertisement-tile-description.reduced {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.advertisement-user-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    background: #f3f4f6;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    margin-bottom: 5px;
}

.advertisement-user-badge.has-user.total-requests {
    background: #dbeafe;
    color: #1e40af;
}

.advertisement-user-badge.has-user.open-requests {
    background: #fef3c7;
    color: #854d0e;
}

.advertisement-user-badge.has-user.admin-anzeige {
    background: yellow;
    color: black;
}

.advertisement-user-badge.has-user.accepted-requests {
    background: green;
    color: white;
}

.advertisement-user-badge.has-user.rejected-requests {
    background: #fee2e2;
    color: red;
}

.advertisement-user-badge.expired-date {
    background: #dc2626;
    color: white;
}

.advertisement-tile-categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    flex: 1;
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
    padding: 8px;
    align-content: center;
    justify-items: center;
    box-sizing: border-box;
    overflow: visible;
}

.advertisement-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
}

.advertisement-category-icon {
    font-size: 42px;
    line-height: 1;
    display: block;
    width: auto;
    height: auto;
    transition: font-size 0.3s ease;
    overflow: visible;
}

/* Dynamische Größenanpassung basierend auf Kategorienanzahl */
.advertisement-tile-categories[data-category-count="1"] .advertisement-category-icon {
    font-size: 120px;
}

.advertisement-tile-categories[data-category-count="2"] .advertisement-category-icon {
    font-size: 70px;
}

.advertisement-tile-categories[data-category-count="3"] .advertisement-category-icon,
.advertisement-tile-categories[data-category-count="4"] .advertisement-category-icon,
.advertisement-tile-categories[data-category-count="5"] .advertisement-category-icon,
.advertisement-tile-categories[data-category-count="6"] .advertisement-category-icon {
    font-size: 42px;
}

.advertisement-tile-categories[data-category-count]:not([data-category-count="1"]):not([data-category-count="2"]):not([data-category-count="3"]):not([data-category-count="4"]):not([data-category-count="5"]):not([data-category-count="6"]) .advertisement-category-icon {
    font-size: 36px;
}

.advertisement-category-name {
    font-size: 16px;
    color: #666;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
    padding-top: 10px;
    box-sizing: border-box;
}

.advertisement-tile-categories[data-category-count="1"] {
    grid-template-columns: minmax(0, 1fr);
}

.advertisement-tile-categories[data-category-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.advertisement-tile-actions {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.advertisement-tile.active .advertisement-tile-actions {
    display: flex;
    opacity: 1 !important;
}

.advertisement-action-btn {
    border: 1px solid black;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.advertisement-action-btn.edit {
    background: white;
    color: black;
    
}

.advertisement-action-btn.edit:hover {
    background: #c02929;
}

.advertisement-action-btn.delete {
    background: #dc3545;
    color: white;
}

.advertisement-action-btn.delete:hover {
    background: #c82333;
}

.advertisement-action-btn.cancel {
    background: white;
    color: black;
    border: 1px solid red;
}

.advertisement-action-btn.cancel:hover {
    background: #c82333;
    color: white;
}

.advertisement-action-btn.accept, .advertisement-action-btn.accept-later,
.advertisement-action-btn.apply {
    background: white;
    color: black;
    border: 1px solid green;
}

.advertisement-action-btn.accept:hover, .advertisement-action-btn.accept-later:hover,
.advertisement-action-btn.apply:hover {
    background: #DD3333;
    color: white;
}

.advertisement-action-btn.reject {
    background: white;
    color: black;
    border: 1px solid red;
}

.advertisement-action-btn.reject:hover {
    background: #DD3333;
    color: white;
}

.advertisement-action-btn.details {
    background: white;
    color: black;
    border: 1px solid black;
}

.advertisement-action-btn.details:hover {
    background: #DD3333;
    color: white;
}

.advertisement-action-btn.details:hover {
    background: #DD3333;
    color: white;
}



.user-details-label {
    font-weight: 600;
    margin-bottom: 5px;
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state a:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.loading-indicator {
    text-align: center;
    padding: 40px;
    color: #666;
}

.message-container {
    font-size: 12px;
    color: #666;
    margin: 10px;
    padding: 10px;
    border-radius: 5px;
    background: #f8fafc;
}

/* @media (max-width: 768px) {
    .advertisements-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .advertisement-tile {
        padding: 15px;
        min-height: 250px;
    }
} */
    
.advertisement-tile-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 6px;
}

.advertisement-category-icon {
    font-size: 40px;
}

.advertisement-tile-categories[data-category-count="1"] .advertisement-category-icon {
    font-size: 90px;
}

.advertisement-tile-categories[data-category-count="2"] .advertisement-category-icon {
    font-size: 55px;
}

.advertisement-tile-categories[data-category-count="3"] .advertisement-category-icon,
.advertisement-tile-categories[data-category-count="4"] .advertisement-category-icon,
.advertisement-tile-categories[data-category-count="5"] .advertisement-category-icon,
.advertisement-tile-categories[data-category-count="6"] .advertisement-category-icon {
    font-size: 40px;
}

.advertisement-tile-categories[data-category-count]:not([data-category-count="1"]):not([data-category-count="2"]):not([data-category-count="3"]):not([data-category-count="4"]):not([data-category-count="5"]):not([data-category-count="6"]) .advertisement-category-icon {
    font-size: 32px;
}

.advertisement-category-name {
    font-size: 10px;
}

.advertisement-tile-title {
    font-size: 16px;
}

.advertisement-user-badge {
    font-size: 12px;
    padding: 6px 12px;
}

/* Kategorien-Kacheln */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.category-tile {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    user-select: none;  /* NEU: Verhindert Textauswahl */
    -webkit-user-select: none;  /* Für Safari/WebKit */
    -moz-user-select: none;  /* Für Firefox */
    -ms-user-select: none;  /* Für IE/Edge */
}

.category-tile:hover {
    border-color: #DD3333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 51, 51, 0.15);
}

.category-tile.selected {
    border-color: #DD3333;
    background: #fff5f5;
}

.category-tile .category-icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

.category-tile .category-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.category-tile .category-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #DD3333;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.category-tile.selected .category-check {
    display: flex;
}

.category-tile.inactive {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.category-tile.inactive:hover {
    border-color: #e0e0e0;
    transform: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .category-tile {
        padding: 15px;
    }
    
    .category-tile .category-icon {
        font-size: 36px;
    }
    
    .date-range-container {
        flex-direction: column;
    }
    
    .date-range-container .input-group {
        min-width: 100%;
    }
}

/* ===================================
   Postfach / Inbox Styles
   =================================== */

/* Badge auf Dashboard-Card-Icon */
.dashboard-card--inbox .dashboard-card-icon {
    position: relative;
}

.badge-notification {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Badge für wichtige Nachrichten */
.badge-urgent {
    background: #dc3545;
    color: white;
    margin-right: 8px;
}

/* Inbox Modal Message List */
.inbox-messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inbox-message-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.inbox-message-item[data-message-type="warning"] {
    background: #fff3cd;
    border-color: #ffc107;
}

.inbox-message-item[data-message-type="error"],
.inbox-message-item[data-message-type="danger"] {
    background: #f8d7da;
    border-color: #dc3545;
}

.inbox-message-item[data-message-type="success"] {
    background: #d4edda;
    border-color: #28a745;
}

.inbox-message-item[data-message-type="info"] {
    background: white;
    border-color: #17a2b8;
}

.inbox-message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.inbox-message-header strong {
    font-size: 16px;
    color: #212529;
}

.inbox-message-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.inbox-message-meta small {
    color: #6c757d;
    font-size: 12px;
    white-space: nowrap;
}

.inbox-message-body {
    margin-bottom: 12px;
}

.inbox-message-body p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
}

.inbox-message-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Responsive Anpassungen für Inbox Messages */
@media (max-width: 768px) {
    .inbox-message-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .inbox-message-meta {
        align-items: flex-start;
    }
    
    .badge-notification {
        width: 28px;
        height: 28px;
        font-size: 12px;
        border: 2px solid #fff;
        top: 6px;
        right: 6px;
    }
}

@media (max-width: 480px) {
    .badge-notification {
        width: 32px;
        height: 32px;
        font-size: 14px;
        top: 8px;
        right: 8px;
    }
}
   
