/* ===== Global ===== */
* { box-sizing: border-box; }

body.app-body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    background: #f3f4f6;
    color: #515151;
}

/* ===== Login ===== */
body.login-body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #e0f2fe, #eff6ff 55%, #e5e7eb);
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
}
.login-card {
    background: #ffffff;
    padding: 24px 26px;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15,23,42,0.16);
    width: 340px;
    border: 1px solid rgba(148, 163, 184, 0.45);
}
.login-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}
.login-card input[type="password"] {
    width: 100%;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid #cbd5f5;
    background: #f9fafb;
    color: #111827;
    margin-bottom: 12px;
    box-sizing: border-box;
    font-size: 14px;
}
.login-card input[type="password"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.35);
}
.login-card button {
    width: 100%;
    padding: 9px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}
.login-card button:hover {
    filter: brightness(1.07);
}
.small {
    font-size: 12px;
    color: #6b7280;
}
.mb-10 { margin-bottom: 10px; }

/* ===== Layout mit Sidebar ===== */
.app-layout {
    display:flex;
    min-height:100vh;
}
.sidebar {
    width:230px;
    background: #2c2c2c;
    color:#e5e7eb;
    padding:18px 16px;
    display:flex;
    flex-direction:column;
    gap:16px;
}
.sidebar-logo {
    font-weight:700;
    font-size:18px;
    display:flex;
    align-items:center;
    gap:8px;
}
.sidebar-nav a {
    display:flex;
    align-items:center;
    gap:8px;
    padding:12px 8px;
    border-radius:8px;
    font-size:16px;
    color:#fff;
    text-decoration:none;
    margin-bottom:4px;
}
.sidebar-nav a.active {
    background: #222;
    color:#e5e7eb;
}
.sidebar-nav a:hover:not(.active) {
    background:rgb(111 111 111 / 90%);
}
.sidebar-footer {
    margin-top:auto;
    font-size:12px;
    color:#9ca3af;
}
.logout-link {
    color:#9ca3af;
    text-decoration:none;
}
.logout-link:hover { text-decoration:underline; }

.main {
    flex:1;
    padding:24px 24px 40px;
}

/* Header */
.app-header {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    margin-bottom:24px;
    gap:12px;
}
.app-title {
    font-size: 22px;
    font-weight: 650;
}
.app-sub {
    font-size: 13px;
    color: #6b7280;
}
.badge {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 10px;
    border-radius:999px;
    background: #dbeafe;
    font-size:11px;
    color: #2563eb;
}

/* Cards */
.card {
    background: #ffffff;
    border-radius: 0;
    margin-bottom: 24px;
    box-shadow: 0 8px 20px rgba(15,23,42,0.04);
    border: 1px solid #e5e7eb;
}

.card-inner {
    padding: 18px 20px 20px;
}
.card-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:12px;
}
.card-title {
    font-size:18px;
    font-weight:600;
    color: #222;
}

/* Messages */
.msg {
    padding:9px 11px;
    margin-bottom:10px;
    border-radius:8px;
    font-size:14px;
}
.msg-ok {
    background:#ecfdf3;
    border:1px solid #22c55e;
    color:#14532d;
}
.msg-error {
    background:#fef2f2;
    border:1px solid #f97373;
    color:#7f1d1d;
}

/* Inputs */
label {
    font-weight:500;
    display:block;
    margin-bottom:4px;
    font-size:14px;
    color: #393939;
}
input[type="text"],
input[type="file"],
input[type="url"],
select {
    width:100%;
    padding:8px 10px;
    border-radius: 0;
    border:1px solid #d1d5db;
    background:#f9fafb;
    color: #2c2c2c;
    margin-bottom:10px;
    font-size:14px;
}
input[type="text"]:focus,
input[type="file"]:focus,
input[type="url"]:focus,
select:focus {
    outline:none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.25);
}

/* Buttons */
button {
    border-radius:999px;
    border:none;
    padding:7px 14px;
    font-size:14px;
    font-weight:500;
    cursor:pointer;
}
.btn-primary {
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:#fff;
}
.btn-ghost {
    background:#f9fafb;
    border:1px solid #d1d5db;
    color:#111827;
}
.btn-ghost:hover {
    background:#f3f4f6;
}
.btn-danger {
    background:#fee2e2;
    color:#b91c1c;
    border:1px solid #fecaca;
}
.btn-danger:hover {
    background:#fecaca;
}
.btn-sm {
    font-size:12px;
    padding:5px 10px;
}

