* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        html,
        body {
            height: 100%;
            margin: 0;
            padding: 0;
            background: #F6F6F6;
            font-family: 'Courier Prime', 'Courier New', Monaco, monospace;
            color: #222222;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
.panel-border {
    padding: 40px 32px;
    margin-bottom: 24px;
    border-radius: 0;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 2px solid #D5D5D5;
    background: #FAFAFA;
    max-height: 900px;
    overflow-y: auto;
    overflow-x: hidden;

}
        .bir-container {
            width: 100%;
            max-width: 100%;
            background: #FFFFFF;
            border: none;
            box-shadow: none;
            position: relative;
            display: flex;
            flex-direction: column;
            flex: 1;
        }
        .bir-container::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            background: repeating-linear-gradient(0deg,
                    rgba(0, 0, 0, 0.035) 0px,
                    rgba(0, 0, 0, 0.035) 2px,
                    transparent 2px,
                    transparent 6px);
            z-index: 999;
            opacity: 0.5;
        }
        .bir-container {
            animation: pageFade 0.6s ease-out;
        }
        @keyframes pageFade {
            0% {
                opacity: 0;
            }
            100% {
                opacity: 1;
            }
        }
        .bir-container.flicker {
            animation: crtFlicker 0.4s ease-out;
        }
        @keyframes crtFlicker {
            0% {
                opacity: 0.7;
                transform: scale(1.002);
            }
            20% {
                opacity: 1;
                transform: scale(1);
            }
            40% {
                opacity: 0.85;
            }
            60% {
                opacity: 1;
            }
            100% {
                opacity: 1;
            }
        }

       .top-status {
    background: #3D0000;
    color: #F6F6F6;
    font-family: 'Courier Prime', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0 28px;
    height: 44px;  /* Slightly increased for better spacing */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #5A0000;
    text-transform: uppercase;
    width: 100%;
    flex-shrink: 0;
    user-select: none;
}
        .top-status .left span {
            color: #d0d0d0;
        }
        .top-status .right {
            color: #b0b0b0;
        }

        .main-header {
            background: #FFFFFF;
            padding: 24px 28px 18px 28px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 2px solid #7D0000;
            flex-wrap: wrap;
            width: 100%;
            flex-shrink: 0;
        }
        .logo-area {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        .logo-img {
            width: 111px;
            height: 111px;
            border: none;
            box-shadow: none;
            background: transparent;
            object-fit: contain;
            transition: filter 0.15s ease;
            cursor: default;
            flex-shrink: 0;
            display: block;
        }
        .logo-img:hover {
            filter: brightness(0.85);
        }
        .title-block {
            text-align: left;
        }
        .title-block h1 {
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 1.9rem;
            letter-spacing: 4px;
            color: #7D0000;
            text-transform: uppercase;
            font-weight: 400;
            line-height: 1.1;
            margin-bottom: 2px;
            cursor: default;
        }
        .title-block .sub {
            font-family: 'Courier Prime', monospace;
            font-size: 0.8rem;
            letter-spacing: 2px;
            color: #5A0000;
            text-transform: uppercase;
            font-weight: 700;
            cursor: default;
        }
        .title-block .tagline {
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 0.9rem;
            letter-spacing: 1px;
            color: #222;
            margin-top: 4px;
            border-top: 1px solid #D5D5D5;
            padding-top: 4px;
            display: inline-block;
            cursor: default;
        }

        @media (max-width: 700px) {
            .main-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }
            .logo-img {
                width: 68px;
                height: 68px;
            }
        }

  .OBSCURE {
  color: inherit !important;
  text-decoration: none !important;
}

        .nav-bar {
            background: #5A0000;
            padding: 0 28px;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            border-bottom: 2px solid #7D0000;
            min-height: 48px;
            width: 100%;
            flex-shrink: 0;
        }
        .nav-links {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 20px;
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 0.9rem;
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }
        .nav-links a {
            color: #F6F6F6;
            text-decoration: none;
            padding: 10px 2px;
            border-bottom: 2px solid transparent;
            transition: border-color 0.15s, background 0.15s, color 0.15s;
            cursor: pointer;
            position: relative;
        }
        .nav-links a:hover {
            border-bottom-color: #F6F6F6;
            color: #ffffff;
            background: rgba(255, 255, 255, 0.06);
        }
        .nav-links a.active {
            background: #3D0000;
            color: #ffffff;
            border-bottom-color: #8A1111;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
        }
        .nav-search {
            display: flex;
            gap: 6px;
            align-items: center;
            padding: 6px 0;
             flex: 0 0 auto !important;
    min-width: auto !important;
        }
        .nav-search input {
            background: #3D0000;
            border: 1px solid #7D0000;
            color: #F6F6F6;
            font-family: 'Courier Prime', monospace;
            padding: 4px 8px;
            font-size: 0.75rem;
            width: 300px !important;
            letter-spacing: 0.5px;
            transition: border-color 0.15s, box-shadow 0.15s;
            outline: none;
        }

        .nav-search input:hover {
            border-color: #a00000;
        }
        .nav-search input:focus {
            border-color: #8A1111;
            box-shadow: 0 0 6px rgba(138, 17, 17, 0.3);
        }
        .nav-search input::placeholder {
            color: #999;
            font-style: italic;
        }
        .nav-search button {
            background: #7D0000;
            border: 1px solid #3D0000;
            color: white;
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 0.75rem;
            padding: 4px 14px;
            letter-spacing: 1px;
            text-transform: uppercase;
            cursor: pointer;
            transition: background 0.1s, transform 0.1s;
            line-height: 1.4;
        }
        .nav-search button:hover {
            background: #8A1111;
        }
        .nav-search button:active {
            transform: scale(0.96);
        }

        /* ============================================================
           FEATURED SECTION — now exclusively the detail view
           ============================================================ */
  
