body {
    background-color: #f4f6f9;
    color: #212529;
}

.pandora-navbar {
    background-color: #161b22;
}

.hero-section {
    max-width: 850px;
    margin: 0 auto;
}

.search-container {
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.card {
    border: 1px solid #dee2e6;
    border-radius: 12px;
}

.card-body {
    padding: 24px;
}

.manufacturer-logo-preview {
    max-width: 220px;
    max-height: 120px;
    object-fit: contain;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 10px;
}

.manufacturer-logo-small {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    padding: 4px;
}

.manufacturer-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #efefef;
    border: 1px solid #dcdcdc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #888;
}

.manufacturer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.manufacturer-name {
    font-size: 16px;
    font-weight: 600;
}

.manufacturer-subtitle {
    font-size: 13px;
    color: #777;
}

.equipment-class-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.equipment-class-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #ffffff;
    color: #495057;
    font-weight: 600;
}

.family-manufacturer-logo {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    object-fit: contain;
    padding: 4px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 7px;
}

.model-link {
    color: #0d6efd;
    font-weight: 600;
    text-decoration: none;
}

.model-link:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.model-breadcrumb {
    font-size: 0.9rem;
}

.model-breadcrumb a {
    text-decoration: none;
}

.model-detail-header {
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 14px;
}

.model-detail-title-area {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px;
}

.model-detail-logo-area {
    flex-shrink: 0;
}

.model-detail-logo,
.model-detail-logo-placeholder {
    width: 84px;
    height: 84px;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background-color: #ffffff;
}

.model-detail-logo {
    object-fit: contain;
    padding: 10px;
}

.model-detail-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    background-color: #f8f9fa;
    font-size: 1.75rem;
    font-weight: 700;
}

.model-catalog-path {
    margin-bottom: 4px;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.model-detail-title {
    margin-bottom: 8px;
    font-size: 2rem;
    font-weight: 700;
}

.model-detail-description {
    max-width: 850px;
    margin-bottom: 0;
    line-height: 1.65;
}

.model-detail-actions {
    margin-left: auto;
    flex-shrink: 0;
}

.model-facts-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.model-fact {
    min-width: 0;
    padding: 18px 20px;
    border-right: 1px solid #e9ecef;
}

.model-fact:last-child {
    border-right: 0;
}

.model-fact-label {
    display: block;
    margin-bottom: 4px;
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.model-fact-value {
    display: block;
    overflow-wrap: anywhere;
    font-weight: 600;
}

.model-content-card {
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 14px;
}

.model-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 18px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.model-tabs .nav-item {
    flex-shrink: 0;
}

.model-tabs .nav-link {
    padding: 18px 16px;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #495057;
    font-weight: 600;
    white-space: nowrap;
}

.model-tabs .nav-link:hover {
    color: #0d6efd;
    border-bottom-color: #adb5bd;
}

.model-tabs .nav-link.active {
    color: #0d6efd;
    background-color: transparent;
    border-bottom-color: #0d6efd;
}

.model-tab-content {
    min-height: 330px;
    padding: 28px;
}

.model-empty-state {
    display: flex;
    min-height: 270px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background-color: #fafbfc;
}

@media (max-width: 1199.98px) {
    .model-facts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .model-fact:nth-child(3) {
        border-right: 0;
    }

    .model-fact:nth-child(-n + 3) {
        border-bottom: 1px solid #e9ecef;
    }
}

@media (max-width: 767.98px) {
    .model-detail-title-area {
        flex-direction: column;
        padding: 22px;
    }

    .model-detail-actions {
        width: 100%;
        margin-left: 0;
    }

    .model-detail-actions .btn {
        width: 100%;
    }

    .model-facts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .model-fact,
    .model-fact:nth-child(3) {
        border-right: 1px solid #e9ecef;
        border-bottom: 1px solid #e9ecef;
    }

    .model-fact:nth-child(even) {
        border-right: 0;
    }

    .model-fact:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .model-tab-content {
        padding: 18px;
    }
}

@media (max-width: 479.98px) {
    .model-facts-grid {
        grid-template-columns: 1fr;
    }

    .model-fact,
    .model-fact:nth-child(3),
    .model-fact:nth-child(even),
    .model-fact:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid #e9ecef;
    }

    .model-fact:last-child {
        border-bottom: 0;
    }

    .model-detail-title {
        font-size: 1.65rem;
    }
}

.hardware-overview-gallery {
    display: grid;
    gap: 24px;
}

.hardware-overview-item {
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background-color: #ffffff;
}

.hardware-overview-item.featured {
    border-color: #86b7fe;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.08);
}

.hardware-overview-image-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.hardware-overview-image-link {
    display: block;
    padding: 18px;
    text-align: center;
    background-color: #ffffff;
}

.hardware-overview-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 900px;
    margin: 0 auto;
    object-fit: contain;
}

