/* --- public/style.css --- */
/* Allgemeine Stile & Body */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
}

body.modal-open {
    overflow: hidden;
}

/* Stile für die Login-Seite */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 0;
    background-image: url('https://images.unsplash.com/photo-1558591710-4b4a1ae0f04d?q=80&w=1887&auto-format&fit=crop');
    background-size: cover;
    background-position: center;
}
.login-body .form-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
/* Dark Mode für Login-Seite */
body.dark-mode.login-body .form-container {
    background-color: rgba(30, 30, 30, 0.8);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
body.dark-mode.login-body .form-container h2,
body.dark-mode.login-body .form-container label {
    color: #fff;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Header & Navigation */
h1, h2 {
    color: #2c3e50;
}
h1 {
    text-align: center;
    margin-bottom: 30px;
}
h2 {
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 40px;
}
.login-body h2 {
    border-bottom: none;
    margin-top: 0;
}


.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.header-nav h1 {
    margin: 0;
    text-align: left;
    font-size: 28px;
    flex-shrink: 0;
}

/* Live Info Container */
#live-info-container {
    text-align: center;
    font-size: 14px;
    margin: 10px;
    flex-grow: 1;
    background-color: #e9ecef;
    padding: 8px 10px;
    border-radius: 8px;
    min-height: 70px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}
body.dark-mode #live-info-container {
    background-color: rgba(255,255,255,0.1);
}

/* Container für rechte Steuerelemente */
.header-right-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    min-height: 70px;
    justify-content: center;
}
#opening-hours-info {
    font-weight: bold;
    font-size: 0.9em;
    white-space: nowrap;
}
#weather-info {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
#weather-info img {
    width: 35px;
    height: 35px;
    margin-right: 5px;
}
#datetime-info {
    font-size: 12px;
    line-height: 1.2;
}


.admin-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

#user-dropdown-btn {
    padding: 8px 12px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001; /* Erhöht, um über anderen Elementen zu sein */
    border-radius: 4px;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.show {
    display: block;
}

/* Tab-System */
.tab {
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
}
.tab::after {
    content: "";
    display: table;
    clear: both;
}
.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 17px;
    font-weight: bold;
    color: #3498db;
}
.tab button:hover {
    background-color: #f1f1f1;
}
.tab button.active {
    background-color: #3498db;
    color: white;
    border-radius: 6px 6px 0 0;
}
.tabcontent {
    display: none;
    padding: 6px 12px;
    animation: fadeEffect 0.5s;
}
@keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* Foto-Vorschau-Container */
.photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.photo-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
}
.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Formularelemente */
.form-group { margin-bottom: 20px; text-align: left; }
label { display: block; font-weight: bold; margin-bottom: 5px; }
input[type="text"], input[type="password"], input[type="datetime-local"], input[type="tel"], input[type="email"], input[type="number"], select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: white;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.conditional-fields {
    display: none;
    padding: 20px;
    margin-top: -10px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background-color: #fafafa;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: #ffffff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
    box-sizing: border-box;
}
.btn:hover { background-color: #2980b9; }

form .btn {
    width: 100%;
    padding: 12px 20px;
}

.btn-delete {
    background-color: #e74c3c;
}
.btn-delete:hover { background-color: #c0392b; }

.btn-edit {
    background-color: #f39c12;
}
.btn-edit:hover { background-color: #e67e22; }

.btn-secondary {
    background-color: #6c757d;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* Outline-Button Stil */
.btn-outline {
    background-color: transparent;
    border: 2px solid #5a6268;
    color: #5a6268;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}
.btn-outline:hover {
    background-color: #5a6268;
    color: #ffffff;
}
.login-body .btn-outline {
    margin-top: 15px;
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: #ffffff;
    font-weight: bold;
}
.login-body .btn-outline:hover {
    background-color: #c0392b;
    border-color: #c0392b;
    color: #ffffff;
}
body.dark-mode.login-body .btn-outline {}
body.dark-mode.login-body .btn-outline:hover {}

/* Tabellen */
table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    word-break: break-word;
}
th, td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}
th {
    background-color: #3498db;
    color: white;
}
tr:nth-child(even) { background-color: #f2f2f2; }

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.action-buttons .btn, .action-buttons a.btn {
    white-space: nowrap;
}

td.action-cell {
    padding: 8px;
}

/* Admin-Panel spezifische Stile */
.add-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}
.add-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}
.add-form {
    display: flex;
    gap: 10px;
    margin-top: 0;
}
.add-form .form-group {
    flex-grow: 1;
}
.add-form .btn {
    width: auto;
    flex-shrink: 0;
    align-self: flex-end;
}
#admin-items-table .action-buttons,
#employee-table .action-buttons,
#location-table .action-buttons,
#admin-loss-reports-table .action-buttons {
    flex-direction: column;
    align-items: stretch;
}
#admin-items-table .action-buttons .btn,
#employee-table .action-buttons .btn,
#location-table .action-buttons .btn,
#admin-loss-reports-table .action-buttons .btn {
    margin-right: 0;
    text-align: center;
}


