/* Aura Environmental Intelligence Web Application Styles */
:root {
    --bg-main: #060814;
    --bg-sidebar: #0A0D1B;
    --bg-card: rgba(14, 18, 35, 0.75);
    --bg-card-hover: rgba(22, 28, 54, 0.85);
    --bg-input: #101426;
    --border-color: #1E2540;
    --border-glow: rgba(99, 102, 241, 0.3);
    
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --primary-indigo: #6366F1;
    --primary-purple: #8B5CF6;
    --primary-cyan: #06B6D4;
    --primary-blue: #3B82F6;
    
    --status-good: #10B981;
    --status-moderate: #F59E0B;
    --status-sensitive: #F97316;
    --status-unhealthy: #EF4444;
    --status-very-unhealthy: #DC2626;
    --status-hazardous: #7F1D1D;
    --status-critical: #DC2626;
    
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.light-theme {
    --bg-main: #F1F5F9;
    --bg-sidebar: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-hover: #FFFFFF;
    --bg-input: #F8FAFC;
    --border-color: #E2E8F0;
    --border-glow: rgba(99, 102, 241, 0.15);
    
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* App Container Layout */
#app {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
    width: 240px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    flex-shrink: 0;
    z-index: 100;
    overflow-y: auto;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 18px 8px;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
    border: 1px solid rgba(56, 189, 248, 0.3);
    background: #060814;
}

.brand-info h1 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-info p {
    font-size: 11px;
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 14px;
    flex: 1;
}

.nav-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #4F5E74;
    padding: 16px 12px 6px 12px;
    user-select: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 9.5px 14px;
    border-radius: 10px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.14s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
}

.nav-item i {
    font-size: 14.5px;
    width: 18px;
    text-align: center;
    color: #94A3B8;
    transition: color 0.14s ease;
}

.nav-item:hover {
    color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-item:hover i {
    color: #FFFFFF;
}

.nav-item.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.28) 0%, rgba(79, 70, 229, 0.20) 100%);
    border: 1px solid rgba(129, 140, 248, 0.45);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.nav-item.active i {
    color: #FFFFFF;
}

/* Light Theme Sidebar Navigation */
body.light-theme .nav-category {
    color: #64748B;
}

body.light-theme .nav-item {
    color: #475569;
}

body.light-theme .nav-item i {
    color: #64748B;
}

body.light-theme .nav-item:hover {
    color: #0F172A;
    background-color: #EEF2F6;
}

body.light-theme .nav-item:hover i {
    color: #0F172A;
}

body.light-theme .nav-item.active {
    color: #4338CA;
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

body.light-theme .nav-item.active i {
    color: #4F46E5;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #334155;
    transition: 0.3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-indigo);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

/* Sensor Connect Card in Sidebar */
.sensor-connect-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.sensor-connect-card:hover {
    border-color: var(--primary-indigo);
}

.sensor-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.badge-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.live {
    background-color: var(--status-good);
    box-shadow: 0 0 8px var(--status-good);
}

.status-dot.disconnected {
    background-color: var(--status-unhealthy);
}

.sensor-connect-btn {
    width: 100%;
    padding: 6px 10px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
    color: var(--primary-indigo);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.sensor-connect-btn:hover {
    background: var(--primary-indigo);
    color: #FFFFFF;
}

/* Main Layout Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-main);
}

/* Topbar Header Matching Reference Image */
.topbar {
    height: 68px;
    min-height: 68px;
    max-height: 68px;
    box-sizing: border-box;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: relative;
    z-index: 90;
    flex-shrink: 0;
}

.topbar-left-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.top-nav-link:hover {
    color: var(--text-primary);
}

.top-nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
}

.top-nav-bold {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary) !important;
    letter-spacing: -0.3px;
}

.topbar-center-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.brand-sparkle-logo {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60A5FA, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 11px;
}

.brand-title-center {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.topbar-right-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.btn-get-started {
    padding: 8px 18px;
    border-radius: 20px;
    background: #FFFFFF;
    color: #0B0E1E;
    font-size: 12.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-get-started:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.3);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary-indigo);
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--status-unhealthy);
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-sidebar);
}

/* Notifications Dropdown (Exact Match to Reference Image) */
.notif-dropdown {
    position: absolute;
    top: 68px;
    right: 32px;
    width: 360px;
    max-height: 490px;
    background: linear-gradient(180deg, #151833 0%, #0B0F20 18%, #080B18 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(99, 102, 241, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    backdrop-filter: blur(16px);
}

.notif-dropdown.show { display: flex; }

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14.5px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.2px;
}

.notif-header span:first-child {
    font-weight: 700;
    color: #FFFFFF;
}

