#HeaderNav1 li.bvg-pilot-header-material-button a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--bvg-primary, #c8102e);
    border-radius: 4px;
    background: #fff;
    color: var(--bvg-primary, #c8102e) !important;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

#HeaderNav1 li.bvg-pilot-header-material-button a:hover,
#HeaderNav1 li.bvg-pilot-header-material-button a:focus {
    background: #fff5f6;
    color: var(--bvg-primary, #c8102e) !important;
}

/* Header-Feinschliff (RS-Header ist weiß) — additiv, ohne Layout-Shift.
   Aktiver/Hover-Zustand als roter Unterstrich via inset box-shadow. */
#Header #HeaderNav1 li a:hover,
#Header #HeaderNav2 li a:hover,
#Header #HeaderNav1 li a.current,
#Header #HeaderNav1 li.current a {
    color: var(--bvg-primary, #c8102e) !important;
    box-shadow: inset 0 -2px 0 var(--bvg-primary, #c8102e);
    text-decoration: none;
}

/* Direkt-Upload-Button als rote Pill */
#Header #HeaderNav1 li.UploadButton a {
    background: var(--bvg-primary, #c8102e) !important;
    color: #fff !important;
    border-radius: 6px;
    font-weight: 600;
}

#Header #HeaderNav1 li.UploadButton a:hover {
    background: #a50d26 !important;
    color: #fff !important;
    box-shadow: none;
}

/* BVG Pilot: vereinfachte ResourceSpace-Oberfläche */

/* RS-Wissensdatenbank (help.php) — nicht „Tipps und Tricks“ (brand_guidelines) */
#Header a[href*="/pages/help.php"],
#Header a[href*="pages/help.php"] {
    display: none !important;
}

/* CSV-Export: Datei-Icon (Fallback, falls noch fa-download im Markup) */
.bvg-pm-fc-rs-action-export .fa-download::before,
.bvg-pm-bn-btn-export .fa-download::before {
    content: "\f6dd";
}

.bvg-pm-fc-rs-action-export .fa-download,
.bvg-pm-bn-btn-export .fa-download {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Listenansicht: kompakte Icon-Spalte statt Dateivorschau */
#CentralSpaceContainer table.ListviewStyle .bvg-pilot-list-col-hidden {
    display: none !important;
}

/* Dashboard: BN-Auswahl-Kachel — muss in die feste RS-Kachel (160px) passen */
.HomePanelDynamicDash .bvg-pilot-dash-bn-selector {
    box-sizing: border-box;
    padding: 4px 15px 0 15px;
    text-shadow: none;
}

.bvg-pilot-dash-bn-selector .bvg-pilot-dash-bn-select {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-size: 13px;
}

.bvg-pilot-dash-bn-selector .bvg-pilot-dash-bn-empty {
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: #555;
    text-shadow: none;
}

.bvg-pilot-dash-bn-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.bvg-pilot-dash-bn-actions .bvg-pilot-dash-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 8px;
    border: 0;
    border-radius: 4px;
    background: var(--bvg-primary, #c8102e);
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.bvg-pilot-dash-bn-actions .bvg-pilot-dash-btn:hover {
    filter: brightness(0.93);
}

.bvg-pilot-dash-bn-actions .bvg-pilot-dash-btn-secondary {
    background: #555;
}

/* RS-Core setzt auf Dash-Kachel-Text einen harten Schlagschatten (global.css) — deaktivieren. */
.HomePanelDynamicDash p,
.HomePanelThemes p,
.HomePanelDynamicDash h2,
.HomePanelThemes h2 {
    text-shadow: none;
}

/* =========================================================================
   Dashboard-Kacheln als helle „Cards" — nur im Dashboard (#HomePanelContainer),
   damit Featured-Collection-/Suchseiten unberührt bleiben. Nutzt die im Header
   (hooks/all.php :root) gesetzten BVG-Variablen; Fallbacks inline.
   ========================================================================= */
#HomePanelContainer .HomePanel.DashTile {
    background: #ffffff !important;
    border: 1px solid var(--bvg-border, #e2e6ec) !important;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .04);
    color: var(--bvg-secondary, #1f2933);
    transition: box-shadow .15s ease, transform .15s ease;
    overflow: hidden;
}

#HomePanelContainer .HomePanel.DashTile:hover {
    box-shadow: 0 2px 4px rgba(15, 23, 42, .08), 0 12px 24px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}

#HomePanelContainer .HomePanel.DashTile .HomePanelDynamicDash,
#HomePanelContainer .HomePanel.DashTile .HomePanelIN {
    background: transparent !important;
    color: inherit;
}

