/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

/* 应用容器 */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

/* 主容器 */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* 侧边栏 */
.sidebar {
    width: 200px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-content {
    display: none;
}

.sidebar.collapsed .card-body,
.sidebar.collapsed .card-header {
    display: none;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-content {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.card-body {
    padding: 1rem;
}

/* 用户卡片 */
.user-card .user-avatar {
    color: #1e3c72;
}

.user-card .card-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* 统计网格 */
.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-icon {
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-info {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

/* 图例 */
.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

/* 地图容器 */
.map-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* 地图控制按钮 */
.map-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.map-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 加载动画 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 消息容器 */
.message-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    max-width: 400px;
}

/* 弹出窗口样式 */
.mapboxgl-popup-content {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    min-width: 400px;
}

.popup-content h5 {
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.popup-details p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
}

/* 表单样式 */
.form-check {
    margin-bottom: 0.5rem;
}

.form-check-label {
    font-size: 0.9rem;
    cursor: pointer;
}

.form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
    
    .map-container {
        height: 60vh;
    }
    
    .sidebar.collapsed {
        width: 100%;
        height: 60px;
    }
    
    .sidebar.collapsed .sidebar-content {
        display: none;
    }
}

/* 滚动条样式 */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.global-loading{
    display: none;
}

/* 工具类 */
.text-primary { color: #1e3c72 !important; }
.text-success { color: #28a745 !important; }
.text-info { color: #17a2b8 !important; }
.text-warning { color: #ffc107 !important; }
.text-danger { color: #dc3545 !important; }

.bg-primary { background-color: #1e3c72 !important; }
.bg-success { background-color: #28a745 !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-danger { background-color: #dc3545 !important; }

/* 浮动提示样式 */
.floating-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    min-width: 300px;
    max-width: 500px;
    animation: slideInRight 0.3s ease;
}

.floating-alert .alert {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
}

/* 地图浮动弹窗 */
.floating-map-popup .mapboxgl-popup-content {
    padding: 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    animation: popupFadeIn 0.3s ease;
}

.popup-content {
    min-width: 250px;
}

.popup-header {
    padding: 15px 15px 10px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.popup-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.popup-close {
    opacity: 0.7;
    transition: 0.2s ease all;
}

.popup-close:hover {
    opacity: 1;
    scale: 1.2;
}

.popup-body {
    padding: 10px 15px 15px;
}

.popup-body p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

/* 动画效果 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .floating-alert {
        left: 10px;
        right: 10px;
        min-width: auto;
    }
    
    .floating-map-popup .mapboxgl-popup-content {
        max-width: 90vw;
    }
}

/* 用户资料弹窗样式 */
#userProfileModal .modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#userProfileModal .modal-header {
    height: 50px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.modal-content .modal-header{
    background-color: #1e3c72;
    color: white;
}

#userProfileModal .avatar-circle {
    transition: all 0.3s ease;
}

#userProfileModal .avatar-circle:hover {
    transform: scale(1.05);
}

#userProfileModal .detail-item {
    padding: 10px 0;
    transition: all 0.3s ease;
}

#userProfileModal .detail-item:hover {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding-left: 10px;
    padding-right: 10px;
}

#userProfileModal .detail-item:last-child {
    border-bottom: none;
}

/* 弹窗动画 */
.modal.fade .modal-dialog {
    transform: translateY(-50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 576px) {
    #userProfileModal .modal-dialog {
        margin: 10px;
    }
    
    #userProfileModal .detail-item .row {
        flex-direction: column;
        text-align: center;
    }
    
    #userProfileModal .detail-item .col-4 {
        margin-bottom: 5px;
    }
}

/* Element UI 风格消息框样式 */
.message-box-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    max-width: 380px;
    min-width: 300px;
    pointer-events: none;
}

.message-box-item {
    position: relative;
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    border: 1px solid #ebeef5;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
    animation: messageBoxSlideIn 0.4s cubic-bezier(0.55, 0, 0.1, 1) forwards;
}

.message-box-item.hiding {
    animation: messageBoxSlideOut 0.3s cubic-bezier(0.55, 0, 0.1, 1) forwards;
}

.message-box-item.success {
    border-left: 4px solid #67c23a;
    background: linear-gradient(135deg, #f0f9eb, #ffffff);
}

.message-box-item.error {
    border-left: 4px solid #f56c6c;
    background: linear-gradient(135deg, #fef0f0, #ffffff);
}

.message-box-item.warning {
    border-left: 4px solid #e6a23c;
    background: linear-gradient(135deg, #fdf6ec, #ffffff);
}

.message-box-item.info {
    border-left: 4px solid #909399;
    background: linear-gradient(135deg, #f4f4f5, #ffffff);
}

.message-box-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.message-box-icon {
    font-size: 16px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
}

.message-box-icon.success {
    color: #67c23a;
    background: #f0f9eb;
}

.message-box-icon.error {
    color: #f56c6c;
    background: #fef0f0;
}

.message-box-icon.warning {
    color: #e6a23c;
    background: #fdf6ec;
}

.message-box-icon.info {
    color: #909399;
    background: #f4f4f5;
}

.message-box-text {
    flex: 1;
    color: #606266;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.message-box-close {
    background: none;
    border: none;
    color: #c0c4cc;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.message-box-close:hover {
    color: #909399;
    background: #f5f7fa;
}

@keyframes messageBoxSlideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    70% {
        transform: translateX(-10%);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes messageBoxSlideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-box-container {
        left: 10px;
        right: 10px;
        max-width: none;
        min-width: auto;
    }
    
    .message-box-item {
        margin-bottom: 10px;
        padding: 12px 15px;
    }
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

/* 应用容器 */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

/* 主容器 */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* 侧边栏 */
.sidebar {
    width: 200px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-content {
    display: none;
}

.sidebar.collapsed .card-body,
.sidebar.collapsed .card-header {
    display: none;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-content {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.card-body {
    padding: 1rem;
}

/* 用户卡片 */
.user-card .user-avatar {
    color: #1e3c72;
}

.user-card .card-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* 统计网格 */
.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-icon {
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-info {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

/* 图例 */
.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

/* 地图容器 */
.map-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* 地图控制按钮 */
.map-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.map-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.map-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 加载动画 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 弹出窗口样式 */
.mapboxgl-popup-content {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    min-width: 400px;
}

.popup-content h5 {
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.popup-details p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
}

/* 表单样式 */
.form-check {
    margin-bottom: 0.5rem;
}

.form-check-label {
    font-size: 0.9rem;
    cursor: pointer;
}

.form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
    
    .map-container {
        height: 60vh;
    }
    
    .sidebar.collapsed {
        width: 100%;
        height: 60px;
    }
    
    .sidebar.collapsed .sidebar-content {
        display: none;
    }
}

/* 滚动条样式 */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.global-loading{
    display: none;
}

/* 工具类 */
.text-primary { color: #1e3c72 !important; }
.text-success { color: #28a745 !important; }
.text-info { color: #17a2b8 !important; }
.text-warning { color: #ffc107 !important; }
.text-danger { color: #dc3545 !important; }

.bg-primary { background-color: #1e3c72 !important; }
.bg-success { background-color: #28a745 !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-danger { background-color: #dc3545 !important; }

/* 浮动提示样式 */
.floating-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    min-width: 300px;
    max-width: 500px;
    animation: slideInRight 0.3s ease;
}

.floating-alert .alert {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
}

/* 地图浮动弹窗 */
.floating-map-popup .mapboxgl-popup-content {
    padding: 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    animation: popupFadeIn 0.3s ease;
}

.popup-content {
    min-width: 250px;
}

.popup-header {
    padding: 15px 15px 10px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.popup-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.popup-close {
    opacity: 0.7;
    transition: 0.2s ease all;
}

.popup-close:hover {
    opacity: 1;
    scale: 1.2;
}

.popup-body {
    padding: 10px 15px 15px;
}

.popup-body p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

/* 动画效果 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .floating-alert {
        left: 10px;
        right: 10px;
        min-width: auto;
    }
    
    .floating-map-popup .mapboxgl-popup-content {
        max-width: 90vw;
    }
}

/* 用户资料弹窗样式 */
#userProfileModal .modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#userProfileModal .modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background-color: #1e3c72;
    height: 50px;
}

#userProfileModal .avatar-circle {
    transition: all 0.3s ease;
}

#userProfileModal .avatar-circle:hover {
    transform: scale(1.05);
}

#userProfileModal .detail-item {
    padding: 10px 0;
    
    transition: all 0.3s ease;
}

#userProfileModal .detail-item:hover {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding-left: 10px;
    padding-right: 10px;
}

#userProfileModal .detail-item:last-child {
    border-bottom: none;
}

/* 弹窗动画 */
.modal.fade .modal-dialog {
    transform: translateY(-50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 576px) {
    #userProfileModal .modal-dialog {
        margin: 10px;
    }
    
    #userProfileModal .detail-item .row {
        flex-direction: column;
        text-align: center;
    }
    
    #userProfileModal .detail-item .col-4 {
        margin-bottom: 5px;
    }
}

/* 在文档1的CSS中添加以下样式 */

/* 侧边栏隐藏时控制面板文字隐藏 */
.sidebar.collapsed .sidebar-header h5 {
    display: none !important;
}

/* 紧凑的个人资料弹窗样式 */
#userProfileModal .modal-dialog.modal-sm {
    max-width: 350px;
}

#userProfileModal .modal-body {
    padding: 1rem;
}

#userProfileModal .user-details {
    font-size: 0.875rem;
}

#userProfileModal .detail-item {
    
    padding: 0.5rem 0;
}

#userProfileModal .detail-item:last-child {
    border-bottom: none;
}

/* 搜索结果显示样式 */
.search-result-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.advanced-search-result {
    cursor: pointer;
    transition: transform 0.2s;
}

.advanced-search-result:hover {
    transform: translateY(-2px);
}

/* 图层控制样式 */
.form-check-sm .form-check-input {
    transform: scale(0.8);
}

.form-check-sm .form-check-label {
    font-size: 0.8rem;
}

/* 聚合模式按钮样式 */
.btn-group-sm .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* 高级搜索弹窗样式 */
#advancedSearchModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#advancedSearchResults {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
    
    .map-container {
        height: 60vh;
    }
    
    .sidebar.collapsed {
        width: 100%;
        height: 60px;
    }
    
    .sidebar.collapsed .sidebar-content {
        display: none;
    }
    
    #advancedSearchModal .modal-dialog {
        margin: 1rem;
    }
}

/* 图层控制样式 */
.form-check-sm .form-check-input {
    transform: scale(0.8);
    margin-right: 0.3rem;
}

.form-check-sm .form-check-label {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
}

/* 模式切换按钮样式 */
.btn-group-sm .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.btn-group-sm .btn.active {
    background-color: #1e3c72;
    border-color: #1e3c72;
    color: white;
}

/* 分类颜色指示器 */
.category-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 0.5rem;
    border: 1px solid #ddd;
}

/* 高级搜索弹窗样式 */
#advancedSearchModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#advancedSearchResults {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
}

.advanced-search-result {
    cursor: pointer;
    transition: transform 0.2s;
}

.advanced-search-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 分类颜色指示器 */
.category-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 0.5rem;
    border: 1px solid #ddd;
}