/* Upload */
.upload-actions {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-top:12px;
    gap:10px;
    flex-wrap:wrap;
}
#uploadProgressWrap {
    flex:1;
    display:none;
    min-width:160px;
}
#uploadProgress {
    width:100%;
    height:14px;
}

/* Filter */
.filter-form {
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
}
.filter-form select {
    width:auto;
}
.filter-form input[type="text"] {
    width:auto;
    min-width:160px;
}

/* Kategorien */
.cat-add-form .cat-add-grid {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:flex-end;
}
.cat-add-grid > div {
    min-width:160px;
    flex:1;
}
.cat-rename-input {
    width:120px;
    font-size:12px;
    padding:4px 6px;
    border-radius:6px;
    border:1px solid #d1d5db;
}
.inline-form {
    display:inline-block;
    margin-right:4px;
}
.cat-table {
    width:100%;
    border-collapse:collapse;
    font-size:13px;
    color: #222;
}
.cat-table th,
.cat-table td {
    padding:6px 8px;
    border-bottom:1px solid #e5e7eb;
    text-align:left;
}
.cat-table th {
    font-weight:600;
    background:#f9fafb;
}

/* Video Grid */
.video-grid {
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:16px;
}
.video-card {
    border: none;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    box-shadow: 0 8px 20px rgba(15,23,42,0.04);
}

.video-thumb-btn {
    padding:0;
    border:none;
    background:transparent;
    width:100%;
    cursor:pointer;
}
.video-thumb {
    width:100%;
    aspect-ratio:16/9;
    border-radius: 0;
    overflow:hidden;
    background:#e5e7eb;
    position:relative;
}
.video-thumb img {
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.video-thumb.placeholder {
    background:linear-gradient(135deg,#0f172a,#1e293b);
    color:#e5e7eb;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:8px;
}
.video-thumb-placeholder-text {
    padding:4px 8px;
    font-size:14px;
    text-align:center;
    line-height:1.3;
}
.video-play-icon {
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    pointer-events:none;
}
.video-card-header {
    display:flex;
    align-items:flex-start;
    gap:6px;
    margin-top:4px;
}
.video-title {
    font-weight:500;
    font-size:15px;
    flex:1;
}
.video-meta-small {
    font-size:11px;
}
.video-menu {
    margin-left:auto;
    position:relative;
}
.menu-toggle {
    background:transparent;
    border:none;
    border-radius:999px;
    width:24px;
    height:24px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    line-height:1;
    padding:0;
    color:#6b7280;
}
.menu-toggle:hover {
    background:#e5e7eb;
}

.menu-dropdown.open {
    display:block;
}
.menu-item {
    width:100%;
    padding:6px 10px;
    border:none;
    background:transparent;
    text-align:left;
    font-size:13px;
    cursor:pointer;
}
.menu-item:hover {
    background:#f3f4f6;
}

.video-meta {
    font-size:12px;
    color:#6b7280;
}
.video-slug {
    font-family:monospace;
    word-break:break-all;
}
.video-category {
    margin-top:2px;
}
.status-badge {
    display:inline-flex;
    align-items:center;
    padding:3px 8px;
    border-radius:999px;
    font-size:11px;
    gap:6px;
}
.status-processing {
    background:#fef3c7;
    color:#92400e;
}
.status-ready {
    background:#dcfce7;
    color:#166534;
}
.video-actions {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}
.video-share-panel {
    margin-top:6px;
    padding:6px 8px;
    border-radius:8px;
    border:1px dashed #e5e7eb;
    background:#f9fafb;
    display:none;
    flex-direction:column;
    gap:6px;
}
.video-share-panel.active {
    display:flex;
}
.video-share-panel input,
.video-share-panel textarea {
    width:100%;
    font-size:11px;
    font-family:monospace;
    padding:4px 6px;
    border-radius:6px;
    border:1px solid #d1d5db;
    background:#ffffff;
}
.share-row .small {
    margin-bottom:2px;
}

/* Preview */
.preview-container {
    margin-top:8px;
    display:none;
}
.preview-container.active {
    display:block;
}
.preview-video-wrapper {
    position:relative;
    border-radius:10px;
    overflow:hidden;
    background:#020617;
    border:1px solid #d1d5db;
}
.preview-video-wrapper video {
    width:100%;
    display:block;
    max-height: 420px;
    background:#000;
}
.quality-select-wrapper select {
    cursor: pointer;
}
.quality-select-wrapper select:focus {
    outline: none;
}
.preview-footer {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:6px 8px;
    font-size:12px;
    color:#6b7280;
}

/* Edit Form */
.video-edit-form {
    margin-top:8px;
    padding-top:8px;
    border-top:1px dashed #e5e7eb;
    display:none;
}
.video-edit-form.active {
    display:block;
}

/* Responsive */
@media (max-width: 1100px) {
    .video-grid {
        grid-template-columns:repeat(2, minmax(0,1fr));
    }
}
@media (max-width: 700px) {
    .app-layout {
        flex-direction:column;
    }
    .sidebar {
        width:100%;
        flex-direction:row;
        align-items:center;
        justify-content:space-between;
    }
    .sidebar-nav {
        display:flex;
        gap:6px;
        flex-wrap:wrap;
    }
    .sidebar-footer {
        display:none;
    }
    .main {
        padding:16px;
    }
    .video-grid {
        grid-template-columns:repeat(1, minmax(0,1fr));
    }
}

/* === v4 Upgrade: Video-Grid, Menü & Modal (Dark) === */

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 1100px) {
    .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .video-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}

.video-card {
    border: none;
    border-radius: 10px;
    background: #ffffff;
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    box-shadow: 0 8px 20px rgba(15,23,42,0.04);
}


.video-thumb-btn {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    border-radius: 0;
    overflow: hidden;
}

.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: radial-gradient(circle at top, #1f2937, #020617);
    display:flex;
    align-items:center;
    justify-content:center;
}
.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display:block;
}
.video-thumb.placeholder .video-thumb-placeholder-text {
    padding: 8px 10px;
    text-align:center;
    font-size: 13px;
    color:#e5e7eb;
}