#HomePanelContainer .HomePanel.DashTile h2 {
    color: var(--bvg-secondary, #1f2933) !important;
    text-shadow: none !important;
    background: none !important;
}

#HomePanelContainer .HomePanel.DashTile p {
    color: var(--bvg-muted, #5a6673);
    text-shadow: none !important;
}

/* Roter Akzentstreifen oben auf der BN-Auswahl-Kachel */
#HomePanelContainer .HomePanel.DashTile.bvg-pilot-dash-bn-tile {
    position: relative;
}

#HomePanelContainer .HomePanel.DashTile.bvg-pilot-dash-bn-tile::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--bvg-primary, #c8102e);
    z-index: 2;
}

/* Dezentes Fokus-Highlight für das BN-Dropdown (nur Dashboard) */
#HomePanelContainer .bvg-pilot-dash-bn-select:focus {
    outline: none;
    border-color: var(--bvg-primary, #c8102e);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, .15);
}

/* Angepinnte BN-Quicklinks: Kurztitel unter der BN-Nummer */
a.HomePanel.DashTile[href*="collections_featured.php?parent"] .HomePanelDynamicDash h2 {
    font-size: 1.25em;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* =========================================================================
   Suchergebnis-Liste (display=list) an den BN-Katalog-Look angleichen.
   Streng auf #CentralSpaceResources begrenzt — andere Listenansichten
   (Related Resources, Nachrichten, Collections) bleiben unberührt.
   RS-Kern setzt hier .ListviewTitleStyle th{background:#444;...} und
   .ListviewTitleStyle a{color:#fff} — beides wird überschrieben.
   ========================================================================= */
#CentralSpaceResources table.ListviewStyle tr.ListviewTitleStyle th {
    padding: 10px 12px !important;
    background: #f0f3f6 !important;
    border-bottom: 1px solid var(--bvg-border, #DDDDDD) !important;
    text-shadow: none !important;
}

/* th a mitnehmen: RS-Kern setzt .ListviewTitleStyle a{font-size:.875rem;color:#fff},
   sonst wirken verlinkte (sortierbare) Titel größer als reine Text-Header. */
#CentralSpaceResources table.ListviewStyle tr.ListviewTitleStyle th,
#CentralSpaceResources table.ListviewStyle tr.ListviewTitleStyle th a,
#CentralSpaceResources table.ListviewStyle tr.ListviewTitleStyle th a:visited,
#CentralSpaceResources table.ListviewStyle tr.ListviewTitleStyle th a:hover {
    color: #5a6673 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em;
    text-decoration: none;
}

/* Helle Zeilen mit dünner Trennlinie, dezente Abwechslung + Hover-Tint */
#CentralSpaceResources table.ListviewStyle tr[id^="ResourceShell"] td {
    border-top: 1px solid var(--bvg-border, #e2e6ec);
    text-shadow: none;
}

#CentralSpaceResources table.ListviewStyle tr[id^="ResourceShell"]:nth-child(even) td {
    background: #f7f8fa;
}

#CentralSpaceResources table.ListviewStyle tr[id^="ResourceShell"]:hover td {
    background: #fff5f6 !important;
}

/* Eckige Ecken: der .Listview-Wrapper (global.css) rundet sonst per overflow */
#CentralSpaceResources .Listview {
    border-radius: 0 !important;
}


