/* PMedia Delivery Portal — Brand: Blau #38a0fb / #68bfff, Dunkel #0f1115, Inter Tight + Inter */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Inter+Tight:wght@600;700&display=swap');

:root {
    --brand: #38a0fb;
    --brand-light: #68bfff;
    --ink: #0f1115;
    --panel: #171a21;
    --border: #262b35;
    --paper: #eef2f5;
    --paper-dim: rgba(238, 242, 245, 0.6);
    --paper-faint: rgba(238, 242, 245, 0.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--ink);
    color: var(--paper);
    font-family: 'Inter', sans-serif;
    background-image:
        radial-gradient(circle at 15% -10%, rgba(56, 160, 251, 0.16), transparent 55%),
        radial-gradient(circle at 85% 0%, rgba(104, 191, 255, 0.10), transparent 45%);
    background-attachment: fixed;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.4em 0;
}

a { color: var(--brand-light); }

.wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.wrap-narrow {
    max-width: 420px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.eyebrow {
    color: var(--brand-light);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.72rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card {
    background-color: var(--panel);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.75rem;
}

.center-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.6rem;
    padding: 0.65rem 1.15rem;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.btn-primary {
    background-color: var(--brand);
    color: var(--ink);
}
.btn-primary:hover { background-color: var(--brand-light); }

.btn-secondary {
    background: transparent;
    border-color: var(--brand);
    color: var(--brand-light);
}
.btn-secondary:hover { background-color: rgba(56, 160, 251, 0.1); }

.btn-danger {
    background: transparent;
    border-color: #7a3030;
    color: #ff8b8b;
}
.btn-danger:hover { background-color: rgba(255, 100, 100, 0.08); }

.btn-block { width: 100%; }

label {
    display: block;
    font-size: 0.85rem;
    color: var(--paper-dim);
    margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea {
    width: 100%;
    background-color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    color: var(--paper);
    font-family: inherit;
    font-size: 0.95rem;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
}

.field { margin-bottom: 1.1rem; }

.error {
    color: #ff8b8b;
    font-size: 0.88rem;
    margin: 0.75rem 0;
}
.success {
    color: #7fe3a0;
    font-size: 0.88rem;
    margin: 0.75rem 0;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-list { display: flex; flex-direction: column; gap: 0.75rem; }

.project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.4rem;
    text-decoration: none;
    color: inherit;
    gap: 1rem;
    flex-wrap: wrap;
}
.project-row:hover { border-color: rgba(56,160,251,0.6); }

.project-row .meta {
    text-align: right;
    font-size: 0.82rem;
    color: var(--paper-faint);
}

.badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--paper-dim);
}

.video-block { margin-bottom: 2rem; }
.video-block video {
    width: 100%;
    border-radius: 0.9rem;
    background: #000;
    display: block;
    border: 1px solid var(--border);
}

.video-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.85rem;
    flex-wrap: wrap;
}

.video-meta {
    font-size: 0.82rem;
    color: var(--paper-faint);
    margin-top: 0.4rem;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
table.admin-table th, table.admin-table td {
    text-align: left;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border);
}
table.admin-table th {
    color: var(--paper-faint);
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.copy-link-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.copy-link-row input { flex: 1; }

.footer-note {
    text-align: center;
    color: var(--paper-faint);
    font-size: 0.78rem;
    margin-top: 3rem;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.75rem 0;
}

/* Filter-Tabs (Alle / Videos / Fotos) */
.filter-tabs {
    display: inline-flex;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem;
    gap: 0.15rem;
}
.filter-tab {
    background: transparent;
    border: none;
    color: var(--paper-dim);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.filter-tab:hover { color: var(--paper); }
.filter-tab.active {
    background: var(--brand);
    color: var(--ink);
}

/* Galerie-Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.media-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.media-card:hover {
    border-color: rgba(56, 160, 251, 0.6);
    transform: translateY(-2px);
}

.media-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #000;
    overflow: hidden;
}
.media-thumb img,
.media-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-icon-overlay {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    width: 1.9rem;
    height: 1.9rem;
    background: rgba(15, 17, 21, 0.75);
    border-radius: 0.4rem;
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    pointer-events: none;
}

.media-caption {
    padding: 0.85rem 1rem 1rem;
}
.media-title {
    font-weight: 600;
    font-size: 0.92rem;
    margin: 0 0 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.media-size-label {
    color: var(--brand-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    font-weight: 600;
    margin: 0;
}
.media-size-value {
    font-size: 0.85rem;
    margin: 0.1rem 0 0 0;
    color: var(--paper-dim);
}

/* Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.lightbox-overlay.open { display: flex; }

.lightbox-content {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 1rem;
    max-width: 960px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}

.lightbox-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 17, 21, 0.7);
    border: none;
    color: var(--paper);
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    z-index: 1;
}
.lightbox-close:hover { background: rgba(15, 17, 21, 0.95); }

.lightbox-media {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 70vh;
}
.lightbox-media video,
.lightbox-media img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
}
.lightbox-title {
    font-weight: 600;
    margin: 0 0 0.2rem 0;
}

/* Cover-Banner & Begrüßungstext */
.cover-banner {
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    max-height: 280px;
    border: 1px solid var(--border);
}
.cover-banner img {
    width: 100%;
    height: 100%;
    max-height: 280px;
    object-fit: cover;
    display: block;
}
.welcome-message {
    color: var(--paper-dim);
    margin: 0.4rem 0 0 0;
    max-width: 640px;
    white-space: pre-wrap;
}

/* Freigabe-Status pro Datei */
.approval-buttons {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.75rem;
}
.approval-btn {
    flex: 1;
    background: var(--ink);
    border: 1px solid var(--border);
    color: var(--paper-dim);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.approval-btn:hover { border-color: var(--brand); color: var(--paper); }
.approval-btn-approve.active {
    background: rgba(127, 227, 160, 0.12);
    border-color: #2e6b45;
    color: #7fe3a0;
}
.approval-btn-changes.active {
    background: rgba(255, 207, 127, 0.12);
    border-color: #7a5a20;
    color: #ffcf7f;
}

/* Feedback-Formular */
.feedback-card {
    margin-top: 2rem;
}

.dropzone-compact {
    padding: 1.5rem 1rem;
}

.feedback-file-list {
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.feedback-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--ink);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
}
.feedback-file-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.feedback-file-row button {
    background: transparent;
    border: none;
    color: var(--paper-faint);
    cursor: pointer;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.feedback-file-row button:hover { color: #ff8b8b; }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 560px) {
    .two-col { grid-template-columns: 1fr; }
}

/* Drag & Drop Upload */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: 0.9rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone:hover,
.dropzone:focus-visible {
    border-color: var(--brand);
    outline: none;
}
.dropzone-active {
    border-color: var(--brand);
    background-color: rgba(56, 160, 251, 0.08);
}

.upload-queue-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.upload-queue-item:last-child { border-bottom: none; }

.upload-queue-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-queue-bar-wrap {
    width: 120px;
    height: 0.45rem;
    background: var(--ink);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
}
.upload-queue-bar {
    height: 100%;
    background: var(--brand);
    transition: width 0.15s ease;
}

.upload-queue-pct {
    width: 3.2rem;
    text-align: right;
    color: var(--paper-dim);
    flex-shrink: 0;
}

.upload-queue-status {
    color: var(--paper-faint);
    flex-shrink: 0;
}
.upload-queue-status.ok { color: #7fe3a0; }
.upload-queue-status.err { color: #ff8b8b; }