.featured-section {
    padding: 32px 28px 40px 28px;
    background: #FFFFFF;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

        /* ============================================================
           DOCUMENT DETAIL LAYOUT
           ============================================================ */
      .doc-detail-layout {
    display: flex;
    gap: 32px;
    align-items: stretch; /* Change from flex-start to stretch */
    width: 100%;
    flex: 1;
}


        /* ---- SIDEBAR ---- */
        .doc-sidebar {
            flex: 0 0 240px;
            min-width: 200px;
            max-width: 280px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding-top: 4px;
        }
        .doc-sidebar .sidebar-label {
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 0.75rem;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: #7D0000;
            border-bottom: 2px solid #7D0000;
            padding-bottom: 6px;
            margin-bottom: 4px;
        }
        .sidebar-case {
            display: flex;
            flex-direction: column;
            padding: 10px 12px;
            border-left: 3px solid transparent;
            background: #FAFAFA;
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s, transform 0.1s;
            border-radius: 0;
            text-decoration: none;
            color: inherit;
        }
        .sidebar-case:hover {
            background: #F0F0F0;
            border-left-color: #7D0000;
        }
        .sidebar-case.active-case {
            background: #F0F0F0;
            border-left-color: #7D0000;
            box-shadow: inset 0 0 0 1px #D5D5D5;
        }
        .sidebar-case .case-id {
            font-family: 'Courier Prime', monospace;
            font-size: 0.7rem;
            color: #7D0000;
            font-weight: 700;
            letter-spacing: 0.3px;
        }
        .sidebar-case .case-title {
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 0.85rem;
            color: #222;
            line-height: 1.3;
            margin-top: 1px;
        }
        .sidebar-case .case-meta {
            font-family: 'Courier Prime', monospace;
            font-size: 0.6rem;
            color: #888;
            margin-top: 2px;
            letter-spacing: 0.3px;
        }

        /* ---- MAIN CONTENT ---- */
  .doc-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
        .doc-main .doc-header-title {
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 1.6rem;
            color: #7D0000;
            letter-spacing: 1px;
            margin-bottom: 2px;
            line-height: 1.2;
            word-break: break-word;
        }
        .doc-main .doc-header-meta {
            font-family: 'Courier Prime', monospace;
            font-size: 0.8rem;
            color: #666;
            margin-bottom: 16px;
            display: flex;
            flex-wrap: wrap;
            gap: 6px 20px;
        }
        .doc-main .doc-header-meta .class-tag {
            font-size: 0.65rem;
            padding: 0 10px;
            display: inline-block;
            padding: 1px 10px;
            font-weight: 700;
            border: 1px solid transparent;
            text-transform: uppercase;
            cursor: default;
        }
        .class-tag.top-secret {
            color: #7D0000;
            border-color: #7D0000;
            background: rgba(125, 0, 0, 0.06);
        }
        .class-tag.confidential {
            color: #5A0000;
            border-color: #5A0000;
            background: rgba(90, 0, 0, 0.05);
        }
        .class-tag.unknown {
            color: #666;
            border-color: #999;
            background: rgba(0, 0, 0, 0.03);
            font-style: italic;
        }

        /* ---- TABS ---- */
        .doc-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 0;
            border-bottom: 2px solid #7D0000;
            margin-bottom: 24px;
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 0.8rem;
            letter-spacing: 1px;
            text-transform: uppercase;
        }
        .doc-tabs .tab-btn {
            background: transparent;
            border: none;
            padding: 8px 18px 6px 18px;
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 0.8rem;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: #555;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: color 0.15s, border-color 0.15s, background 0.15s;
            margin-bottom: -2px;
            background: transparent;
        }
        .doc-tabs .tab-btn:hover {
            color: #7D0000;
            background: rgba(125, 0, 0, 0.03);
        }
        .doc-tabs .tab-btn.active-tab {
            color: #7D0000;
            border-bottom-color: #7D0000;
            background: rgba(125, 0, 0, 0.04);
        }

        /* ---- TAB CONTENT ---- */
        .tab-content {
            display: none;
            animation: tabFade 0.25s ease-out;
        }
        .tab-content.active-tab-content {
            display: block;
            flex: 1;
        }
        @keyframes tabFade {
            0% {
                opacity: 0.4;
            }
            100% {
                opacity: 1;
            }
        }

        /* ---- FILE TABLE ---- */
        .file-table-wrap {
            overflow-x: auto;
            margin-bottom: 8px;
        }
        .file-table {
            width: 100%;
            border-collapse: collapse;
            font-family: 'Courier Prime', monospace;
            font-size: 0.8rem;
            text-align: left;
        }
        .file-table th {
            background: #3D0000;
            color: #F6F6F6;
            padding: 8px 14px;
            font-weight: 700;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            font-size: 0.7rem;
            border: 1px solid #5A0000;
        }
        .file-table td {
            padding: 8px 14px;
            border: 1px solid #D5D5D5;
            color: #222;
            background: #FFFFFF;
        }
        .file-table tr:nth-child(even) td {
            background: #F9F9F9;
        }
        .file-table .file-icon {
            font-size: 1rem;
            margin-right: 6px;
            opacity: 0.7;
        }
        .file-table .file-size {
            color: #666;
            font-size: 0.75rem;
        }
        .file-table .file-date {
            color: #666;
            font-size: 0.75rem;
        }

        /* ---- EVIDENCE GALLERY ---- */
        .evidence-gallery {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 20px;
            margin-top: 4px;
        }
        .gallery-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: #FAFAFA;
    border: 1px solid #E0E0E0;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    overflow: hidden;
    min-width: 0; /* Allows the item to shrink below its content size */
    max-width: 100%; /* Prevents overflow */
}
        .gallery-item:hover {
            border-color: #7D0000;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
            background: #F5F5F5;
        }
        .gallery-item .thumb-wrap {
            width: 100%;
            aspect-ratio: 4 / 3;
            overflow: hidden;
            background: #EEEEEE;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .gallery-item .thumb-wrap img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            filter: grayscale(1);
            transition: filter 0.4s ease, transform 0.4s ease, brightness 0.4s ease;
            transform: scale(1);
        }
 .gallery-item:hover .thumb-wrap img {
    filter: grayscale(0) brightness(1.05);
    transform: scale(1.01);
}
        .gallery-item .thumb-caption {
    padding: 8px 10px 10px 10px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: #444;
    line-height: 1.4;
    border-top: 1px solid #E8E8E8;
    transition: background 0.2s;
    word-wrap: break-word; /* This breaks long words */
    overflow-wrap: break-word; /* Modern version of word-wrap */
    word-break: break-word; /* Breaks words if needed */
    max-width: 100%; /* Ensures it doesn't overflow container */
    overflow: hidden; /* Hides any overflow */
}
        .gallery-item:hover .thumb-caption {
            background: #FCFCFC;
        }
        .gallery-item .thumb-caption .fn {
            font-weight: 700;
            color: #222;
            display: block;
            font-size: 0.75rem;
        }
        .gallery-item .thumb-caption .meta {
            color: #888;
            font-size: 0.65rem;
            margin-top: 2px;
        }

        /* ---- TAB PLACEHOLDER ---- */
        .tab-placeholder {
            font-family: 'Courier Prime', monospace;
            font-size: 0.8rem;
            color: #888;
            padding: 24px 0;
            border-top: 1px solid #E8E8E8;
            margin-top: 8px;
            font-style: italic;
            letter-spacing: 0.3px;
        }
        .tab-placeholder strong {
            color: #444;
            font-style: normal;
        }

        /* ============================================================
           IMAGE VIEWER (LIGHTBOX)
           ============================================================ */
        .image-viewer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.88);
            z-index: 20000;
            display: none;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
            backdrop-filter: blur(3px);
        }
        .image-viewer-overlay.open {
            display: flex;
            opacity: 1;
        }
        .image-viewer-overlay .viewer-close {
            position: fixed;
            top: 28px;
            right: 32px;
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 1.6rem;
            color: #F6F6F6;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.15);
            padding: 4px 18px 6px 18px;
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s;
            z-index: 20001;
            user-select: none;
            letter-spacing: 2px;
        }
        .image-viewer-overlay .viewer-close:hover {
            background: rgba(125, 0, 0, 0.6);
            border-color: #7D0000;
        }
        .image-viewer-overlay .viewer-nav {
            position: fixed;
            top: 50%;
            transform: translateY(-50%);
            font-family: 'Special Elite', 'Courier New', monospace;
            font-size: 2.4rem;
            color: rgba(255, 255, 255, 0.5);
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.08);
            padding: 12px 20px;
            cursor: pointer;
            transition: background 0.15s, color 0.15s, border-color 0.15s;
            z-index: 20001;
            user-select: none;
            line-height: 1;
            border-radius: 0;
        }
        .image-viewer-overlay .viewer-nav:hover {
            background: rgba(125, 0, 0, 0.4);
            color: #FFFFFF;
            border-color: #7D0000;
        }
        .image-viewer-overlay .viewer-nav.prev {
            left: 24px;
        }
        .image-viewer-overlay .viewer-nav.next {
            right: 24px;
        }
        .image-viewer-overlay .viewer-content {
            max-width: 90vw;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            z-index: 20001;
            padding: 20px;
        }
        .image-viewer-overlay .viewer-content .viewer-img-wrap {
            max-width: 100%;
            max-height: 70vh;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.06);
        }
        .image-viewer-overlay .viewer-content .viewer-img-wrap img {
            max-width: 100%;
            max-height: 70vh;
            object-fit: contain;
            display: block;
            opacity: 0;
            transition: opacity 0.35s ease;
        }
        .image-viewer-overlay .viewer-content .viewer-img-wrap img.loaded {
            opacity: 1;
        }
        .image-viewer-overlay .viewer-content .viewer-caption {
            margin-top: 18px;
            text-align: center;
            color: #D5D5D5;
            font-family: 'Courier Prime', monospace;
            font-size: 0.8rem;
            letter-spacing: 0.3px;
            max-width: 80%;
            padding: 8px 16px;
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        .image-viewer-overlay .viewer-content .viewer-caption .vfn {
            font-weight: 700;
            color: #F6F6F6;
        }
        .image-viewer-overlay .viewer-content .viewer-caption .vmeta {
            color: #999;
            font-size: 0.7rem;
            display: block;
            margin-top: 2px;
        }
        .image-viewer-overlay .viewer-counter {
            position: fixed;
            bottom: 32px;
            left: 50%;
            transform: translateX(-50%);
            color: rgba(255, 255, 255, 0.3);
            font-family: 'Courier Prime', monospace;
            font-size: 0.7rem;
            letter-spacing: 1px;
            z-index: 20001;
            background: rgba(0, 0, 0, 0.3);
            padding: 4px 16px;
            border: 1px solid rgba(255, 255, 255, 0.04);
        }

        .footer-bar {
            background: #3D0000;
            color: #F6F6F6;
            font-family: 'Courier Prime', monospace;
            font-size: 0.8rem;
            padding: 14px 28px;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            border-top: 2px solid #7D0000;
            letter-spacing: 0.3px;
            width: 100%;
            flex-shrink: 0;
            margin: 0;
        }
        .footer-left {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: default;
            color: #c0c0c0;
        }
        .footer-center {
            display: flex;
            gap: 24px;
            color: #c0c0c0;
            cursor: default;
        }
       .footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-copy {
    font-size: 0.8rem;
    border-left: 1px solid #5A0000;
    padding-left: 16px;
    cursor: default;
    display: inline-block;
    vertical-align: middle;
}
.footer-logo {
    height: 60px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
    image-rendering: auto;
    filter: brightness(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: filter 0.3s ease, transform 0.3s ease;
    background: transparent;
}

.footer-logo:hover {
    filter: brightness(1.1) drop-shadow(0 0 10px rgba(235, 25, 25, 0.678)) drop-shadow(0 0 20px rgba(138, 17, 17, 0.15));
    transform: scale(1.02);
}
@media (max-width: 700px) {
    .footer-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 28px;
    }
    .footer-center {
        flex-wrap: wrap;
        gap: 12px;
    }
    .footer-right {
        flex-wrap: wrap;
        gap: 10px;
    }
}


        /* ============================================================
           GLITCH OVERLAY
           ============================================================ */
        .glitch-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 10000;
            background: rgba(0, 0, 0, 0.03);
            opacity: 0;
            transition: opacity 0.05s;
        }
        .glitch-overlay.active {
            opacity: 1;
            animation: glitchFlash 0.5s ease-out;
        }
        @keyframes glitchFlash {
            0% {
                opacity: 0.6;
                background: rgba(255, 0, 0, 0.04);
            }
            20% {
                opacity: 0.2;
                background: rgba(0, 0, 0, 0.08);
            }
            40% {
                opacity: 0.5;
                background: rgba(255, 0, 0, 0.03);
            }
            60% {
                opacity: 0.1;
            }
            100% {
                opacity: 0;
            }
        }

        /* ============================================================
           RESPONSIVE
           ============================================================ */
        @media (max-width: 900px) {
            .doc-detail-layout {
                flex-direction: column;
                gap: 24px;
            }
            .doc-sidebar {
                flex: 1 1 auto;
                max-width: 100%;
                width: 100%;
                flex-direction: row;
                flex-wrap: wrap;
                gap: 8px;
                padding-top: 0;
            }
            .doc-sidebar .sidebar-label {
                width: 100%;
                margin-bottom: 2px;
            }
            .sidebar-case {
                flex: 1 1 140px;
                min-width: 120px;
                padding: 8px 12px;
            }
            .doc-main .doc-header-title {
                font-size: 1.3rem;
            }
            .doc-tabs .tab-btn {
                font-size: 0.7rem;
                padding: 6px 12px;
            }
            .evidence-gallery {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
                gap: 14px;
            }
            .image-viewer-overlay .viewer-nav {
                font-size: 1.8rem;
                padding: 8px 14px;
            }
            .image-viewer-overlay .viewer-nav.prev {
                left: 10px;
            }
            .image-viewer-overlay .viewer-nav.next {
                right: 10px;
            }
            .image-viewer-overlay .viewer-close {
                top: 16px;
                right: 18px;
                font-size: 1.2rem;
                padding: 2px 14px;
            }
            .image-viewer-overlay .viewer-content .viewer-caption {
                font-size: 0.7rem;
                max-width: 92%;
            }
        }
        @media (max-width: 600px) {
            .top-status {
                font-size: 0.6rem;
                padding: 0 14px;
                height: 32px;
                flex-wrap: wrap;
            }
            .main-header {
                padding: 16px 14px 12px 14px;
            }
            .title-block h1 {
                font-size: 1.3rem;
                letter-spacing: 2px;
            }
            .nav-bar {
                padding: 0 14px;
            }
            .nav-links {
                font-size: 0.7rem;
                gap: 4px 12px;
            }
            .nav-search input {
                width: 100px;
                font-size: 0.65rem;
            }
            .featured-section {
                padding: 20px 14px 28px 14px;
            }
            .doc-sidebar .sidebar-case {
                flex: 1 1 100%;
            }
               .evidence-gallery {
        grid-template-columns: repeat(2, 1fr); 
        gap: 14px; 
    }
    

    .gallery-item .thumb-wrap {
        aspect-ratio: 4 / 3; 
        min-height: 140px; 
    }
    
    .gallery-item .thumb-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        filter: grayscale(1);
        transition: filter 0.4s ease, transform 0.4s ease, brightness 0.4s ease;
        transform: scale(1);
    }
    
    .gallery-item .thumb-caption {
        font-size: 0.65rem; 
        padding: 6px 8px 8px 8px;
    }
    
    .gallery-item .thumb-caption .fn {
        font-size: 0.7rem; 
    }
            .file-table th,
            .file-table td {
                padding: 6px 8px;
                font-size: 0.7rem;
            }
            .doc-tabs .tab-btn {
                font-size: 0.6rem;
                padding: 4px 8px;
                letter-spacing: 0.5px;
            }
            .footer-bar {
                padding: 12px 14px;
                font-size: 0.7rem;
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }
            .footer-center {
                flex-wrap: wrap;
                gap: 12px;
            }
            .footer-right {
                flex-wrap: wrap;
                gap: 10px;
            }
        }

        /* scrollbar */
        ::-webkit-scrollbar {
            width: 10px;
            background: #F0F0F0;
        }
        ::-webkit-scrollbar-thumb {
            background: #7D0000;
            border: 1px solid #5A0000;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #5A0000;
        }
        .doc-sidebar::-webkit-scrollbar {
            width: 4px;
            background: #F0F0F0;
        }
        .doc-sidebar::-webkit-scrollbar-thumb {
            background: #7D0000;
            border: none;
        }