/* 图层控制样式 */
.form-check-sm .form-check-input {
    transform: scale(0.8);
    margin-right: 0.3rem;
}

.form-check-sm .form-check-label {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
}

/* 模式切换按钮样式 */
.btn-group-sm .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.btn-group-sm .btn.active {
    background-color: #1e3c72;
    border-color: #1e3c72;
    color: white;
}

/* 全选框样式 */
.form-check-sm .form-check-input {
    transform: scale(0.8);
    margin-right: 0.3rem;
}

.form-check-sm .form-check-label {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
}

/* 全选复选框特殊样式 */
#selectAllPOI, #selectAllFence {
    margin-right: 0.3rem;
}

/* 分类颜色指示器 */
.category-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 0.5rem;
    border: 1px solid #ddd;
}

/* 图层控制容器样式 */
#poiLayersContainer, #fenceLayersContainer {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

/* 滚动条样式 */
#poiLayersContainer::-webkit-scrollbar,
#fenceLayersContainer::-webkit-scrollbar {
    width: 4px;
}

#poiLayersContainer::-webkit-scrollbar-track,
#fenceLayersContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

#poiLayersContainer::-webkit-scrollbar-thumb,
#fenceLayersContainer::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

#poiLayersContainer::-webkit-scrollbar-thumb:hover,
#fenceLayersContainer::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 全选标题样式 */
.layer-select-all {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
}

