/**
 * Modern Service Result Showcase & Futuristic HUD Holographic Engine
 * 100% Offline, Zero GPU Load, Zero Blur, Full Dark & Light Mode Support
 * Version: 4.1.0 (HUD Universal Edition)
 */

/* ==========================================================================
   1. Sci-Fi HUD Framework, Hexagonal Mesh & Neon Light Bars
   ========================================================================== */

/* Top Center Glowing Neon Light Bar */
.hud-light-bar-top {
    display: block;
    width: 220px;
    max-width: 45%;
    height: 3px;
    background: #00f2fe;
    box-shadow: 0 0 12px #00f2fe, 0 0 25px rgba(0, 242, 254, 0.8), 0 0 45px rgba(56, 189, 248, 0.5);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 3px 3px;
    z-index: 6;
    pointer-events: none;
}

[data-bs-theme="light"] .hud-light-bar-top {
    background: #0284c7 !important;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.8), 0 0 22px rgba(14, 165, 233, 0.4) !important;
}

/* Bottom Center Glowing Neon Light Bar */
.hud-light-bar-bottom {
    display: block;
    width: 220px;
    max-width: 45%;
    height: 3px;
    background: #00f2fe;
    box-shadow: 0 0 12px #00f2fe, 0 0 25px rgba(0, 242, 254, 0.8), 0 0 45px rgba(56, 189, 248, 0.5);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px 3px 0 0;
    z-index: 6;
    pointer-events: none;
}

[data-bs-theme="light"] .hud-light-bar-bottom {
    background: #0284c7 !important;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.8), 0 0 22px rgba(14, 165, 233, 0.4) !important;
}

/* Top Edge Full Gradient Accent Bar */
.vector-top-gradient-bar {
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #10b981 20%, #00f2fe 50%, #6366f1 80%, transparent 100%);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    pointer-events: none;
}

[data-bs-theme="light"] .vector-top-gradient-bar {
    background: linear-gradient(90deg, transparent 0%, #059669 20%, #0284c7 50%, #6366f1 80%, transparent 100%) !important;
}

/* HUD Sci-Fi Chamfered Corner Reticle Brackets (Inner HUD Offset) */
.hud-corner-tl,
.hud-corner-tr,
.hud-corner-bl,
.hud-corner-br {
    position: absolute;
    width: 14px;
    height: 14px;
    pointer-events: none;
    z-index: 5;
}

.hud-corner-tl {
    top: 14px;
    left: 14px;
    border-top: 1.5px solid #00f2fe;
    border-left: 1.5px solid #00f2fe;
}

.hud-corner-tr {
    top: 10px;
    right: 14px;
    border-top: 1.5px solid #00f2fe;
    border-right: 1.5px solid #00f2fe;
}

.hud-corner-bl {
    bottom: 10px;
    left: 14px;
    border-bottom: 1.5px solid #10b981;
    border-left: 1.5px solid #10b981;
}

.hud-corner-br {
    bottom: 14px;
    right: 14px;
    border-bottom: 1.5px solid #10b981;
    border-right: 1.5px solid #10b981;
}

[data-bs-theme="light"] .hud-corner-tl,
[data-bs-theme="light"] .hud-corner-tr {
    border-color: #0284c7 !important;
}

[data-bs-theme="light"] .hud-corner-bl,
[data-bs-theme="light"] .hud-corner-br {
    border-color: #059669 !important;
}

/* Authentic Sci-Fi HUD 45° Corner Vector Chamfers (Top-Left Stripes, Bottom-Right Notch) */
.hud-chamfer-stripes-tl {
    position: absolute;
    top: 0;
    left: 0;
    width: 54px;
    height: 54px;
    pointer-events: none;
    z-index: 8;
}

.hud-chamfer-stripes-tl path {
    stroke: #00f2fe;
}

[data-bs-theme="light"] .hud-chamfer-stripes-tl path {
    stroke: #0284c7 !important;
}

.hud-chamfer-notch-br {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 54px;
    height: 54px;
    pointer-events: none;
    z-index: 8;
}

.hud-chamfer-notch-br path {
    stroke: #00f2fe;
}

.hud-chamfer-notch-br polygon {
    fill: #00f2fe;
    fill-opacity: 0.35;
}

[data-bs-theme="light"] .hud-chamfer-notch-br path {
    stroke: #0284c7 !important;
}

[data-bs-theme="light"] .hud-chamfer-notch-br polygon {
    fill: #0284c7 !important;
    fill-opacity: 0.25 !important;
}

.hud-corner-tr-svg {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 8;
}

.hud-corner-tr-svg path {
    stroke: #00f2fe;
}

[data-bs-theme="light"] .hud-corner-tr-svg path {
    stroke: #0284c7 !important;
}

.hud-corner-bl-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 8;
}

.hud-corner-bl-svg path {
    stroke: #00f2fe;
}

[data-bs-theme="light"] .hud-corner-bl-svg path {
    stroke: #0284c7 !important;
}

/* Top Circular HUD Tracking Reticle Dial */
.hud-reticle-gauge {
    position: absolute;
    top: 14px;
    right: 70px;
    width: 80px;
    height: 80px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.40;
    filter: none !important;
}

[data-bs-theme="light"] .hud-reticle-gauge {
    opacity: 0.18 !important;
}

/* Sharp Top-Right Tech Corner Vector (Non-Blurred Geometric Arcs) */
.service-vector-top-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 170px;
    height: 140px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.38;
    filter: none !important;
}

