/* ── Custom Select (replaces native <select> to avoid macOS native dropdown UI) ──
   Base styles used by both the map toolbar and panel dropdowns.              ── */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 2px;
    border: 1px solid rgba(var(--primary-rgb), 0.35);
    font-size: 11px;
    font-family: var(--font-secondary);
    font-weight: 600;
    color: var(--text-primary);
    background: var(--surface-container);
    cursor: pointer;
    outline: none;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}

.custom-select-trigger:hover {
    border-color: rgba(var(--primary-rgb), 0.55);
    background: var(--surface-container-high);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--primary);
}

.custom-select-trigger svg {
    flex-shrink: 0;
    color: rgba(28, 28, 25, 0.45);
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-trigger svg {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface-container-low);
    border: 1px solid rgba(var(--primary-rgb), 0.35);
    border-radius: 2px;
    box-shadow: 0 6px 20px rgba(28, 28, 25, 0.14);
    z-index: 200;
    max-height: min(320px, calc(100vh - 160px));
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--primary-rgb), 0.45) transparent;
}

.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.4);
    border-radius: 999px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.65);
}

.custom-select-dropdown.hidden {
    display: none;
}

.custom-select-option {
    width: 100%;
    display: block;
    padding: 9px 12px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 11px;
    font-family: var(--font-secondary);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.12s;
}

.custom-select-option:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

.custom-select-option.selected {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}

.farm-group-header {
    padding: 6px 12px 2px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    pointer-events: none;
    user-select: none;
}

.custom-select-option--mission {
    padding-left: 22px;
}

.custom-select-option--row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-select-option-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-option-farm {
    flex-shrink: 0;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 500;
    color: rgba(61, 61, 58, 0.55);
}

/* Scrollbar Styling */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: #2d6630;
}