#searchDropdown::-webkit-scrollbar {
    width: 6px;
    background: #F0F0F0;
}

#searchDropdown::-webkit-scrollbar-thumb {
    background: #7D0000;
    border: none;
}

#searchDropdown::-webkit-scrollbar-thumb:hover {
    background: #5A0000;
}

/* Search dropdown item animation */
#searchDropdown > div {
    animation: dropdownSlide 0.15s ease-out;
}

@keyframes dropdownSlide {
    0% {
        opacity: 0;
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
        .mobile-file-ico {
        display: none;
    }
}

@media (max-width: 600px) {
    .image-viewer-overlay {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 10px;
        gap: 0;
    }

    .image-viewer-overlay .viewer-content {
        order: 1;
        max-height: 70vh;
        padding: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
    }

    .image-viewer-overlay .viewer-content .viewer-img-wrap {
        max-height: 50vh;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .image-viewer-overlay .viewer-content .viewer-img-wrap img {
        max-height: 50vh;
        max-width: 100%;
        object-fit: contain;
    }

    .image-viewer-overlay .viewer-content .viewer-caption {
        order: 2;
        margin-top: 6px;
        margin-bottom: 4px;
        font-size: 0.7rem;
        max-width: 95%;
        flex-shrink: 0;
    }

    /* Move counter inside viewer-content, above caption */
    .image-viewer-overlay .viewer-counter {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        order: 1;
        margin-bottom: 4px;
        font-size: 0.6rem;
        padding: 2px 12px;
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.4);
        display: inline-block;
        flex-shrink: 0;
    }

    /* Navigation buttons fixed at bottom */
    .image-viewer-overlay .viewer-nav {
        position: fixed !important;
        bottom: 20px !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        font-size: 1.6rem !important;
        padding: 6px 18px !important;
        margin: 0 10px !important;
        min-width: 50px;
        text-align: center;
        background: rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.7);
        z-index: 20002;
        flex-shrink: 0;
    }

    .image-viewer-overlay .viewer-nav.prev {
        left: 50% !important;
        transform: translateX(-70px) !important;
        bottom: 20px !important;
    }

    .image-viewer-overlay .viewer-nav.next {
        right: 50% !important;
        transform: translateX(70px) !important;
        bottom: 20px !important;
    }
}