[data-bs-theme="light"] .service-vector-top-corner {
    opacity: 0.16 !important;
}

/* Sharp Service-Related Blueprint Watermark SVG (Bottom-Right, Strict Bounds) */
.service-vector-watermark {
    position: absolute !important;
    right: 15px !important;
    bottom: 12px !important;
    width: 280px !important;
    height: 190px !important;
    max-width: 38% !important;
    max-height: 42% !important;
    pointer-events: none !important;
    z-index: 0 !important;
    opacity: 0.35;
    filter: none !important;
    transform: translateZ(0);
    overflow: hidden !important;
}

[data-bs-theme="light"] .service-vector-watermark {
    opacity: 0.12 !important; /* Elegant, gentle watermark in light theme - never overbearing */
}

/* Actively suppress and hide legacy unstyled watermarks and blurry orbs */
.vector-blueprint-watermark,
.vector-orb-accent {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* Result Showcase Container (Sci-Fi HUD Chamfered Outer Frame + Micro-Dot Grid) */
#serviceResultSection,
.service-result-showcase,
.service-result-vector-bg {
    position: relative !important;
    background-color: #061124 !important;
    border-radius: 0 !important;
    border: 2px solid #00f2fe !important;
    clip-path: polygon(
        36px 0%,
        calc(100% - 16px) 0%,
        100% 16px,
        100% calc(100% - 36px),
        calc(100% - 36px) 100%,
        16px 100%,
        0% calc(100% - 16px),
        0% 36px
    ) !important;
    background-image: 
        radial-gradient(circle, rgba(0, 242, 254, 0.20) 1px, transparent 1px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48.497' viewBox='0 0 28 48.497'%3E%3Cpath fill='none' stroke='%2338bdf8' stroke-opacity='0.10' stroke-width='0.8' d='M14 0l14 8.083v16.166L14 32.332 0 24.249V8.083zm0 48.497l14-8.083V24.249L14 32.332 0 24.249v16.165z'/%3E%3C/svg%3E") !important;
    background-size: 16px 16px, 28px 48.5px !important;
    background-repeat: repeat !important;
    overflow: hidden !important;
    scroll-margin-top: 95px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-bs-theme="light"] #serviceResultSection,
[data-bs-theme="light"] .service-result-showcase,
[data-bs-theme="light"] .service-result-vector-bg {
    background-color: #ffffff !important;
    border: 2px solid #0284c7 !important;
    clip-path: polygon(
        36px 0%,
        calc(100% - 16px) 0%,
        100% 16px,
        100% calc(100% - 36px),
        calc(100% - 36px) 100%,
        16px 100%,
        0% calc(100% - 16px),
        0% 36px
    ) !important;
    background-image: 
        radial-gradient(circle, rgba(2, 132, 199, 0.15) 1px, transparent 1px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48.497' viewBox='0 0 28 48.497'%3E%3Cpath fill='none' stroke='%230284c7' stroke-opacity='0.06' stroke-width='0.8' d='M14 0l14 8.083v16.166L14 32.332 0 24.249V8.083zm0 48.497l14-8.083V24.249L14 32.332 0 24.249v16.165z'/%3E%3C/svg%3E") !important;
    background-size: 16px 16px, 28px 48.5px !important;
    color: #0f172a !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

/* Light Mode Text Visibility Overrides */
[data-bs-theme="light"] .service-result-showcase .text-white,
[data-bs-theme="light"] .service-result-modal .text-white,
[data-bs-theme="light"] .hud-modal .text-white {
    color: #0f172a !important;
}

[data-bs-theme="light"] .service-result-showcase .text-white-50,
[data-bs-theme="light"] .service-result-modal .text-white-50,
[data-bs-theme="light"] .hud-modal .text-white-50 {
    color: #475569 !important;
}

[data-bs-theme="light"] .service-result-showcase .text-muted,
[data-bs-theme="light"] .service-result-modal .text-muted,
[data-bs-theme="light"] .hud-modal .text-muted {
    color: #64748b !important;
}

[data-bs-theme="light"] .service-result-showcase .text-secondary,
[data-bs-theme="light"] .service-result-modal .text-secondary,
[data-bs-theme="light"] .hud-modal .text-secondary {
    color: #475569 !important;
}

/* ==========================================================================
   2. Modern Govt Verified Emblem & Badges in Transparent HUD Style
   ========================================================================== */

.govt-verified-hud-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.95rem;
    position: relative;
    z-index: 2;
}

/* Holographic Transparent HUD Govt Emblem Shield (Clean Square) */
.govt-verified-hud-icon,
.govt-verified-emblem-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 4px !important; /* Clean Square */
    clip-path: none !important;
    -webkit-clip-path: none !important;
    background: rgba(6, 182, 212, 0.08);
    border: 1.5px solid rgba(0, 242, 254, 0.7);
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.35), inset 0 0 12px rgba(6, 182, 212, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.govt-verified-hud-icon svg,
.govt-verified-emblem-icon svg {
    width: 28px;
    height: 28px;
}

[data-bs-theme="light"] .govt-verified-hud-icon,
[data-bs-theme="light"] .govt-verified-emblem-icon {
    background: #e0f2fe !important;
    border: 1.5px solid #0284c7 !important;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.22) !important;
}

/* Transparent HUD Verified Pill Badge (Angular Chamfered Sci-Fi Polygon) */
.govt-hud-verified-pill,
.govt-verified-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(16, 185, 129, 0.08);
    color: #34d399;
    border: 1.2px solid rgba(52, 211, 153, 0.6);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.25), inset 0 0 8px rgba(16, 185, 129, 0.12);
    border-radius: 0 !important;
    clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px) !important;
    padding: 0.28rem 0.85rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

[data-bs-theme="light"] .govt-hud-verified-pill,
[data-bs-theme="light"] .govt-verified-pill {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1.5px solid #10b981 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15) !important;
}

/* Live Radar Pulse Ping Dot */
.hud-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    display: inline-block;
    animation: hudRadarPing 1.8s ease-in-out infinite;
}