/* Modal-Stile */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 1200px;
    border-radius: 8px;
    position: relative;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close-button {
    display: none;
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.modal-close-button:hover,
.modal-close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
    width: auto;
}

.modal-actions .btn-secondary {
    margin-top: 0;
}

/* Drei-Spalten-Layout für Bearbeiten-Modal */
.modal-form-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
.modal-column-left, .modal-column-middle, .modal-column-right {
    display: flex;
    flex-direction: column;
}

.modal-column-right {
    justify-content: space-between; 
}

.modal-body {
    overflow-y: visible;
}

/* --- NEU: Stile für Sektionen im Modal --- */
.modal-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.modal-section:last-child {
    margin-bottom: 0;
}
.modal-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
    font-size: 1.1em;
    color: #495057;
}
body.dark-mode .modal-section {
    background-color: var(--table-stripe-color);
    border-color: var(--border-color);
}
body.dark-mode .modal-section h3 {
    border-color: var(--border-color);
    color: var(--text-color);
}
/* --- ENDE der neuen Sektionen-Stile --- */


/* Statistik-Stile */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.stats-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}
.stats-card h3 {
    margin-top: 0;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}
.stats-card p {
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
}
.stats-card strong {
    font-size: 1.2em;
    color: #3498db;
}

/* Chart Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.chart-card, .chart-card-full {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}
.chart-card-full {
    grid-column: 1 / -1;
}
.chart-card h3, .chart-card-full h3 {
    margin-top: 0;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

#password-message.success { color: #27ae60; font-weight: bold; }
#password-message.error { color: #e74c3c; font-weight: bold; }

/* Darkmode Toggle Switch */
.dark-mode-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background-color: #2196F3;
}
input:checked + .slider:before {
    transform: translateX(20px);
}
.slider.round {
    border-radius: 24px;
}
.slider.round:before {
    border-radius: 50%;
}

/* Dark Mode Theme */
:root {
    --bg-color: #f4f7f6;
    --container-bg: #ffffff;
    --text-color: #333;
    --header-color: #2c3e50;
    --border-color: #ddd;
    --table-stripe-color: #f2f2f2;
    --input-bg: #ffffff;
    --input-border: #ccc;
    --tab-border: #ccc;
    --tab-hover-bg: #f1f1f1;
    --link-color: #3498db;
    --link-hover-color: #2980b9;
    --comment-bg-light: #ffffff;
    --comment-bg-dark: #f8f9fa;
}

body.dark-mode {
    --bg-color: #121212;
    --container-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --header-color: #ffffff;
    --border-color: #444;
    --table-stripe-color: #2a2a2a;
    --input-bg: #252525;
    --input-border: #555;
    --tab-border: #444;
    --tab-hover-bg: #333;
    --link-color: #5dade2;
    --link-hover-color: #85c1e9;
    --comment-bg-light: #2a2a2a;
    --comment-bg-dark: #333333;
}
body.dark-mode .add-container {
    background-color: var(--table-stripe-color);
    border-color: var(--border-color);
}
body.dark-mode .add-container h3 {
    color: var(--header-color);
    border-color: var(--border-color);
}
body.dark-mode .stats-card, 
body.dark-mode .chart-card,
body.dark-mode .chart-card-full {
     background-color: var(--table-stripe-color);
    border-color: var(--border-color);
}


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
}

body.modal-open {
    overflow: hidden;
}