.doc-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0 4px;
    flex: 1;
}

/* Hide scrollbar for Chrome/Safari */
.doc-tabs::-webkit-scrollbar {
    display: none;
}

.doc-tabs .tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    background: transparent;
    border: none;
    padding: 8px 18px 6px 18px;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #555;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    margin-bottom: -2px;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

.doc-tabs .tab-btn:hover {
    color: #7D0000;
    background: rgba(125, 0, 0, 0.03);
}

.doc-tabs .tab-btn.active-tab {
    color: #7D0000;
    border-bottom-color: #7D0000;
    background: rgba(125, 0, 0, 0.04);
}

.tab-nav-arrow {
    background: #FAFAFA;
    border: 1px solid #D5D5D5;
    color: #7D0000;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    user-select: none;
    border-radius: 0;
    background: #FFFFFF;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease, background 0.15s, border-color 0.15s;
}

.tab-nav-arrow:hover {
    background: #7D0000;
    color: #FFFFFF;
    border-color: #7D0000;
}

.tab-nav-arrow:active {
    transform: scale(0.92);
}

.tab-nav-arrow.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tab-nav-arrow.prev-arrow {
    margin-right: 8px;
}

.tab-nav-arrow.next-arrow {
    margin-left: 8px;
}

/* Add scroll indicators on mobile */
@media (max-width: 700px) {

     .tab-nav-arrow {
        display: none !important;
    }

 .doc-tabs {
        padding: 0 4px;
    }

    .doc-tabs {
        position: relative;
        padding: 0 20px 0 20px; /* Add padding for scroll hint */
        margin-bottom: 20px;
    }

        .doc-tabs .tab-btn {
        font-size: 0.7rem;
        padding: 8px 16px 6px 16px;
        letter-spacing: 0.8px;
        flex-shrink: 0;
    }
    
    .doc-tabs::before,
    .doc-tabs::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 20px;
        pointer-events: none;
        z-index: 1;
    }
    
    .doc-tabs::before {
        left: 0;
        background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    }
    
    .doc-tabs::after {
        right: 0;
        background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    }
    
    .doc-tabs .tab-btn {
        font-size: 0.7rem;
        padding: 8px 16px 6px 16px;
        letter-spacing: 0.8px;
        flex-shrink: 0;
    }
}