.clear-notif-btn {
    font-size: 13px;
    color: #06B6D4;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.clear-notif-btn:hover {
    color: #38BDF8;
    text-decoration: underline;
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notif-list::-webkit-scrollbar {
    width: 6px;
}

.notif-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.notif-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.notif-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.notif-card {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(15, 20, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    transition: all 0.15s ease;
    cursor: pointer;
}

.notif-card:hover {
    background: rgba(20, 26, 48, 0.95);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.notif-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.notif-card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.notif-red-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #EF4444;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.notif-location-name {
    font-weight: 700;
    font-size: 13.5px;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.notif-hazard-badge {
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.notif-desc-text {
    font-size: 12px;
    color: #94A3B8;
    line-height: 1.45;
    margin: 8px 0 10px 0;
}

.notif-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-time-ago {
    font-size: 11px;
    color: #64748B;
    font-weight: 500;
}

.notif-tap-action {
    font-size: 11.5px;
    font-weight: 600;
    color: #06B6D4;
    cursor: pointer;
    transition: var(--transition);
}

.notif-tap-action:hover {
    color: #38BDF8;
    text-decoration: underline;
}

/* Light theme support for Notifications */
body.light-theme .notif-dropdown {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .notif-header {
    border-bottom: 1px solid #E2E8F0 !important;
    color: #0F172A !important;
}

body.light-theme .notif-header span:first-child {
    color: #0F172A !important;
}

body.light-theme .notif-card {
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
}

body.light-theme .notif-card:hover {
    background: #F1F5F9 !important;
    border-color: #CBD5E1 !important;
}

body.light-theme .notif-location-name {
    color: #0F172A !important;
}

body.light-theme .notif-desc-text {
    color: #475569 !important;
}

/* Content Body */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    scrollbar-gutter: stable;
}

.screen-view {
    display: none;
    flex-direction: column;
    width: 100%;
    opacity: 0;
    contain: content;
}

.screen-view.active {
    display: flex;
    opacity: 1;
    animation: smoothZeroJitterFade 0.08s ease-out forwards;
}

@keyframes smoothZeroJitterFade {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    backdrop-filter: blur(14px);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

/* ------------------------------------------------------------- */
/* 1. DASHBOARD HERO (EXACT REFERENCE UI REPLICATION)             */
/* ------------------------------------------------------------- */
.dash-hero-container {
    background: radial-gradient(circle at 68% 40%, rgba(20, 32, 68, 0.7) 0%, rgba(6, 8, 20, 0.98) 75%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

/* Soft Subtle Background Glow */
.dash-lens-flare {
    position: absolute;
    top: -20px;
    left: 48%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.15) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(25px);
    z-index: 1;
}

/* Subtle Vertical Grid Guidelines */
.dash-grid-lines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(90deg, transparent, transparent 110px, rgba(255, 255, 255, 0.018) 110px, rgba(255, 255, 255, 0.018) 111px);
    pointer-events: none;
    z-index: 0;
}

/* 2-Column Hero Stage Layout */
.dash-stage-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 32px;
    align-items: center;
    min-height: 480px;
    position: relative;
    z-index: 2;
}

.dash-left-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

.dash-title-group {
    margin-bottom: 8px;
}

.dash-hero-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.dash-title-thin {
    font-weight: 300;
    color: var(--text-secondary);
}

.dash-timestamp-row {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.dash-location-row {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.flag-icon {
    font-size: 14px;
}

/* Card 1: Main Statistics */
.stat-hero-card {
    background: rgba(14, 18, 35, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
}

.card-mini-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-dual-grid {
    margin-bottom: 8px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.stat-big-num {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.05;
}

.stat-footer-text {
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 8px;
}

.stat-footer-text strong {
    color: var(--text-secondary);
}

/* Card 2: Risk of Pollution */
.risk-hero-card {
    background: rgba(14, 18, 35, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
}

.risk-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.risk-details-btn {
    font-size: 11px;
    font-weight: 700;
    background: #F59E0B;
    color: #0F172A;
    border: none;
    padding: 4px 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.risk-details-btn:hover {
    background: #D97706;
}

.risk-big-metric {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 4px 0;
}

.risk-metric-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.risk-metric-val {
    font-size: 32px;
    font-weight: 800;
    color: #60A5FA;
}

.risk-wave-graphic {
    height: 34px;
    margin: 4px 0;
}

.wave-svg {
    width: 100%;
    height: 100%;
}

.risk-subtext {
    font-size: 11px;
    color: var(--text-muted);
}

/* Bottom Utilities Row */
.dash-hero-bottom-utils {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
    padding-top: 6px;
}

.util-share-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.share-icons-row {
    display: flex;
    gap: 6px;
}

.share-icon-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 10px;
    cursor: pointer;
    text-decoration: none !important;
    outline: none;
    transition: var(--transition);
}

.share-icon-btn:hover {
    color: #FFFFFF;
    background: var(--primary-indigo);
    text-decoration: none !important;
}

.util-coordinates {
    font-size: 10.5px;
    color: var(--text-muted);
    line-height: 1.3;
}

.util-zoom-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zoom-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.zoom-round-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: var(--text-primary);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.zoom-round-btn:hover {
    background: var(--primary-indigo);
}

/* Right 3D Earth Globe Viewport */
.dash-right-globe-stage {
    position: relative;
    width: 100%;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.globe-3d-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.globe-3d-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
}

.globe-3d-canvas:active {
    cursor: grabbing;
}

/* Floating Tooltip Card on Globe (Matching Reference Screenshot) */
.globe-floating-card {
    position: absolute;
    top: 50%;
    left: 64%;
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: none;
    z-index: 20;
    transform: translate(-50%, -50%);
}

.floating-tooltip-card {
    background: rgba(14, 18, 38, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    min-width: 200px;
}

.tooltip-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tooltip-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot-red-alert {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #EF4444;
    box-shadow: 0 0 8px #EF4444;
    animation: pulseRed 1.8s infinite;
}

@keyframes pulseRed {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.tooltip-city-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.tooltip-details-link {
    font-size: 10px;
    color: var(--text-muted);
}

.tooltip-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aqi-badge-orange {
    font-size: 9.5px;
    font-weight: 800;
    background: #EA580C;
    color: #FFFFFF;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
}

.aqi-status-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.tooltip-weather-row {
    display: flex;
    gap: 12px;
    font-size: 10.5px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 4px;
    margin-top: 2px;
}

.tooltip-weather-row strong {
    color: var(--text-primary);
}

/* Radiant Golden-Yellow Circular Badge */
.globe-glowing-circle-badge {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle, #FCD34D 0%, #F59E0B 75%, #D97706 100%);
    color: #0F172A;
    font-size: 19px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.9), 0 0 10px rgba(252, 211, 77, 0.8);
    border: 2.5px solid rgba(255, 255, 255, 0.75);
}

.badge-pointer-arrow {
    position: absolute;
    top: 50%;
    left: -6px;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #F59E0B;
}

/* 3D / IQ Air Map Switcher at bottom of globe */
.globe-view-switcher {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    background: rgba(14, 18, 38, 0.95);
    border: 1px solid var(--border-color);
    padding: 4px 6px;
    border-radius: 20px;
    backdrop-filter: blur(12px);
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.switcher-pill {
    padding: 5px 16px;
    border-radius: 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.switcher-pill.active {
    background: #2563EB;
    color: #FFFFFF;
}

.globe-2d-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #0B0E1E;
}

.globe-mini-map-view {
    width: 100% !important;
    height: 100% !important;
    min-height: 480px;
    border-radius: var(--radius-lg);
}

/* IQAir HUD Overlay */
.iqair-hud-overlay {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
    pointer-events: none;
}

.iqair-hud-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.iqair-badge-pill {
    padding: 5px 12px;
    background: rgba(14, 18, 38, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 11.5px;
    font-weight: 700;
    color: #60A5FA;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.iqair-live-pulse {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    color: #10B981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 8px;
    border-radius: 10px;
}

.iqair-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10B981;
    box-shadow: 0 0 6px #10B981;
    animation: pulseRed 1.6s infinite;
}

.iqair-aqi-scale-bar {
    display: flex;
    gap: 4px;
    background: rgba(14, 18, 38, 0.88);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px 6px;
    backdrop-filter: blur(10px);
    overflow-x: auto;
}

.aqi-step {
    flex: 1;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 9.5px;
    font-weight: 700;
    color: #FFFFFF;
    background: var(--c);
    text-align: center;
    white-space: nowrap;
    opacity: 0.9;
}

.aqi-step span {
    font-weight: 800;
    margin-right: 2px;
}

/* Light Theme Dashboard Hero & IQAir Overrides */
body.light-theme .dash-hero-container {
    background: radial-gradient(circle at 68% 40%, #FFFFFF 0%, #F1F5F9 75%);
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

body.light-theme .dash-hero-title {
    color: #0F172A;
}

body.light-theme .dash-title-thin {
    color: #64748B;
}

body.light-theme .dash-timestamp-row {
    color: #64748B;
}

body.light-theme .dash-location-row {
    color: #475569;
}

body.light-theme .stat-hero-card,
body.light-theme .risk-hero-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

body.light-theme .stat-big-num {
    color: #0F172A;
}

body.light-theme .stat-label,
body.light-theme .card-mini-title,
body.light-theme .stat-footer-text {
    color: #64748B;
}

body.light-theme .stat-footer-text strong {
    color: #1E293B;
}

body.light-theme .risk-metric-val {
    color: #2563EB;
}

body.light-theme .risk-subtext {
    color: #64748B;
}

body.light-theme .share-label,
body.light-theme .zoom-label {
    color: #475569;
}

body.light-theme .share-icon-btn,
body.light-theme .zoom-round-btn {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
}

body.light-theme .share-icon-btn:hover,
body.light-theme .zoom-round-btn:hover {
    background: var(--primary-indigo);
    color: #FFFFFF;
}

body.light-theme .util-coordinates {
    color: #64748B;
}

body.light-theme .floating-tooltip-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #E2E8F0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

body.light-theme .tooltip-city-name,
body.light-theme .aqi-status-text {
    color: #0F172A;
}

body.light-theme .tooltip-details-link,
body.light-theme .tooltip-weather-row {
    color: #64748B;
}

body.light-theme .tooltip-weather-row strong {
    color: #0F172A;
}

body.light-theme .globe-view-switcher {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #CBD5E1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

body.light-theme .switcher-pill {
    color: #64748B;
}

body.light-theme .switcher-pill.active {
    background: #2563EB;
    color: #FFFFFF;
}

body.light-theme .dash-lens-flare {
    background: radial-gradient(circle, rgba(96, 165, 250, 0.12) 0%, transparent 70%);
}

body.light-theme .dash-grid-lines {
    background: repeating-linear-gradient(90deg, transparent, transparent 110px, rgba(0, 0, 0, 0.02) 110px, rgba(0, 0, 0, 0.02) 111px);
}

body.light-theme .iqair-badge-pill,
body.light-theme .iqair-aqi-scale-bar {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #CBD5E1;
    color: #0F172A;
}

/* ------------------------------------------------------------- */
/* DASHBOARD LOWER GRIDS                                         */
/* ------------------------------------------------------------- */
.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 16px;
}

@media (max-width: 1300px) {
    .dashboard-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.metric-tile-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.metric-mini-tile {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.mini-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.mini-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 4px 0;
}

.mini-status {
    font-size: 10px;
    font-weight: 600;
}

/* ------------------------------------------------------------- */
/* READINGS SCREEN                                               */
/* ------------------------------------------------------------- */
.section-action-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-indigo);
    border: none;
    border-radius: var(--radius-md);
    color: #FFFFFF;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #4F46E5;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Readings Tab Controls & Table (Exact Reference Image Match) */
.readings-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.readings-controls-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 280px;
}

.readings-search-box {
    position: relative;
    width: 320px;
    max-width: 100%;
}

.readings-search-box > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748B;
    font-size: 13px;
    pointer-events: none;
}

.readings-search-input {
    width: 100%;
    height: 40px;
    padding: 8px 14px 8px 38px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.readings-search-input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    background: rgba(15, 23, 42, 0.95);
}

.readings-search-input::placeholder {
    color: #64748B;
    font-size: 12.5px;
}

.readings-filter-chips {
    display: flex;
    align-items: center;
    gap: 8px;
}

.readings-filter-chip {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94A3B8;
    transition: var(--transition);
}

.readings-filter-chip:hover {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.2);
}

.readings-filter-chip.active {
    background: #1E293B;
    border-color: #3B82F6;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-export-csv {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-export-csv:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.readings-table-card {
    background: rgba(11, 15, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 8px 20px 16px 20px;
    overflow-x: auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(14px);
}

.readings-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.readings-data-table thead th {
    padding: 16px 12px 14px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #64748B;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    user-select: none;
}

.readings-data-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.12s ease;
    cursor: pointer;
}

.readings-data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.06);
}

.readings-data-table tbody td {
    padding: 13px 12px;
    color: #E2E8F0;
    vertical-align: middle;
}

.sensor-id-cell {
    color: #60A5FA !important;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.sensor-loc-cell {
    color: #F1F5F9 !important;
    font-weight: 500;
}

.sensor-aqi-cell {
    color: #FFFFFF !important;
    font-weight: 800;
    font-size: 13.5px;
}

.sensor-status-cell {
    font-weight: 700;
    font-size: 12.5px;
}

.status-txt-good { color: #10B981; }
.status-txt-moderate { color: #F59E0B; }
.status-txt-sensitive { color: #F97316; }
.status-txt-unhealthy { color: #EF4444; }
.status-txt-very-unhealthy { color: #DC2626; }
.status-txt-hazardous { color: #8B5CF6; }

.source-badge-pill {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94A3B8;
}

.source-badge-pill.satellite {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
    color: #818CF8;
}

/* Light theme for Readings */
body.light-theme .readings-search-input {
    background: #FFFFFF;
    border-color: #CBD5E1;
    color: #0F172A;
}

body.light-theme .readings-filter-chip {
    border-color: #CBD5E1;
    color: #64748B;
}

body.light-theme .readings-filter-chip.active {
    background: #E2E8F0;
    border-color: #3B82F6;
    color: #0F172A;
}

body.light-theme .readings-table-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

body.light-theme .readings-data-table thead th {
    border-bottom-color: #E2E8F0;
    color: #64748B;
}

body.light-theme .readings-data-table tbody tr {
    border-bottom-color: #F1F5F9;
}

body.light-theme .readings-data-table tbody tr:hover {
    background: #F8FAFC;
}

body.light-theme .readings-data-table tbody td {
    color: #334155;
}

body.light-theme .sensor-loc-cell {
    color: #0F172A !important;
}

body.light-theme .sensor-aqi-cell {
    color: #0F172A !important;
}

/* ------------------------------------------------------------- */
/* SATELLITE DATA SCREEN                                         */
/* ------------------------------------------------------------- */
.satellite-chips-row {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
}

.sat-chip {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.sat-chip.chip-flood.active { background: rgba(59, 130, 246, 0.18); border-color: #3B82F6; color: #60A5FA; }
.sat-chip.chip-fire.active { background: rgba(239, 68, 68, 0.18); border-color: #EF4444; color: #F87171; }
.sat-chip.chip-landslide.active { background: rgba(245, 158, 11, 0.18); border-color: #F59E0B; color: #FBBF24; }
.sat-chip.chip-aqi.active { background: rgba(139, 92, 246, 0.18); border-color: #8B5CF6; color: #A78BFA; }
.sat-chip.chip-temp.active { background: rgba(249, 115, 22, 0.18); border-color: #F97316; color: #FB923C; }
.sat-chip.chip-quake.active { background: rgba(6, 182, 212, 0.18); border-color: #06B6D4; color: #22D3EE; }
.sat-chip.chip-heat.active { background: rgba(220, 38, 38, 0.18); border-color: #DC2626; color: #EF4444; }

.satellite-4grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.satellite-3grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.sat-metric-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sat-metric-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sat-metric-val {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 6px 0;
}

.sat-unit {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.sat-metric-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.satellite-bottom-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.regional-aod-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aod-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
}

.aod-loc {
    font-weight: 700;
    color: var(--text-primary);
}

.aod-val {
    color: var(--text-secondary);
    font-size: 12px;
}

.sat-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule-card {
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.sched-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
}

.sched-time {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--status-good);
}

.sched-desc {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* ------------------------------------------------------------- */
/* MULTI-HAZARD MAP SCREEN                                       */
/* ------------------------------------------------------------- */
.map-screen-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.map-layer-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.layer-chip {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.layer-chip.active {
    border-color: var(--primary-indigo);
    background: rgba(99, 102, 241, 0.15);
    color: #FFFFFF;
}

.mappls-map-wrapper {
    position: relative;
    flex: 1;
    min-height: 480px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.mappls-map-container {
    width: 100%;
    height: 100%;
}

.mappls-hud-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(14, 18, 35, 0.88);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 11.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 500;
    backdrop-filter: blur(8px);
}

.mappls-logo-badge {
    font-weight: 800;
    color: #60A5FA;
}

.mappls-status-text {
    color: var(--text-muted);
}

.mappls-map-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 500;
}

.mappls-ctrl-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #11162B;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.mappls-ctrl-btn:hover {
    background: var(--primary-indigo) !important;
    color: #FFFFFF !important;
    border-color: var(--primary-indigo) !important;
}

body.light-theme .mappls-ctrl-btn {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    color: #0F172A !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .mappls-ctrl-btn:hover {
    background: #2563EB !important;
    color: #FFFFFF !important;
    border-color: #2563EB !important;
}

/* ------------------------------------------------------------- */
/* LEAFLET & MAPPLS MAP POPUPS                                   */
/* ------------------------------------------------------------- */
.leaflet-popup-content-wrapper {
    background: rgba(14, 18, 38, 0.95) !important;
    color: #FFFFFF !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(10px) !important;
}

.leaflet-popup-tip {
    background: rgba(14, 18, 38, 0.95) !important;
}

.popup-title {
    font-weight: 800;
    font-size: 13.5px;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.popup-info {
    font-size: 11px;
    color: #CBD5E1;
    line-height: 1.4;
    margin-bottom: 6px;
}

.popup-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
}

/* ------------------------------------------------------------- */
/* MAP POINT DETAILS INSPECTOR PANEL (BELOW MAP)                 */
/* ------------------------------------------------------------- */
.map-point-details-container {
    width: 100%;
    margin-top: 6px;
}

.map-point-empty-card {
    background: rgba(14, 18, 38, 0.75);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.map-point-empty-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.15);
    color: #818CF8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.map-point-empty-info {
    flex: 1;
    min-width: 240px;
}

.map-point-empty-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 3px;
}

.map-point-empty-info p {
    font-size: 12px;
    color: #94A3B8;
    line-height: 1.4;
}

.map-point-empty-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.map-empty-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #CBD5E1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.map-point-card {
    background: rgba(14, 18, 38, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 20px 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(16px);
    animation: pointCardSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pointCardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-point-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
}

.map-point-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.map-point-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.map-point-category {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.map-point-status-pill {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.map-point-name {
    font-size: 17px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.25;
    margin-bottom: 2px;
}

.map-point-coords {
    font-size: 11.5px;
    color: #94A3B8;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.map-point-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94A3B8;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.map-point-close-btn:hover {
    color: #FFFFFF;
    background: rgba(239, 68, 68, 0.2);
    border-color: #EF4444;
}

.map-point-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .map-point-grid {
        grid-template-columns: 1fr;
    }
}

.map-point-stat-box,
.map-point-actions-box {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-point-box-title {
    font-size: 12px;
    font-weight: 700;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.map-point-desc {
    font-size: 13px;
    color: #E2E8F0;
    line-height: 1.5;
    font-weight: 500;
}

.map-point-subtag {
    font-size: 11px;
    color: #60A5FA;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.map-point-ai-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #94A3B8;
    font-weight: 600;
}

.map-point-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.map-point-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.map-point-safety {
    font-size: 12px;
    color: #FBBF24;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.45;
    margin-top: 4px;
}

.btn-point-action {
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    transition: var(--transition);
}

.btn-dispatch-point {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-dispatch-point:hover {
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.45);
    transform: translateY(-1px);
}

.btn-focus-point {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60A5FA;
}

.btn-focus-point:hover {
    background: rgba(59, 130, 246, 0.25);
    color: #FFFFFF;
}

.btn-ask-point {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #818CF8;
}

.btn-ask-point:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #FFFFFF;
}

/* Light Theme for Point Details */
body.light-theme .map-point-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body.light-theme .map-point-empty-card {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

body.light-theme .map-point-empty-info h4 {
    color: #0F172A;
}

body.light-theme .map-point-name {
    color: #0F172A;
}

body.light-theme .map-point-stat-box,
body.light-theme .map-point-actions-box {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

body.light-theme .map-point-desc {
    color: #334155;
}

/* ------------------------------------------------------------- */
/* EMERGENCY ALERTS SCREEN (EXACT REFERENCE REPLICATION)        */
/* ------------------------------------------------------------- */
.emergency-alert-card {
    background: rgba(11, 15, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(14px);
    transition: all 0.15s ease;
}

.emergency-alert-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.emergency-alert-card.alert-card-critical {
    border-left: 4px solid #EF4444;
}

.emergency-alert-card.alert-card-warning {
    border-left: 4px solid #F97316;
}

.alert-card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.alert-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.alert-red-bullet {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    background-color: #EF4444;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

.alert-warn-icon {
    color: #F59E0B;
    font-size: 14px;
    margin: 0 2px 0 2px;
}

.alert-location-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.2px;
}

.alert-hazard-type {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: 4px;
}

.alert-unread-pill {
    color: #06B6D4;
    font-size: 11.5px;
    font-weight: 600;
    margin-left: 4px;
}

.alert-timestamp {
    font-size: 12px;
    color: #64748B;
    font-weight: 500;
    margin-left: auto;
}

.alert-description-text {
    font-size: 12.5px;
    color: #94A3B8;
    line-height: 1.45;
    margin: 8px 0 12px 0;
}

.alert-card-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-ai-confidence {
    font-size: 12px;
    font-weight: 600;
    color: #06B6D4;
    letter-spacing: 0.1px;
}

.btn-notify-field {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-notify-field:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
}

/* Light Theme for Emergency Alerts */
body.light-theme .emergency-alert-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

body.light-theme .alert-location-title {
    color: #0F172A;
}

body.light-theme .alert-description-text {
    color: #475569;
}

/* ------------------------------------------------------------- */
/* EMERGENCY EMAIL DISPATCH MODAL                                */
/* ------------------------------------------------------------- */
.email-dispatch-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background: rgba(4, 8, 20, 0.85);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: emailModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes emailModalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.email-dispatch-modal-card {
    background: rgba(14, 18, 38, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 18px;
    width: 100%;
    max-width: 540px;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.25);
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
}

.email-dispatch-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.email-dispatch-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.email-dispatch-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #EF4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
    animation: pulseAlertIcon 1.6s infinite;
}

.email-dispatch-icon-box.broadcast {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.5);
    color: #818CF8;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
}

@keyframes pulseAlertIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.email-dispatch-title {
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.2px;
    margin: 0;
}

.email-dispatch-subtitle {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 2px;
}

.email-dispatch-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94A3B8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.email-dispatch-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.email-recipients-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-recipients-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: 6px;
}

.email-recipient-chips-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.email-recipient-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: #E2E8F0;
}

.email-recipient-chip i {
    color: #818CF8;
    margin-right: 8px;
}

.status-sent-badge {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34D399;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.email-payload-preview {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px;
    font-size: 12px;
    color: #CBD5E1;
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
}

.email-dispatch-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.btn-send-gmail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #EA4335, #C5221F);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.4);
}

.btn-send-gmail:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(234, 67, 53, 0.6);
    color: #FFFFFF;
}

.btn-open-mailto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #E2E8F0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-open-mailto:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.5);
    color: #FFFFFF;
}

.btn-close-modal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}


.btn-close-modal:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.6);
}

body.light-theme .email-dispatch-modal-card {
    background: #FFFFFF;
    border-color: #CBD5E1;
    color: #0F172A;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

body.light-theme .email-dispatch-title {
    color: #0F172A;
}

body.light-theme .email-recipient-chip {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #0F172A;
}

body.light-theme .email-payload-preview {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #334155;
}


/* ------------------------------------------------------------- */
/* NODE MANAGEMENT SCREEN                                        */
/* ------------------------------------------------------------- */
.node-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.node-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left-width: 4px;
}

.node-card.online { border-left-color: var(--status-good); }
.node-card.degraded { border-left-color: var(--status-moderate); }
.node-card.fire-alert { border-left-color: var(--status-unhealthy); }
.node-card.severe { border-left-color: var(--status-critical); }

.node-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.node-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.node-tag {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 8px;
}

.node-tag.online { background: rgba(16, 185, 129, 0.15); color: var(--status-good); }
.node-tag.degraded { background: rgba(245, 158, 11, 0.15); color: var(--status-moderate); }
.node-tag.fire-alert { background: rgba(239, 68, 68, 0.15); color: var(--status-unhealthy); }
.node-tag.severe { background: rgba(220, 38, 38, 0.15); color: var(--status-critical); }

.node-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 11.5px;
}

.node-meta-item span { color: var(--text-muted); }
.node-meta-item strong { color: var(--text-primary); margin-left: 4px; }

.node-issue-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.node-issue-banner.fire {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #F87171;
}

.node-issue-banner.warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #FBBF24;
}

.node-issue-banner.good {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34D399;
}

.node-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 2px;
}

.btn-node-notify {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    border: none;
    border-radius: 6px;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
    width: 100%;
    justify-content: center;
}

.btn-node-notify:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.55);
}

.btn-node-notify.warning {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.btn-node-notify.warning:hover {
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.55);
}

.btn-node-ping {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #94A3B8;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

.btn-node-ping:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: #FFFFFF;
}

.node-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.node-stat-card {
    background: rgba(14, 18, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.node-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.node-stat-info {
    display: flex;
    flex-direction: column;
}

.node-stat-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.node-stat-lbl {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-notify-all-faults {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #EA4335, #C5221F);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.35);
}

.btn-notify-all-faults:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(234, 67, 53, 0.55);
}

/* ------------------------------------------------------------- */
/* SETTINGS & CONNECTIVITY SCREEN (EXACT REFERENCE REPLICATION) */
/* ------------------------------------------------------------- */
.settings-screen-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.settings-card {
    background: rgba(11, 15, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 22px 26px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(14px);
    transition: all 0.15s ease;
}

.settings-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.settings-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    letter-spacing: -0.2px;
}

.settings-card-sub {
    font-size: 12px;
    color: #64748B;
    margin: 4px 0 16px 0;
    line-height: 1.45;
}

.settings-hw-pills-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.settings-hw-pill {
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94A3B8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.settings-hw-pill:hover {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.2);
}

.settings-hw-pill.active {
    background: #1E293B;
    border-color: #3B82F6;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.settings-inset-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 16px;
    gap: 14px;
}

.settings-inset-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.settings-inset-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #FFFFFF;
}

.settings-inset-desc {
    font-size: 11.5px;
    color: #64748B;
    margin-top: 2px;
}

.settings-packet-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 12px;
}

.settings-packet-input {
    flex: 1;
    height: 42px;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 13px;
    outline: none;
    transition: var(--transition);
}

.settings-packet-input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    background: rgba(15, 23, 42, 0.95);
}

.settings-packet-input::placeholder {
    color: #64748B;
    font-size: 12px;
}

.btn-send-packet {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    white-space: nowrap;
    height: 42px;
}

.btn-send-packet:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.settings-sample-chips-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-sample-chip {
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: #94A3B8;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.settings-sample-chip:hover {
    border-color: rgba(99, 102, 241, 0.4);
    color: #FFFFFF;
    background: rgba(99, 102, 241, 0.08);
}

.settings-diagnostics-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
    font-size: 13px;
}

.settings-diag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background: transparent;
    border: none;
}

.settings-diag-label {
    color: #64748B;
    font-size: 13px;
    font-weight: 500;
}

.settings-diag-val {
    color: #E2E8F0;
    font-size: 13px;
    font-weight: 600;
}

.settings-diag-val.active-mesh {
    color: #10B981;
    font-weight: 700;
}

/* Light Theme Support */
body.light-theme .settings-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

body.light-theme .settings-card-title {
    color: #0F172A;
}

body.light-theme .settings-hw-pill {
    border-color: #CBD5E1;
    color: #64748B;
}

body.light-theme .settings-hw-pill.active {
    background: #E2E8F0;
    border-color: #3B82F6;
    color: #0F172A;
}

body.light-theme .settings-inset-box {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

body.light-theme .settings-inset-title {
    color: #0F172A;
}

body.light-theme .settings-packet-input {
    background: #FFFFFF;
    border-color: #CBD5E1;
    color: #0F172A;
}

body.light-theme .settings-sample-chip {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #475569;
}

body.light-theme .settings-diag-row {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

body.light-theme .settings-diag-row strong {
    color: #0F172A;
}

/* Assistant Chat */
.assistant-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.assistant-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.assistant-logo-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.assistant-header-logo {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: contain;
    display: block;
    background: #060814;
}

.quick-prompts-row {
    display: flex;
    gap: 8px;
    padding: 10px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.quick-prompts-row::-webkit-scrollbar {
    display: none;
}

.prompt-chip {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-chip:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary-indigo);
    color: var(--text-primary);
}

.chat-stream {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 0;
    min-height: 280px;
}

.chat-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
}

.chat-row.user-row {
    justify-content: flex-end;
}

.chat-row.bot-row {
    justify-content: flex-start;
}

.bot-avatar-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.bot-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.msg-bubble {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.55;
    word-break: break-word;
}

.user-bubble {
    background: var(--primary-indigo);
    color: #FFFFFF;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.bot-bubble {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.md-bullet {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 3px 0;
}

.bullet-dot, .bullet-num {
    color: var(--primary-cyan);
    font-weight: 700;
}

.inline-code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.code-block {
    background: #020617;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 8px 0;
    overflow-x: auto;
    font-family: monospace;
    font-size: 12px;
}

/* Markdown Table Rendering in Assistant Chat */
.md-table-wrapper {
    margin: 12px 0;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 15, 30, 0.7);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
    min-width: 480px;
}

.md-table thead {
    background: rgba(56, 189, 248, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.md-table th {
    padding: 9px 12px;
    font-weight: 700;
    color: #38BDF8;
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.md-table td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    line-height: 1.45;
    vertical-align: middle;
}

.md-table tr:last-child td {
    border-bottom: none;
}

.md-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.md-table td strong {
    color: #FFF;
}

.md-spacer {
    height: 8px;
}

.chat-input-bar {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.chat-input-bar input {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-indigo);
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ------------------------------------------------------------- */
/* RICH HUD NOTIFICATION POPUP & TOAST (BOTTOM RIGHT)            */
/* ------------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    z-index: 10000;
    pointer-events: none;
    max-width: 400px;
    width: calc(100vw - 48px);
}

.toast {
    padding: 12px 20px;
    background: #1E293B;
    border: 1px solid var(--primary-indigo);
    border-radius: var(--radius-md);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
    pointer-events: none;
    display: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
    pointer-events: auto;
}

.rich-toast-card {
    pointer-events: auto;
    background: rgba(14, 18, 38, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--primary-indigo);
    border-radius: 14px;
    padding: 15px 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 9px;
    animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

@keyframes toastSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rich-toast-card.hide {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
    pointer-events: none;
}

.rich-toast-card.critical {
    border-left-color: #EF4444;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(239, 68, 68, 0.25);
}

.rich-toast-card.warning {
    border-left-color: #F59E0B;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.25);
}

.rich-toast-card.node {
    border-left-color: #06B6D4;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(6, 182, 212, 0.25);
}

.rich-toast-card.success {
    border-left-color: #10B981;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(16, 185, 129, 0.25);
}

.rich-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rich-toast-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rich-toast-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2.5px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rich-toast-badge.critical {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.rich-toast-badge.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.rich-toast-badge.node {
    background: rgba(6, 182, 212, 0.2);
    color: #38BDF8;
    border: 1px solid rgba(6, 182, 212, 0.4);
}

.rich-toast-badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.rich-toast-time {
    font-size: 11px;
    color: #64748B;
    font-weight: 500;
}

.rich-toast-close {
    background: transparent;
    border: none;
    color: #64748B;
    font-size: 15px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: var(--transition);
    line-height: 1;
}

.rich-toast-close:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

.rich-toast-main {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.rich-toast-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.rich-toast-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.rich-toast-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.3;
}

.rich-toast-subtitle {
    font-size: 11.5px;
    color: #94A3B8;
    font-weight: 600;
}

.rich-toast-desc {
    font-size: 11.5px;
    color: #CBD5E1;
    line-height: 1.45;
    margin-top: 4px;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rich-toast-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #64748B;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 8px;
    margin-top: 2px;
}

.rich-toast-meta strong {
    color: #06B6D4;
}

.rich-toast-recipients {
    color: #818CF8;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rich-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366F1, #8B5CF6);
    width: 100%;
    animation: toastProgress 5.5s linear forwards;
}

.rich-toast-card.critical .rich-toast-progress {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

.rich-toast-card.warning .rich-toast-progress {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.rich-toast-card.node .rich-toast-progress {
    background: linear-gradient(90deg, #06B6D4, #38BDF8);
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Light Theme for Rich Toast */
body.light-theme .rich-toast-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

body.light-theme .rich-toast-title {
    color: #0F172A;
}

body.light-theme .rich-toast-desc {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #334155;
}


/* ========================================================================== */
/* COMPREHENSIVE LIGHT THEME TEXT VISIBILITY & CONTRAST OVERHAUL              */
/* ========================================================================== */
body.light-theme {
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --bg-main: #F8FAFC;
    --bg-sidebar: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F5F9;
    --bg-input: #F1F5F9;
    --border-color: #E2E8F0;
    --border-glow: rgba(99, 102, 241, 0.15);
}

body.light-theme .top-nav-link {
    color: #475569;
}

body.light-theme .top-nav-link:hover,
body.light-theme .top-nav-link.active,
body.light-theme .top-nav-bold {
    color: #0F172A !important;
}

body.light-theme .dash-hero-title {
    color: #0F172A !important;
}

body.light-theme .dash-title-thin {
    color: #475569 !important;
}

body.light-theme .dash-timestamp-row {
    color: #475569 !important;
}

body.light-theme .dash-location-row {
    color: #334155 !important;
}

body.light-theme .stat-big-num {
    color: #0F172A !important;
}

body.light-theme .stat-label,
body.light-theme .card-mini-title {
    color: #475569 !important;
}

body.light-theme .stat-footer-text {
    color: #475569 !important;
    border-top-color: #E2E8F0 !important;
}

body.light-theme .stat-footer-text strong {
    color: #0F172A !important;
}

body.light-theme .risk-metric-label {
    color: #475569 !important;
}

body.light-theme .risk-subtext {
    color: #475569 !important;
}

body.light-theme .prompt-chip {
    background: #F1F5F9 !important;
    color: #334155 !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .prompt-chip:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--primary-indigo) !important;
    border-color: var(--primary-indigo) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15) !important;
}

body.light-theme .data-table th {
    background: #F8FAFC !important;
    color: #475569 !important;
    border-bottom-color: #CBD5E1 !important;
}

body.light-theme .data-table td {
    color: #0F172A !important;
    border-bottom-color: #E2E8F0 !important;
}

body.light-theme .data-table tr:hover td {
    background: #F1F5F9 !important;
}

body.light-theme .chat-bubble.ai,
body.light-theme .bot-bubble {
    background: #FFFFFF !important;
    color: #0F172A !important;
    border-color: #CBD5E1 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.light-theme .code-block {
    background: #0F172A !important;
    color: #F8FAFC !important;
}

body.light-theme .inline-code {
    background: #E2E8F0 !important;
    color: #0F172A !important;
}

body.light-theme .md-table-wrapper {
    border-color: #CBD5E1 !important;
    background: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .md-table thead {
    background: #F0F9FF !important;
    border-bottom-color: #BAE6FD !important;
}

body.light-theme .md-table th {
    color: #0284C7 !important;
}

body.light-theme .md-table td {
    color: #334155 !important;
    border-bottom-color: #F1F5F9 !important;
}

body.light-theme .md-table tbody tr:hover {
    background: #F8FAFC !important;
}

body.light-theme .md-table td strong {
    color: #0F172A !important;
}

body.light-theme .chat-input-bar input {
    background: #FFFFFF !important;
    color: #0F172A !important;
    border-color: #CBD5E1 !important;
}

body.light-theme .sat-chip {
    background: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    color: #334155 !important;
}

body.light-theme .sat-metric-val {
    color: #0F172A !important;
}

body.light-theme .sat-metric-label {
    color: #475569 !important;
}

body.light-theme .sat-metric-sub {
    color: #64748B !important;
}

body.light-theme .aod-row,
body.light-theme .schedule-card {
    background: #F8FAFC !important;
    border-color: #E2E8F0 !important;
}

body.light-theme .aod-loc,
body.light-theme .sched-top strong {
    color: #0F172A !important;
}

body.light-theme .aod-val,
body.light-theme .sched-desc {
    color: #475569 !important;
}

body.light-theme .node-card {
    background: #FFFFFF !important;
    border-color: #E2E8F0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.light-theme .node-name {
    color: #0F172A !important;
}

body.light-theme .node-meta-item strong {
    color: #0F172A !important;
}

body.light-theme .hw-mode-btn {
    background: #F8FAFC !important;
    border-color: #CBD5E1 !important;
    color: #334155 !important;
}

body.light-theme .hw-mode-btn.active {
    background: rgba(99, 102, 241, 0.12) !important;
    border-color: var(--primary-indigo) !important;
    color: var(--primary-indigo) !important;
}

body.light-theme .metric-mini-tile {
    background: #F8FAFC !important;
    border-color: #E2E8F0 !important;
}

body.light-theme .mini-val {
    color: #0F172A !important;
}

body.light-theme .mini-label {
    color: #475569 !important;
}
/* Multi-Hazard Map Top Header & Controls (Matching Image 1) */
.map-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.map-screen-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.map-screen-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.map-header-status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-my-location {
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    border: none;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transition: var(--transition);
}

.btn-my-location:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Colorful Filter Chips (Matching Reference Image 1) */
.layer-chip.chip-flood.active {
    border-color: #3B82F6 !important;
    background: rgba(59, 130, 246, 0.16) !important;
    color: #60A5FA !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.layer-chip.chip-fire.active {
    border-color: #EF4444 !important;
    background: rgba(239, 68, 68, 0.16) !important;
    color: #F87171 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.layer-chip.chip-landslide.active {
    border-color: #F59E0B !important;
    background: rgba(245, 158, 11, 0.16) !important;
    color: #FBBF24 !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.layer-chip.chip-aqi.active {
    border-color: #8B5CF6 !important;
    background: rgba(139, 92, 246, 0.16) !important;
    color: #C084FC !important;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.layer-chip.chip-temp.active {
    border-color: #F97316 !important;
    background: rgba(249, 115, 22, 0.16) !important;
    color: #FB923C !important;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.25);
}

.layer-chip.chip-quake.active {
    border-color: #06B6D4 !important;
    background: rgba(6, 182, 212, 0.16) !important;
    color: #22D3EE !important;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

.layer-chip.chip-heat.active {
    border-color: #DC2626 !important;
    background: rgba(220, 38, 38, 0.16) !important;
    color: #F87171 !important;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.25);
}

/* Teardrop Disaster Map Pins */
.custom-div-pin {
    background: transparent !important;
    border: none !important;
}

.disaster-pin-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disaster-pin-body {
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--pin-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px var(--pin-color), 0 3px 8px rgba(0, 0, 0, 0.5);
    border: 2px solid #FFFFFF;
}

.disaster-pin-body i {
    transform: rotate(45deg);
    font-size: 12px;
    color: #FFFFFF;
}

.disaster-pin-pulse {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--pin-color);
    animation: pinPulse 2s infinite ease-out;
    pointer-events: none;
}

@keyframes pinPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* High-Visibility 2D Map City Tags (Guaranteed Visible) */
.custom-city-tag-pin {
    background: transparent !important;
    border: none !important;
}

.mini-city-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(14, 18, 38, 0.95);
    border: 1.5px solid var(--c);
    border-radius: 14px;
    padding: 3px 8px 3px 4px;
    box-shadow: 0 0 12px var(--c), 0 4px 10px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s;
}

.mini-city-tag:hover {
    transform: scale(1.12);
    z-index: 1000;
}

.mini-tag-badge {
    background: var(--c);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
}

.mini-tag-name {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 11px;
}

.mini-city-tag.active-searched-tag {
    box-shadow: 0 0 20px var(--c), 0 0 35px var(--c), 0 4px 14px rgba(0, 0, 0, 0.85);
    border: 2px solid #FFFFFF;
    background: rgba(10, 14, 30, 0.98);
    transform: scale(1.08);
    animation: searchTagPulse 2.2s infinite ease-in-out;
}

@keyframes searchTagPulse {
    0%, 100% {
        box-shadow: 0 0 16px var(--c), 0 0 30px var(--c), 0 4px 14px rgba(0, 0, 0, 0.85);
        transform: scale(1.06);
    }
    50% {
        box-shadow: 0 0 26px var(--c), 0 0 50px var(--c), 0 6px 20px rgba(0, 0, 0, 0.95);
        transform: scale(1.16);
    }
}

/* Dedicated AQI Scale Range Bar Outside the Map */
.dash-aqi-range-bar-container {
    margin-top: 16px;
    width: 100%;
    z-index: 10;
}

.dash-aqi-scale-bar {
    display: flex;
    gap: 6px;
    background: rgba(14, 18, 38, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px 8px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    overflow-x: auto;
}

.aqi-step {
    flex: 1;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: #FFFFFF;
    background: var(--c);
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.aqi-step span {
    font-weight: 800;
}

.aqi-step.active-selected-range {
    transform: scale(1.05);
    box-shadow: 0 0 14px var(--c), 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 2px solid #FFFFFF;
    position: relative;
    z-index: 2;
    transition: all 0.25s ease;
}

body.light-theme .dash-aqi-scale-bar {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}
.aqi-range-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 0 4px;
}

.aqi-range-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.aqi-range-title i {
    color: #60A5FA;
}

.aqi-range-sub {
    font-size: 11px;
    color: var(--text-muted);
}

body.light-theme .aqi-range-title {
    color: #0F172A !important;
}

body.light-theme .aqi-range-sub {
    color: #64748B !important;
}
/* Search Bar Component (Exact Original AuraWebApp) */
.search-container {
    position: relative;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    width: 100%;
}

.search-input-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-input-box > i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 10px 16px 10px 44px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
    display: block;
}

.search-input:focus {
    border-color: var(--primary-indigo);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    background: linear-gradient(135deg, var(--primary-indigo), var(--primary-purple));
    color: #FFFFFF !important;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
    user-select: none;
}

.btn-primary:hover {
    opacity: 0.94;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #14172C;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7);
    z-index: 2500;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    backdrop-filter: blur(16px);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.autocomplete-item i {
    position: static !important;
    transform: none !important;
    font-size: 15px !important;
    width: 20px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    z-index: 1 !important;
}

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

.autocomplete-item:hover {
    background: rgba(99, 102, 241, 0.18);
}

body.light-theme .autocomplete-dropdown {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .autocomplete-item {
    border-bottom: 1px solid #F1F5F9 !important;
    color: #0F172A !important;
}

body.light-theme .autocomplete-item:hover {
    background: #F8FAFC !important;
}

.map-screen-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}
.topbar-title-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.topbar-dashboard-title {
    font-size: 20px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    user-select: none;
    line-height: 1.2;
    margin: 0;
}

.topbar-dashboard-subtitle {
    font-size: 11.5px;
    font-weight: 500;
    color: #64748B;
    letter-spacing: 0.1px;
    user-select: none;
    margin: 0;
    line-height: 1.2;
}

.topbar-right-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.topbar-sensor-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.topbar-sensor-pill.disconnected {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #EF4444;
}

.topbar-sensor-pill.disconnected:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.4);
}

.topbar-sensor-pill.live {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.topbar-sensor-pill.live:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.45);
}

body.light-theme .topbar-dashboard-title {
    color: #0F172A !important;
}

body.light-theme .topbar-dashboard-subtitle {
    color: #64748B !important;
}
/* Multi-Hazard Map Header Bar (Exact match to Reference Screenshot) */
.map-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 10px 0;
    width: 100%;
}

.map-header-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.map-header-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.map-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.map-sensor-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

.map-sensor-pill.connected {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
}

.map-sensor-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #EF4444;
    box-shadow: 0 0 8px #EF4444;
}

.map-sensor-pill.connected .map-sensor-dot {
    background-color: #10B981;
    box-shadow: 0 0 8px #10B981;
}

.map-notif-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}

.map-notif-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.map-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light-theme .map-header-title {
    color: #0F172A !important;
}

body.light-theme .map-header-sub {
    color: #64748B !important;
}

body.light-theme .map-notif-btn {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #334155;
}
/* Sensor Blind Spots Screen (Exact Match to Reference Image) */
.blind-spots-header-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    width: 100%;
    padding: 16px 20px;
    background: rgba(13, 17, 36, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    flex-wrap: wrap;
}

.blind-spots-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.blind-spot-logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blind-spots-title {
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    letter-spacing: -0.2px;
}

.aura-ai-pill {
    font-size: 10px;
    font-weight: 700;
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.35);
    color: #06B6D4;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.4px;
}

.blind-spots-sub {
    font-size: 11.5px;
    color: #64748B;
    margin: 2px 0 0 0;
}

.btn-regenerate-ai {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-regenerate-ai:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Cyan Info Shield Banner */
.blind-spots-info-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(8, 20, 42, 0.6);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 12px;
    color: #38BDF8;
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 20px;
    width: 100%;
}

.blind-spots-info-banner > i {
    color: #06B6D4;
    font-size: 15px;
    flex-shrink: 0;
}

/* Blind Spots Grid */
.blind-spots-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    width: 100%;
}

.blind-spot-card {
    background: rgba(11, 15, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    transition: all 0.15s ease;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(14px);
}

.blind-spot-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.bs-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.bs-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.bs-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.bs-title-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bs-location-title {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.bs-gap-sub {
    font-size: 11.5px;
    color: #64748B;
    margin-top: 2px;
}

.bs-severity-tag {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.bs-metric-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 10px;
}

.bs-metric-num {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}

.bs-metric-label {
    font-size: 12px;
    color: #64748B;
    font-weight: 500;
    margin-left: 8px;
}

.bs-desc-text {
    font-size: 12px;
    color: #94A3B8;
    line-height: 1.45;
    margin: 0 0 16px 0;
    flex: 1;
}

.bs-card-footer {
    display: flex;
    align-items: center;
}

.btn-view-map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-view-map:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.5);
}

/* Light theme support */
body.light-theme .blind-spots-header-box {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

body.light-theme .blind-spots-title {
    color: #0F172A;
}

body.light-theme .blind-spots-info-banner {
    background: #F0F9FF;
    border-color: #BAE6FD;
    color: #0284C7;
}

body.light-theme .blind-spot-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

body.light-theme .bs-location-title {
    color: #0F172A;
}

body.light-theme .bs-desc-text {
    color: #475569;
}

/* Light Theme Daytime Sky & Sun Flare for 3D Globe Hero */
body.light-theme .dash-hero-container {
    background: radial-gradient(circle at 68% 36%, rgba(240, 249, 255, 0.95) 0%, rgba(224, 242, 254, 0.85) 55%, rgba(248, 250, 252, 0.98) 100%) !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .dash-lens-flare {
    background: radial-gradient(circle, rgba(254, 240, 138, 0.45) 0%, rgba(251, 191, 36, 0.20) 45%, transparent 70%) !important;
}

/* ============================================================= */
/* MULTI-HAZARD DETECTION DASHBOARD EXTENSIONS                   */
/* ============================================================= */

/* Top Live Hazard Ticker Strip */
.dash-hazard-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.dash-hazard-pill {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.dash-hazard-pill:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.dash-hazard-pill-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.dash-hazard-pill-info {
    display: flex;
    flex-direction: column;
}

.dash-hazard-pill-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.dash-hazard-pill-val {
    font-size: 13px;
    font-weight: 700;
    color: #FFF;
}

/* Multi-Hazard Threat Spectrum */
.dash-threat-spectrum-container {
    background: rgba(14, 18, 35, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-top: 18px;
    backdrop-filter: blur(14px);
}

.dash-threat-spectrum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dash-threat-spectrum-title {
    font-size: 13px;
    font-weight: 700;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-threat-spectrum-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.dash-threat-spectrum-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.dash-threat-step {
    background: rgba(255, 255, 255, 0.03);
    border-top: 3px solid var(--step-color, #10B981);
    border-radius: 0 0 6px 6px;
    padding: 8px 10px;
    font-size: 11.5px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-threat-step strong {
    color: #FFF;
    font-size: 12px;
}

/* Live Multi-Hazard Incident Detection Grid */
.dash-incidents-section {
    margin-top: 20px;
}

.dash-incidents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.dash-incidents-title-group h3 {
    font-size: 16px;
    font-weight: 700;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-incidents-title-group p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dash-incidents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.dash-incident-card {
    background: rgba(14, 20, 40, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

.dash-incident-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
    background: var(--hazard-accent, #3B82F6);
}

.dash-incident-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.dash-incident-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.dash-incident-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #FFF;
}

.dash-incident-status-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
}

.dash-incident-loc {
    font-size: 14px;
    font-weight: 700;
    color: #FFF;
    margin-bottom: 4px;
}

.dash-incident-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
}

.dash-incident-metrics-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 12px;
}

.dash-incident-stat-box {
    display: flex;
    flex-direction: column;
}

.dash-incident-stat-label {
    font-size: 10px;
    color: var(--text-muted);
}

.dash-incident-stat-val {
    font-size: 12px;
    font-weight: 700;
    color: #FFF;
}

.dash-incident-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn-incident-map {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #FFF;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-incident-map:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38BDF8;
}

.btn-incident-alert {
    flex: 1;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    border: none;
    color: #FFF;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-incident-alert:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

/* Light theme overrides for Multi-Hazard extensions */
body.light-theme .dash-hazard-pill {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

body.light-theme .dash-hazard-pill-val {
    color: #0F172A;
}

body.light-theme .dash-threat-spectrum-container {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

body.light-theme .dash-threat-spectrum-title {
    color: #0F172A;
}

body.light-theme .dash-threat-step {
    background: #F8FAFC;
    border-color: var(--step-color, #10B981);
}

body.light-theme .dash-threat-step strong {
    color: #0F172A;
}

body.light-theme .dash-incident-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

body.light-theme .dash-incidents-title-group h3,
body.light-theme .dash-incident-loc,
body.light-theme .dash-incident-stat-val {
    color: #0F172A;
}

body.light-theme .dash-incident-desc {
    color: #475569;
}

body.light-theme .dash-incident-metrics-row {
    background: #F1F5F9;
}

body.light-theme .btn-incident-map {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #334155;
}

body.light-theme .btn-incident-map:hover {
    background: #E0F2FE;
    color: #0284C7;
    border-color: #7DD3FC;
}