.hardware-document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
}

.pdf-icon {
    display: flex;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background-color: #dc3545;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hardware-document-link {
    color: #212529;
    font-weight: 600;
    text-decoration: none;
}

.hardware-document-link:hover {
    color: #0d6efd;
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .hardware-overview-image-header,
    .hardware-document-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .hardware-document-item .overview-delete-form,
    .hardware-document-item .overview-delete-form .btn,
    .hardware-overview-image-header .overview-delete-form,
    .hardware-overview-image-header .overview-delete-form .btn {
        width: 100%;
    }
}


/* Hardware Overview PDF reader */
.hardware-document-list {
    display: grid;
    gap: 16px;
}

.hardware-document-card {
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #ffffff;
}

.hardware-document-card .hardware-document-item {
    border: 0;
    border-radius: 0;
}

.hardware-document-title {
    font-weight: 600;
    color: #212529;
}

.hardware-document-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.hardware-pdf-preview {
    border-top: 1px solid #dee2e6;
    background: #e9ecef;
}

.hardware-pdf-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.hardware-pdf-object {
    display: block;
    width: 100%;
    height: min(78vh, 920px);
    min-height: 620px;
    border: 0;
    background: #525659;
}

.hardware-pdf-fallback {
    min-height: 300px;
    padding: 48px 24px;
    text-align: center;
    background: #ffffff;
}

@media (max-width: 767.98px) {
    .hardware-document-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .hardware-document-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .hardware-pdf-object {
        min-height: 500px;
        height: 70vh;
    }
}

/* Visual Hardware Guide */
.visual-guide-categories {
    display: grid;
    gap: 28px;
}

.visual-guide-category {
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #ffffff;
}

.visual-guide-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.visual-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 20px;
}

.visual-guide-card {
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #ffffff;
}

.visual-guide-image-button {
    display: block;
    width: 100%;
    height: 320px;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    cursor: zoom-in;
}

.visual-guide-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.visual-guide-card-body {
    padding: 16px;
}

.visual-guide-caption {
    color: #495057;
    line-height: 1.55;
    white-space: pre-line;
}

.visual-guide-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.visual-guide-viewer-body {
    min-height: 400px;
    padding: 20px;
    text-align: center;
    background: #eef1f4;
}

.visual-guide-viewer-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 78vh;
    margin: 0 auto;
    object-fit: contain;
}

@media (max-width: 991.98px) {
    .visual-guide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .visual-guide-grid {
        padding: 12px;
    }

    .visual-guide-image-button {
        height: 240px;
    }
}

/* PDF source library and intelligent figure index */
.source-document-list {
    display: grid;
    gap: 12px;
}

.source-document-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
}

.pdf-discovery-layout {
    display: grid;
    grid-template-columns: minmax(280px, 34%) minmax(0, 1fr);
    min-height: 680px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
}

.pdf-discovery-sidebar {
    max-height: 780px;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
    background: #f8f9fa;
}

.pdf-discovery-sidebar-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 16px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

.pdf-discovery-items {
    display: grid;
}

.pdf-discovery-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #e9ecef;
}

.pdf-finding-link {
    display: grid;
    flex: 1;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.pdf-finding-link:hover .pdf-finding-title,
.pdf-finding-link.active .pdf-finding-title {
    color: #0d6efd;
}

.pdf-finding-title {
    font-weight: 600;
    line-height: 1.3;
}

.pdf-finding-meta {
    color: #6c757d;
    font-size: 0.78rem;
}

.pdf-discovery-viewer {
    display: flex;
    min-width: 0;
    flex-direction: column;
    background: #525659;
}

.pdf-discovery-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    background: #fff;
}