[data-bs-theme="light"] .hud-pulse-dot {
    background: #059669 !important;
    box-shadow: 0 0 6px #059669 !important;
}

@keyframes hudRadarPing {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.85);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.govt-verified-hud-subtext,
.govt-verified-subtext {
    font-size: 0.78rem;
    color: #94a3b8;
    font-family: monospace;
    letter-spacing: 0.3px;
    display: block;
}

[data-bs-theme="light"] .govt-verified-hud-subtext,
[data-bs-theme="light"] .govt-verified-subtext {
    color: #475569 !important;
}

[data-bs-theme="light"] .govt-verified-hud-subtext code,
[data-bs-theme="light"] .govt-verified-subtext code {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* ==========================================================================
   3. Capabilities Box & Holographic Data Table
   ========================================================================== */

/* Primary Highlight Banner (Both Dark & Light Modes) */
.result-primary-banner {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(6, 18, 41, 0.95) 100%) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.35) !important;
    border-radius: 0 !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px) !important;
    padding: 1rem 1.25rem !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 0 15px rgba(16, 185, 129, 0.05) !important;
    position: relative;
    overflow: hidden;
}

[data-bs-theme="light"] .result-primary-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.45) !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.1) !important;
    color: #0f172a !important;
}

[data-bs-theme="light"] .result-primary-banner .text-white,
[data-bs-theme="light"] #primaryValDisplay {
    color: #0f172a !important;
    text-shadow: none !important;
}

/* Order Summary Bar */
.result-order-summary-bar {
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
}

[data-bs-theme="light"] .result-order-summary-bar {
    background: #f8fafc !important;
    border: 1px solid rgba(2, 132, 199, 0.25) !important;
    color: #0f172a !important;
}

[data-bs-theme="light"] .result-order-summary-bar code {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Nested Detail Rows Container */
.result-nested-box {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(56, 189, 248, 0.2) !important;
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
}

[data-bs-theme="light"] .result-nested-box {
    background: #f8fafc !important;
    border: 1px solid rgba(2, 132, 199, 0.2) !important;
    color: #0f172a !important;
}

/* Custom Result Details Box (e.g. TN Ration Smartcard) */
.result-details-box {
    background: rgba(6, 18, 41, 0.72) !important;
    border: 1px solid rgba(56, 189, 248, 0.25) !important;
    border-radius: 0 !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px) !important;
    box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.05);
}

[data-bs-theme="light"] .result-details-box {
    background: #ffffff !important;
    border: 1.5px solid rgba(2, 132, 199, 0.3) !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
}

[data-bs-theme="light"] .result-details-box .text-white {
    color: #0f172a !important;
}

[data-bs-theme="light"] .result-details-box .text-white-50 {
    color: #475569 !important;
}

[data-bs-theme="light"] .result-details-box .text-muted {
    color: #64748b !important;
}

.result-capabilities-box {
    background: rgba(6, 18, 41, 0.72) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    border-radius: 0 !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px) !important;
    padding: 1rem 1.25rem;
    box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.08), 0 8px 24px rgba(0, 0, 0, 0.35);
    position: relative;
}

[data-bs-theme="light"] .result-capabilities-box {
    background: #ffffff !important;
    border: 1.5px solid rgba(2, 132, 199, 0.35) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05), inset 0 0 15px rgba(2, 132, 199, 0.03) !important;
    color: #0f172a !important;
}

[data-bs-theme="light"] .result-capabilities-box div[style*="rgba(30,41,59"] {
    background: #f8fafc !important;
    border-color: rgba(2, 132, 199, 0.2) !important;
}

.capabilities-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.65rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px dashed rgba(56, 189, 248, 0.3);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #38bdf8;
    font-family: monospace;
}

[data-bs-theme="light"] .capabilities-header {
    color: #0284c7 !important;
    border-bottom: 1px dashed rgba(2, 132, 199, 0.25) !important;
}

/* Primary Highlight Banner in Light Theme (Legacy fallback) */
[data-bs-theme="light"] .service-result-showcase div[style*="linear-gradient(135deg, rgba(30,41,59"],
[data-bs-theme="light"] .service-result-modal div[style*="linear-gradient(135deg, rgba(30,41,59"] {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.4) !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08) !important;
}

[data-bs-theme="light"] #primaryValDisplay {
    color: #0f172a !important;
    text-shadow: none !important;
}

/* Glowing Holographic Double-Tick Mark Icon */
.verified-double-tick {
    display: inline-flex;
    align-items: center;
    color: #00f2fe;
    font-size: 1.05rem;
    line-height: 1;
    margin-right: 0.45rem;
}

[data-bs-theme="light"] .verified-double-tick {
    color: #0284c7 !important;
}