.video-play-icon {
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    pointer-events:none;
}

/* Header-Bereich innerhalb der Card */
.video-header {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:8px;
}
.video-title {
    font-size:14px;
    font-weight:600;
}
.video-meta {
    font-size:11px;
    color:#9ca3af;
    margin-top:4px;
}

/* Status + Menü rechts */
.video-top-right {
    display:flex;
    align-items:center;
    gap:6px;
}

/* Menü (3 Punkte) */
.video-menu {
    position: relative;
}
.menu-toggle {
    border:0;
    background:transparent;
    color: #222;
    cursor:pointer;
    font-size:18px;
    line-height:1;
    padding:3px 6px;
    border-radius:999px;
}
.menu-toggle:hover {
    background:rgba(148,163,184,0.25);
}

.menu-dropdown {
    position:absolute;
    right:0;
    top:120%;
    min-width:160px;
    background: #2c2c2c;
    padding:4px 0;
    display:none;
    z-index:40;
}
.menu-dropdown.open {
    display:block;
}
.menu-item {
    width:100%;
    text-align:left;
    padding:7px 10px;
    border:0;
    background:transparent;
    color:#e5e7eb;
    font-size:13px;
    cursor:pointer;
}
.menu-item:hover {
    background:#222;
}

/* Share-Panel im Card-Body */
.video-share-panel {
    margin-top:8px;
    padding:8px 10px;
    border-radius:0;
    background: #fff;
    border:1px solid rgba(148,163,184,0.25);
    display:none;
    flex-direction:column;
    gap:6px;
}
.video-share-panel.open {
    display:flex;
}
.share-row {
    display:flex;
    flex-direction:column;
    gap:2px;
}
.share-row input,
.share-row textarea {
    width:100%;
    font-size:11px;
    border-radius:0;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #222;
    padding:4px 6px;
}
.share-buttons {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    margin-top:4px;
}
.share-buttons a {
    font-size:11px;
    padding:4px 8px;
    border-radius:999px;
    border:1px solid #1d4ed8;
    text-decoration:none;
    color:#bfdbfe;
}
.share-buttons a:hover {
    background:#1d4ed8;
    color:#eff6ff;
}