/* 模式切换按钮样式 */
.btn-group-sm .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.btn-group-sm .btn.active {
    background-color: #1e3c72;
    border-color: #1e3c72;
    color: white;
}
.mapboxgl-popup{
    max-width: 400px !important;
}
.mapboxgl-popup-close-button{
    display: none !important;
}
.mapboxgl-popup-content{
    padding: unset !important;
}
.popup-header{
    background-color: #1e3c72;
    color: white;
    font-weight: bold;
}

.mapboxgl-ctrl-logo{
    display: none !important;
}

/* Popup属性列表样式 */
.property-list {
    max-height: 300px;
    overflow-y: auto;
}

.property-item {
    border-bottom: 1px solid #f0f0f0;
}

.property-item:last-child {
    border-bottom: none;
}

.property-item small {
    font-size: 12px;
}

/* Popup滚动条样式 */
.property-list::-webkit-scrollbar {
    width: 4px;
}

.property-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.property-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.property-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Popup响应式调整 */
@media (max-width: 480px) {
    .mapboxgl-popup {
        max-width: 90vw !important;
    }
    
    .popup-content {
        min-width: auto !important;
    }
    
    .property-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .property-item small {
        font-size: 11px;
    }
}

.property-item{
    margin-right: 5px;
}

/* 围栏模式切换按钮样式 */
.fence-mode-buttons {
    margin-bottom: 15px;
}

.fence-mode-buttons .btn-group {
    width: 100%;
}

.fence-mode-buttons .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.fence-mode-buttons .btn.active {
    background-color: #1e3c72;
    border-color: #1e3c72;
    color: white;
}

.fence-heat-attribute select {
    font-size: 0.8rem;
    padding: 0.3rem;
}

/* 图例样式 */
.map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
    width: 250px;
}

/* 修改图例渐变颜色为红-黄-绿 */
.legend-gradient {
    height: 10px;
    width: 100%;
    background: linear-gradient(to right, #02355A, #145798, #367FCE, #71A8E3, #A6CBEF, #EAEAEA) !important;
    margin: 5px 0;
    border-radius: 2px;
}

.fence-layer-checkbox:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
}