/* Responsive Design */
@media (max-width: 768px) {
    .control-panel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }
    
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Notification Animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Animated Route Line */
@keyframes routeShine {
    0% {
        filter: drop-shadow(0 0 2px #698F3F) hue-rotate(0deg) brightness(1);
    }
    25% {
        filter: drop-shadow(0 0 8px #698F3F) hue-rotate(30deg) brightness(1.3);
    }
    50% {
        filter: drop-shadow(0 0 12px #698F3F) hue-rotate(60deg) brightness(1.5);
    }
    75% {
        filter: drop-shadow(0 0 8px #698F3F) hue-rotate(30deg) brightness(1.3);
    }
    100% {
        filter: drop-shadow(0 0 2px #698F3F) hue-rotate(0deg) brightness(1);
    }
}

@keyframes routeDash {
    to {
        stroke-dashoffset: -40;
    }
}

.animated-route {
    stroke-dasharray: 10, 10;
    animation: routeShine 2s ease-in-out infinite, routeDash 1s linear infinite;
}

@keyframes mpRouteDash {
    to { stroke-dashoffset: -30; }
}

@keyframes mpRouteGlow {
    0%, 100% { filter: drop-shadow(0 0 3px #5BB85D) brightness(1.1); }
    50%       { filter: drop-shadow(0 0 10px #6EE370) brightness(1.6); }
}

.animated-mp-route {
    stroke-dasharray: 12, 6;
    animation: mpRouteGlow 1.8s ease-in-out infinite, mpRouteDash 0.8s linear infinite;
}

/* Route start marker — red, draggable */
.route-start-marker {
    background: transparent;
    border: none;
    cursor: grab;
}
.route-start-marker:active { cursor: grabbing; }
.start-point-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.45));
}
.start-point-label {
    background: rgba(40, 8, 8, 0.9);
    color: #ffd6d3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 5px 10px;
    border-radius: 7px;
    border: 1px solid rgba(229, 57, 53, 0.6);
    white-space: nowrap;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 5px;
}
.start-point-badge {
    width: 34px;
    height: 34px;
    background: #E53935;
    border: 2.5px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    animation: startPulse 2.2s ease-in-out infinite;
}
.start-point-stem {
    width: 2px;
    height: 12px;
    background: #fff;
    border-radius: 1px;
    opacity: 0.9;
}
@keyframes startPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7); }
    50%       { box-shadow: 0 0 0 9px rgba(229, 57, 53, 0); }
}

/* Sunlight Mode */
body.sunlight-mode {
    background: var(--sunlight-bg);
    color: var(--sunlight-text);
}

body.sunlight-mode .control-panel {
    background: var(--sunlight-panel);
    border-color: var(--sunlight-text);
}

body.sunlight-mode .panel-content {
    background: var(--sunlight-panel);
}

body.sunlight-mode .panel-header {
    background: var(--sunlight-panel);
    border-color: var(--sunlight-text);
}

body.sunlight-mode .panel-header h2,
body.sunlight-mode .text-primary {
    color: var(--sunlight-text);
}

body.sunlight-mode .text-secondary {
    color: #CCCC99;
}

body.sunlight-mode .btn-primary {
    background: var(--off-cream);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.sunlight-mode .tab.active {
    background: var(--off-cream);
    color: var(--text-primary);
}


/* Offline Indicator */
.connection-status {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid;
    backdrop-filter: blur(8px);
}

.connection-status.online {
    background: var(--green-light);
    border-color: var(--deep-green);
    color: var(--deep-green);
}

.connection-status.offline {
    background: var(--green-light);
    border-color: var(--deep-green);
    color: var(--deep-green);
}

.connection-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Pre-flight Checklist */
.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 8px;
    background: var(--cream-white);
    transition: all 0.15s ease;
}

.checklist-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--green-primary);
}

.checklist-item label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.checklist-item:has(input:checked) {
    background: var(--green-light);
    border-color: var(--green-primary);
}


/* ─── Species Info Side Panel ───────────────────────────────────────────── */
/* Matches control-panel dimensions; appears immediately to its right */
.species-panel {
    position: fixed;
    top: 12px;
    /* sidebar-width + panel-left-offset(12) + panel-width(380) + gap(10) */
    left: calc(var(--sidebar-width) + 12px + 380px + 10px);
    width: 380px;
    max-height: calc(100vh - 24px);
    background: #ffffff;
    border-radius: var(--modal-radius);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    box-shadow: 0 8px 40px rgba(28, 28, 25, 0.18);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.species-panel.hidden {
    display: none;
}

/* Position the X button in the top-right corner of the species panel header */
.species-panel .close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    color: var(--text-primary);
}

.species-panel .close-modal:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
}

.species-panel-body {
    overflow-y: auto;
    padding: 24px;
    flex: 1;
}

