body.admin-body {
    background: #f2f2f2;
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.admin-header {
    background: #3a3a3a;
    color: #fff;
}

.admin-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
}

.admin-header .logo { color: #fff; text-decoration: none; font-weight: bold; }
.admin-nav a { color: #ddd; margin-right: 1rem; text-decoration: none; }
.admin-nav a:hover { color: #fff; }

.btn-link {
    background: none;
    border: none;
    color: #ddd;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}

.btn-danger { color: #d9534f; }

.admin-main { padding: 2rem 1.5rem; }

.login-box {
    max-width: 360px;
    margin: 4rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.media-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.media-sidebar {
    background: #fff;
    padding: 1rem;
    border-radius: 6px;
    height: fit-content;
}

.folder-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.folder-list li a {
    display: block;
    padding: 0.5rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.folder-list li.active a {
    background: #dd5252;
    color: #fff;
}

.folder-list li a:hover { background: #eee; }
.folder-list li.active a:hover { background: #dd0000; }

.media-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 6px;
}

.form-compact { max-width: 100%; }
.btn-small { padding: 0.4rem 0.9rem; font-size: 0.9rem; }

.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.media-item {
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
}

.media-link {
    display: block;
    cursor: zoom-in;
}

.media-select-link {
    cursor: pointer;
}

.media-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: opacity 0.15s ease;
}

.media-link:hover img {
    opacity: 0.85;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #fff;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.lightbox-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
}

body.lightbox-open {
    overflow: hidden;
}

.media-item figcaption {
    padding: 0.5rem;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.media-name { word-break: break-all; }
.media-size { color: #888; }

.small { font-size: 0.85rem; }

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 2rem;
    background: #fff;
}

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

.user-table th {
    background: #f5f5f5;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.badge-active { background: #e4f7e9; color: #1b5e20; }
.badge-inactive { background: #f1f1f1; color: #777; }

.concert-form,
.admin-form { max-width: 640px; }
.concert-form textarea,
.admin-form textarea { width: 100%; box-sizing: border-box; padding: 0.5rem; font-size: 1rem; font-family: inherit; resize: vertical; }

.image-picker { margin: 1rem 0; }
.image-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.6rem;
    max-width: 640px;
}

.image-picker-item {
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    background: none;
    overflow: hidden;
}

.image-picker-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.image-picker-item.selected {
    border-color: #dd5252;
}

.events-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.events-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 1rem;
}

.events-list {
    background: #fff;
    padding: 1.5rem;
    border-radius: 6px;
}

.events-list h3 {
    margin-top: 0;
}

.events-list .user-table {
    margin: 1rem 0;
}

.event-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.event-row:hover {
    background-color: #f9f9f9;
}

.event-link {
    color: #dd5252;
    text-decoration: none;
    font-weight: 500;
}

.event-link:hover {
    text-decoration: underline;
}

.events-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 6px;
    height: fit-content;
    position: sticky;
    top: 1rem;
}

.events-form h3 {
    margin-top: 0;
    font-size: 1rem;
}

.events-form .form-compact {
    max-width: 100%;
}

.events-form label {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.events-form input {
    width: 100%;
    padding: 0.4rem;
    font-size: 0.9rem;
}

/* Image Picker Modal */
#imagePickerModal .modal-content {
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
}

#imagePickerModal .image-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

#imagePickerModal .image-picker-item {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

#imagePickerModal .image-picker-item:hover {
    border-color: #dd5252;
    box-shadow: 0 2px 8px rgba(122, 31, 43, 0.2);
}

#imagePickerModal .image-picker-item.selected {
    border-color: #dd5252;
    background: #f9f9f9;
}

#imagePickerModal .image-picker-item img {
    width: 100%;
    height: auto;
}

.image-preview {
    margin: 1rem 0;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.image-preview img {
    border-radius: 4px;
}

.btn-secondary {
    background: #666;
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #555;
}

@media (max-width: 1000px) {
    .events-layout {
        grid-template-columns: 1fr;
    }
    
    .events-form {
        position: static;
    }
}

@media (max-width: 700px) {
    .media-layout { grid-template-columns: 1fr; }
}

/* Gallery Admin Section */
.gallery-section {
    margin-top: 3rem;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid var(--color-primary);
}

.gallery-section h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.gallery-upload-form {
    margin: 1.5rem 0 2rem 0;
    padding: 1.5rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.file-input-wrapper {
    margin-top: 0.5rem;
}

#selected-files {
    margin-top: 0.5rem;
}

.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.admin-gallery-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.admin-gallery-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.admin-gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.admin-gallery-item form {
    padding: 0.75rem;
    text-align: center;
}

/* Fotografen-Bereich */
.photo-body {
    min-height: 100vh;
}

.photo-header {
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.photo-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.photo-header .logo img {
    display: block;
    width: auto;
    max-width: 240px;
    max-height: 50px;
}

.photo-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.photo-nav a,
.photo-nav .btn-link {
    color: #333;
    font-size: 0.92rem;
    text-decoration: none;
}

.photo-nav a:hover,
.photo-nav .btn-link:hover {
    color: #dd5252;
    text-decoration: underline;
}

.photo-main {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.photo-upload-box {
    max-width: 720px;
    margin: 1.25rem 0 2.5rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.photo-upload-box .form {
    max-width: 100%;
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
    margin: 1rem 0 2rem;
}

.photo-gallery-item {
    margin: 0;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.photo-gallery-item img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
}