.global-loading {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(255, 255, 255, 0.95) !important;
    z-index: 9999 !important;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#searchResults {
    display: none; /* 默认隐藏 */
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.search-result-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner-cyber {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-text {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #666;
}

.fence-heat-attribute{
    margin-bottom: 10px;
}

.loading-content {
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-content{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sidebar .choices__input--cloned {
    min-width: 6ch !important;
    width: auto !important;
}
.poi-category-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid #e9ecef;
    padding-top: 10px;
}

.poi-cat-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.poi-cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.8;
}

.poi-cat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.poi-cat-label {
    flex: 1;
    color: #555;
}

.poi-cat-count {
    font-weight: 600;
    color: #333;
}

.poi-cat-header .poi-cat-label {
    font-weight: 600;
    color: #333;
}

.poi-cat-children {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* channel indent */
.poi-cat-channel {
    padding-left: 18px;
    font-size: 12px;
    color: #666;
}

/* subchannel deeper indent */
.poi-cat-subchannel {
    padding-left: 36px;
    font-size: 11px;
    color: #888;
}

.poi-cat-sap {
  padding-left: 54px;
  font-size: 10px;
  color: #aaa;
}

/* ===== 侧边栏导航菜单 ===== */
.sidebar-nav {
  padding: 0.5rem;
  border-bottom: 1px solid #dee2e6;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: #495057;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.9rem;
}

.nav-item:hover {
  background: #e9ecef;
  color: #1e3c72;
  text-decoration: none;
}

.nav-item.active {
  background: #1e3c72;
  color: white;
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* 侧边栏折叠时 */
.sidebar.collapsed .nav-label {
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0.6rem;
}

.sidebar.collapsed .sidebar-nav {
  padding: 0.5rem 0.25rem;
}

/* ========================================
   Enterprise Filter Panel
   ======================================== */

.map-wrapper {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Map legend now inside .map-wrapper, keep it stuck to bottom-right */
.map-legend {
  position: absolute;
  bottom: 13px;
  right: 13px;
  background: white;
  padding: 7px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  display: none;
  width: 167px;
  font-size: 0.67rem;
}

.map-legend .legend-title small {
  font-size: 0.67rem;
}

.map-legend .legend-gradient {
  height: 7px;
  margin: 3px 0;
  border-radius: 2px;
}

.map-legend .legend-labels {
  font-size: 7px;
}

/* Mobile Filter Button */
.filter-mobile-header {
  display: none;
  flex-shrink: 0;
}

.filter-mobile-header .btn {
  border-radius: 10px;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
}

/* ========================================
   Filter Toggle Bar (desktop)
   ======================================== */

.filter-toggle-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 4px;
  flex-shrink: 0;
}

.filter-panel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-panel-toggle:hover {
  color: #1e3c72;
  border-color: #1e3c72;
  background: #f8fafc;
}

.filter-panel-toggle i {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

/* ========================================
   Filter Collapsible (slide animation)
   ======================================== */

.filter-collapsible {
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.25s ease-in-out;
  opacity: 1;
  max-height: 0;
}

.filter-collapsible.collapsed {
  max-height: 0 !important;
  opacity: 0;
}

.filter-collapsible-inner {
  overflow: hidden;
}

/* On mobile: hide the desktop toggle bar, show mobile toggle */
@media (max-width: 767.98px) {
  .filter-toggle-bar {
    display: none !important;
  }
  #filterCollapsible {
    max-height: none !important;
    opacity: 1 !important;
  }
  #filterCollapsible.collapsed {
    max-height: none !important;
    opacity: 1 !important;
  }
}

/* ===== 登录后页面顶栏视觉规范 ===== */
.app-container > .navbar {
  min-height: 58px;
  padding: 5px 22px;
  background: #fff !important;
  border: 0;
  border-bottom: 1px solid #eceaf3;
  box-shadow: none !important;
}

.app-container > .navbar .container-fluid {
  padding: 0;
}

.app-container .navbar-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  color: #414878;
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", sans-serif;
  font-size: 30px;
  font-weight: 700;
}

.navbar-logo {
  width: 100px;
  height: 80px;
  object-fit: contain;
}

.app-container > .navbar .nav-link {
  color: rgba(65, 72, 120, 0.82);
}

.app-container > .navbar .nav-link:hover,
.app-container > .navbar .nav-link:focus {
  color: #30345f;
}

.app-container > .navbar .navbar-toggler {
  border-color: rgba(65, 72, 120, 0.32);
}

.app-container > .navbar .navbar-toggler-icon {
  filter: invert(29%) sepia(15%) saturate(1460%) hue-rotate(195deg) brightness(88%);
}

/* 登录后侧边栏与登录页使用同一背景色 */
.app-container .sidebar,
.app-container .sidebar-header,
.app-container .sidebar-nav {
  background: #5b568f;
}

.app-container .sidebar {
  position: relative;
  overflow: hidden;
  color: #fff;
  border-right-color: rgba(255, 255, 255, 0.18);
}

.app-container .sidebar-header,
.app-container .sidebar-nav {
  position: relative;
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.2);
}

.app-container .sidebar-header h5 {
  color: #fff;
}

.app-container .sidebar-header .btn {
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.42);
}

.app-container .sidebar-header .btn:hover,
.app-container .sidebar-header .btn:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}

.app-container .sidebar-nav .nav-item {
  color: rgba(255, 255, 255, 0.82);
}

.app-container .sidebar-nav .nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.app-container .sidebar-nav .nav-item.active {
  color: #fff;
  background: #30345f;
  box-shadow: inset 3px 0 0 #d4af37;
}

/* Offcanvas Desktop Override */
@media (min-width: 768px) {
  #filterOffcanvas {
    position: static !important;
    transform: none !important;
    visibility: visible !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    z-index: auto !important;
    top: auto !important;
    left: auto !important;
    outline: none !important;
    flex-shrink: 0;
  }
  #filterOffcanvas.offcanvas-start {
    left: auto !important;
    top: auto !important;
    transform: none !important;
  }
  #filterOffcanvas .offcanvas-header {
    display: none !important;
  }
  #filterOffcanvas .offcanvas-body {
    padding: 16px 20px !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .offcanvas-backdrop.show {
    display: none !important;
  }
}