/* ==========================================================================
   4. Result Focus Glow Pulse (Auto-Scroll)
   ========================================================================== */

@keyframes serviceResultGlowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.9), 0 10px 40px -10px rgba(0, 0, 0, 0.6);
        border-color: rgba(0, 242, 254, 1);
        transform: translateY(0);
    }
    40% {
        box-shadow: 0 0 0 16px rgba(0, 242, 254, 0), 0 16px 50px -10px rgba(0, 242, 254, 0.4);
        border-color: #38bdf8;
        transform: translateY(-2px);
    }
    100% {
        box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.65), 0 0 30px rgba(6, 182, 212, 0.2);
        border-color: rgba(56, 189, 248, 0.45);
        transform: translateY(0);
    }
}

.service-result-focused {
    animation: serviceResultGlowPulse 1.4s cubic-bezier(0.16, 1, 0.3, 1) 1 forwards !important;
}

/* ==========================================================================
   5. Futuristic Sci-Fi HUD Semi-Transparent Popup Modal (Chamfered Shape)
   ========================================================================== */

.service-result-modal .modal-dialog,
.hud-modal .modal-dialog {
    max-width: 980px;
    margin: 1.5rem auto;
    filter: none !important;
}

[data-bs-theme="light"] .service-result-modal .modal-dialog,
[data-bs-theme="light"] .hud-modal .modal-dialog {
    filter: none !important;
}

/* Zero GPU Load Hardware-Accelerated Modal Transition (Global Speed Mode) */
.service-result-modal.fade .modal-dialog,
.hud-modal.fade .modal-dialog {
    transition: transform 0.16s ease-out, opacity 0.16s linear !important;
    transform: translate3d(0, -10px, 0) scale(0.98) !important;
    will-change: transform, opacity;
}

.service-result-modal.show .modal-dialog,
.hud-modal.show .modal-dialog {
    transform: translate3d(0, 0, 0) scale(1) !important;
}

.service-result-modal .modal-content,
.hud-modal .modal-content {
    position: relative;
    background-color: #070f1e !important;
    border-radius: 0 !important;
    border: 2px solid #00f2fe !important;
    clip-path: polygon(
        36px 0%,
        calc(100% - 16px) 0%,
        100% 16px,
        100% calc(100% - 36px),
        calc(100% - 36px) 100%,
        16px 100%,
        0% calc(100% - 16px),
        0% 36px
    ) !important;
    background-image: 
        radial-gradient(circle, rgba(0, 242, 254, 0.16) 1px, transparent 1px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48.497' viewBox='0 0 28 48.497'%3E%3Cpath fill='none' stroke='%2338bdf8' stroke-opacity='0.10' stroke-width='0.8' d='M14 0l14 8.083v16.166L14 32.332 0 24.249V8.083zm0 48.497l14-8.083V24.249L14 32.332 0 24.249v16.165z'/%3E%3C/svg%3E") !important;
    background-size: 16px 16px, 28px 48.5px !important;
    background-repeat: repeat !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75) !important;
    color: #e2e8f0;
    overflow: hidden;
}

[data-bs-theme="light"] .service-result-modal .modal-content,
[data-bs-theme="light"] .hud-modal .modal-content {
    background-color: #ffffff !important;
    border: 2px solid #0284c7 !important;
    clip-path: polygon(
        36px 0%,
        calc(100% - 16px) 0%,
        100% 16px,
        100% calc(100% - 36px),
        calc(100% - 36px) 100%,
        16px 100%,
        0% calc(100% - 16px),
        0% 36px
    ) !important;
    background-image: 
        radial-gradient(circle, rgba(2, 132, 199, 0.12) 1px, transparent 1px),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48.497' viewBox='0 0 28 48.497'%3E%3Cpath fill='none' stroke='%230284c7' stroke-opacity='0.06' stroke-width='0.8' d='M14 0l14 8.083v16.166L14 32.332 0 24.249V8.083zm0 48.497l14-8.083V24.249L14 32.332 0 24.249v16.165z'/%3E%3C/svg%3E") !important;
    background-size: 16px 16px, 28px 48.5px !important;
    color: #0f172a !important;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18) !important;
}

/* HUD Modal Header */
.service-result-modal .modal-header,
.hud-modal .modal-header {
    position: relative;
    background: rgba(6, 18, 41, 0.65);
    border-bottom: 1px solid rgba(56, 189, 248, 0.35);
    padding: 1.25rem 1.75rem;
    z-index: 2;
}

[data-bs-theme="light"] .service-result-modal .modal-header,
[data-bs-theme="light"] .hud-modal .modal-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border-bottom: 1.5px solid rgba(2, 132, 199, 0.25) !important;
}

/* HUD Modal Body */
.service-result-modal .modal-body,
.hud-modal .modal-body {
    position: relative;
    padding: 1.75rem;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
    z-index: 2;
}

[data-bs-theme="light"] .service-result-modal .modal-body,
[data-bs-theme="light"] .hud-modal .modal-body {
    background: #ffffff !important;
    color: #0f172a !important;
}

[data-bs-theme="light"] .service-result-modal div[style*="rgba(6, 18, 41"],
[data-bs-theme="light"] .hud-modal div[style*="rgba(6, 18, 41"] {
    background: #f8fafc !important;
    border-color: rgba(2, 132, 199, 0.25) !important;
}