.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Header & Navigation */
h1, h2 {
    color: var(--header-color);
}
h1 {
    text-align: center;
    margin-bottom: 30px;
}
h2 {
    border-bottom: 2px solid var(--link-color);
    padding-bottom: 10px;
    margin-top: 40px;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.header-nav h1 {
    margin: 0;
    text-align: left;
    font-size: 28px;
}

.admin-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

#user-dropdown-btn {
    padding: 8px 12px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--container-bg);
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.dropdown-content a:hover {
    background-color: var(--table-stripe-color);
}

.show {
    display: block;
}

/* Darkmode Toggle Switch */
.dark-mode-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background-color: #2196F3;
}
input:checked + .slider:before {
    transform: translateX(20px);
}
.slider.round {
    border-radius: 24px;
}
.slider.round:before {
    border-radius: 50%;
}

/* Tab-System */
.tab {
    border-bottom: 1px solid var(--tab-border);
    margin-bottom: 20px;
}
.tab::after {
    content: "";
    display: table;
    clear: both;
}
.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: 0.3s;
    font-size: 17px;
    font-weight: bold;
    color: var(--link-color);
}
.tab button:hover {
    background-color: var(--tab-hover-bg);
}
.tab button.active {
    background-color: var(--link-color);
    color: white;
    border-radius: 6px 6px 0 0;
}
.tabcontent {
    display: none;
    padding: 6px 12px;
    animation: fadeEffect 0.5s;
}
@keyframes fadeEffect {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* Formularelemente */
.form-group { margin-bottom: 20px; text-align: left; }
label { display: block; font-weight: bold; margin-bottom: 5px; }
input[type="text"], input[type="password"], input[type="datetime-local"], input[type="tel"], input[type="email"], select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    box-sizing: border-box;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 16px;
}

.conditional-fields {
    display: none;
    padding: 20px;
    margin-top: -10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background-color: rgba(0,0,0,0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--link-color);
    color: #ffffff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
    box-sizing: border-box;
}
.btn:hover { background-color: var(--link-hover-color); }

form .btn {
    width: 100%;
    padding: 12px 20px;
}

.btn-delete {
    background-color: #e74c3c;
}
.btn-delete:hover { background-color: #c0392b; }

.btn-edit {
    background-color: #f39c12;
}
.btn-edit:hover { background-color: #e67e22; }

.btn-secondary {
    background-color: #6c757d;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* Tabellen */
table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    word-break: break-word;
}
th, td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}
th {
    background-color: var(--link-color);
    color: white;
}
tr:nth-child(even) { background-color: var(--table-stripe-color); }

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.action-buttons .btn, .action-buttons a.btn {
    white-space: nowrap;
}

td.action-cell {
    padding: 8px;
}

#admin-items-table .action-buttons,
#employee-table .action-buttons,
#location-table .action-buttons,
#loss-reports-table .action-buttons,
#unclaimed-items-table .action-buttons {
    flex-direction: column;
    align-items: stretch;
}

#admin-items-table .action-buttons .btn,
#employee-table .action-buttons .btn,
#location-table .action-buttons .btn,
#loss-reports-table .action-buttons .btn,
#unclaimed-items-table .action-buttons .btn,
#unclaimed-items-table .action-buttons a.btn {
    margin-right: 0;
    text-align: center;
}


/* Modal-Stile */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    padding-top: 40px; /* Abstand nach oben */
}

.modal-content {
    background-color: var(--container-bg);
    margin: 0 auto 40px auto; /* Zentriert, mit Abstand nach unten */
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 90%; /* Responsive Breite */
    max-width: 1200px; /* Maximale Breite für große Bildschirme */
    border-radius: 8px;
    position: relative;
    animation: fadeIn 0.3s;
    display: flex;
    flex-direction: column;
}

.modal-body {
    overflow-y: visible;
}


@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close-button {
    display: none;
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.modal-close-button:hover,
.modal-close-button:focus {
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
    width: auto;
}

/* Statistik-Stile */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.stats-card {
    background-color: var(--table-stripe-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}
.stats-card h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.stats-card p {
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
}
.stats-card strong {
    font-size: 1.2em;
    color: var(--link-color);
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 0;
    margin: 0;
    list-style-type: none;
}
.match-container {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: help;
}
.match-number-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.9em;
    font-weight: bold;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 8px;
    margin-bottom: 3px;
}
body.dark-mode .match-number-badge {
    background-color: #343a40;
    color: #e9ecef;
}
.match-item-title {
    font-size: 0.9em;
    font-weight: 500;
    padding-left: 2px;
}
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: pre-wrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease-in-out, visibility 0.1s ease-in-out;
    z-index: 10;
    min-width: 220px;
    pointer-events: none;
}
body.dark-mode [data-tooltip]::after {
    background-color: #f0f0f0;
    color: #333;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.2s;
}