/* Offcanvas Mobile Styles */
@media (max-width: 767.98px) {
  .filter-mobile-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: white;
    border-bottom: 1px solid #e9ecef;
    gap: 8px;
  }
  #filterOffcanvas .offcanvas-body {
    padding: 16px;
  }
}

/* ========================================
   Filter Cards Grid - Responsive
   ======================================== */

.filter-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1399.98px) {
  .filter-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1199.98px) {
  .filter-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Filter Card
   ======================================== */

.filter-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.filter-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.01em;
  border-bottom: 1px solid #f1f5f9;
}

.filter-card-header i {
  font-size: 0.85rem;
  color: #1e3c72;
  opacity: 0.75;
}

.filter-card-body {
  padding: 16px 20px;
}

.filter-card-body:empty {
  padding: 0;
}

/* Compact card for minimal content */
.filter-card-body .filter-field:only-child {
  margin-top: 0;
}

.filter-field {
  margin-top: 12px;
}

.filter-field:first-child {
  margin-top: 0;
}

.filter-field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ========================================
   POI Checkbox Styles (Enterprise)
   ======================================== */

#poiLayersContainer .form-check {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 28px !important;
  margin-bottom: 0 !important;
  padding-left: 0 !important;
  gap: 4px !important;
}

#poiLayersContainer .form-check-input {
  width: 14px !important;
  height: 14px !important;
  transform: none !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  accent-color: #1e3c72;
}

#poiLayersContainer .form-check-label {
  font-size: 0.8125rem !important;
  color: #334155 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  cursor: pointer !important;
  line-height: 1.4 !important;
  margin-bottom: 0 !important;
}

#poiLayersContainer .category-color {
  display: inline-block !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 3px !important;
  flex-shrink: 0 !important;
  margin-right: 0 !important;
  border: none !important;
  vertical-align: middle !important;
}

/* POI checkbox group - vertical list */
#poiLayersContainer {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  max-height: 220px !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
}

/* ========================================
   Fence Tag Flow Layout
   ======================================== */

.fence-tag-wrap {
  position: relative;
}

.fence-tag-group {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.fence-tag-group .form-check {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 4px 14px 4px 10px !important;
  min-height: 30px !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 20px !important;
  background: #f8fafc !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.fence-tag-group .form-check:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

.fence-tag-group .form-check:has(.form-check-input:checked) {
  border-color: #1e3c72 !important;
  background: #eef2ff !important;
}

.fence-tag-group .form-check-input {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

.fence-tag-group .form-check-label {
  font-size: 0.8125rem !important;
  color: #334155 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  line-height: 1.3 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
}

.fence-tag-group .category-color {
  display: inline-block !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  border: none !important;
}

/* "展开更多" button */
.fence-toggle-btn {
  display: none;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fence-toggle-btn:hover {
  color: #1e3c72;
  border-color: #1e3c72;
  background: #f8fafc;
}

.fence-toggle-btn i {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

/* ========================================
   Stats Dashboard
   ======================================== */

.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  padding: 4px 0;
}

.stat-card {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 16px 14px 56px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  overflow: hidden;
  min-height: 72px;
}

.stat-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
}

.stat-card-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: #1e3c72;
  opacity: 0.15;
  width: 28px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.2;
  margin-bottom: 2px;
}

.stat-card .stat-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #8896ab;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   Form Controls Override
   ======================================== */

.form-select {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
  color: #334155;
  background-color: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus {
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

/* Mode toggle buttons */
.fence-mode-buttons .btn-group .btn {
  font-size: 0.75rem;
  padding: 0.3rem 0.5rem;
  border-color: #e2e8f0;
  color: #64748b;
}

.fence-mode-buttons .btn-group .btn.active {
  background-color: #1e3c72;
  border-color: #1e3c72;
  color: #ffffff;
  font-weight: 600;
}

.fence-mode-buttons .btn-group .btn:not(.active):hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

/* ===== 内容区域 ===== */
.content-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.content-view {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  background: #f8f9fa;
}

.content-view.active {
  display: block;
}

/* 非地图视图内容样式 */
.content-view .p-4 h4 {
  color: #1e3c72;
  font-weight: 600;
}

.content-view .card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-view .card-header {
  font-weight: 600;
  border-bottom: 1px solid #e9ecef;
}

.content-view .card-body .fw-bold {
  font-size: 1rem;
  color: #333;
}

/* BI report tabs */
.bi-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bi-report-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
}

.bi-report-card .card-header {
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.bi-report-tabs {
  flex-wrap: nowrap;
  min-width: max-content;
}

.bi-report-tabs .nav-link {
  color: #495057;
  white-space: nowrap;
  font-size: 0.875rem;
}

.bi-report-tabs .nav-link.active {
  color: #1e3c72;
  font-weight: 600;
}

.bi-report-body {
  flex: 1;
  min-height: 0;
  padding: 0;
}

.bi-report-content,
.bi-report-pane {
  height: 100%;
  min-height: 0;
}

.bi-report-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 640px;
  border: 0;
  background: #ffffff;
}

@media (max-width: 768px) {
  .bi-report-frame {
    min-height: 560px;
  }
}

/* ========================================
   Reference-style filter surface override
   ======================================== */

:root {
  --geo-blue: #0b3f97;
  --geo-blue-dark: #082c72;
  --geo-blue-soft: #eaf2ff;
  --geo-border: #e5eaf3;
  --geo-text: #0e2147;
  --geo-muted: #697894;
}

.filter-mobile-header {
  justify-content: flex-end;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--geo-blue-dark), var(--geo-blue));
  border-bottom: 0;
}

.filter-mobile-header .btn {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  color: #ffffff;
  font-weight: 700;
}

.filter-toggle-bar {
  margin: -2px 0 4px;
  padding: 0;
}

.filter-panel-toggle {
  min-height: 40px;
  padding: 0 22px;
  border-radius: 6px;
  border-color: rgba(255, 255, 255, 0.32);
  background: var(--geo-blue-dark);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(8, 44, 114, 0.2);
}

.filter-panel-toggle:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.62);
  background: #0a398b;
}