/* Horizontal scrollable image gallery */
.species-gallery {
    display: flex;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.species-gallery img {
    flex: 0 0 auto;
    width: 240px;
    aspect-ratio: 3/2;
    scroll-snap-align: start;
    object-fit: cover;
    border-radius: 6px;
    border: var(--border-thick);
    cursor: pointer;
    transition: opacity 0.15s;
}

.species-gallery img:hover {
    opacity: 0.85;
}

.weed-info-section {
    margin-bottom: 20px;
}

.weed-info-section h4 {
    font-family: var(--font-tertiary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(28, 28, 25, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.weed-info-section p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* ─── Settings Modal ─────────────────────────────────────────────────────── */
.settings-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.map-theme-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.map-theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 10px 6px;
    background: var(--cream-white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: var(--font-tertiary);
}

.map-theme-card:hover {
    border-color: var(--green-primary);
}

.map-theme-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
}

.map-theme-preview {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
}

/* Colour swatches as stand-ins for tile thumbnails */
.map-theme-preview--satellite { background: linear-gradient(135deg, #2d4a1e 0%, #3a6b2a 40%, #1a3a10 70%, #4a7a35 100%); }
.map-theme-preview--hybrid    { background: linear-gradient(135deg, #2d4a1e 0%, #3a6b2a 40%, #c8b89a 70%, #8a7a6a 100%); }
.map-theme-preview--streets   { background: linear-gradient(135deg, #f5f5dc 0%, #e8e0d0 40%, #d0c8b8 70%, #c8baa8 100%); }
.map-theme-preview--terrain   { background: linear-gradient(135deg, #8ab87a 0%, #6a9a5a 30%, #a8c890 60%, #4a7a4a 100%); }
.map-theme-preview--dark      { background: linear-gradient(135deg, #1a1f2e 0%, #252b3a 40%, #1e2435 70%, #2a3045 100%); }

.tile-theme-preview--rgb          { background: linear-gradient(135deg, #6aad6e 30%, #8bc34a 60%, #c8a96e 100%); }
.tile-theme-preview--plant-health { background: linear-gradient(135deg, #8B4513 0%, #c8a000 50%, #2d7a2d 100%); }

.tile-theme-grid { grid-template-columns: repeat(5, 1fr); }

/* ── Floating job progress widget ─────────────────────────────────────────── */
.job-progress-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.97);
    color: var(--text-primary);
    border-radius: var(--modal-radius);
    padding: 12px 14px;
    width: 280px;
    box-shadow: 0 4px 20px rgba(28, 28, 25, 0.15);
    border: 1px solid var(--border-color);
    cursor: pointer;
    z-index: 1100;
    transition: box-shadow 0.2s;
}
.job-progress-widget:hover { box-shadow: 0 6px 24px rgba(28, 28, 25, 0.18); }
.job-progress-widget.hidden { display: none; }
.job-progress-widget-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.job-progress-widget-icon { font-size: 18px; flex-shrink: 0; color: var(--primary); }
.job-progress-widget-text { flex: 1; min-width: 0; }
.job-progress-widget-text span {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
}
.job-progress-widget-track {
    background: var(--surface-container-high);
    border-radius: 4px;
    height: 4px;
    overflow: hidden;
}
.job-progress-widget-bar {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
    transition: width 0.5s ease;
}
.job-progress-widget-cancel {
    background: none;
    border: none;
    color: rgba(28, 28, 25, 0.4);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    flex-shrink: 0;
    border-radius: 4px;
    line-height: 1;
}
.job-progress-widget-cancel:hover { color: var(--text-primary); background: var(--surface-container); }

/* ─── Coordinates Bar — bottom center of .main-content (same axis as .map-toolbar) ─ */
.coords-bar {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--floating-island-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--floating-island-border);
    border-radius: var(--radius-lg);
    padding: 8px 16px;
    z-index: 1040;
    pointer-events: none;
    box-shadow: 0 2px 12px rgba(28, 28, 25, 0.12);
}

.coords-bar.hidden { display: none; }


.coords-label {
    font-size: 9px;
    font-weight: 700;
    color: rgba(28, 28, 25, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-secondary);
}

.coords-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-secondary);
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}

.coords-divider {
    width: 1px;
    height: 16px;
    background: rgba(var(--primary-rgb), 0.2);
    flex-shrink: 0;
}

/* ─── Location Search Autocomplete ─────────────────────────────────────── */
.top-bar-search {
    position: relative;
}

.location-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface-container-low);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow: hidden;
    min-width: 280px;
}

.location-suggestions.hidden { display: none; }

.location-suggestion-item {
    padding: 9px 14px;
    font-size: 11px;
    font-family: var(--font-secondary);
    font-weight: 500;
    color: rgba(28, 28, 25, 0.8);
    cursor: pointer;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.15);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.1s, color 0.1s;
}

.location-suggestion-item:last-child { border-bottom: none; }

.location-suggestion-item:hover {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--text-primary);
}

.location-suggestion-item .suggestion-main {
    font-weight: 600;
    color: var(--text-primary);
}

.location-suggestion-item .suggestion-sub {
    font-size: 10px;
    color: rgba(28, 28, 25, 0.4);
    margin-top: 1px;
}

/* ── Detection Gallery ─────────────────────────────────────────────────────── */
/* Confidence slider section — matches reference: full-width, border-bottom */
.detection-gallery-section {
    margin-top: 20px;
}

.detection-gallery-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-primary);
}

.detection-gallery-title a {
    color: var(--primary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: opacity 0.15s;
    cursor: pointer;
}

.detection-gallery-title a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.detection-gallery {
    display: grid;
    grid-template-rows: repeat(3, 100px);
    grid-auto-flow: column;
    grid-auto-columns: 100px;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
}

.detection-gallery-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    opacity: 0.6;
    width: 100%;
    text-align: center;
}

.detection-gallery-empty.hidden {
    display: none;
}

.det-gallery-card {
    background: var(--surface-container);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    aspect-ratio: 1 / 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.det-gallery-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

.det-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    flex: 1;
}

.det-gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 6px;
    text-align: center;
    backdrop-filter: blur(2px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.det-gallery-no-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-container);
    color: var(--text-secondary);
    font-size: 22px;
    opacity: 0.4;
}

.det-gallery-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.det-gallery-spinner::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ── Resolution preset buttons (upload modal + run mission dialog) ── */
.upload-form-field {
    margin-bottom: 14px;
}
.upload-form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.res-preset-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.res-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 6px;
    border: 1.5px solid var(--border, #e0e0e0);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-family: var(--font-primary);
}
.res-preset:hover {
    border-color: var(--primary);
}
.res-preset.active {
    border-color: var(--primary);
    background: rgba(51, 123, 48, 0.07);
}
.res-preset-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}
.res-preset-desc {
    font-size: 10px;
    color: var(--text-muted, #888);
}

/* ── Drone image map markers ────────────────────────────────────────────── */
.drone-img-pin {
    width: 26px;
    height: 26px;
    background: #F5A623;
    border-radius: 6px 6px 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    position: relative;
}
.drone-img-pin::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    border-left: 0 solid transparent;
    border-right: 8px solid transparent;
    border-top: 5px solid #F5A623;
}

/* Unselected (outside the 75 % overlap grid — not needed for stitching) — light gray */
.drone-img-pin--unselected {
    background: #ADADAD;
    color: #fff;
}
.drone-img-pin--unselected::after {
    border-top-color: #ADADAD;
}

/* Leaflet tooltip container for drone hover card */
.leaflet-tooltip.drone-tooltip {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    padding: 10px 12px;
    pointer-events: none;
}
.leaflet-tooltip.drone-tooltip::before {
    display: none;
}

.drone-hover-card {
    min-width: 230px;
    font-family: var(--font-primary);
}
.dhc-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.dhc-row:last-child { border-bottom: none; }
.dhc-label {
    font-size: 11px;
    color: var(--text-secondary, #6b7280);
    flex-shrink: 0;
    white-space: nowrap;
}
.dhc-val {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary, #3D3D3A);
    text-align: right;
    word-break: break-all;
}

/* Drone image modal metadata grid */
.drone-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 14px;
    background: var(--app-bg, #F8F9FA);
    border-radius: 8px;
    padding: 10px 12px;
}
.drone-modal-meta .dhc-row {
    padding: 4px 0;
}

/* Original image in modal */
.drone-img-wrap {
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.drone-img-full {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}
.drone-img-loading {
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    padding: 20px;
    font-family: var(--font-primary);
}

/* ── Drone image popover (click-on-pin floating card) ──────────────────────── */
.drone-popover {
    position: fixed;
    z-index: 5000;
    width: 260px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    font-family: var(--font-primary);
    overflow: hidden;
}
.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    background: var(--brand-navy, #1F4781);
    color: #fff;
    cursor: move;
    user-select: none;
}
.dp-filename {
    font-size: 11px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dp-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.dp-close:hover { opacity: 0.8; }
.dp-body { padding: 8px 10px 10px; }
.dp-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f3f3f3;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.dp-img-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dp-img-load {
    font-size: 11px;
    color: var(--text-secondary, #888);
}