#password-message.success { color: #27ae60; font-weight: bold; }
#password-message.error { color: #e74c3c; font-weight: bold; }

/* Responsive Design for Mobile Devices */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 15px;
    }
    .header-nav {
        flex-direction: column;
        gap: 10px;
    }
    .tab button {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
    .tab button.active {
        border-radius: 4px;
    }
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .add-form {
        flex-direction: column;
    }
    .add-form .btn {
        width: 100%;
        align-self: initial;
    }
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }
     #photo-modal .modal-content {
        margin: 5% auto;
        padding: 15px;
    }
}

/* Stile für die Fortschrittsanzeige */
.progress-bar-container {
    width: 100%;
    background-color: var(--table-stripe-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

.progress-bar {
    width: 0%;
    height: 24px;
    background-color: #27ae60;
    text-align: center;
    line-height: 24px;
    color: white;
    font-weight: bold;
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
}

/* Vereinfachte Foto-Anzeige im Bearbeiten-Modal */
.photo-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}
.photo-link-item a {
    color: var(--link-color);
    text-decoration: none;
}
.photo-link-item a:hover {
    text-decoration: underline;
}

.delete-photo-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
}
.delete-photo-btn:hover {
    background: #c0392b;
}

/* Stile für den Foto-Slider im Modal */
#photo-modal .modal-content {
    max-width: 800px;
    background: transparent;
    border: none;
    padding: 0;
}
#photo-modal h2 {
    color: white;
    text-shadow: 1px 1px 3px black;
    text-align: center;
}
.photo-slider {
    position: relative;
    margin: 20px auto;
    height: 500px;
}

#photo-modal-gallery {
    width: 100%;
    height: 100%;
}

.slide {
    display: none; /* Wird per JS auf 'flex' gesetzt */
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    animation: fadeEffect 0.5s;
    position: relative;
}

.slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.slide-number {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    background-color: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 1010;
}

.slide-caption {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    z-index: 1010;
}
.slide-caption .btn {
    margin-top: 0;
    width: auto;
    background-color: rgba(0,0,0,0.5);
}
.slide-caption .btn:hover {
    background-color: rgba(0,0,0,0.8);
}

.slider-control {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 22px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.4);
    z-index: 1010;
}

.slider-control.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.slider-control:hover {
    background-color: rgba(0,0,0,0.7);
}
#photo-modal .modal-close-button {
    display: block; /* Für das Foto-Modal bleibt das X sichtbar, da es keinen Abbrechen-Button gibt */
    position: absolute;
    top: -10px;
    right: 5px;
    z-index: 1011;
    color: white;
    font-size: 40px;
    text-shadow: 1px 1px 3px black;
}
.item-details .item-title {
    font-size: 1.05em;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}
.item-details .item-props-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 4px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 10px;
    font-size: 0.9em;
}
body.dark-mode .item-details .item-props-box {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #444;
}
.item-details .prop-label {
    color: #6c757d;
    font-weight: 500;
    text-align: right;
}
body.dark-mode .item-details .prop-label {
    color: #999;
}
.item-details .prop-label::after {
    content: ":";
}
.item-details .prop-value {
    color: #212529;
    font-weight: 500;
    text-align: left;
}
body.dark-mode .item-details .prop-value {
    color: #ddd;
}

.item-comments-box, .item-zendesk-box {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    white-space: pre-wrap;
}
.item-comments-box {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    color: #664d03;
}
.item-zendesk-box {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
}

.item-zendesk-box a {
    color: #3498db !important;
    font-weight: bold;
    text-decoration: none;
}
.item-zendesk-box a:hover {
    text-decoration: underline;
}