.filter-collapsible-inner {
  padding: 0;
}

.filter-cards-grid {
  grid-template-columns: minmax(430px, 1.55fr) minmax(250px, 0.6fr) minmax(340px, 0.9fr);
  align-items: stretch;
  gap: 16px;
}

.filter-card {
  border: 1px solid var(--geo-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(11, 63, 151, 0.08);
  overflow: visible;
}

.filter-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(11, 63, 151, 0.12);
}

.filter-card.heatRankFilterContainer {
  position: relative;
  z-index: 4;
}

.heatRankFilterContainer .choices {
  position: relative;
  z-index: 5;
  overflow: visible;
}

.heatRankFilterContainer .filter-field {
  position: relative;
  z-index: 1;
}

.heatRankFilterContainer .filter-field:focus-within,
.heatRankFilterContainer .filter-field:has(.choices.is-open) {
  z-index: 70;
}

.heatRankFilterContainer .choices.is-open {
  z-index: 80;
}

.heatRankFilterContainer .choices__list--dropdown {
  z-index: 90;
}

.filter-card-header {
  min-height: 52px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--geo-border);
  color: var(--geo-text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.filter-card-header i,
.stats-title i {
  display: inline-flex;
  width: 22px;
  justify-content: center;
  color: var(--geo-blue);
  font-size: 1.05rem;
  opacity: 1;
}

.filter-card-body {
  padding: 18px 22px 20px;
}

.filter-field-label {
  margin-bottom: 9px;
  color: #1d2b44;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.filter-card:first-child .filter-card-body {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(260px, 1.28fr);
  gap: 18px 26px;
}

.filter-field {
  margin-top: 0;
}

.filter-field-head {
  min-height: 25px;
  margin-bottom: 9px;
}

.form-select,
.choices__inner {
  min-height: 42px;
  border: 1px solid #dbe3ef !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  color: #34415a;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(11, 63, 151, 0.03);
}

.form-select:focus,
.choices.is-focused .choices__inner {
  border-color: #7aa7eb !important;
  box-shadow: 0 0 0 3px rgba(11, 63, 151, 0.12) !important;
}

#poiLayersContainer,
#fenceLayersContainer {
  max-height: none !important;
  overflow: visible !important;
  padding-right: 0 !important;
}

#poiLayersContainer {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 10px 12px !important;
}

#fenceLayersContainer > .d-flex {
  display: none !important;
}

#poiLayersContainer .mb-2 {
  display: contents !important;
}

#poiLayersContainer .mb-2 > .d-flex {
  display: none !important;
}

#poiLayersContainer .form-check,
.filter-card-body > .filter-field-head .form-check {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 34px !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#poiLayersContainer .form-check-input,
.filter-card-body > .filter-field-head .form-check-input,
#selectAllPOI,
#selectAllFence {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  border: 1px solid #cfd8e6;
  border-radius: 4px;
  accent-color: var(--geo-blue);
  cursor: pointer;
}

#poiLayersContainer .form-check-label,
.filter-card-body > .filter-field-head .form-check-label {
  color: #24324a !important;
  font-size: 0.875rem !important;
  font-weight: 600;
  line-height: 1.35 !important;
}

#poiLayersContainer .category-color {
  width: 9px !important;
  height: 9px !important;
  border-radius: 2px !important;
}

.fence-mode-buttons .btn-group {
  gap: 8px;
}

.fence-mode-buttons .btn-group .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px !important;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  color: #34415a;
  font-size: 0.875rem;
  font-weight: 700;
}

.fence-mode-buttons .btn-group .btn.active {
  background: linear-gradient(135deg, var(--geo-blue-dark), var(--geo-blue));
  border-color: var(--geo-blue);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(11, 63, 151, 0.22);
}

.fence-tag-wrap {
  padding-top: 2px;
}

.fence-tag-group {
  gap: 10px !important;
}

.fence-tag-group .form-check {
  min-height: 36px !important;
  padding: 0 13px !important;
  border: 1px solid #dfe6f1 !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(11, 63, 151, 0.04);
}

.fence-tag-group .form-check:hover {
  border-color: #b9c9df !important;
  background: #f8fbff !important;
}

.fence-tag-group .form-check:has(.form-check-input:checked) {
  border-color: #bfd4f4 !important;
  background: var(--geo-blue-soft) !important;
  color: var(--geo-blue);
}