/* Edit-Form */
.video-edit-form {
    margin-top:10px;
    padding:8px 10px;
    border-radius: 0;
    background: #ffffff;
    display:none;
}
.video-edit-form.open {
    display:block;
}

/* Modal-Overlay für Video-Preview */
.video-modal-backdrop {
    position:fixed;
    inset:0;
    background:rgba(15,23,42,0.85);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:1000;
}
.video-modal {
    width: min(960px, 96vw);
    background:#020617;
    border-radius:16px;
    border:1px solid rgba(148,163,184,0.5);
    box-shadow:0 30px 80px rgba(0,0,0,0.85);
    overflow:hidden;
}
.video-modal-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:8px 12px;
    border-bottom:1px solid #1f2937;
    font-size:13px;
}
.video-modal-close {
    border:0;
    background:transparent;
    color:#e5e7eb;
    cursor:pointer;
    font-size:18px;
    line-height:1;
}
.video-modal-body {
    padding:10px;
}
.video-modal-body video {
    width:100%;
    max-height:70vh;
    background:#000;
    display:block;
}
.video-modal-footer {
    padding:6px 10px 10px;
    font-size:11px;
    color:#9ca3af;
}




/* =========================
   USERS PAGE – Layout & Styling
   ========================= */

.user-add-wrapper {
    background: #f9fafb;
    border: 1px solid #f9fafb;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.user-list-wrapper {
    background: #f9fafb;
    border: 1px solid #f9fafb;
    padding: 16px 18px;
    margin-top: 10px;
}

.user-add-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap: 16px;
    margin-top: 6px;
}

.user-add-grid input,
.user-add-grid select {
    background: #f9fafb;
    border: 1px solid #e3e3e3;
    color:#fff;
    border-radius:6px;
    padding:8px 10px;
    font-size:14px;
    margin-bottom: 0;
}

.user-add-btn {
    display:flex;
    align-items:flex-end;
    padding: 4px;
}
.user-add-btn button {
    width:100%;
}

/* Tabelle für Benutzer */
.user-table {
    width:100%;
    border-collapse:collapse;
    margin-top: 10px;
    font-size:14px;
}
.user-table thead th {
    background:#262626;
    color:#ddd;
    padding:8px 10px;
    text-align:left;
    border-bottom:2px solid #333;
}
.user-table td {
    padding:8px 10px;
    border-bottom:1px solid #333;
    vertical-align:top;
    color: #222;
}
.user-table tr:hover td {
    background: #e3e3e3;
}

/* Formulare in Zellen */
.user-actions-form {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    align-items:center;
}
.user-actions-form select {
    background:#2b2b2b;
    border:1px solid #444;
    color:#fff;
    border-radius:6px;
    padding:4px 8px;
    font-size:13px;
}
.user-actions-form input[type="text"] {
    background:#2b2b2b;
    border:1px solid #444;
    color:#fff;
    border-radius:6px;
    padding:4px 8px;
    font-size:13px;
    min-width:140px;
}
.user-actions-form button {
    border-radius:999px;
}

/* Passwort-Zelle etwas kompakter */
.user-actions-password {
    gap:6px;
    flex-wrap:nowrap;
}
.user-actions-password input[type="text"] {
    flex:1;
}

/* Checkbox inline */
.checkbox-inline {
    display:inline-flex;
    align-items:center;
    gap:4px;
    font-size:13px;
    color: #222;
}
.checkbox-inline input[type="checkbox"] {
    accent-color:#4ea3ff;
}


/* === Video Preview Modal === */


.preview-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-out;
}

.preview-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.preview-modal {
    width: min(960px, 96vw);
    height: 100%;
    max-height: 70vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.preview-modal-iframe-wrapper {
    position: relative;
    flex: 1;
}

/* Iframe füllt Modal-Höhe, 16:9 kommt aus embed.php selbst */
.preview-modal-iframe-wrapper::before {
    content: none;
}

.preview-modal-iframe-wrapper iframe {
    position: relative;
    width: 100%;
    height: 100%;
    border: 0;
}

.preview-modal-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: 0;
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 999px;
}

.preview-modal-close:hover {
    background: rgba(148,163,184,0.2);
}