/* HUD Modal Footer Bar */
.service-result-modal .modal-footer,
.hud-modal .modal-footer {
    position: relative;
    background: rgba(6, 18, 41, 0.75);
    border-top: 1px solid rgba(56, 189, 248, 0.3);
    padding: 1rem 1.75rem;
    z-index: 2;
}

[data-bs-theme="light"] .service-result-modal .modal-footer,
[data-bs-theme="light"] .hud-modal .modal-footer {
    background: #f8fafc !important;
    border-top: 1.5px solid rgba(2, 132, 199, 0.25) !important;
}

/* ==========================================================================
   6. Futuristic Sci-Fi HUD Action Buttons (Angular Chamfer Shapes)
   ========================================================================== */

/* Primary HUD Action Button (Compact 38px Height, Sleek 8px Chamfer) */
.btn-result-highlighted-close,
.sci-btn-download,
.btn-hud-emerald {
    position: relative !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35) 0%, rgba(5, 150, 105, 0.6) 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #10b981 !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.35), inset 0 0 8px rgba(52, 211, 153, 0.2) !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    padding: 0.42rem 1.15rem !important;
    min-height: 38px !important;
    height: 38px !important;
    font-size: 0.82rem !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
    cursor: pointer !important;
    text-shadow: 0 0 6px rgba(52, 211, 153, 0.6) !important;
    vertical-align: middle !important;
    text-decoration: none !important;
}

.btn-result-highlighted-close:hover,
.btn-hud-emerald:hover {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.5) 0%, rgba(16, 185, 129, 0.75) 100%) !important;
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.65), inset 0 0 12px rgba(52, 211, 153, 0.35) !important;
    transform: translateY(-2px) !important;
    border-color: #34d399 !important;
    color: #ffffff !important;
}

.btn-result-highlighted-close:active,
.btn-hud-emerald:active {
    transform: translateY(1px) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4) !important;
}

[data-bs-theme="light"] .btn-result-highlighted-close,
[data-bs-theme="light"] .btn-hud-emerald {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #047857 !important;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.28) !important;
    text-shadow: none !important;
}

[data-bs-theme="light"] .btn-result-highlighted-close:hover,
[data-bs-theme="light"] .btn-hud-emerald:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #059669 !important;
    box-shadow: 0 5px 15px rgba(5, 150, 105, 0.4) !important;
    color: #ffffff !important;
}

/* Secondary HUD Cyan Action Button (Compact 38px Height, Sleek 8px Chamfer) */
.btn-hud-cyan,
.sci-btn-popup,
.btn-download-digital,
.btn-download-image,
.btn-download-final,
.btn-download-pdf,
.service-open-popup-btn {
    position: relative !important;
    background: rgba(6, 182, 212, 0.18) !important;
    color: #38bdf8 !important;
    border: 1.5px solid #00f2fe !important;
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.3), inset 0 0 8px rgba(6, 182, 212, 0.15) !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    padding: 0.42rem 1.15rem !important;
    min-height: 38px !important;
    height: 38px !important;
    font-size: 0.82rem !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
    cursor: pointer !important;
    text-shadow: 0 0 6px rgba(0, 242, 254, 0.5) !important;
    vertical-align: middle !important;
    text-decoration: none !important;
}

.btn-hud-cyan:hover,
.btn-download-digital:hover,
.btn-download-image:hover,
.btn-download-final:hover,
.btn-download-pdf:hover,
.service-open-popup-btn:hover {
    background: rgba(6, 182, 212, 0.35) !important;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.6), inset 0 0 12px rgba(6, 182, 212, 0.3) !important;
    transform: translateY(-2px) !important;
    border-color: #38bdf8 !important;
    color: #f0f9ff !important;
}

.btn-hud-cyan:active,
.service-open-popup-btn:active {
    transform: translateY(1px) !important;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4) !important;
}

[data-bs-theme="light"] .btn-hud-cyan,
[data-bs-theme="light"] .btn-download-digital,
[data-bs-theme="light"] .btn-download-image,
[data-bs-theme="light"] .btn-download-final,
[data-bs-theme="light"] .btn-download-pdf,
[data-bs-theme="light"] .service-open-popup-btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #0284c7 !important;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.28) !important;
    text-shadow: none !important;
}

[data-bs-theme="light"] .btn-hud-cyan:hover,
[data-bs-theme="light"] .btn-download-digital:hover,
[data-bs-theme="light"] .btn-download-image:hover,
[data-bs-theme="light"] .btn-download-final:hover,
[data-bs-theme="light"] .btn-download-pdf:hover,
[data-bs-theme="light"] .service-open-popup-btn:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    border-color: #0369a1 !important;
    box-shadow: 0 5px 15px rgba(2, 132, 199, 0.4) !important;
    color: #ffffff !important;
}