/* Optional: Add a subtle scroll hint animation */
@media (max-width: 700px) {
    .doc-tabs {
        animation: scrollHint 3s ease-in-out infinite;
    }
}

@keyframes scrollHint {
    0%, 100% {
        scroll-snap-type: none;
    }
    50% {
        scroll-snap-type: x mandatory;
    }
}

/* Better touch experience for tabs */
@media (hover: none) and (pointer: coarse) {
    .doc-tabs .tab-btn {
        padding: 12px 18px 10px 18px; /* Larger touch target */
    }
}

.doc-tabs .tab-btn.active-tab {
    color: #7D0000;
    border-bottom-color: #7D0000;
    background: rgba(125, 0, 0, 0.04);
}

.doc-tabs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

/* ============================================================
   EXTRA INFORMATION SECTIONS
   ============================================================ */
.extra-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.extra-section {
    border: 1px solid #D5D5D5;
    background: #FAFAFA;
}

.extra-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #F0F0F0;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
    font-family: 'Special Elite', 'Courier New', monospace;
}

.extra-section-header:hover {
    background: #E5E5E5;
}

.extra-section-title {
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #7D0000;
    font-weight: 700;
    text-transform: uppercase;
}

.extra-section-toggle {
    font-size: 0.8rem;
    color: #7D0000;
    transition: transform 0.3s ease;
}