#CentralSpaceContainer table.ListviewStyle td.bvg-pilot-list-icon-cell {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 4px 6px;
    vertical-align: middle;
    text-align: center;
}

#CentralSpaceContainer table.ListviewStyle td.bvg-pilot-list-icon-cell a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

#CentralSpaceContainer table.ListviewStyle .bvg-pilot-list-type-icon {
    width: 28px;
    height: 28px;
    font-size: 28px;
    line-height: 28px;
}

#CentralSpaceContainer table.ListviewStyle .bvg-pilot-list-type-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: #f4f4f2;
    color: #555;
    font-size: 12px;
    font-weight: 600;
}

#CentralSpaceContainer table.ListviewStyle td.bvg-pilot-list-icon-cell img,
#CentralSpaceContainer table.ListviewStyle td.bvg-pilot-list-icon-cell .ListImage,
#CentralSpaceContainer table.ListviewStyle td.bvg-pilot-list-icon-cell .ImageColourWrapper {
    display: none !important;
}

#CentralSpaceContainer table.ListviewStyle tr.ListviewTitleStyle th[data-bvg-pilot-thumb-header] {
    width: 44px;
    text-align: center;
}

/* Metadaten bearbeiten (edit.php): RS-Systembereiche ausblenden */
.BasicsBoxEdit .HelpLink,
.BasicsBoxEdit #resource_ref_div,
.BasicsBoxEdit #question_imagecorrection,
.BasicsBoxEdit #question_metadatatemplate,
.BasicsBoxEdit #question_exif,
.BasicsBoxEdit:has(#editmultipleresources) #StatusRelationshipsSectionHead,
.BasicsBoxEdit:has(#editmultipleresources) #StatusRelationshipsSection,
.BasicsBoxEdit:has(#editmultipleresources) #StatusSection,
.BasicsBoxEdit:has(#editmultipleresources) [id^="StatusSection"],
.BasicsBoxEdit:has(#editmultipleresources) .Question[id^="editmultiple_"] {
    display: none !important;
}

/* Ressourcen-Detail (view.php + Modal): Pilot-Werkzeuge und Zusatzpanels */
#ResourceWorkflowActionsButton,
#ResourceWorkflowActions,
#modal .RecordBox:has(a[href*="plugins/consentmanager/"]),
#modal .RecordBox:has(a[href*="plugins/licensemanager/"]),
#CentralSpaceContainer .RecordBox:has(a[href*="plugins/consentmanager/"]),
#CentralSpaceContainer .RecordBox:has(a[href*="plugins/licensemanager/"]),
#modal .RecordBox:has(#GeolocationData),
#CentralSpaceContainer .RecordBox:has(#GeolocationData),
#GeolocationShowLink,
#GeolocationHideLink,
#ResourceToolsContainer li:has(a.addToCollection),
#ResourceToolsContainer li:has(a[id^="alternative_link_"]),
#ResourceToolsContainer li:has(a[id^="lock_link_"]),
#ResourceToolsContainer li:has(a[id^="lock_details_link"]),
#ResourceToolsContainer li:has(a[href*="annotate_pdf_config.php"]),
#ResourceToolsContainer li:has(a[href*="metadata_download.php"]),
#ResourceToolsContainer li:has(a[href*="request_log.php"]),
#ResourceToolsContainer li:has(a.no_file_link),
#ResourceToolsContainer li:has(a[href*="contactadmin.php"]) {
    display: none !important;
}

/* Platzhalter ohne Datei: Offline-Ressource / Anfragen-Zeile ausblenden —
   Upload/Ersetzen läuft über #view_replace_link in den Werkzeugen. */
#ResourceDownloadOptions tr.DownloadDBlend:has(a[href*="resource_request.php"]),
#ResourceDownloadOptions tr.DownloadDBlend:has(td.DownloadButton.DownloadDisabled) {
    display: none !important;
}