/* Tertiary HUD Indigo Action Button & Preview PDF Button (Compact 38px Height, Sleek 8px Chamfer) */
.btn-hud-indigo,
.btn-hud-preview,
.sci-btn-preview,
.btn-preview-pdf,
.service-result-showcase .btn-glass-secondary,
.service-result-showcase a.btn-glass-secondary,
.service-result-showcase button.btn-glass-secondary,
#serviceResultSection .btn-glass-secondary,
#serviceResultSection a.btn-glass-secondary,
#serviceResultSection button.btn-glass-secondary,
a.btn-glass-secondary:has(.bi-eye),
a.btn-glass-secondary:has(.bi-eye-fill),
button.btn-glass-secondary:has(.bi-eye),
button.btn-glass-secondary:has(.bi-eye-fill) {
    position: relative !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0%, rgba(79, 70, 229, 0.6) 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #818cf8 !important;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.35), inset 0 0 8px rgba(99, 102, 241, 0.2) !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    -webkit-clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    padding: 0.42rem 1.15rem !important;
    min-height: 38px !important;
    height: 38px !important;
    font-size: 0.82rem !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
    cursor: pointer !important;
    text-shadow: 0 0 6px rgba(129, 140, 248, 0.6) !important;
    vertical-align: middle !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.btn-hud-indigo:hover,
.btn-hud-preview:hover,
.btn-preview-pdf:hover,
.service-result-showcase .btn-glass-secondary:hover,
.service-result-showcase a.btn-glass-secondary:hover,
.service-result-showcase button.btn-glass-secondary:hover,
#serviceResultSection .btn-glass-secondary:hover,
#serviceResultSection a.btn-glass-secondary:hover,
#serviceResultSection button.btn-glass-secondary:hover,
a.btn-glass-secondary:has(.bi-eye):hover,
a.btn-glass-secondary:has(.bi-eye-fill):hover,
button.btn-glass-secondary:has(.bi-eye):hover,
button.btn-glass-secondary:has(.bi-eye-fill):hover {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.5) 0%, rgba(99, 102, 241, 0.8) 100%) !important;
    box-shadow: 0 0 22px rgba(99, 102, 241, 0.65) !important;
    transform: translateY(-2px) !important;
    border-color: #a5b4fc !important;
    color: #ffffff !important;
}

.btn-hud-indigo:active,
.btn-hud-preview:active,
.btn-preview-pdf:active {
    transform: translateY(1px) !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4) !important;
}

[data-bs-theme="light"] .btn-hud-indigo,
[data-bs-theme="light"] .btn-hud-preview,
[data-bs-theme="light"] .btn-preview-pdf,
[data-bs-theme="light"] .service-result-showcase .btn-glass-secondary,
[data-bs-theme="light"] .service-result-showcase a.btn-glass-secondary,
[data-bs-theme="light"] .service-result-showcase button.btn-glass-secondary,
[data-bs-theme="light"] #serviceResultSection .btn-glass-secondary,
[data-bs-theme="light"] #serviceResultSection a.btn-glass-secondary,
[data-bs-theme="light"] #serviceResultSection button.btn-glass-secondary,
[data-bs-theme="light"] a.btn-glass-secondary:has(.bi-eye),
[data-bs-theme="light"] a.btn-glass-secondary:has(.bi-eye-fill),
[data-bs-theme="light"] button.btn-glass-secondary:has(.bi-eye),
[data-bs-theme="light"] button.btn-glass-secondary:has(.bi-eye-fill) {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #4338ca !important;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.28) !important;
    text-shadow: none !important;
}

[data-bs-theme="light"] .btn-hud-indigo:hover,
[data-bs-theme="light"] .btn-hud-preview:hover,
[data-bs-theme="light"] .btn-preview-pdf:hover,
[data-bs-theme="light"] .service-result-showcase .btn-glass-secondary:hover,
[data-bs-theme="light"] .service-result-showcase a.btn-glass-secondary:hover,
[data-bs-theme="light"] .service-result-showcase button.btn-glass-secondary:hover,
[data-bs-theme="light"] #serviceResultSection .btn-glass-secondary:hover,
[data-bs-theme="light"] #serviceResultSection a.btn-glass-secondary:hover,
[data-bs-theme="light"] #serviceResultSection button.btn-glass-secondary:hover,
[data-bs-theme="light"] a.btn-glass-secondary:has(.bi-eye):hover,
[data-bs-theme="light"] a.btn-glass-secondary:has(.bi-eye-fill):hover,
[data-bs-theme="light"] button.btn-glass-secondary:has(.bi-eye):hover,
[data-bs-theme="light"] button.btn-glass-secondary:has(.bi-eye-fill):hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    border-color: #3730a3 !important;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4) !important;
    color: #ffffff !important;
}

/* Secondary HUD Neutral / Print Button (Compact 38px, 8px Chamfer) */
.btn-hud-secondary,
.btn-hud-print {
    position: relative !important;
    background: rgba(148, 163, 184, 0.15) !important;
    color: #e2e8f0 !important;
    border: 1.5px solid rgba(148, 163, 184, 0.4) !important;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.15) !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    text-transform: uppercase !important;
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    -webkit-clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    padding: 0.42rem 1.15rem !important;
    min-height: 38px !important;
    height: 38px !important;
    font-size: 0.82rem !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.btn-hud-secondary:hover,
.btn-hud-print:hover {
    background: rgba(148, 163, 184, 0.3) !important;
    border-color: #94a3b8 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 0 16px rgba(148, 163, 184, 0.35) !important;
}

[data-bs-theme="light"] .btn-hud-secondary,
[data-bs-theme="light"] .btn-hud-print {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
}

[data-bs-theme="light"] .btn-hud-secondary:hover,
[data-bs-theme="light"] .btn-hud-print:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12) !important;
}