.fence-tag-group .form-check-label {
  color: #33415d !important;
  font-size: 0.8125rem !important;
}

.fence-tag-group .category-color {
  width: 10px !important;
  height: 10px !important;
  border-radius: 3px !important;
}

.fence-toggle-btn {
  border: 0;
  color: var(--geo-blue);
  font-weight: 700;
}

.stats-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 -4px;
  color: var(--geo-text);
  font-size: 1rem;
  font-weight: 800;
}

.stats-dashboard {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 16px;
  padding: 0;
}

.stat-card {
  min-height: 92px;
  padding: 17px 58px 16px 20px;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 74%);
  box-shadow: 0 8px 22px rgba(11, 63, 151, 0.07);
}

.stat-card:nth-child(2),
.stat-card:nth-child(7) {
  border-color: #ccebdc;
  background: linear-gradient(135deg, #f0fbf5 0%, #ffffff 74%);
}

.stat-card:nth-child(3),
.stat-card:nth-child(8) {
  border-color: #f6ddb5;
  background: linear-gradient(135deg, #fff8ec 0%, #ffffff 74%);
}

.stat-card:nth-child(4),
.stat-card:nth-child(9) {
  border-color: #cce9e1;
  background: linear-gradient(135deg, #eefbf8 0%, #ffffff 74%);
}

.stat-card:nth-child(5),
.stat-card:nth-child(10) {
  border-color: #ded2fb;
  background: linear-gradient(135deg, #f7f2ff 0%, #ffffff 74%);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(11, 63, 151, 0.12);
}

.stat-card-icon {
  left: auto;
  right: 18px;
  width: 26px;
  color: var(--geo-blue);
  font-size: 1.55rem;
  opacity: 0.42;
}

.stat-card .stat-value {
  color: var(--geo-text);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
}

.stat-card .stat-label {
  color: #475672;
  font-size: 0.875rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .map-container {
    background: #f6f8fc;
  }

  #filterOffcanvas .offcanvas-body {
    position: relative;
    padding: 18px 26px 22px !important;
    gap: 18px;
    background: #f7f9fd;
    border-bottom: 1px solid var(--geo-border);
  }

  #filterOffcanvas .offcanvas-body::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 68px;
    background: linear-gradient(135deg, var(--geo-blue-dark), var(--geo-blue));
    pointer-events: none;
  }

  #filterOffcanvas .offcanvas-body > * {
    position: relative;
    z-index: 1;
  }

  .filter-cards-grid .filter-card:nth-child(4) {
    grid-column: 1 / -1;
  }

  .map-wrapper {
    flex: 1;
  }
}

@media (max-width: 1399.98px) {
  .filter-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-card:first-child .filter-card-body {
    grid-template-columns: 1fr;
  }

  .stats-dashboard {
    grid-template-columns: repeat(4, minmax(145px, 1fr));
  }
}

@media (max-width: 991.98px) {
  .filter-cards-grid,
  .stats-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #poiLayersContainer {
    grid-template-columns: repeat(2, minmax(86px, 1fr));
  }
}

@media (max-width: 767.98px) {
  #filterOffcanvas.offcanvas-start {
    width: min(86vw, 340px);
    border-right: 0;
    border-radius: 0 18px 18px 0;
    overflow: hidden;
    box-shadow: 14px 0 34px rgba(8, 44, 114, 0.24);
  }

  #filterOffcanvas .offcanvas-header {
    min-height: 64px;
    padding: 15px 18px;
    border-bottom: 0;
    background: linear-gradient(135deg, var(--geo-blue-dark), var(--geo-blue));
    color: #ffffff;
  }

  #filterOffcanvas .offcanvas-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 800;
  }

  #filterOffcanvas .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
    opacity: 0.85;
  }

  #filterOffcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 12px 18px !important;
    background: #f6f8fc;
  }

  .filter-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .filter-card:first-child .filter-card-body {
    display: block;
  }

  .filter-card {
    border-radius: 8px;
  }

  .filter-card-header {
    min-height: 44px;
    padding: 12px 14px;
    font-size: 0.875rem;
  }

  .filter-card-body {
    padding: 13px 14px 15px;
  }

  .filter-field + .filter-field {
    margin-top: 14px;
  }

  #poiLayersContainer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 10px !important;
  }

  .fence-tag-group {
    gap: 7px !important;
  }

  .fence-tag-group .form-check {
    min-height: 28px !important;
    padding: 0 8px !important;
  }

  .stats-title {
    margin-top: 2px;
    font-size: 0.9rem;
  }

  .stats-dashboard {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat-card {
    min-height: 74px;
    padding: 13px 48px 12px 14px;
  }

  .stat-card .stat-value {
    font-size: 1.35rem;
  }
}

/* ========================================
   Three-column map workspace
   ======================================== */