.pdf-discovery-placeholder {
    display: flex;
    min-height: 620px;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #fff;
    text-align: center;
}

.pdf-discovery-object {
    width: 100%;
    min-height: 680px;
    flex: 1;
    border: 0;
}

@media (max-width: 991.98px) {
    .pdf-discovery-layout {
        grid-template-columns: 1fr;
    }

    .pdf-discovery-sidebar {
        max-height: 420px;
        border-right: 0;
        border-bottom: 1px solid #dee2e6;
    }
}

@media (max-width: 575.98px) {
    .source-document-card,
    .pdf-discovery-viewer-header {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Visual guide assisted curation */
.finding-filter-bar { display:flex; flex-wrap:wrap; gap:8px; }
.finding-type-badge { font-size:.62rem; text-transform:uppercase; background:#e9ecef; color:#495057; }
.finding-row[data-finding-type="figure"] .finding-type-badge { background:#d1e7dd; color:#0f5132; }
.finding-row[data-finding-type="procedure"] .finding-type-badge { background:#cff4fc; color:#055160; }
.finding-row[data-finding-type="troubleshooting"] .finding-type-badge { background:#fff3cd; color:#664d03; }
.pdf-discovery-object { width:100%; height:650px; border:0; background:#525659; }
@media (max-width: 767.98px) { .pdf-discovery-object { height:520px; } }

/* Class-aware Visual Hardware Guide search */
.visual-search-panel {
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #f8f9fa;
}

.visual-quick-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.visual-group-button.active {
    color: #fff;
    background: #0d6efd;
    border-color: #0d6efd;
}

.visual-custom-search {
    padding: 16px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
}

.visual-search-layout {
    background: #fff;
}

.reference-index-list {
    max-height: 620px;
    overflow: auto;
    background: #fff;
}

.reference-index-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #e9ecef;
}

.reference-index-row:last-child {
    border-bottom: 0;
}

@media (max-width: 767.98px) {
    .visual-search-panel {
        padding: 14px;
    }
}

/* Procedures: PDF-derived headings grouped by normalized component */
.procedure-search-panel {
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #f8f9fa;
}

.procedure-total-badge {
    color: #495057;
    font-weight: 600;
}

.procedure-quick-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.procedure-group-button.active {
    color: #fff;
    background: #0d6efd;
    border-color: #0d6efd;
}

.procedure-group-button.active .badge {
    color: #0d6efd !important;
    background: #fff !important;
}

.procedure-custom-search {
    padding: 16px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
}

.procedure-discovery-layout {
    background: #fff;
}

.procedure-discovery-sidebar .pdf-discovery-item {
    padding: 14px;
}

.procedure-pdf-link {
    gap: 6px;
}

.procedure-action-badge {
    color: #212529;
    background: #e9ecef;
    border: 1px solid #ced4da;
}

.procedure-action-remove,
.procedure-action-remove--replace {
    color: #842029;
    background: #f8d7da;
    border-color: #f5c2c7;
}

.procedure-action-replace {
    color: #664d03;
    background: #fff3cd;
    border-color: #ffecb5;
}

.procedure-action-install {
    color: #0f5132;
    background: #d1e7dd;
    border-color: #badbcc;
}

.procedure-action-disconnect,
.procedure-action-connect {
    color: #055160;
    background: #cff4fc;
    border-color: #b6effb;
}

@media (max-width: 767.98px) {
    .procedure-search-panel {
        padding: 14px;
    }
}


/* Curated procedures */
.procedure-create-form { width: 100%; margin-top: 8px; }
.procedure-curated-badge { align-self: center; margin: 8px 0 2px; }
.curated-procedures-section { border-top: 1px solid #dee2e6; padding-top: 28px; }
.curated-procedure-list { display: grid; gap: 22px; }
.curated-procedure-card { overflow: hidden; border: 1px solid #dee2e6; border-radius: 12px; background: #fff; }
.curated-procedure-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 18px 20px; border-bottom: 1px solid #e9ecef; background: #f8f9fa; }
.curated-procedure-steps { display: grid; }
.curated-procedure-step { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; padding: 20px; border-bottom: 1px solid #e9ecef; }
.curated-procedure-step:last-child { border-bottom: 0; }
.curated-step-number { display: flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; background: #0d6efd; color: #fff; font-weight: 700; }
.curated-step-text { margin: 0; white-space: pre-line; line-height: 1.65; }
.curated-step-image-link { display: block; margin-top: 16px; padding: 12px; border: 1px solid #dee2e6; border-radius: 10px; background: #f8f9fa; text-align: center; }
.curated-step-image { width: auto; max-width: 100%; max-height: 620px; object-fit: contain; }
.curated-empty-state { min-height: 190px; }
@media (max-width: 767.98px) {
  .curated-procedure-header { flex-direction: column; }
  .curated-procedure-step { grid-template-columns: 36px minmax(0, 1fr); padding: 16px; }
  .curated-step-number { width: 32px; height: 32px; }
}

/* Curated procedure step review controls */
.curated-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.curated-step-actions form {
    display: inline-flex;
}

.curated-step-edit-form {
    padding: 14px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #f8f9fa;
}

.curated-source-text {
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    color: #495057;
}

.curated-source-text summary {
    cursor: pointer;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .curated-step-actions {
        width: 100%;
    }

    .curated-step-actions .btn {
        width: 100%;
    }
}

/* PDIE 0.8.6: compact, index-style Procedures navigation */
.procedure-action-filter {
    padding: 12px 14px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
}

.procedure-action-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.procedure-action-filter-button.active {
    color: #fff;
    background: #495057;
    border-color: #495057;
}

.procedure-discovery-sidebar {
    min-width: 320px;
}

.procedure-discovery-sidebar .pdf-discovery-item {
    position: relative;
    padding: 0;
    border-bottom: 1px solid #e9ecef;
}

.procedure-discovery-sidebar .procedure-pdf-link {
    width: 100%;
    padding: 11px 12px 9px;
    gap: 5px;
}

.procedure-discovery-sidebar .pdf-finding-title {
    margin-top: 3px;
    font-size: .92rem;
    line-height: 1.28;
    font-weight: 650;
}

.procedure-discovery-sidebar .pdf-finding-meta {
    margin-top: 3px;
    font-size: .73rem;
    line-height: 1.25;
}

.procedure-row-admin {
    position: absolute;
    right: 9px;
    top: 9px;
    z-index: 2;
}

.procedure-create-form {
    width: auto;
    margin: 0;
}

.procedure-curate-button {
    padding: 2px 7px;
    font-size: .68rem;
    line-height: 1.35;
    background: rgba(255,255,255,.92);
}

.procedure-curated-badge {
    margin: 0;
    font-size: .65rem;
}

.procedure-pdf-link .d-flex {
    padding-right: 55px;
}

@media (max-width: 767.98px) {
    .procedure-discovery-sidebar { min-width: 0; }
}

.hardware-summary-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    background: var(--bs-body-bg);
}

.hardware-summary-table th {
    white-space: nowrap;
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.hardware-summary-table td {
    vertical-align: top;
}

.hardware-summary-empty {
    min-height: 150px;
}

/* Pandora catalog List / Detailed view */
.catalog-view-card { border: 1px solid #e4e8ee; transition: transform .15s ease, box-shadow .15s ease; }
.catalog-view-card:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.25rem rgba(31,45,61,.10)!important; }
.catalog-view-logo { width: 54px; height: 54px; object-fit: contain; border: 1px solid #e4e8ee; border-radius: .65rem; padding: .4rem; background: #fff; }
.catalog-list-logo { width: 34px; height: 34px; object-fit: contain; border: 1px solid #e4e8ee; border-radius: .45rem; padding: .25rem; background: #fff; }
.catalog-list-description { max-width: 34rem; color: #6c757d; font-size: .9rem; }
.view-switcher .btn { min-width: 86px; }
@media (max-width: 767.98px) { .view-switcher .btn { min-width: auto; } }
