/* input(1390,9): run-time error CSS1019: Unexpected token, found '}' */
/* Extracted from TraidbMap.cshtml for browser caching + maintainability. */
        .map-wrapper {
            position: relative;
            width: 100%;
            /* Adjusted to safely prevent vertical scrolling on various screens */
            height: calc(100vh - 95px);
            overflow: hidden;
            background: #aad3df;
        }
        #traidb-map, #company-map { width: 100%; height: 100%; z-index: 1; }
        .map-wrapper.tiles-dark {
            background: #0f172a !important;
        }
        .map-wrapper.tiles-dark #traidb-map,
        .map-wrapper.tiles-dark #company-map,
        .map-wrapper.tiles-dark .leaflet-container {
            background: #0f172a !important;
        }
        body.dark-mode .leaflet-container { background: #0f172a; }
        /* Persian Gulf label. Colors sampled directly from Esri's own water-name labels
           (e.g. "Red Sea") on each basemap: #5c7f9d on World_Street_Map (day), #63646f on
           World_Dark_Gray_Base (night) — Esri renders these italic with no halo, so we match
           that exactly rather than adding an outline that would make it stand out. Keyed off
           the map's own .tiles-dark class (set by the in-map theme toggle), NOT body.dark-mode
           — the site shell is always dark-mode, but the map tiles default to day/colorful. */
        .sea-label {
            color: #5c7f9d; font-weight: 400; font-style: italic; font-size: 12px;
            letter-spacing: 0.2px; white-space: nowrap; font-family: Arial, Helvetica, sans-serif;
            transition: opacity 0.3s, font-size 0.3s;
        }
        .map-wrapper.tiles-dark .sea-label {
            color: #636468;
        }
        /* Hide Leaflet attribution */
        .leaflet-control-attribution { display: none !important; }
        
        .globe-control-panel {
            position: absolute; top: 20px; left: 12px; z-index: 800;
            width: 270px; font-family: Poppins, sans-serif;
            max-height: calc(100% - 40px);
            overflow-y: auto;
            overflow-x: hidden;
            transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
            display: flex;
            flex-direction: column;
            gap: 15px;
            /* Scrollbar padding */
            padding-right: 4px;
        }
        .filter-menu-box {
            background: rgba(255, 255, 255, 0.45);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            padding: 20px; border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.6);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(255,255,255,0.2);
            color: #1e293b;
            flex-shrink: 0;
            transition: all 0.3s ease;
        }
        .filter-menu-box.route-box {
            background: #f8fafc; /* solid light slate for contrast */
            border-top: 3px solid #3b82f6;
        }
        /* The panel's z-index (800) sits in the root stacking context, while the header's
           search-suggestions dropdown is trapped inside the header's OWN stacking context
           (the header has position:sticky + z-index:50) — so no z-index on the dropdown can
           ever paint above the panel; the whole header stacks at 50 vs. the panel's 800.
           Sliding the panel out of the way while the user is searching is both the fix and
           the requested UX: it auto-tucks aside, then springs back once search closes. */
        .tb-landing--header-only:has(.tb-landing__header--search-active) ~ main .globe-control-panel {
            transform: translateX(-140%);
            opacity: 0;
            pointer-events: none;
        }
        .tb-landing--header-only:has(.tb-landing__header--search-active) ~ main #mobilePanelToggle {
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }
        .globe-control-panel::-webkit-scrollbar { width: 6px; }
        .globe-control-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 6px; }
        body.dark-mode .filter-menu-box {
            background: rgba(15, 23, 42, 0.55);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255,255,255,0.05);
            color: #f8fafc;
        }
        body.dark-mode .filter-menu-box.route-box {
            background: #1e293b; /* solid dark slate */
        }
        .globe-control-panel h3 {
            font-size: 1.1rem; margin-bottom: 20px; font-weight: 700;
            border-bottom: 1px solid rgba(0,0,0,0.08); padding-bottom: 12px;
            display: flex; align-items: center; gap: 10px;
            color: #0f172a;
            letter-spacing: -0.3px;
        }
        body.dark-mode .globe-control-panel h3 { border-bottom-color: rgba(255,255,255,0.1); color: #f8fafc; }
        .globe-toggle-item { display: flex; align-items: center; margin-bottom: 12px; cursor: pointer; }
        .globe-toggle-item input[type=checkbox] { width:18px; height:18px; cursor:pointer; margin-right:12px; flex-shrink:0; }
        .globe-toggle-item input.sea-toggle   { accent-color:#0ea5e9; }
        .globe-toggle-item input.land-toggle  { accent-color:#f59e0b; }
        .globe-toggle-item input.air-toggle   { accent-color:#8b5cf6; }
        .globe-toggle-item input.routes-toggle{ accent-color:#3b82f6; }
        .globe-toggle-item span { font-size:.9rem; user-select:none; display:flex; align-items:center; gap:8px; }
        .port-count { font-size:.72rem; opacity:.55; margin-left:auto; }
        .panel-divider { border-top: 1px solid rgba(0,0,0,0.1); }
        body.dark-mode .panel-divider { border-top-color: rgba(255,255,255,0.1); }
        .loading-pill {
            position:absolute; bottom:20px; left:50%; transform:translateX(-50%);
            z-index:1000; background:rgba(0,0,0,.72); color:#fff;
            padding:7px 18px; border-radius:20px; font-size:.83rem; display:none;
        }
        /* Geocoder Search Bar - Glassmorphism */
        .leaflet-control-geocoder {
            position: absolute !important;
            left: 50vw !important;
            transform: translateX(-50%) !important;
            top: 20px !important;
            margin: 0 !important;
            z-index: 2000 !important;
            width: 400px !important;
            max-width: 90vw !important;
            background: rgba(255, 255, 255, 0.4) !important;
            backdrop-filter: blur(16px) !important;
            -webkit-backdrop-filter: blur(16px) !important;
            border: 1px solid rgba(255, 255, 255, 0.6) !important;
            border-radius: 24px !important;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
            transition: all 0.3s ease !important;
            display: flex !important;
            align-items: center !important;
            overflow: hidden;
        }
        .leaflet-control-geocoder-form {
            display: flex !important;
            align-items: center !important;
            margin: 0 !important;
            padding: 0 !important;
        }
        .leaflet-control-geocoder-icon {
            background-color: transparent !important;
            border: none !important;
            margin: 2px !important;
        }
        .leaflet-control-geocoder:hover, .leaflet-control-geocoder-expanded {
            background: rgba(255, 255, 255, 0.7) !important;
        }
        .leaflet-control-geocoder input {
            background: transparent !important;
            color: #333 !important; /* Keep input text readable in light mode */
            border: none !important;
            font-family: Poppins, sans-serif !important;
            padding: 12px 20px 12px 10px !important;
            font-size: 1.05rem !important;
            font-weight: 500 !important;
            outline: none !important;
            width: 100% !important;
            height: 48px !important;
        }
        .leaflet-control-geocoder input::placeholder {
            color: #fff !important;
            opacity: 0.9 !important;
        }
        
        /* Dark mode overrides for search bar */
        body.dark-mode .leaflet-control-geocoder {
            background: rgba(15, 23, 42, 0.5) !important;
            border-color: rgba(255, 255, 255, 0.15) !important;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
        }
        body.dark-mode .leaflet-control-geocoder:hover, body.dark-mode .leaflet-control-geocoder-expanded {
            background: rgba(15, 23, 42, 0.75) !important;
        }
        body.dark-mode .leaflet-control-geocoder input {
            color: #fff !important;
        }
        body.dark-mode .leaflet-control-geocoder-icon {
            filter: invert(1);
            opacity: 0.8;
        }

        /* Suggestions Dropdown (Alternatives) - Glassmorphism */
        .leaflet-control-geocoder-alternatives {
            background: rgba(255, 255, 255, 0.6) !important;
            backdrop-filter: blur(16px) !important;
            -webkit-backdrop-filter: blur(16px) !important;
            border: 1px solid rgba(255, 255, 255, 0.5) !important;
            border-radius: 12px !important;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
            margin-top: 8px !important;
            padding: 5px 0 !important;
            font-family: Poppins, sans-serif !important;
        }
        .leaflet-control-geocoder-alternatives li {
            background: transparent !important;
            color: #333 !important;
            padding: 10px 16px !important;
            border-bottom: 1px solid rgba(0,0,0,0.05) !important;
            transition: background 0.2s ease !important;
        }
        .leaflet-control-geocoder-alternatives li:last-child {
            border-bottom: none !important;
        }
        .leaflet-control-geocoder-alternatives li:hover {
            background: rgba(255, 255, 255, 0.6) !important;
        }
        
        /* Dark mode overrides for suggestions */
        body.dark-mode .leaflet-control-geocoder-alternatives {
            background: rgba(15, 23, 42, 0.6) !important;
            border-color: rgba(255, 255, 255, 0.1) !important;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
        }
        body.dark-mode .leaflet-control-geocoder-alternatives li {
            color: #f8fafc !important;
            border-bottom-color: rgba(255,255,255,0.05) !important;
        }
        body.dark-mode .leaflet-control-geocoder-alternatives li:hover {
            background: rgba(255, 255, 255, 0.1) !important;
        }
        
        /* Fix link color inside suggestions */
        .leaflet-control-geocoder-alternatives li a {
            color: inherit !important;
            text-decoration: none !important;
        }

        /* Modern Country Search & Filter */
        .country-filter-wrap {
            margin-top: 20px;
            border-top: 1px solid rgba(0,0,0,0.1);
            padding-top: 16px;
        }
        body.dark-mode .country-filter-wrap { border-top-color: rgba(255,255,255,0.1); }
        .country-filter-wrap label {
            font-size: 0.85rem;
            font-weight: 600;
            opacity: 0.9;
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 12px;
            letter-spacing: 0.02em;
        }
        .country-filter-input-row {
            display: flex;
            gap: 6px;
            align-items: center;
        }
        .country-filter-input {
            flex: 1;
            padding: 10px 14px;
            border-radius: 10px;
            border: 1px solid rgba(0,0,0,0.1);
            background: rgba(255, 255, 255, 0.6);
            backdrop-filter: blur(8px);
            font-size: 0.85rem;
            font-family: inherit;
            outline: none;
            color: #333;
            transition: all 0.3s ease;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
        }
        body.dark-mode .country-filter-input {
            background: rgba(15, 23, 42, 0.5);
            border-color: rgba(255,255,255,0.15);
            color: #fff;
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
        }
        .country-filter-input:focus { 
            border-color: #0ea5e9;
            background: rgba(255, 255, 255, 0.9);
            box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
        }
        body.dark-mode .country-filter-input:focus {
            background: rgba(15, 23, 42, 0.9);
        }
        .country-filter-clear {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.2);
            cursor: pointer;
            color: #ef4444;
            font-size: 0.9rem;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            transition: all 0.2s;
            display: none;
            align-items: center;
            justify-content: center;
        }
        .country-filter-clear:hover { 
            background: #ef4444;
            color: #fff;
        }
        .filter-status {
            margin-top: 8px;
            font-size: 0.78rem;
            min-height: 18px;
            opacity: 0.7;
        }
        
        /* Glassmorphism Suggestions Dropdown */
        .country-suggestions {
            position: absolute;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(16px);
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.15);
            max-height: 200px;
            overflow-y: auto;
            z-index: 2000;
            width: calc(100% - 40px);
            display: none;
            padding: 6px;
        }
        body.dark-mode .country-suggestions {
            background: rgba(15, 23, 42, 0.9);
            border-color: rgba(255,255,255,0.15);
            box-shadow: 0 10px 40px rgba(0,0,0,0.4);
        }
        .country-suggestions div {
            padding: 10px 14px;
            cursor: pointer;
            font-size: 0.85rem;
            border-radius: 8px;
            transition: all 0.2s;
            margin-bottom: 2px;
            font-weight: 500;
        }
        .country-suggestions div:last-child { margin-bottom: 0; }
        .country-suggestions div:hover {
            background: rgba(14,165,233,0.15);
            color: #0ea5e9;
            transform: translateX(4px);
        }

        /* Dual country + Trace Route */
        .dual-country-row {
            display: flex;
            gap: 6px;
            align-items: center;
            margin-bottom: 6px;
        }
        .country-tag {
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            opacity: 0.5;
            min-width: 14px;
        }
        .trace-btn {
            width: 100%;
            margin-top: 10px;
            padding: 9px 14px;
            border: none;
            border-radius: 10px;
            background: linear-gradient(135deg, #6366f1, #0ea5e9);
            color: #fff;
            font-weight: 700;
            font-size: 0.85rem;
            cursor: pointer;
            transition: opacity 0.2s, transform 0.15s;
            display: none;
            letter-spacing: 0.03em;
        }
        .trace-btn:hover { opacity: 0.88; transform: translateY(-1px); }
        .trace-btn:active { transform: translateY(0); }
        .trace-result {
            margin-top: 10px;
            font-size: 0.78rem;
            line-height: 1.6;
            display: none;
        }
        .trace-result .tr-section {
            padding: 8px 10px;
            border-radius: 8px;
            margin-bottom: 6px;
        }
        .tr-land  { background: rgba(245,158,11,0.12); border-left: 3px solid #f59e0b; }
        .tr-sea   { background: rgba(14,165,233,0.12); border-left: 3px solid #0ea5e9; }
        .tr-none  { background: rgba(239,68,68,0.10);  border-left: 3px solid #ef4444; }
        .trace-clear {
            width: 100%; margin-top: 6px; padding: 5px;
            background: none; border: 1px solid rgba(0,0,0,0.1);
            border-radius: 8px; cursor: pointer; font-size: 0.78rem;
            color: #888; display: none;
        }
        body.dark-mode .trace-clear { border-color: rgba(255,255,255,0.15); color: #aaa; }
        .trace-clear:hover { color: #ef4444; border-color: #ef4444; }

        /* Port selectors */
        .port-select {
            width: 100%;
            margin-top: 4px;
            padding: 8px;
            background: rgba(255, 255, 255, 0.4);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.6);
            color: #333;
            border-radius: 8px;
            font-size: 0.75rem;
            display: none;
            outline: none;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
        }
        body.dark-mode .port-select {
            background: rgba(15, 23, 42, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: #fff;
        }
        .port-select:focus { border-color: #0ea5e9; background: rgba(255,255,255,0.8); }
        body.dark-mode .port-select:focus { background: rgba(15, 23, 42, 0.8); }
        .dual-country-wrap { margin-bottom: 8px; }

        /* Animation for route direction */
        @keyframes flow {
            from { stroke-dashoffset: 44; }
            to { stroke-dashoffset: 0; }
        }
        .animated-route {
            animation: flow 1.5s linear infinite;
            filter: drop-shadow(0 0 4px currentColor);
        }

        /* Glassmorphism popups */
        .leaflet-popup-content-wrapper {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            color: #1e293b;
            font-family: Poppins, sans-serif;
        }
        body.dark-mode .leaflet-popup-content-wrapper {
            background: rgba(15, 23, 42, 0.85);
            border-color: rgba(255, 255, 255, 0.1);
            color: #f8fafc;
        }
        .leaflet-popup-tip {
            background: rgba(255, 255, 255, 0.85);
        }
        body.dark-mode .leaflet-popup-tip {
            background: rgba(15, 23, 42, 0.85);
        }
        .leaflet-popup-content b {
            display: block;
            font-size: 1.05rem;
            margin-bottom: 5px;
            border-bottom: 1px solid rgba(0,0,0,0.1);
            padding-bottom: 5px;
        }
        body.dark-mode .leaflet-popup-content b {
            border-bottom-color: rgba(255,255,255,0.1);
        }
        .popup-stats {
            margin-top: 8px;
            font-size: 0.8rem;
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 160px;
        }
        .popup-stats span {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .popup-stats strong {
            color: #0ea5e9;
        }

        /* Engineered Dossier-Style Company Card */
        .company-map-card {
            display: flex;
            flex-direction: column;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(0, 0, 0, 0.08);
            border-radius: 16px;
            padding: 16px 18px;
            margin-bottom: 14px;
            transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
            box-shadow: 0 4px 15px rgba(0,0,0,0.03);
            position: relative;
        }

        .company-map-card.card-exact {
            border-left: 4px solid #10b981;
        }

        .company-map-card.card-approximate {
            border-left: 4px solid #f59e0b;
        }

        .company-map-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 28px rgba(0,0,0,0.08);
            border-color: rgba(59, 130, 246, 0.35);
            background: rgba(255, 255, 255, 0.98);
        }

        .company-map-card.card-exact:hover {
            border-left-color: #059669;
            box-shadow: 0 12px 28px rgba(16, 185, 129, 0.12);
        }

        .card-identity-row {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 10px;
        }

        .card-company-logo {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid rgba(0,0,0,0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            background: #fff;
            flex-shrink: 0;
            box-shadow: 0 2px 6px rgba(0,0,0,0.04);
            padding: 3px;
        }

        .card-company-logo img {
            max-width: 92%;
            max-height: 92%;
            object-fit: contain;
        }

        .card-company-info {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .card-title-link {
            text-decoration: none;
            color: inherit;
        }

        .card-title-link h5 {
            margin: 0;
            font-size: 1.05rem;
            font-weight: 700;
            color: #0f172a;
            line-height: 1.3;
            letter-spacing: -0.2px;
            word-break: break-word;
            transition: color 0.2s ease;
        }

        .card-title-link:hover h5 {
            color: #2563eb;
        }

        .card-badges-row {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
            margin-top: 2px;
        }

        .badge-status-pill {
            font-size: 0.72rem;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
        }

        .badge-status-pill.pill-exact {
            background: rgba(16, 185, 129, 0.12);
            color: #059669;
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .badge-status-pill.pill-approx {
            background: rgba(245, 158, 11, 0.12);
            color: #d97706;
            border: 1px solid rgba(245, 158, 11, 0.3);
        }

        .badge-status-pill.pill-type {
            background: rgba(59, 130, 246, 0.08);
            color: #2563eb;
            border: 1px solid rgba(59, 130, 246, 0.22);
        }

        .card-location-row {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.83rem;
            color: #475569;
            margin-bottom: 10px;
            font-weight: 500;
        }

        .company-card-match {
            font-size: 0.82rem;
            color: #0369a1;
            background: rgba(14, 165, 233, 0.1);
            padding: 6px 10px;
            border-radius: 6px;
            display: flex;
            align-items: flex-start;
            gap: 6px;
            font-weight: 500;
            margin-bottom: 10px;
        }
        
        .company-card-match i {
            margin-top: 2px;
            color: #0ea5e9;
        }

        .card-action-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-top: auto;
            padding-top: 10px;
            border-top: 1px solid rgba(0,0,0,0.06);
        }

        .btn-card-action {
            font-size: 0.82rem;
            font-weight: 600;
            padding: 7px 14px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid transparent;
            white-space: nowrap;
        }

        .btn-navigate {
            background: rgba(16, 185, 129, 0.1);
            color: #059669;
            border-color: rgba(16, 185, 129, 0.3);
        }

        .btn-navigate:hover {
            background: #10b981;
            color: #ffffff;
            border-color: #10b981;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
        }

        .btn-view-profile {
            background: #2563eb;
            color: #ffffff;
            border-color: #2563eb;
        }

        .btn-view-profile:hover {
            background: #1d4ed8;
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
        }

        .btn-view-profile.btn-full {
            margin-left: auto;
        }

        .approx-note-text {
            font-size: 0.75rem;
            color: #d97706;
            display: flex;
            align-items: center;
            gap: 4px;
            font-weight: 500;
        }

        /* Dossier Dark Mode Overrides - High Contrast & Premium */
        body.dark-mode .company-map-card {
            background: rgba(30, 41, 59, 0.75);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-color: rgba(255, 255, 255, 0.08);
            box-shadow: 0 4px 20px rgba(0,0,0,0.35);
        }
        body.dark-mode .company-map-card:hover {
            background: rgba(30, 41, 59, 0.95);
            border-color: rgba(56, 189, 248, 0.45);
            box-shadow: 0 12px 30px rgba(0,0,0,0.5), 0 0 15px rgba(56, 189, 248, 0.15);
        }
        body.dark-mode .card-title-link h5 { color: #f8fafc; }
        body.dark-mode .card-title-link:hover h5 { color: #60a5fa; }
        body.dark-mode .card-company-logo { background: rgba(255,255,255,0.95); border-color: transparent; }
        body.dark-mode .card-location-row { color: #cbd5e1; }
        body.dark-mode .card-action-bar { border-top-color: rgba(255,255,255,0.08); }
        
        body.dark-mode .badge-status-pill.pill-exact {
            background: rgba(16, 185, 129, 0.2);
            color: #34d399;
            border-color: rgba(16, 185, 129, 0.4);
        }
        body.dark-mode .badge-status-pill.pill-approx {
            background: rgba(245, 158, 11, 0.2);
            color: #fbbf24;
            border-color: rgba(245, 158, 11, 0.4);
        }
        body.dark-mode .badge-status-pill.pill-type {
            background: rgba(59, 130, 246, 0.2);
            color: #93c5fd;
            border-color: rgba(59, 130, 246, 0.35);
        }
        body.dark-mode .btn-navigate {
            background: rgba(16, 185, 129, 0.18);
            color: #34d399;
            border-color: rgba(16, 185, 129, 0.4);
        }
        body.dark-mode .btn-navigate:hover {
            background: #10b981;
            color: #0f172a;
        }
        body.dark-mode .btn-view-profile {
            background: rgba(56, 189, 248, 0.18);
            color: #38bdf8;
            border-color: rgba(56, 189, 248, 0.4);
        }
        body.dark-mode .btn-view-profile:hover {
            background: #38bdf8;
            color: #0f172a;
            border-color: #38bdf8;
        }
        body.dark-mode .approx-note-text {
            color: #fbbf24;
        }

        /* Company Sidebar */
        .company-sidebar {
            position: absolute;
            top: 20px;
            right: -450px;
            width: 410px;
            max-width: calc(100vw - 40px);
            bottom: 20px;
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 20px;
            box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
            z-index: 2000;
            display: flex;
            flex-direction: column;
            transition: right 0.35s cubic-bezier(0.25, 1, 0.5, 1);
            overflow: hidden;
        }

        .company-sidebar.open {
            right: 20px;
        }

        body.dark-mode .company-sidebar {
            background: rgba(15, 23, 42, 0.96);
            border-color: rgba(255, 255, 255, 0.12);
            box-shadow: -8px 0 36px rgba(0, 0, 0, 0.6);
        }

        .company-sidebar .sidebar-header {
            padding: 16px 20px 14px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.08);
            display: flex;
            flex-direction: column;
            gap: 8px;
            background: rgba(255, 255, 255, 0.4);
        }

        body.dark-mode .company-sidebar .sidebar-header {
            border-bottom-color: rgba(255, 255, 255, 0.08);
            background: rgba(15, 23, 42, 0.4);
        }

        .company-sidebar .sidebar-header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }

        .company-sidebar .sidebar-header-top h4 {
            margin: 0;
            font-size: 1.15rem;
            font-weight: 700;
            color: #0f172a;
            display: flex;
            align-items: center;
            letter-spacing: -0.2px;
        }

        body.dark-mode .company-sidebar .sidebar-header-top h4 {
            color: #f8fafc;
        }

        .company-sidebar .close-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.06);
            border: none;
            font-size: 0.95rem;
            color: #64748b;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            flex-shrink: 0;
        }

        .company-sidebar .close-btn:hover {
            background: rgba(239, 68, 68, 0.15);
            color: #ef4444;
            transform: rotate(90deg) scale(1.05);
        }

        body.dark-mode .company-sidebar .close-btn {
            background: rgba(255, 255, 255, 0.08);
            color: #94a3b8;
        }

        body.dark-mode .company-sidebar .close-btn:hover {
            background: rgba(239, 68, 68, 0.25);
            color: #f87171;
        }

        .company-sidebar .sidebar-content {
            padding: 16px 20px;
            overflow-y: auto;
            flex-grow: 1;
        }

        /* Location Precision Vertical Control */
        .precision-vertical-list {
            display: flex !important;
            flex-direction: column !important;
            gap: 6px !important;
            margin-top: 8px !important;
            width: 100% !important;
        }
        .precision-vertical-list .precision-segment {
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            padding: 8px 11px !important;
            background: rgba(15, 23, 42, 0.7) !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
            border-radius: 9px !important;
            cursor: pointer !important;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
            text-align: left !important;
            width: 100% !important;
            user-select: none !important;
            box-sizing: border-box !important;
        }

        /* Autocomplete Suggestions Container */
        .autocomplete-suggestions {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            max-height: 250px;
            overflow-y: auto;
            margin-top: 4px;
            display: none;
        }

        .autocomplete-suggestion {
            padding: 10px 15px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: background 0.2s;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
            color: #1e293b;
        }

        .autocomplete-suggestion:last-child {
            border-bottom: none;
        }

        .autocomplete-suggestion:hover {
            background: rgba(59, 130, 246, 0.1);
        }

        .autocomplete-suggestion i {
            color: #3b82f6;
            width: 20px;
            text-align: center;
        }

        /* Dark Mode for Autocomplete */
        body.dark-mode .autocomplete-suggestions {
            background: rgba(30, 41, 59, 0.95);
            border-color: rgba(255, 255, 255, 0.1);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        }

        body.dark-mode .autocomplete-suggestion {
            color: #f1f5f9;
            border-bottom-color: rgba(255, 255, 255, 0.05);
        }

        body.dark-mode .autocomplete-suggestion:hover {
            background: rgba(59, 130, 246, 0.2);
        }

        /* Responsive: raised from 768px so the bottom-sheet + FAB toggle (instead of the
           always-open desktop side panel) kicks in for phones AND tablet-width viewports —
           at 768-991px the desktop panel was overlapping the search bar with no way to
           dismiss it. */
        @media (max-width: 991.98px) {
            .company-sidebar {
                top: auto;
                bottom: -110%;
                right: 0; left: 0;
                width: 100%;
                height: 55vh;
                border-radius: 24px 24px 0 0;
                z-index: 2500;
                transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1);
            }
            .company-sidebar.open {
                bottom: 0;
            }
            .leaflet-control-geocoder {
                width: 90vw !important;
                left: 5vw !important;
                transform: none !important;
            }
            .globe-control-panel {
                top: auto;
                bottom: -110%; /* Hidden off-screen by default */
                right: 0; left: 0; width: 100%;
                max-height: 75vh; overflow-y: auto;
                padding: 20px;
                box-sizing: border-box;
                border-radius: 24px 24px 0 0;
                transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1);
                box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
                background: rgba(255,255,255,0.98);
            }
            body.dark-mode .globe-control-panel {
                background: rgba(15,23,42,0.98);
            }
            .filter-menu-box {
                background: transparent !important;
                box-shadow: none !important;
                border: none !important;
                padding: 0 !important;
                border-radius: 0 !important;
                backdrop-filter: none !important;
            }
            .globe-control-panel.panel-open {
                bottom: 0;
            }
            /* On the mobile bottom-sheet, keep it dismissed downward (not sideways) while
               the header search is active — same drawer motion it already uses. */
            .tb-landing--header-only:has(.tb-landing__header--search-active) ~ main .globe-control-panel {
                bottom: -110% !important;
                transform: none;
                opacity: 1;
            }
            #mobilePanelToggle {
                display: flex !important;
            }
            .map-wrapper { height: 100vh; /* fallback */ }
        }
        /* Animated Route Flow */
        .animated-route {
            animation: flowDash 20s linear infinite;
        }
        @keyframes flowDash {
            to { stroke-dashoffset: -1000; }
        }

        /* ===== PRO PDF / PRINT STYLESHEET ===== */
        @media print {
            @page { size: landscape; margin: 12mm 15mm; }
            /* The report is moved to be a direct child of the page body just before
               printing (generateProReport also hides the other top-level nodes via JS).
               This sidesteps the map wrapper fixed height and overflow that was clipping
               the report to a single page. */
            html, body {
                height: auto !important; min-height: 0 !important; max-height: none !important;
                overflow: visible !important; background: #fff !important;
            }
            #pro-pdf-report {
                display: block !important;
                position: static !important;
                width: 100% !important; background: white;
                color: #1e293b;
                box-sizing: border-box;
                font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
                font-size: 10pt;
                line-height: 1.5;
                -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
            }
            #pro-pdf-report * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
            /* ---- Report Header ---- */
            .rpt-header {
                display: flex; justify-content: space-between; align-items: center;
                border-bottom: 3px solid #0369a1; padding-bottom: 10px; margin-bottom: 18px;
            }
            .rpt-header-left h1 { margin: 0; font-size: 18pt; color: #0369a1; letter-spacing: -0.5px; }
            .rpt-wordmark {
                font-family: 'Segoe UI Semibold', 'Trebuchet MS', 'Helvetica Neue', Arial, sans-serif;
                font-size: 22pt; font-weight: 800; letter-spacing: -0.5px;
                color: #0f172a; line-height: 1;
            }
            .rpt-wordmark__b { color: #0ea5e9; }
            .rpt-header-left p  { margin: 2px 0 0; font-size: 9pt; color: #64748b; }
            .rpt-header-right   { text-align: right; font-size: 8.5pt; color: #64748b; line-height: 1.7; }
            .rpt-header-right strong { color: #1e293b; }
            
            /* ---- Executive Summary Box ---- */
            .rpt-summary {
                display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
                margin-bottom: 18px;
            }
            .rpt-summary-item {
                border: 1px solid #e2e8f0; border-top: 3px solid #0369a1;
                border-radius: 4px; padding: 10px 12px; background: #f8fafc;
                print-color-adjust: exact; -webkit-print-color-adjust: exact;
            }
            .rpt-summary-item .label { font-size: 7.5pt; text-transform: uppercase; color: #94a3b8; letter-spacing: 0.5px; }
            .rpt-summary-item .value { font-size: 13pt; font-weight: 700; color: #0369a1; }
            .rpt-summary-item .sub   { font-size: 8pt; color: #64748b; }
            
            /* ---- Fastest Route Recommendation ---- */
            .rpt-fastest-rec {
                border: 2px solid #10b981; background: #ecfdf5; border-radius: 6px;
                padding: 12px; margin-bottom: 18px;
                print-color-adjust: exact; -webkit-print-color-adjust: exact;
            }
            .rpt-fastest-rec-title {
                color: #047857; font-weight: 700; font-size: 12pt; margin-bottom: 8px;
                display: flex; align-items: center; gap: 8px;
            }
            
            /* ---- Section Title ---- */
            .rpt-section-title {
                font-size: 11pt; font-weight: 700; color: #0f172a;
                border-left: 4px solid #0369a1; padding-left: 8px;
                margin: 20px 0 10px 0; text-transform: uppercase; letter-spacing: 0.5px;
                page-break-after: avoid;
            }
            
            /* ---- Trade Profile Grid ---- */
            .rpt-profiles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
            .rpt-profile-card {
                border: 1px solid #cbd5e1; border-radius: 4px; overflow: hidden;
                page-break-inside: avoid;
                print-color-adjust: exact; -webkit-print-color-adjust: exact;
            }
            .rpt-profile-card-header {
                background: #0369a1; color: white; padding: 7px 12px;
                font-size: 10pt; font-weight: 600;
            }
            .rpt-profile-card-body { padding: 0; }
            .rpt-profile-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
            .rpt-profile-table tr td { padding: 5px 10px; border-bottom: 1px solid #f1f5f9; }
            .rpt-profile-table tr td:first-child { color: #64748b; font-weight: 500; width: 38%; }
            .rpt-profile-table tr:last-child td { border-bottom: none; }
            
            /* ---- Route Cards Grid ---- */
            .rpt-cards-grid {
                display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px;
            }
            .rpt-card {
                width: calc(33.333% - 7px);
                border: 1px solid #e2e8f0; border-radius: 6px; padding: 10px;
                page-break-inside: avoid; break-inside: avoid; background: #fff;
                print-color-adjust: exact; -webkit-print-color-adjust: exact;
                box-sizing: border-box;
            }
            .rpt-card-header {
                font-weight: 700; font-size: 9.5pt; color: #1e293b; margin-bottom: 6px;
                padding-bottom: 6px; border-bottom: 1px dashed #cbd5e1;
            }
            .rpt-card-path { font-size: 8.5pt; color: #334155; line-height: 1.4; margin-bottom: 8px; }
            
            /* ---- Calc HUD reused in Print ---- */
            .calc-hud {
                background: #f8fafc !important; border: 1px solid #e2e8f0; border-radius: 4px; padding: 6px 8px; font-size: 8pt;
                print-color-adjust: exact; -webkit-print-color-adjust: exact;
            }
            .rpt-fastest-rec .calc-hud {
                display: grid; grid-template-columns: 1fr 1fr; gap: 4px 15px;
            }
            .calc-row { display: flex; justify-content: space-between; margin-bottom: 2px; }
            .calc-label { color: #64748b; display: flex; align-items: center; gap: 4px; }
            .calc-val { font-weight: 600; color: #0f172a; }
            .calc-bar-bg { display: none; } /* hide bars for print */
            
            .rpt-badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 7.5pt; font-weight: 600; }
            .rpt-badge-sea  { background: #dbeafe; color: #1d4ed8; }
            .rpt-badge-air  { background: #f3e8ff; color: #7c3aed; }
            .rpt-badge-land { background: #fef3c7; color: #b45309; }
            .rpt-badge-rail { background: #e5e7eb; color: #374151; }
            .rpt-badge-hub  { background: #f5f3ff; color: #7c3aed; }
            .rpt-tradeoff {
                background: #fffbeb; border: 1px solid #fcd34d; border-left: 3px solid #f59e0b;
                border-radius: 4px; padding: 8px 12px; font-size: 9pt; color: #92400e; margin-bottom: 14px;
            }
            /* ---- Route ribbon ---- */
            .rpt-ribbon {
                display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
                background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 14px;
            }
            .rpt-ribbon__end { font-size: 11pt; font-weight: 700; color: #0f172a; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
            .rpt-ribbon__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
            .rpt-ribbon__dot--a { background: #0ea5e9; }
            .rpt-ribbon__dot--b { background: #f59e0b; }
            .rpt-ribbon__track { flex: 1; border-top: 2px dashed #cbd5e1; position: relative; height: 0; margin: 0 4px; }
            .rpt-ribbon__modes { position: relative; top: -11px; text-align: center; background: #f8fafc; display: inline-block; left: 50%; transform: translateX(-50%); padding: 0 8px; }
            .rpt-ribbon__mode { font-size: 8.5pt; font-weight: 700; margin: 0 5px; white-space: nowrap; }
            /* ---- Contents strip ---- */
            .rpt-toc { font-size: 8pt; color: #64748b; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
            .rpt-toc strong { color: #334155; }
            
            /* ---- Footer ---- */
            .rpt-footer {
                margin-top: 25px; border-top: 1px solid #e2e8f0;
                padding-top: 8px; display: flex; justify-content: space-between;
                font-size: 7.5pt; color: #94a3b8;
            }
            
            /* ---- No-data placeholder ---- */
            .rpt-empty { border: 1px dashed #cbd5e1; border-radius: 4px; padding: 14px; text-align:center; color:#94a3b8; font-size:9pt; margin-bottom:14px; }

            /* ---- Full combination tables (all possible routes) ---- */
            .rpt-table { width: 100%; border-collapse: collapse; font-size: 8pt; margin-bottom: 8px; }
            .rpt-table thead { display: table-header-group; }   /* repeat header on each printed page */
            .rpt-table thead th {
                background: #0369a1 !important; color: #fff !important; text-align: left; padding: 5px 7px;
                font-size: 7.5pt; font-weight: 600; border: 1px solid #0369a1;
                -webkit-print-color-adjust: exact; print-color-adjust: exact;
            }
            .rpt-table tbody td { padding: 4px 7px; border: 1px solid #e2e8f0; color: #1e293b; vertical-align: top; }
            .rpt-table tbody tr:nth-child(even) { background: #f8fafc; }
            .rpt-table tbody td small { color: #64748b; font-size: 7pt; }
            .rpt-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
            .rpt-table .rank { color: #94a3b8; text-align: center; width: 22px; }
            .rpt-table tr.is-best td { background: #ecfdf5 !important; }
            .rpt-table tr.is-best td:first-child::after { content: " ★"; color: #059669; }
            .rpt-table-note { font-size: 7.5pt; color: #64748b; margin: 2px 0 18px; }
            .rpt-port-summary {
                font-size: 8.5pt; color: #475569; background: #f1f5f9;
                padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; line-height: 1.5;
            }
            .rpt-port-summary strong { color: #0f172a; }
            /* keep big tables from breaking awkwardly across pages */
            .rpt-table tr { page-break-inside: avoid; }
        }

        /* Prevent image dragging and text selection on the map */
        #traidb-map {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        #traidb-map img, .leaflet-tile {
            -webkit-user-drag: none !important;
            user-drag: none !important;
            -webkit-touch-callout: none !important;
        }

        /* Subtle visual watermark overlay */
        .map-watermark-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 700; /* between tiles and controls */
            pointer-events: none;
            user-select: none;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .map-watermark-text {
            font-family: 'Poppins', sans-serif;
            font-weight: 900;
            font-size: 3.5rem;
            color: rgba(14, 165, 233, 0.0075); /* Extremely subtle blue tint in light mode (0.75% opacity) */
            text-transform: uppercase;
            letter-spacing: 6px;
            transform: rotate(-15deg);
            user-select: none;
            pointer-events: none;
            white-space: nowrap;
        }
        body.dark-mode .map-watermark-text {
            color: rgba(255, 255, 255, 0.0075); /* Extremely subtle white tint in dark mode (0.75% opacity) */
        }

/* Cluster hint under the layer toggles */
.map-legend-hint {
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-secondary, #94a3b8);
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    padding: 7px 10px;
    margin: 8px 0 4px;
}
.map-legend-hint i { color: #38bdf8; margin-right: 4px; }
.map-legend-hint strong { color: var(--text-primary, #e2e8f0); }

/* Glassmorphism Advanced Search Form */
.route-analysis-form .form-control,
.route-analysis-form .form-select {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #1e293b;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}
.route-analysis-form .form-control:focus,
.route-analysis-form .form-select:focus {
    background: rgba(255, 255, 255, 0.7);
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}
body.dark-mode .route-analysis-form .form-control,
body.dark-mode .route-analysis-form .form-select {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}
body.dark-mode .route-analysis-form .form-control:focus,
body.dark-mode .route-analysis-form .form-select:focus {
    background: rgba(15, 23, 42, 0.7);
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}
/* Ensure dark mode select options are visible */
body.dark-mode .route-analysis-form .form-select option {
    background: #1e293b;
    color: #f8fafc;
}
.route-analysis-form .form-floating label {
    color: rgba(30, 41, 59, 0.7);
}
body.dark-mode .route-analysis-form .form-floating label {
    color: rgba(248, 250, 252, 0.7);
}

/* Engineered Glass Buttons */
.btn-engineered {
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.btn-engineered.btn-primary {
    background: rgba(59, 130, 246, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.btn-engineered.btn-primary:hover {
    background: rgba(37, 99, 235, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}
.btn-engineered.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(30, 41, 59, 0.2);
    color: #1e293b;
}
.btn-engineered.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(30, 41, 59, 0.4);
    transform: translateY(-2px);
}
            
            .rpt-badge { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 7.5pt; font-weight: 600; }
            .rpt-badge-sea  { background: #dbeafe; color: #1d4ed8; }
            .rpt-badge-air  { background: #f3e8ff; color: #7c3aed; }
            .rpt-badge-land { background: #fef3c7; color: #b45309; }
            .rpt-badge-rail { background: #e5e7eb; color: #374151; }
            .rpt-badge-hub  { background: #f5f3ff; color: #7c3aed; }
            .rpt-tradeoff {
                background: #fffbeb; border: 1px solid #fcd34d; border-left: 3px solid #f59e0b;
                border-radius: 4px; padding: 8px 12px; font-size: 9pt; color: #92400e; margin-bottom: 14px;
            }
            /* ---- Route ribbon ---- */
            .rpt-ribbon {
                display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
                background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 14px;
            }
            .rpt-ribbon__end { font-size: 11pt; font-weight: 700; color: #0f172a; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
            .rpt-ribbon__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
            .rpt-ribbon__dot--a { background: #0ea5e9; }
            .rpt-ribbon__dot--b { background: #f59e0b; }
            .rpt-ribbon__track { flex: 1; border-top: 2px dashed #cbd5e1; position: relative; height: 0; margin: 0 4px; }
            .rpt-ribbon__modes { position: relative; top: -11px; text-align: center; background: #f8fafc; display: inline-block; left: 50%; transform: translateX(-50%); padding: 0 8px; }
            .rpt-ribbon__mode { font-size: 8.5pt; font-weight: 700; margin: 0 5px; white-space: nowrap; }
            /* ---- Contents strip ---- */
            .rpt-toc { font-size: 8pt; color: #64748b; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; }
            .rpt-toc strong { color: #334155; }
            
            /* ---- Footer ---- */
            .rpt-footer {
                margin-top: 25px; border-top: 1px solid #e2e8f0;
                padding-top: 8px; display: flex; justify-content: space-between;
                font-size: 7.5pt; color: #94a3b8;
            }
            
            /* ---- No-data placeholder ---- */
            .rpt-empty { border: 1px dashed #cbd5e1; border-radius: 4px; padding: 14px; text-align:center; color:#94a3b8; font-size:9pt; margin-bottom:14px; }

            /* ---- Full combination tables (all possible routes) ---- */
            .rpt-table { width: 100%; border-collapse: collapse; font-size: 8pt; margin-bottom: 8px; }
            .rpt-table thead { display: table-header-group; }   /* repeat header on each printed page */
            .rpt-table thead th {
                background: #0369a1 !important; color: #fff !important; text-align: left; padding: 5px 7px;
                font-size: 7.5pt; font-weight: 600; border: 1px solid #0369a1;
                -webkit-print-color-adjust: exact; print-color-adjust: exact;
            }
            .rpt-table tbody td { padding: 4px 7px; border: 1px solid #e2e8f0; color: #1e293b; vertical-align: top; }
            .rpt-table tbody tr:nth-child(even) { background: #f8fafc; }
            .rpt-table tbody td small { color: #64748b; font-size: 7pt; }
            .rpt-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
            .rpt-table .rank { color: #94a3b8; text-align: center; width: 22px; }
            .rpt-table tr.is-best td { background: #ecfdf5 !important; }
            .rpt-table tr.is-best td:first-child::after { content: " ★"; color: #059669; }
            .rpt-table-note { font-size: 7.5pt; color: #64748b; margin: 2px 0 18px; }
            .rpt-port-summary {
                font-size: 8.5pt; color: #475569; background: #f1f5f9;
                padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; line-height: 1.5;
            }
            .rpt-port-summary strong { color: #0f172a; }
            /* keep big tables from breaking awkwardly across pages */
            .rpt-table tr { page-break-inside: avoid; }
        }

        /* Prevent image dragging and text selection on the map */
        #traidb-map {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        #traidb-map img, .leaflet-tile {
            -webkit-user-drag: none !important;
            user-drag: none !important;
            -webkit-touch-callout: none !important;
        }

        /* Subtle visual watermark overlay */
        .map-watermark-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 700; /* between tiles and controls */
            pointer-events: none;
            user-select: none;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        .map-watermark-text {
            font-family: 'Poppins', sans-serif;
            font-weight: 900;
            font-size: 3.5rem;
            color: rgba(14, 165, 233, 0.0075); /* Extremely subtle blue tint in light mode (0.75% opacity) */
            text-transform: uppercase;
            letter-spacing: 6px;
            transform: rotate(-15deg);
            user-select: none;
            pointer-events: none;
            white-space: nowrap;
        }
        body.dark-mode .map-watermark-text {
            color: rgba(255, 255, 255, 0.0075); /* Extremely subtle white tint in dark mode (0.75% opacity) */
        }

/* Cluster hint under the layer toggles */
.map-legend-hint {
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-secondary, #94a3b8);
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    padding: 7px 10px;
    margin: 8px 0 4px;
}
.map-legend-hint i { color: #38bdf8; margin-right: 4px; }
.map-legend-hint strong { color: var(--text-primary, #e2e8f0); }

/* Advanced Search Form (Matches Route Analysis inputs) */
.route-analysis-form .form-control,
.route-analysis-form .form-select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    border-radius: 8px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}
.route-analysis-form .form-control:focus,
.route-analysis-form .form-select:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
body.dark-mode .route-analysis-form .form-control,
body.dark-mode .route-analysis-form .form-select {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}
body.dark-mode .route-analysis-form .form-control:focus,
body.dark-mode .route-analysis-form .form-select:focus {
    background: #0f172a;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}
/* Ensure select options are visible */
body.dark-mode .route-analysis-form .form-select option {
    background: #0f172a;
    color: #f8fafc;
}
.route-analysis-form .form-floating label {
    color: rgba(30, 41, 59, 0.7);
}
body.dark-mode .route-analysis-form .form-floating label {
    color: rgba(248, 250, 252, 0.7);
}

/* Engineered Glass Buttons */
.btn-engineered {
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.btn-engineered.btn-primary {
    background: rgba(59, 130, 246, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.btn-engineered.btn-primary:hover {
    background: rgba(37, 99, 235, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}
.btn-engineered.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(30, 41, 59, 0.2);
    color: #1e293b;
}
.btn-engineered.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(30, 41, 59, 0.4);
    transform: translateY(-2px);
}
body.dark-mode .btn-engineered.btn-outline-secondary {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}
body.dark-mode .btn-engineered.btn-outline-secondary:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Map Loading Overlay */
.map-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 1000; /* Above map but below controls if needed, or 3000 to cover everything */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}
body.dark-mode .map-loading-overlay {
    background: rgba(15, 23, 42, 0.6);
}
.map-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: map-spin 1s linear infinite;
    margin-bottom: 20px;
}
.map-loading-text {
    font-family: Poppins, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: 0.5px;
}
body.dark-mode .map-loading-text {
    color: #f8fafc;
}
@keyframes map-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Modern Engineered Buttons */
.btn-engineered {
    border-radius: 50px !important;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 10px 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid transparent;
}

.btn-engineered:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-engineered:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* Specific styles for Primary Button (Search Map) */
.btn-engineered.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    border: none;
}

.btn-engineered.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

/* Specific styles for Outline Button (Open in Search Result) */
.btn-engineered.btn-outline-secondary {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #cbd5e1;
    color: #475569;
}

body.dark-mode .btn-engineered.btn-outline-secondary {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #475569;
    color: #cbd5e1;
}

.btn-engineered.btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

body.dark-mode .btn-engineered.btn-outline-secondary:hover {
    background: #334155;
    border-color: #64748b;
    color: #f1f5f9;
}

/* ==========================================
   Custom Company Logo Pin Marker
   ========================================== */
.custom-company-pin {
    position: relative;
    width: 44px;
    height: 52px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom center;
}

.custom-company-pin:hover {
    transform: scale(1.2) translateY(-4px);
    z-index: 1000 !important;
}

.custom-company-pin .pin-avatar {
    width: 42px;
    height: 42px;
    background: #ffffff;
    border: 2.5px solid #3b82f6;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(59, 130, 246, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-company-pin:hover .pin-avatar {
    border-color: #2563eb;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45), 0 0 0 4px rgba(59, 130, 246, 0.35);
}

.custom-company-pin .pin-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
    background: #ffffff;
    border-radius: 50%;
}

.custom-company-pin .pin-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    line-height: 1.2;
    z-index: 10;
}

.custom-company-pin .pin-pointer {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #3b82f6;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

/* Company Tooltip styling */
.company-map-tooltip {
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-family: Poppins, sans-serif !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
    pointer-events: none;
}

.company-map-tooltip::before {
    border-top-color: rgba(15, 23, 42, 0.92) !important;
}

/* ==========================================
   Server-Side Cluster Bubbles
   ========================================== */
.server-cluster-bubble {
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    border: 2.5px solid #ffffff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45), 0 0 0 4px rgba(59, 130, 246, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: Poppins, sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
    user-select: none;
}

.server-cluster-bubble:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.65), 0 0 0 6px rgba(59, 130, 246, 0.4);
}

.server-cluster-bubble.cluster-sm {
    width: 42px;
    height: 42px;
    font-size: 0.85rem;
}

.server-cluster-bubble.cluster-md {
    width: 50px;
    height: 50px;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
}

.server-cluster-bubble.cluster-lg {
    width: 58px;
    height: 58px;
    font-size: 1.05rem;
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45), 0 0 0 4px rgba(139, 92, 246, 0.25);
}

.server-cluster-bubble .cluster-num {
    line-height: 1;
}

/* ==========================================
   Sidebar Breakdown & Location Precision Badges
   ========================================== */
.sidebar-counts-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.sidebar-pill-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sidebar-pill-tag.tag-total {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}
body.dark-mode .sidebar-pill-tag.tag-total {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.35);
}

.sidebar-pill-tag.tag-exact {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
body.dark-mode .sidebar-pill-tag.tag-exact {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}

.sidebar-pill-tag.tag-approx {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
body.dark-mode .sidebar-pill-tag.tag-approx {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.35);
}

.badge-approximate-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #d97706;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 6px;
}
body.dark-mode .badge-approximate-pill {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
}

.badge-exact-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #059669;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 6px;
}
body.dark-mode .badge-exact-pill {
    color: #34d399;
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.35);
}

/* Visual Marker distinction for approximate pin locations */
.custom-company-pin.pin-approximate .pin-avatar {
    border-color: #f59e0b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(245, 158, 11, 0.3);
}
.custom-company-pin.pin-approximate .pin-pointer {
    border-top-color: #f59e0b;
}

/* ==========================================
   Navigation / Directions Button & Dropdown
   ========================================== */
.company-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-dropdown-wrapper {
    position: relative;
    display: inline-flex;
}

.nav-direction-btn {
    font-size: 0.82rem;
    font-weight: 600;
    color: #059669;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-direction-btn:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

body.dark-mode .nav-direction-btn {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}

.nav-dropdown-wrapper {
    position: relative;
    display: inline-flex;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
    padding: 6px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.company-map-card.dropdown-open {
    z-index: 500 !important;
}

body.dark-mode .nav-dropdown-menu {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    transform: translateX(2px);
}

body.dark-mode .nav-dropdown-item {
    color: #f1f5f9;
}

body.dark-mode .nav-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.nav-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.nav-dropdown-item i.apple-icon {
    color: #334155;
}

body.dark-mode .nav-dropdown-item i.apple-icon {
    color: #ffffff !important;
}

/* ==========================================
   Desktop Collapsible HUD Dock & Expand Tab
   ========================================== */
.globe-control-panel.panel-collapsed {
    transform: translateX(calc(-100% - 30px)) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.panel-collapse-btn {
    color: #64748b;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.panel-collapse-btn:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}
body.dark-mode .panel-collapse-btn {
    color: #94a3b8;
}
body.dark-mode .panel-collapse-btn:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

.panel-expand-tab {
    position: absolute;
    top: 20px;
    left: 12px;
    z-index: 850;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 12px;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.82rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    animation: tabSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.panel-expand-tab:hover {
    background: #ffffff;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.25);
}
body.dark-mode .panel-expand-tab {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(56, 189, 248, 0.4);
    color: #f8fafc;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
body.dark-mode .panel-expand-tab:hover {
    background: rgba(15, 23, 42, 0.98);
    border-color: #38bdf8;
    box-shadow: 0 12px 28px rgba(56, 189, 248, 0.35);
}
@keyframes tabSlideIn {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   TraidbMap Route-to-RFQ Conversion Card
   ========================================== */
.trace-rfq-card {
    margin-top: 14px;
    padding: 13px 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.06));
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.12);
}
body.dark-mode .trace-rfq-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.08));
    border-color: rgba(16, 185, 129, 0.5);
}
.trace-rfq-header {
    font-size: 0.88rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
body.dark-mode .trace-rfq-header {
    color: #34d399;
}
.trace-rfq-desc {
    font-size: 0.76rem;
    opacity: 0.85;
    line-height: 1.4;
    margin-bottom: 10px;
}
.btn-trace-rfq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.84rem;
    border-radius: 8px;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    transition: all 0.25s ease;
}
.btn-trace-rfq:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45);
    color: #ffffff !important;
}

/* Port-to-CompanyMap Ecosystem Link */
.btn-port-nearby-suppliers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 12px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
    transition: all 0.2s ease;
}
.btn-port-nearby-suppliers:hover {
    background: linear-gradient(135deg, #0369a1, #0284c7);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

/* ==========================================
   CompanyMap Verified Pins & Synergy Actions
   ========================================== */
.custom-company-pin.pin-verified .pin-avatar {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35), 0 4px 16px rgba(245, 158, 11, 0.45) !important;
}
.custom-company-pin.pin-verified .pin-pointer {
    border-top-color: #f59e0b !important;
}
.pin-verified-star {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: #f59e0b;
    color: #0f172a;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}
.badge-status-pill.pill-verified {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
body.dark-mode .badge-status-pill.pill-verified {
    background: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.45);
}
.company-map-card.card-verified-glow {
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
}
body.dark-mode .company-map-card.card-verified-glow {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}
.btn-card-action.btn-chat-supplier {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.3);
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}
.btn-card-action.btn-chat-supplier:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}
body.dark-mode .btn-card-action.btn-chat-supplier {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
}
body.dark-mode .btn-card-action.btn-chat-supplier:hover {
    background: #0284c7;
    color: #ffffff;
}
.btn-card-action.btn-freight-port {
    font-size: 0.82rem;
    font-weight: 600;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}
.btn-card-action.btn-freight-port:hover {
    background: #8b5cf6;
    color: #ffffff;
    border-color: #8b5cf6;
}
body.dark-mode .btn-card-action.btn-freight-port {
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.35);
}
body.dark-mode .btn-card-action.btn-freight-port:hover {
    background: #8b5cf6;
    color: #ffffff;
}

/* ============================================================
   RICH INTERACTIVE POPUPS & PASSAGES (TraidbMap Enhancements)
   ============================================================ */

.rich-port-popup {
    font-family: inherit;
    min-width: 260px;
    max-width: 330px;
    padding: 2px;
    color: #1e293b;
    line-height: 1.45;
}

.rpp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.rpp-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.rpp-icon.sea { background: rgba(14, 165, 233, 0.14); color: #0284c7; }
.rpp-icon.land { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.rpp-icon.passage { background: rgba(6, 182, 212, 0.16); color: #0891b2; }
.rpp-icon.route { background: rgba(59, 130, 246, 0.14); color: #2563eb; }
.rpp-icon.air { background: rgba(139, 92, 246, 0.14); color: #7c3aed; }
.rpp-icon.rail { background: rgba(107, 114, 128, 0.14); color: #4b5563; }

.rpp-title-wrap {
    flex: 1;
    min-width: 0;
}

.rpp-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    word-break: break-word;
}
.rpp-farsi {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.rpp-subtitle {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.rpp-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
}
.rpp-badge.sea { background: #e0f2fe; color: #0369a1; }
.rpp-badge.land { background: #fef3c7; color: #b45309; }
.rpp-badge.passage { background: #cffafe; color: #0e7490; }
.rpp-badge.route { background: #dbeafe; color: #1e40af; }
.rpp-badge.air { background: #ede9fe; color: #6d28d9; }
.rpp-badge.rail { background: #f3f4f6; color: #374151; }

.rpp-desc {
    font-size: 0.77rem;
    color: #334155;
    margin: 6px 0 8px 0;
    line-height: 1.4;
}

.rpp-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    font-size: 0.74rem;
    background: rgba(0, 0, 0, 0.03);
    padding: 6px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.rpp-meta-item.full {
    grid-column: span 2;
}
.rpp-meta-item span {
    color: #64748b;
}
.rpp-meta-item strong {
    color: #0f172a;
    font-weight: 600;
}

.rpp-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.rpp-actions-row {
    display: flex;
    gap: 6px;
}
.rpp-actions-row .btn-rpp-act {
    flex: 1;
}

.btn-rpp-act {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.2;
}

.btn-rpp-act.origin {
    background: #0284c7;
    color: #ffffff;
}
.btn-rpp-act.origin:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.35);
}

.btn-rpp-act.dest {
    background: #d97706;
    color: #ffffff;
}
.btn-rpp-act.dest:hover {
    background: #b45309;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.35);
}

.btn-rpp-act.trace-cross {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 0.8rem;
    padding: 8px 10px;
}
.btn-rpp-act.trace-cross:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-rpp-act.corridor-trace {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}
.btn-rpp-act.corridor-trace:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.rpp-connected-ports {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}
.rpp-cp-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}
.rpp-cp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.rpp-cp-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0369a1;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.rpp-cp-chip:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}

/* Strategic Passage Pulsing Marker */
.passage-marker-container {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.passage-marker-pulse {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.35);
    animation: passagePulse 2s infinite ease-out;
}
.passage-marker-core {
    position: relative;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #06b6d4;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 8px;
    z-index: 2;
}

@keyframes passagePulse {
    0% { transform: scale(0.6); opacity: 1; }
    70% { transform: scale(2.2); opacity: 0; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* Toast Banner */
.map-toast-notification {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f8fafc;
    padding: 9px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 3000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: toastFadeIn 0.3s ease;
    pointer-events: auto;
}
.map-toast-notification i {
    color: #38bdf8;
    font-size: 1rem;
}
@keyframes toastFadeIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Dark mode overrides */
body.dark-mode .rich-port-popup {
    color: #e2e8f0;
}
body.dark-mode .rpp-header {
    border-bottom-color: rgba(255,255,255,0.1);
}
body.dark-mode .rpp-title {
    color: #f8fafc;
}
body.dark-mode .rpp-farsi {
    color: #94a3b8;
}
body.dark-mode .rpp-subtitle {
    color: #94a3b8;
}
body.dark-mode .rpp-desc {
    color: #cbd5e1;
}
body.dark-mode .rpp-meta-grid {
    background: rgba(255, 255, 255, 0.05);
}
body.dark-mode .rpp-meta-item span {
    color: #94a3b8;
}
body.dark-mode .rpp-meta-item strong {
    color: #f1f5f9;
}
body.dark-mode .rpp-connected-ports {
    border-top-color: rgba(255,255,255,0.1);
}
body.dark-mode .rpp-cp-label {
    color: #94a3b8;
}
body.dark-mode .rpp-cp-chip {
    background: #1e293b;
    border-color: #334155;
    color: #38bdf8;
}
body.dark-mode .rpp-cp-chip:hover {
    background: #0284c7;
    color: #ffffff;
}
body.dark-mode .rpp-badge.air {
    background: rgba(139, 92, 246, 0.25);
    color: #c4b5fd;
}
body.dark-mode .rpp-badge.rail {
    background: rgba(156, 163, 175, 0.2);
    color: #e5e7eb;
}

/* Custom Tooltip Styling for Logistics Nodes */
.traidb-map-tooltip,
.leaflet-tooltip {
    background: rgba(15, 23, 42, 0.92) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px !important;
    color: #f8fafc !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
    letter-spacing: 0.02em !important;
    pointer-events: none !important;
    user-select: none !important;
}
.traidb-map-tooltip:before {
    border-top-color: rgba(15, 23, 42, 0.92) !important;
}
.traidb-route-hit-line {
    cursor: pointer !important;
    pointer-events: stroke !important;
}
.leaflet-interactive {
    cursor: pointer !important;
}

/* Cluster Popup Styling */
.rpp-cluster-list {
    max-height: 180px;
    overflow-y: auto;
    margin: 8px -4px 0 -4px;
    padding: 2px 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rpp-cluster-item {
    padding: 6px 10px;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0369a1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.rpp-cluster-item:hover {
    background: #0ea5e9;
    color: #ffffff;
    transform: translateX(3px);
}
.rpp-cluster-item:hover i {
    color: #ffffff !important;
}
.rpp-cluster-more {
    font-size: 0.75rem;
    text-align: center;
    color: #64748b;
    padding: 4px;
    font-style: italic;
}
body.dark-mode .rpp-cluster-item {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.3);
    color: #38bdf8;
}
body.dark-mode .rpp-cluster-item:hover {
    background: #0284c7;
    color: #ffffff;
}
body.dark-mode .rpp-cluster-more {
    color: #94a3b8;
}

/* ── WATER BODY LABELS (PERSIAN GULF, CASPIAN SEA, ETC.) ── */
.water-body-container {
    pointer-events: none !important;
    user-select: none !important;
    text-align: center;
    white-space: nowrap;
}
.water-body-label {
    display: inline-block;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #0369a1;
    text-shadow: 0 0 4px #ffffff, 0 0 8px #ffffff, 0 0 14px rgba(255, 255, 255, 0.9), 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: font-size 0.2s ease, opacity 0.2s ease;
    line-height: 1.1;
}
.water-body-sub {
    display: block;
    font-size: 0.6em;
    font-weight: 600;
    letter-spacing: 0.12em;
    opacity: 0.8;
    margin-top: 2px;
}
body.dark-mode .water-body-label {
    color: #38bdf8;
    text-shadow: 0 0 5px #0f172a, 0 0 10px #0f172a, 0 0 16px rgba(56, 189, 248, 0.5);
}

/* ── LOCATION INSPECTOR & PIN MARKER ── */
.custom-pin-marker {
    background: transparent !important;
    border: none !important;
}
.pin-marker-container {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pin-marker-pulse {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.35);
    animation: pinPulse 2s infinite ease-out;
}
@keyframes pinPulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}
.pin-marker-core {
    position: relative;
    width: 30px;
    height: 30px;
    background: #ef4444;
    color: #ffffff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    border: 2px solid #ffffff;
}
.pin-marker-core i {
    transform: rotate(45deg);
    font-size: 0.9rem;
}

.rpp-icon.pin {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-copy-coords {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.2s ease;
}
.btn-copy-coords:hover {
    background: #0ea5e9;
    color: #ffffff;
    border-color: #0ea5e9;
}
body.dark-mode .btn-copy-coords {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f8fafc;
}

/* External Navigation Buttons */
.rpp-external-nav {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.rpp-external-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
body.dark-mode .rpp-external-title {
    color: #94a3b8;
}
.rpp-nav-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.btn-nav-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
    text-align: center;
}
.btn-nav-map.google-maps {
    background: #ea4335;
    color: #ffffff !important;
}
.btn-nav-map.google-maps:hover {
    background: #dc2626;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.35);
}
.btn-nav-map.google-earth {
    background: #1a73e8;
    color: #ffffff !important;
}
.btn-nav-map.google-earth:hover {
    background: #1557b0;
    box-shadow: 0 3px 8px rgba(26, 115, 232, 0.35);
}
.btn-nav-map.osm {
    background: #059669;
    color: #ffffff !important;
}
.btn-nav-map.osm:hover {
    background: #047857;
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35);
}
.btn-nav-map.bing {
    background: #008272;
    color: #ffffff !important;
}
.btn-nav-map.bing:hover {
    background: #006b5e;
    box-shadow: 0 3px 8px rgba(0, 130, 114, 0.35);
}

.btn-rpp-act.remove-pin {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    margin-top: 6px;
    width: 100%;
}
.btn-rpp-act.remove-pin:hover {
    background: #ef4444;
    color: #ffffff;
}