/* ===== Kategorien Liste ===== */
.cat-list {
    margin-top: 12px;
    border-radius: 0;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #2c2c2c;
}
.cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #7b7b7b;
    gap: 12px;
}
.cat-row:last-child {
    border-bottom: none;
}
.cat-main {
    flex: 1;
}
.cat-name {
    font-size: 14px;
    font-weight: 600;
    color: #f9fafb;
}
.cat-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
    font-size: 12px;
    color: #9ca3af;
}
.cat-meta code {
    background: rgb(69 69 69 / 80%);
    padding: 1px 4px;
    border-radius: 4px;
}
.cat-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.btn-icon {
    border-radius: 999px;
    border: none;
    padding: 5px 8px;
    font-size: 14px;
    cursor: pointer;
    background: transparent;
    color: #e5e7eb;
}
.btn-icon:hover {
    background: #374151;
}

/* ===== Settings / Generic Modal ===== */
.settings-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease-out;
}
.settings-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.settings-modal {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #fff;
    width: 100%;
    max-width: 520px;
    padding: 16px 18px 18px;
    box-shadow: 0 18px 40px rgba(15,23,42,0.42);
    position: relative;
}
.settings-modal-title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
    color: #222;
}
.settings-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: 0;
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 999px;
}
.settings-modal-close:hover {
    background: rgba(148,163,184,0.18);
}
.settings-modal-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.settings-modal-body-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    align-items: flex-end;
}
.settings-modal-checkbox {
    margin-top: 4px;
}

/* ===== Benutzer Badges ===== */
.user-role-status {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}
.badge-role,
.badge-active {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
}
.badge-role-user {
    background: rgba(59,130,246,0.15);
    color: #bfdbfe;
}
.badge-role-admin {
    background: #2c2c2c;
    color: #f9fafb;
    border: 1px solid rgba(248,250,252,0.25);
}
.badge-active-on {
    background: rgba(16,185,129,0.18);
    color: #6ee7b7;
}
.badge-active-off {
    background: rgba(248,113,113,0.15);
    color: #fecaca;
}

/* ===== Upload Layout ===== */
.card-upload .card-inner {
    padding-bottom: 24px;
}
.upload-grid {
    display: grid;
    grid-template-columns: minmax(0,2.2fr) minmax(0,1.3fr);
    gap: 18px;
    align-items: flex-start;
}
.upload-section {
    margin-top: 10px;
    padding-top: 6px;
}
.upload-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0 0 8px;
}
.upload-two-col {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}
.upload-source-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}
.upload-public-toggle {
    padding: 10px 0px;
}
.upload-actions-bottom {
    margin-top: 16px;
}
.upload-side {
    border-left: 1px solid #1f2937;
    padding-left: 16px;
}
.upload-hints ul {
    padding-left: 18px;
    margin: 6px 0 0;
}
.upload-hints li {
    margin-bottom: 4px;
}
.upload-dropzone {
    position: relative;
    border: aliceblue;
    background: #2c2c2c;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
}
.upload-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.upload-dropzone-text {
    font-size: 13px;
    color: #9ca3af;
}
.upload-dropzone.dragover {
    border-color: #60a5fa;
    background: rgba(37,99,235,0.12);
}
.upload-thumb-label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}
.upload-thumb-dropzone {
    position: relative;
    background: #2c2c2c;
    padding: 10px;
}
.upload-thumb-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.upload-thumb-preview {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
}
.upload-thumb-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.upload-thumb-placeholder {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    padding: 0 8px;
}

@media (max-width: 1024px) {
    .upload-grid {
        grid-template-columns: minmax(0,1fr);
    }
    .upload-side {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid #1f2937;
        margin-top: 12px;
        padding-top: 12px;
    }
}
@media (max-width: 800px) {
    .upload-two-col,
    .upload-source-grid {
        grid-template-columns: minmax(0,1fr);
    }
}

/* Feinheiten Benutzerliste im Dark-Theme leicht aufhellen */
.user-table thead th {
    background: #222;
    color:#e5e7eb;
    border-bottom:1px solid #1f2937;
}
.user-table td {
    border-bottom: 1px solid #e3e3e3;
}
.user-table tr:hover td {
    background:#fff;
}


.sidebar-logo-img {
    height: 22px;
    display: block;
}

.sidebar-logo-text {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
    opacity: 0.9;
}