/* Header Close 'X' Sci-Fi Reticle Button (Clean Square) */
.btn-result-modal-close-icon {
    position: relative !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 4px !important; /* Clean Square */
    clip-path: none !important;
    -webkit-clip-path: none !important;
    background: rgba(244, 63, 94, 0.12) !important;
    color: #fb7185 !important;
    border: 1.5px solid #f43f5e !important;
    box-shadow: 0 0 14px rgba(244, 63, 94, 0.35), inset 0 0 8px rgba(244, 63, 94, 0.15) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-size: 1.05rem !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer !important;
}

.btn-result-modal-close-icon:hover {
    background: #f43f5e !important;
    color: #ffffff !important;
    border-color: #fda4af !important;
    transform: scale(1.08) rotate(90deg) !important;
    box-shadow: 0 0 24px rgba(244, 63, 94, 0.75), inset 0 0 12px rgba(255, 255, 255, 0.3) !important;
}

[data-bs-theme="light"] .btn-result-modal-close-icon {
    background: rgba(225, 29, 72, 0.08) !important;
    color: #e11d48 !important;
    border: 1.5px solid #e11d48 !important;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25) !important;
}

[data-bs-theme="light"] .btn-result-modal-close-icon:hover {
    background: #e11d48 !important;
    color: #ffffff !important;
    border-color: #be123c !important;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.45) !important;
}

/* Secondary "Open Tab" and Ghost Buttons in Modal & Showcase */
.service-result-modal .btn-glass-secondary,
.hud-modal .btn-glass-secondary {
    position: relative !important;
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    border: 1.2px solid rgba(0, 242, 254, 0.5) !important;
    background: rgba(6, 182, 212, 0.12) !important;
    color: #38bdf8 !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2) !important;
    transition: all 0.2s ease !important;
}

.service-result-modal .btn-glass-secondary:hover,
.hud-modal .btn-glass-secondary:hover {
    background: rgba(0, 242, 254, 0.25) !important;
    border-color: #00f2fe !important;
    color: #ffffff !important;
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.5) !important;
    transform: translateY(-1px);
}

[data-bs-theme="light"] .service-result-modal .btn-glass-secondary,
[data-bs-theme="light"] .hud-modal .btn-glass-secondary {
    background: #e0f2fe !important;
    border: 1.2px solid #0284c7 !important;
    color: #0284c7 !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2) !important;
}

[data-bs-theme="light"] .service-result-modal .btn-glass-secondary:hover,
[data-bs-theme="light"] .hud-modal .btn-glass-secondary:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
}

/* Service Open Popup Button (On-page Trigger) */
.service-open-popup-btn {
    position: relative !important;
    border-radius: 0 !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px) !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Admin Debug Modal Tabs */
#adminDebugTabs .nav-link {
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

#adminDebugCopyBtn,
#adminDebugDownloadBtn {
    border-radius: 0 !important;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px) !important;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

/* ==========================================================================
   7. Bottom HUD Telemetry Readout (Signal Bars, Gauges, Status)
   ========================================================================== */

.hud-telemetry-strip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: monospace;
    font-size: 0.74rem;
    color: #64748b;
    letter-spacing: 0.4px;
}

[data-bs-theme="light"] .hud-telemetry-strip {
    color: #475569 !important;
}

.hud-telemetry-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
}

.hud-telemetry-bar-seg {
    width: 3px;
    border-radius: 1px;
    background: #00f2fe;
    box-shadow: 0 0 4px #00f2fe;
}

.hud-telemetry-bar-seg:nth-child(1) { height: 4px; opacity: 0.4; }
.hud-telemetry-bar-seg:nth-child(2) { height: 7px; opacity: 0.6; }
.hud-telemetry-bar-seg:nth-child(3) { height: 10px; opacity: 0.8; }
.hud-telemetry-bar-seg:nth-child(4) { height: 12px; opacity: 0.95; }
.hud-telemetry-bar-seg:nth-child(5) { height: 14px; opacity: 1; }

[data-bs-theme="light"] .hud-telemetry-bar-seg {
    background: #0284c7 !important;
    box-shadow: 0 0 3px rgba(2, 132, 199, 0.5) !important;
}

.hud-telemetry-hex-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 0 !important;
    clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px) !important;
    color: #38bdf8;
    font-size: 0.72rem;
    font-weight: 700;
}

[data-bs-theme="light"] .hud-telemetry-hex-badge {
    background: rgba(2, 132, 199, 0.08) !important;
    border-color: rgba(2, 132, 199, 0.35) !important;
    color: #0369a1 !important;
}

/* ==========================================================================
   8. Floating "⚡ View Result" Reopen Button (HUD Holographic Pill)
   ========================================================================== */

.service-result-floating-reopen-btn {
    position: fixed !important;
    bottom: 110px !important; /* Floats safely above #eservices-chat-launcher */
    right: 28px !important;
    z-index: 1055 !important;
    background: #091326 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #00f2fe !important;
    border: 1.5px solid #00f2fe !important;
    border-radius: 50rem !important; /* Normal rounded pill button */
    clip-path: none !important; /* Normal button, no cut-off chamfers */
    -webkit-clip-path: none !important;
    padding: 0.55rem 1.35rem !important;
    min-height: 40px !important;
    height: 40px !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 242, 254, 0.25) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
    cursor: pointer !important;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.6) !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease !important;
    animation: floatingReopenAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.service-result-floating-reopen-btn:hover {
    transform: translateY(-2px) !important;
    background: #0d1e3d !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 242, 254, 0.45) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}

.service-result-floating-reopen-btn:active {
    transform: translateY(1px) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="light"] .service-result-floating-reopen-btn {
    background: #ffffff !important;
    color: #0284c7 !important;
    border: 1.5px solid #0284c7 !important;
    border-radius: 50rem !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.25), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    text-shadow: none !important;
}