body.dark-mode .item-comments-box {
    background-color: #4d442a;
    border-color: #a88d3d;
    color: #ffecb3;
}
body.dark-mode .item-zendesk-box {
    background-color: #1b3a57;
    border-color: #3c6c98;
}
.item-comments-box strong, .item-zendesk-box strong {
    color: inherit;
}

.comments-history-box {
    min-height: 250px;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: var(--table-stripe-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.comment-entry {
    background-color: var(--container-bg);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
}
.comment-entry:nth-child(odd) {
    background-color: var(--comment-bg-light);
}
.comment-entry:nth-child(even) {
    background-color: var(--comment-bg-dark);
}
.comment-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
    font-size: 0.9em;
}
.comment-user {
    font-weight: bold;
    color: var(--header-color);
}
.comment-time {
    font-size: 0.9em;
    color: #6c757d;
}
body.dark-mode .comment-time {
    color: #999;
}
.comment-entry p {
    margin: 4px 0 0 0;
    white-space: pre-wrap;
    font-size: 0.95em;
}

.comment-input-area {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.comment-input-area textarea {
    flex-grow: 1;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-input-area textarea:focus {
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}
.btn-send-comment {
    background-color: #27ae60;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
    transition: background-color 0.2s;
}
.btn-send-comment:hover {
    background-color: #229954;
}

.btn-delete-comment {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s, background-color 0.2s;
}
.comment-entry:hover .btn-delete-comment {
    opacity: 1;
}
.btn-delete-comment:hover {
    color: #e74c3c;
    background-color: #fbecec;
}
body.dark-mode .btn-delete-comment:hover {
    background-color: #442c2e;
}


/* Korrektur für Foto-Upload im Bearbeiten-Fenster */
.photo-previews {
    margin-bottom: 10px;
}

.photo-preview-item .delete-photo-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 2;
}

.input-with-button {
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-with-button input {
    flex-grow: 1;
}

.btn-save-inline {
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px 10px;
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.2s;
}

.btn-save-inline:hover {
    background-color: #229954;
}

.btn-save-inline.invalid {
    background-color: #e74c3c;
}

/* Tooltip für interaktive Links */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}
.item-link {
    color: var(--link-color);
    font-weight: bold;
    text-decoration: underline;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: pre-wrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    z-index: 100;
    min-width: 220px;
    pointer-events: none;
}
body.dark-mode [data-tooltip]::after {
    background-color: #f0f0f0;
    color: #333;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.3s;
}

.matches-cell.has-matches {
    background-color: #e8f8f5; /* Heller Grünton */
    border: 2px solid #27ae60; /* Dicker grüner Rand */
    border-radius: 8px;
    padding: 10px;
}

body.dark-mode .matches-cell.has-matches {
    background-color: #1c3a2f;
    border-color: #2ecc71;
}

.match-container:hover {
    border-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .match-container {
    background-color: #2a2a2a;
    border-color: #444444;
}

/* Stile für Benachrichtigungen */
.notification-bell {
    position: relative;
    cursor: pointer;
}

.bell-icon {
    font-size: 24px;
    line-height: 1;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    border: 1px solid var(--container-bg);
}

.notification-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1001; /* Liegt über dem Inhalt, aber unter dem Modal */
    margin-top: 10px;
}

.notification-panel.show {
    display: block;
}

.notification-header {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: var(--table-stripe-color);
}

.notification-item.unread {
    background-color: #e8f4fd;
}

body.dark-mode .notification-item.unread {
    background-color: rgba(52, 152, 219, 0.15);
}

.notification-footer {
    padding: 8px;
    text-align: center;
    font-size: 13px;
    color: #6c757d;
}

.notification-item p.notification-message {
    margin: 0;
    padding: 0;
}

.notification-item span.notification-time {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

body.dark-mode .notification-item span.notification-time {
    color: #999;
}

/* --- NEU: Stile für @-Mention Autocomplete --- */
.autocomplete-suggestions {
    position: absolute;
    border: 1px solid var(--border-color);
    background-color: var(--container-bg);
    max-height: 150px;
    overflow-y: auto;
    z-index: 2100; /* Muss über dem Modal-Inhalt liegen */
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.autocomplete-suggestion {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.autocomplete-suggestion:hover {
    background-color: var(--tab-hover-bg);
}

.autocomplete-suggestion.active {
    background-color: var(--link-color);
    color: white;
}