@media (min-width: 768px) {
  .map-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
    background: #eef3fa;
  }

  .map-side-panel {
    position: relative;
    z-index: 4;
    min-width: 0;
    height: 100%;
    background: #f7f9fd;
    transition: flex-basis 0.28s ease, width 0.28s ease, box-shadow 0.28s ease;
  }

  #filterOffcanvas.map-filter-panel {
    position: relative !important;
    flex: 0 0 260px;
    width: 260px !important;
    height: 100% !important;
    overflow: visible !important;
    border-right: 1px solid var(--geo-border) !important;
    box-shadow: 10px 0 26px rgba(11, 63, 151, 0.08);
    z-index: 20 !important;
  }

  .map-stats-panel {
    flex: 0 0 180px;
    width: 180px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--geo-border);
    box-shadow: -10px 0 26px rgba(11, 63, 151, 0.06);
  }

  .map-center-panel {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    position: relative;
    display: flex;
    background: #dfe8f5;
    z-index: 1;
  }

  .map-edge-toggle {
    position: absolute;
    top: 50%;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 56px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 6px;
    background: var(--geo-blue-dark);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(8, 44, 114, 0.22);
    transform: translateY(-50%);
    cursor: pointer;
  }

  .map-edge-toggle-left {
    left: 8px;
  }

  .map-edge-toggle-right {
    right: 8px;
  }

  .map-container.filter-panel-collapsed .map-edge-toggle-left,
  .map-container.stats-panel-collapsed .map-edge-toggle-right {
    display: inline-flex;
  }

  .map-wrapper {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
  }

  #filterOffcanvas .offcanvas-body {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 10px 14px !important;
    border-bottom: 0;
  }

  #filterOffcanvas .offcanvas-body::before {
    height: 58px;
  }

  .filter-toggle-bar,
  .stats-toggle-bar {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
  }

  .filter-toggle-bar {
    justify-content: flex-end;
    margin: 0 0 12px;
  }

  .stats-toggle-bar {
    justify-content: flex-start;
    min-height: 58px;
    padding: 10px 14px 8px;
    background: linear-gradient(135deg, var(--geo-blue-dark), var(--geo-blue));
  }

  .side-panel-toggle {
    min-width: 38px;
    min-height: 38px;
    justify-content: center;
  }

  .stats-panel-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 6px;
    background: var(--geo-blue-dark);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(8, 44, 114, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
  }

  .stats-panel-toggle:hover {
    border-color: rgba(255, 255, 255, 0.62);
    background: #0a398b;
  }

  .filter-collapsible {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible;
  }

  #filterOffcanvas .filter-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    grid-template-columns: none;
  }

  .filter-card:first-child .filter-card-body {
    display: block;
  }

  .filter-card-body {
    padding: 12px 12px 14px;
  }

  .filter-field + .filter-field {
    margin-top: 14px;
  }

  #poiLayersContainer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 9px !important;
  }

  .stats-panel-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 10px 14px;
  }

  .map-stats-panel .stats-title {
    margin: 0 0 14px;
  }

  .map-stats-panel .stats-dashboard {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .map-stats-panel .stat-card {
    min-height: 72px;
    padding: 12px 40px 11px 14px;
  }

  .map-stats-panel .stat-card-icon {
    right: 12px;
    font-size: 1.35rem;
  }

  .map-stats-panel .stat-card .stat-value {
    font-size: 1.38rem;
  }

  .map-stats-panel .stat-card .stat-label {
    font-size: 0.8125rem;
  }

  #filterOffcanvas.map-filter-panel.panel-collapsed {
    flex-basis: 0;
    width: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border-right: 0 !important;
    box-shadow: none;
    z-index: 3000 !important;
    pointer-events: none;
  }

  .map-filter-panel.panel-collapsed .offcanvas-body {
    position: relative;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }

  .map-filter-panel.panel-collapsed .offcanvas-body::before {
    display: none;
  }

  .map-filter-panel.panel-collapsed .filter-toggle-bar {
    display: none;
  }

  .map-filter-panel.panel-collapsed .filter-collapsible {
    display: none;
  }

  .map-filter-panel.panel-collapsed .filter-panel-toggle,
  .map-stats-panel.panel-collapsed .stats-panel-toggle {
    width: 40px;
    min-width: 40px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(8, 44, 114, 0.22);
    pointer-events: auto;
  }

  .map-filter-panel.panel-collapsed .filter-panel-toggle span,
  .map-stats-panel.panel-collapsed .stats-panel-toggle span {
    display: none;
  }

  .map-stats-panel.panel-collapsed {
    flex-basis: 0;
    width: 0;
    overflow: visible;
    background: transparent;
    border-left: 0;
    box-shadow: none;
  }

  .map-stats-panel.panel-collapsed .stats-toggle-bar {
    display: none;
  }

  .map-stats-panel.panel-collapsed .stats-panel-content {
    display: none;
  }
}

@media (min-width: 1200px) {
  #filterOffcanvas.map-filter-panel {
    flex-basis: 260px;
    width: 260px !important;
  }

  .map-stats-panel {
    flex-basis: 180px;
    width: 180px;
  }
}

@media (max-width: 991.98px) and (min-width: 768px) {
  #filterOffcanvas.map-filter-panel {
    flex-basis: 260px;
    width: 260px !important;
  }

  .map-stats-panel {
    flex-basis: 180px;
    width: 180px;
  }

  #poiLayersContainer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .map-container {
    flex-direction: column;
  }

  .map-center-panel {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
  }

  .map-wrapper {
    min-height: 0;
  }

  .map-stats-panel {
    max-height: 36vh;
    overflow-y: auto;
    border-top: 1px solid var(--geo-border);
    background: #f7f9fd;
  }

  .stats-toggle-bar {
    display: none;
  }

  .stats-panel-content {
    padding: 12px;
  }
}