[data-bs-theme="light"] .service-result-floating-reopen-btn:hover {
    background: #f0f9ff !important;
    border-color: #0369a1 !important;
    color: #0369a1 !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35) !important;
    transform: translateY(-2px) !important;
}

@keyframes floatingReopenAppear {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   9. HUD Modal Data Table & PDF Frame
   ========================================================================== */

.result-modal-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.4rem;
}

.result-modal-data-table tr {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 0 !important;
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px) !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.result-modal-data-table tr:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(0, 242, 254, 0.4);
}

[data-bs-theme="light"] .result-modal-data-table tr {
    background: #ffffff !important;
    border: 1px solid rgba(2, 132, 199, 0.2) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

[data-bs-theme="light"] .result-modal-data-table tr:hover {
    background: #f0f9ff !important;
    border-color: #0284c7 !important;
}

.result-modal-data-table td {
    padding: 0.65rem 0.95rem;
    font-size: 0.85rem;
    vertical-align: middle;
}

.result-modal-data-table td.field-label {
    color: #94a3b8;
    width: 44%;
    font-weight: 500;
    font-family: monospace;
}

[data-bs-theme="light"] .result-modal-data-table td.field-label {
    color: #475569 !important;
    font-weight: 600;
}

.result-modal-data-table td.field-value {
    color: #ffffff;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    font-family: monospace;
}

[data-bs-theme="light"] .result-modal-data-table td.field-value {
    color: #0f172a !important;
    font-weight: 700;
}

.result-pdf-iframe-container {
    height: 480px;
    min-height: 400px;
    background: #061124;
    border: 1.5px solid rgba(0, 242, 254, 0.45) !important;
    border-radius: 0 !important;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px) !important;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 25px rgba(6, 182, 212, 0.15), 0 0 15px rgba(0, 242, 254, 0.1) !important;
}

[data-bs-theme="light"] .result-pdf-iframe-container {
    background: #f1f5f9 !important;
    border: 1.5px solid rgba(2, 132, 199, 0.45) !important;
    box-shadow: inset 0 0 15px rgba(2, 132, 199, 0.05), 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .service-result-modal .modal-dialog {
        margin: 0.75rem;
    }
    .service-result-modal .modal-header,
    .service-result-modal .modal-body,
    .service-result-modal .modal-footer {
        padding: 1rem;
    }
    .result-pdf-iframe-container {
        height: 320px;
        min-height: 280px;
    }
    .service-result-floating-reopen-btn {
        bottom: 96px !important;
        right: 16px !important;
        padding: 0.6rem 1.15rem !important;
        font-size: 0.82rem !important;
    }
    .service-vector-watermark {
        width: 200px !important;
        height: 140px !important;
        opacity: 0.25 !important;
    }
    [data-bs-theme="light"] .service-vector-watermark {
        opacity: 0.09 !important;
    }
    .hud-light-bar-top,
    .hud-light-bar-bottom {
        width: 140px;
    }
}

/* ==========================================================================
   10. Light Theme Precision Table Enhancements (PAN & All Service Tables)
   ========================================================================== */
[data-bs-theme="light"] .pan-record-table,
[data-bs-theme="light"] .pan-record-table tbody,
[data-bs-theme="light"] .pan-record-table tr,
[data-bs-theme="light"] .pan-record-table td {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

[data-bs-theme="light"] .pan-record-table tr.border-bottom {
    border-bottom: 1px solid #e2e8f0 !important;
}

[data-bs-theme="light"] .pan-record-table td.text-secondary,
[data-bs-theme="light"] .pan-record-table td:first-child {
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
}

[data-bs-theme="light"] .pan-record-table td.text-white,
[data-bs-theme="light"] .pan-record-table td:last-child,
[data-bs-theme="light"] .pan-record-table td .text-white {
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
}

/* PAN History Table in Light Theme */
[data-bs-theme="light"] .pan-history-table {
    --bs-table-bg: #ffffff !important;
    --bs-table-color: #0f172a !important;
    --bs-table-striped-bg: #f8fafc !important;
    --bs-table-hover-bg: #f1f5f9 !important;
    --bs-table-border-color: #e2e8f0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
}

[data-bs-theme="light"] .pan-history-table thead,
[data-bs-theme="light"] .pan-history-table thead tr,
[data-bs-theme="light"] .pan-history-table thead th {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: none !important;
}

[data-bs-theme="light"] .pan-history-table tbody tr {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-bottom: 1px solid #f1f5f9 !important;
    box-shadow: none !important;
}

[data-bs-theme="light"] .pan-history-table tbody tr:hover {
    background: #f1f5f9 !important;
    background-color: #f1f5f9 !important;
}

[data-bs-theme="light"] .pan-history-table td {
    color: #1e293b !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
}

[data-bs-theme="light"] .pan-history-table td .text-white,
[data-bs-theme="light"] .pan-history-table td span.text-white {
    color: #0f172a !important;
    font-weight: 700 !important;
}

[data-bs-theme="light"] .pan-history-table td .text-secondary,
[data-bs-theme="light"] .pan-history-table td .text-muted {
    color: #475569 !important;
    font-weight: 500 !important;
}

[data-bs-theme="light"] .pan-history-table td code {
    color: #0284c7 !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}