.extra-section-header.open .extra-section-toggle {
    transform: rotate(180deg);
}

.extra-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 16px;
    background: #FFFFFF;
}

.extra-section-content.open {
    max-height: 1000px;
    padding: 16px 16px 20px 16px;
}

.extra-section-body {
    font-family: 'Courier Prime', monospace;
    font-size: 0.8rem;
    color: #222;
    line-height: 1.8;
}

.extra-section-body p {
    margin-bottom: 14px;
}

.extra-section-body p:last-child {
    margin-bottom: 0;
}

.extra-section-body strong {
    color: #7D0000;
}

/* Timeline list styling */
.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-list li {
    padding: 6px 0 6px 20px;
    border-left: 2px solid #7D0000;
    padding-left: 16px;
    margin-bottom: 8px;
    font-size: 0.78rem;
    line-height: 1.6;
    position: relative;
}

.timeline-list li::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 10px;
    width: 8px;
    height: 8px;
    background: #7D0000;
    border-radius: 50%;
}

.timeline-list li:last-child {
    margin-bottom: 0;
}

.timeline-list li strong {
    color: #7D0000;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .extra-section-header {
        padding: 10px 12px;
    }
    
    .extra-section-title {
        font-size: 0.75rem;
    }
    
    .extra-section-content.open {
        padding: 12px 12px 16px 12px;
    }
    
    .extra-section-body {
        font-size: 0.72rem;
        line-height: 1.7;
    }
    
    .timeline-list li {
        font-size: 0.7rem;
        padding: 4px 0 4px 14px;
    }
    .document-viewer {
        justify-content: none !important;
    }
}
/* Document viewer with summary/full toggle */
.document-viewer {
    margin-top: 12px;
    border: 1px solid #D5D5D5;
    background: #FAFAFA;
}

