/* ═══════════════════════════════════════════════════════════════════════
   PR Dokument Portal – Frontend-Stylesheet
   Version: 1.0.1 | Autor: Philipp Ramsch | www.philippramsch.de
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Reset & Basis ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.pdp-portal-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #f1f5f9;
    min-height: 100vh;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

/* ── Portal Wrapper ─────────────────────────────────────────────────────── */
.pdp-portal-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.pdp-portal-header {
    padding: 2rem 0 1.5rem;
}
.pdp-portal-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.pdp-portal-logo { flex-shrink: 0; }
.pdp-portal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin: 0;
}
.pdp-portal-subtitle {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 2px;
}

/* ── Main ────────────────────────────────────────────────────────────────── */
.pdp-portal-main { flex: 1; display: flex; flex-direction: column; gap: 1.25rem; padding-bottom: 2rem; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.pdp-portal-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

.pdp-portal-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.pdp-section-icon {
    width: 22px;
    height: 22px;
    color: #e87722;
    flex-shrink: 0;
}
.pdp-portal-section-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}
.pdp-portal-desc {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

/* ── Drop-Zone ────────────────────────────────────────────────────────────── */
.pdp-drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    transition: border-color .2s, background .2s;
    margin-bottom: 1rem;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pdp-drop-zone.pdp-drag-active {
    border-color: #e87722;
    background: #eff6ff;
}
.pdp-drop-zone-inner {
    text-align: center;
    padding: 2rem 1.5rem;
    width: 100%;
}
.pdp-drop-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.75rem;
    color: #94a3b8;
}
.pdp-drop-icon svg { width: 100%; height: 100%; }
.pdp-drop-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
}
.pdp-drop-oder {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}
.pdp-btn-datei-waehlen {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.4rem;
    background: #e87722;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}
.pdp-btn-datei-waehlen:hover { background: #c45f0a; }
.pdp-drop-info {
    font-size: 0.76rem;
    color: #94a3b8;
    margin-top: 0.6rem;
}

/* ── Datei-Vorschau ───────────────────────────────────────────────────────── */
.pdp-datei-vorschau {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.pdp-pdf-icon-sm { width: 36px; height: 36px; flex-shrink: 0; }
.pdp-pdf-icon-sm svg { width: 100%; height: 100%; }
.pdp-datei-details { flex: 1; min-width: 0; }
.pdp-datei-name {
    display: block;
    font-weight: 600;
    font-size: 0.87rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdp-datei-groesse { font-size: 0.77rem; color: #64748b; }
.pdp-btn-entfernen {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 4px;
    border-radius: 6px;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}
.pdp-btn-entfernen:hover { color: #dc2626; background: #fee2e2; }

/* ── Upload-Button ─────────────────────────────────────────────────────────── */
.pdp-btn-upload {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #e87722, #c45f0a);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    font-family: inherit;
    letter-spacing: .2px;
    box-shadow: 0 2px 8px rgba(37,99,235,.25);
}
.pdp-btn-upload:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); }
.pdp-btn-upload:disabled { background: #94a3b8; cursor: not-allowed; box-shadow: none; transform: none; }

/* ── Fortschritt ─────────────────────────────────────────────────────────── */
.pdp-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}
.pdp-progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}
.pdp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e87722, #f0a060);
    border-radius: 4px;
    transition: width .2s;
    width: 0%;
}
.pdp-progress-text { font-size: 0.8rem; font-weight: 600; color: #e87722; min-width: 36px; text-align: right; }

/* ── Meldungen ────────────────────────────────────────────────────────────── */
.pdp-portal-meldung {
    margin-top: 1rem;
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.45;
    border: 1.5px solid transparent;
}
.pdp-meldung-erfolg { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.pdp-meldung-fehler { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.pdp-meldung-info   { background: #eff6ff; color: #1e40af; border-color: #fcd0a0; }

/* ── Fehler-Card ─────────────────────────────────────────────────────────── */
.pdp-error-card { text-align: center; padding: 3rem 2rem; }
.pdp-error-icon { width: 56px; height: 56px; margin: 0 auto 1.25rem; }
.pdp-error-icon svg { width: 100%; height: 100%; }
.pdp-error-card h2 { font-size: 1.15rem; font-weight: 700; color: #dc2626; margin-bottom: 0.75rem; }
.pdp-error-card p  { font-size: 0.9rem; color: #64748b; line-height: 1.55; }

/* ── Aktuell-Badge ───────────────────────────────────────────────────────── */
.pdp-aktuell-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 0.87rem;
}
.pdp-aktuell-badge {
    display: inline-flex;
    padding: 2px 10px;
    background: #059669;
    color: #fff;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}
.pdp-aktuell-name  { font-weight: 600; color: #0f172a; flex: 1; min-width: 0; word-break: break-word; }
.pdp-aktuell-datum { font-size: 0.78rem; color: #64748b; white-space: nowrap; }

/* ── Download-Leiste ─────────────────────────────────────────────────────── */
.pdp-download-leiste { display: flex; }
.pdp-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    background: #fff;
    border: 1.5px solid #2563eb;
    border-radius: 8px;
    color: #e87722;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s;
    font-family: inherit;
}
.pdp-btn-download:hover { background: #eff6ff; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.pdp-portal-footer {
    text-align: center;
    padding: 1.5rem 0 2rem;
    font-size: 0.77rem;
    color: #94a3b8;
}
.pdp-portal-footer a { color: #64748b; text-decoration: none; }
.pdp-portal-footer a:hover { color: #e87722; }
.pdp-footer-sep { margin: 0 0.4rem; }

/* ═══════════════════════════════════════════════════════════════════════
   PDF.js LIVE-VIEWER – Toolbar, Canvas, Navigation, Spinner
   ═══════════════════════════════════════════════════════════════════════ */

/* Wrapper */
.pdp-anzeige-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    margin: 1rem 0;
    background: #fff;
}

/* ── Toolbar ─────────────────────────────────────────────────────────── */
.pdp-anzeige-wrap .pdp-viewer-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 0.75rem !important;
    height: 48px !important;
    background: #1e293b !important;
    border-bottom: 1px solid #0f172a !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.pdp-anzeige-wrap .pdp-toolbar-links  { display: flex !important; align-items: center !important; min-width: 0; flex: 1; }
.pdp-anzeige-wrap .pdp-toolbar-nav    { display: flex !important; align-items: center !important; gap: 0.4rem; flex-shrink: 0; }
.pdp-anzeige-wrap .pdp-toolbar-rechts { display: flex !important; align-items: center !important; gap: 0.3rem; flex-shrink: 0; }

/* Datei-Pille */
.pdp-anzeige-wrap .pdp-datei-pill {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    padding: 0.25rem 0.7rem;
    max-width: 100%;
    overflow: hidden;
}
.pdp-anzeige-wrap .pdp-toolbar-dateiname {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}
.pdp-anzeige-wrap .pdp-toolbar-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Seitenanzeige */
.pdp-anzeige-wrap .pdp-page-info {
    font-size: 0.78rem;
    color: #cbd5e1;
    white-space: nowrap;
    padding: 0 0.2rem;
}

/* Zoom-Wert */
.pdp-anzeige-wrap .pdp-zoom-wert {
    font-size: 0.75rem;
    color: #cbd5e1;
    min-width: 38px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Trennlinie */
.pdp-anzeige-wrap .pdp-toolbar-trenner {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,.15);
    margin: 0 0.2rem;
    flex-shrink: 0;
}

/* Toolbar-Buttons */
.pdp-anzeige-wrap .pdp-tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    transition: background .13s, color .13s;
    padding: 0;
    flex-shrink: 0;
}
.pdp-anzeige-wrap .pdp-tb-btn:hover:not(:disabled) {
    background: rgba(255,255,255,.12);
    color: #f1f5f9;
}
.pdp-anzeige-wrap .pdp-tb-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* Download-Button (hervorgehoben) */
.pdp-anzeige-wrap .pdp-tb-download {
    width: auto;
    padding: 0 0.75rem;
    background: rgba(37,99,235,.6);
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(37,99,235,.8);
}
.pdp-anzeige-wrap .pdp-tb-download:hover {
    background: rgba(37,99,235,.85) !important;
    color: #fff !important;
}
.pdp-download-label { white-space: nowrap; }

/* ── Canvas-Viewport ─────────────────────────────────────────────────── */
.pdp-anzeige-wrap .pdp-canvas-viewport {
    position: relative;
    background: #374151;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 400px;
}

.pdp-anzeige-wrap .pdp-canvas-container {
    display: none;
    justify-content: center;
    padding: 24px 16px;
    min-width: min-content;
}

.pdp-anzeige-wrap .pdp-pdf-canvas {
    display: block;
    box-shadow: 0 4px 24px rgba(0,0,0,.45);
    border-radius: 3px;
    background: #fff;
    max-width: none;
}

/* ── Lade-Spinner ────────────────────────────────────────────────────── */
.pdp-anzeige-wrap .pdp-ladeanimation {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #94a3b8;
    font-size: 0.88rem;
    background: #374151;
}

.pdp-anzeige-wrap .pdp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,.12);
    border-top-color: #e87722;
    border-radius: 50%;
    animation: pdp-drehen 0.75s linear infinite;
}
@keyframes pdp-drehen {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Fehler-Overlay ─────────────────────────────────────────────────── */
.pdp-anzeige-wrap .pdp-viewer-fehler {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #374151;
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
    padding: 2rem;
}
.pdp-viewer-fehler p { margin: 0; color: #cbd5e1; }
.pdp-fallback-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    background: #e87722;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background .15s;
}
.pdp-fallback-btn:hover { background: #c45f0a; color: #fff; }

/* ── Responsiv ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .pdp-anzeige-wrap .pdp-toolbar-dateiname { max-width: 110px; }
    .pdp-toolbar-meta      { display: none; }
    .pdp-download-label    { display: none; }
    .pdp-tb-download       { width: 32px; padding: 0; justify-content: center; }
    .pdp-zoom-wert         { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE – Tablet & Mobile (Portrait + Landscape)
   ═══════════════════════════════════════════════════════════════════════ */

/* Tablet Portrait (≤ 768px) */
@media (max-width: 768px) {
    .pdp-portal-wrapper {
        max-width: 100%;
        padding: 0 1rem;
    }
    .pdp-portal-card {
        padding: 1.25rem;
        border-radius: 10px;
    }
    .pdp-portal-title { font-size: 1.2rem; }
    .pdp-btn-upload   { font-size: 0.9rem; padding: 0.8rem 1rem; }
    .pdp-drop-zone    { min-height: 130px; }
}

/* Mobile Portrait (≤ 480px) */
@media (max-width: 480px) {
    .pdp-portal-header  { padding: 1.25rem 0 1rem; }
    .pdp-portal-card    { padding: 1rem; border-radius: 8px; }
    .pdp-portal-title   { font-size: 1.1rem; }
    .pdp-portal-section-header h2 { font-size: 0.95rem; }
    .pdp-portal-desc    { font-size: 0.82rem; }
    .pdp-drop-zone      { min-height: 110px; }
    .pdp-drop-zone-inner { padding: 1.25rem 1rem; }
    .pdp-drop-icon      { width: 36px; height: 36px; margin-bottom: 0.5rem; }
    .pdp-drop-text      { font-size: 0.85rem; }
    .pdp-btn-datei-waehlen { padding: 0.55rem 1.1rem; font-size: 0.82rem; }
    .pdp-btn-upload     { font-size: 0.85rem; padding: 0.75rem 0.9rem; }
    .pdp-aktuell-meta   { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .pdp-aktuell-datum  { white-space: normal; font-size: 0.72rem; }
    .pdp-portal-footer  { font-size: 0.7rem; }
}

/* Landscape Mobile (Höhe ≤ 500px) */
@media (max-height: 500px) and (orientation: landscape) {
    .pdp-portal-header  { padding: 0.75rem 0 0.5rem; }
    .pdp-portal-main    { gap: 0.75rem; padding-bottom: 1rem; }
    .pdp-portal-card    { padding: 0.9rem 1rem; }
    .pdp-drop-zone      { min-height: 90px; }
    .pdp-drop-zone-inner { padding: 0.75rem; }
    .pdp-portal-section-header { margin-bottom: 0.4rem; }
    .pdp-portal-desc    { margin-bottom: 0.75rem; font-size: 0.8rem; }
}

/* Tablet Landscape (769px – 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .pdp-portal-wrapper { max-width: 680px; }
}

/* Touch-Optimierung: größere Tap-Targets */
@media (pointer: coarse) {
    .pdp-btn-datei-waehlen,
    .pdp-btn-upload,
    .pdp-btn-download,
    .pdp-btn-entfernen {
        min-height: 44px;
    }
    .pdp-drop-zone { cursor: default; }
}

/* ═══════════════════════════════════════════════════════════════════════
   MULTI-PAGE PORTAL – Seiten-Cards
   ═══════════════════════════════════════════════════════════════════════ */

/* Grid für Seiten-Cards */
/* Seiten-Cards immer untereinander – übersichtlicheres Layout */
.pdp-seiten-grid,
.pdp-seiten-grid-1,
.pdp-seiten-grid-2,
.pdp-seiten-grid-3,
.pdp-seiten-grid-4,
.pdp-seiten-grid-5 {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Seiten-Card */
.pdp-seite-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: border-color .15s, box-shadow .15s;
}
.pdp-seite-card--hat-datei {
    border-color: #e87722;
    box-shadow: 0 0 0 3px rgba(232,119,34,.1);
}

/* Seiten-Badge (Kopfzeile der Card) */
.pdp-seite-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.pdp-seite-nummer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e87722;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}
.pdp-seite-label {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}
.pdp-seite-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: auto;
}
.pdp-seite-status--ok   { background: #ecfdf5; color: #059669; }
.pdp-seite-status--leer { background: #f1f5f9; color: #94a3b8; }

/* Aktuelle Datei Anzeige */
.pdp-seite-aktuelle-datei {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff7f0;
    border: 1px solid #fcd0a0;
    border-radius: 7px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
}
.pdp-seite-dateiname {
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
    flex: 1;
}
.pdp-seite-datum { color: #94a3b8; font-size: 0.73rem; flex-shrink: 0; }
.pdp-seite-ersetzen-hinweis {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    color: #94a3b8;
}

/* Drop-Zone in Card */
.pdp-seite-drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    transition: border-color .15s, background .15s;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pdp-seite-drop-zone.pdp-drag { border-color: #e87722; background: #fff7f0; }
.pdp-seite-drop-inner {
    text-align: center;
    padding: 1rem 0.75rem;
    width: 100%;
}
.pdp-seite-drop-icon { color: #94a3b8; margin: 0 auto 0.5rem; display: block; }
.pdp-seite-drop-text { font-size: 0.82rem; color: #64748b; margin: 0 0 0.4rem; }
.pdp-seite-btn-waehlen {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.45rem 1rem;
    background: #e87722;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}
.pdp-seite-btn-waehlen:hover { background: #c45f0a; }
.pdp-seite-drop-info { font-size: 0.7rem; color: #94a3b8; margin: 0.4rem 0 0; }

/* Datei-Vorschau in Drop-Zone */
.pdp-seite-vorschau {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    width: 100%;
    box-sizing: border-box;
}
.pdp-seite-vname  { display: block; font-size: 0.82rem; font-weight: 600; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.pdp-seite-vgroesse { font-size: 0.72rem; color: #64748b; }
.pdp-seite-btn-entfernen {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.pdp-seite-btn-entfernen:hover { color: #dc2626; background: #fee2e2; }

/* Upload-Button in Card */
.pdp-seite-btn-upload {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #e87722, #c45f0a);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(232,119,34,.25);
}
.pdp-seite-btn-upload:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.pdp-seite-btn-upload:disabled { background: #94a3b8; cursor: not-allowed; box-shadow: none; transform: none; }

/* Fortschritt */
.pdp-seite-progress { margin-top: 0.25rem; }
.pdp-seite-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}
.pdp-seite-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e87722, #f0a060);
    border-radius: 3px;
    transition: width .2s;
    width: 0%;
}

/* Meldungen */
.pdp-seite-meldung {
    padding: 0.6rem 0.8rem;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1.5px solid transparent;
}
.pdp-seite-meldung--erfolg { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.pdp-seite-meldung--fehler { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }

/* Willkommens-Card ohne extra Padding */
.pdp-willkommen-card { padding: 1rem 1.25rem; }
.pdp-willkommen-card .pdp-portal-desc { margin: 0; }

/* ── Shortcode: Seiten-Viewer-Wrapper ─────────────────────────────── */
.pdp-seite-viewer-wrap {
    margin: 0 0 1.5rem;
}
.pdp-seite-viewer-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    padding: 0 0.25rem;
}
.pdp-seite-viewer-nr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e87722;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.pdp-seite-viewer-datei {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Seiten-Trenner zwischen Viewern */
.pdp-seiten-trenner {
    padding: 0.75rem 0;
}
.pdp-seiten-trenner-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e87722 20%, #e87722 80%, transparent);
    border-radius: 1px;
    opacity: .4;
}

/* ── Löschen-Button in der Seiten-Card ────────────────────────────── */
.pdp-seite-btn-datei-loeschen {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #fff;
    color: #dc2626;
    border: 1.5px solid #fca5a5;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .13s, border-color .13s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 32px;
}
.pdp-seite-btn-datei-loeschen:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #dc2626;
}
.pdp-seite-btn-datei-loeschen:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Aktuelle-Datei-Box mit Löschen-Button – Layout anpassen */
.pdp-seite-aktuelle-datei {
    flex-wrap: wrap;
    row-gap: 0.4rem;
}
