/* ===================================================
   ADMIN STYLESHEET – Different Fotografie
   =================================================== */

/* ── Layout ── */
.admin-body {
    background: #0f0f0e;
    color: #e8e4d9;
    min-height: 100vh;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #0a0a09;
    border-right: 1px solid rgba(201,169,110,0.12);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    overflow-y: auto;
}

.admin-logo {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(201,169,110,0.1);
    margin-bottom: 8px;
}

.admin-logo span {
    display: block;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 400;
    color: #e8e4d9;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.admin-logo small {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 3px;
    display: block;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    gap: 2px;
    flex: 1;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    letter-spacing: 0.05em;
    color: #9a9a8e;
    transition: all 0.2s ease;
    text-decoration: none;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(201,169,110,0.08);
    color: #e8e4d9;
}

.admin-nav-item.active { color: var(--gold); }

.admin-nav-item.logout {
    margin-top: auto;
    color: #6b6b62;
}
.admin-nav-item.logout:hover { color: #e07070; background: rgba(200,60,60,0.08); }

/* ── Main Content ── */
.admin-main {
    margin-left: 220px;
    flex: 1;
    padding: 32px 40px 60px;
    min-width: 0;
}

/* ── Topbar ── */
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-topbar h1 {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 300;
    color: #faf9f6;
    letter-spacing: 0.02em;
}

.back-link {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b6b62;
    margin-bottom: 6px;
    transition: color 0.2s;
}
.back-link:hover { color: var(--gold); }

/* ── Album-Grid (Admin) ── */
.admin-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-album-card {
    background: #161614;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-album-card:hover {
    border-color: rgba(201,169,110,0.25);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.admin-album-thumb {
    position: relative;
    aspect-ratio: 4/3;
    background: #1a1a18;
    overflow: hidden;
}

.admin-album-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.admin-album-card:hover .admin-album-thumb img {
    transform: scale(1.04);
}

.admin-album-no-cover {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3d3d38;
}

.admin-album-count-badge {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,0.7);
    color: #9a9a8e;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.admin-album-info {
    padding: 14px 16px;
}

.admin-album-info h3 {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 400;
    color: #e8e4d9;
    margin-bottom: 10px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-album-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

/* ── Fotos-Grid (Admin) ── */
.admin-photos-section { margin-top: 32px; }

.admin-photos-section h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 300;
    color: #faf9f6;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.admin-photo-card {
    background: #161614;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.admin-photo-thumb {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #1a1a18;
}

.admin-photo-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.admin-photo-card:hover .admin-photo-thumb img {
    transform: scale(1.05);
}

.admin-photo-actions-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.admin-photo-card:hover .admin-photo-actions-overlay { opacity: 1; }

.photo-action-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #e8e4d9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-sans);
}

.photo-action-btn:hover { background: rgba(201,169,110,0.2); border-color: var(--gold); color: var(--gold); }
.photo-action-btn.danger:hover { background: rgba(200,60,60,0.25); border-color: #e07070; color: #e07070; }

/* ── Video-Karte ── */
.admin-photo-card.is-video .admin-photo-thumb {
    background: #0e0e0e;
}

.video-thumb-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255,255,255,0.3);
    width: 100%; height: 100%;
    min-height: 120px;
}

.video-thumb-placeholder span {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.video-badge {
    position: absolute;
    top: 6px; left: 6px;
    background: rgba(0,0,0,0.7);
    color: var(--gold);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Upload-Bereich ── */
.upload-section { margin: 32px 0; }

.upload-dropzone {
    border: 1px dashed rgba(201,169,110,0.25);
    border-radius: 6px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(201,169,110,0.02);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--gold);
    background: rgba(201,169,110,0.05);
}

.upload-icon { color: rgba(201,169,110,0.35); margin-bottom: 16px; }
.upload-icon svg { margin: 0 auto; }

.upload-text {
    font-size: 14px;
    color: #9a9a8e;
    margin-bottom: 8px;
}

.upload-browse-btn {
    color: var(--gold);
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
}

.upload-hint {
    font-size: 12px;
    color: #6b6b62;
    letter-spacing: 0.04em;
}

.upload-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.upload-preview-item {
    position: relative;
    width: 80px;
}

.upload-preview-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.preview-video-placeholder {
    width: 80px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: rgba(255,255,255,0.4);
    border-radius: 3px;
}

.preview-remove-btn {
    position: absolute;
    top: -6px; right: -6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #c0392b;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
}

.preview-filename {
    display: block;
    font-size: 10px;
    color: #6b6b62;
    text-align: center;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 80px;
}

.upload-submit-btn { margin-top: 20px; }

/* ── Fortschrittsbalken ── */
.upload-progress {
    margin-top: 16px;
    padding: 16px 20px;
    background: #161614;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-text { font-size: 13px; color: #9a9a8e; }
.progress-percent { font-size: 13px; color: var(--gold); }

.progress-bar {
    height: 3px;
    background: #2e2e2b;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--gold-dark), var(--gold));
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ── Modals ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: #161614;
    border: 1px solid rgba(201,169,110,0.15);
    border-radius: 8px;
    padding: 32px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.modal p { color: #9a9a8e; font-size: 14px; line-height: 1.7; margin-bottom: 24px; }
.modal p strong { color: #e8e4d9; }
.modal p em { color: #6b6b62; font-style: italic; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 300;
    color: #faf9f6;
    letter-spacing: 0.02em;
}

.modal-close {
    color: #6b6b62;
    padding: 4px;
    transition: color 0.15s;
    line-height: 0;
}
.modal-close:hover { color: var(--gold); }

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* ── Login-Seite ── */
.admin-login-wrap,
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #0a0a09;
}

.admin-login-box,
.login-card {
    width: 100%;
    max-width: 400px;
    background: #161614;
    border: 1px solid rgba(201,169,110,0.15);
    border-radius: 8px;
    padding: 48px 40px;
}

.admin-login-box h1,
.login-card h1 {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 300;
    color: #faf9f6;
    margin-bottom: 8px;
}

.admin-login-box p,
.login-card p {
    color: #6b6b62;
    font-size: 13px;
    margin-bottom: 32px;
}

/* ── Leerzustand ── */
.admin-empty {
    color: #6b6b62;
    font-size: 14px;
    padding: 40px 0;
    text-align: center;
    letter-spacing: 0.03em;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .admin-sidebar {
        width: 180px;
    }
    .admin-main {
        margin-left: 180px;
        padding: 24px 20px 48px;
    }
}

@media (max-width: 640px) {
    .admin-sidebar {
        position: static;
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid rgba(201,169,110,0.12);
    }
    .admin-layout { flex-direction: column; }
    .admin-main { margin-left: 0; padding: 20px 16px 48px; }
    .admin-nav { flex-direction: row; padding: 8px; overflow-x: auto; }
    .admin-logo { display: none; }
    .admin-albums-grid { grid-template-columns: 1fr 1fr; }
    .admin-photos-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