.document-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #F0F0F0;
    border-bottom: 1px solid #D5D5D5;
    flex-wrap: wrap;
}

.doc-view-btn {
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 16px;
    border: 1px solid #D5D5D5;
    background: #FFFFFF;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-view-btn:hover {
    background: #E8E8E8;
}

.doc-view-btn.active-view {
    background: #7D0000;
    color: #FFFFFF;
    border-color: #7D0000;
}

.doc-view-status {
    font-family: 'Courier Prime', monospace;
    font-size: 0.7rem;
    color: #666;
    margin-left: auto;
}

.doc-content {
    font-family: 'Courier Prime', monospace;
    font-size: 0.85rem;
    color: #222;
    padding: 16px 18px;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
}

.doc-content p {
    margin-bottom: 10px;
}

.doc-content p:last-child {
    margin-bottom: 0;
}

/* Full document sections */
.full-doc-sections {
    padding: 0;
}

.doc-section {
    margin-bottom: 6px;
}

.doc-section h4 {
    color: #7D0000;
    font-size: 0.85rem;
    border-bottom: 1px solid #D5D5D5;
    padding-bottom: 4px;
    margin: 16px 0 8px 0;
    font-family: 'Special Elite', 'Courier New', monospace;
}

.doc-section:first-child h4 {
    margin-top: 0;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .document-controls {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .doc-view-btn {
        font-size: 0.6rem;
        padding: 3px 12px;
    }
    
    .doc-content {
        font-size: 0.75rem;
        padding: 12px 14px;
        max-height: 300px;
    }
    
    .doc-view-status {
        font-size: 0.6rem;
        margin-left: 0;
        width: 100%;
        text-align: center;
        padding-top: 4px;
        border-top: 1px solid #E0E0E0;
    }
    
    .doc-section h4 {
        font-size: 0.75rem;
    }
}

.expand-doc-btn {
    background: transparent !important;
    border-color: #7D0000 !important;
    color: #7D0000 !important;
    transition: all 0.2s ease !important;
}

.expand-doc-btn:hover {
    background: #7D0000 !important;
    color: #FFFFFF !important;
    border-color: #7D0000 !important;
}

/* Mobile adjustment for the expand button */
@media (max-width: 600px) {
    .expand-doc-btn {
        font-size: 0.6rem !important;
        padding: 3px 10px !important;
        margin-left: 0 !important;
        width: 100%;
        text-align: center;
        margin-top: 4px;
    }
    
    .document-controls {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .doc-view-status {
        order: 3;
        width: 100%;
        text-align: center;
        border-top: 1px solid #E0E0E0;
        padding-top: 6px;
        margin-top: 2px;
    }
    
    .expand-doc-btn {
        order: 2;
        margin-left: auto !important;
        width: auto;
    }
}