/* ============================================================
   长卿地图查询 v3.0 - 全局样式
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", sans-serif;
    overflow: hidden;
}

#map-container {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0; left: 0;
    /* 创建独立堆叠上下文：内部置顶的村名标签不会盖住侧边栏(1000)/弹窗(2000) */
    z-index: 0;
}

/* 村名标签：默认置顶可点击；信息窗打开时降级避免遮挡 */
.village-label.below-info {
    z-index: 150 !important;
    pointer-events: none !important;
}

/* ==================== 左侧图层面板 ==================== */
#layer-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    width: 200px;
    overflow: hidden;
}
.panel-header {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 1px solid #f0f0f0;
    display: flex; align-items: center; gap: 6px;
}
.panel-icon { font-size: 16px; }

.layer-list {
    padding: 8px 0;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
}

.layer-category {
    margin-bottom: 2px;
}
.layer-category-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.layer-category-header:hover { background: #f9fafb; }
.layer-category-icon { font-size: 14px; }
/* 一级大类全选 checkbox */
.cat-toggle-wrap {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.cat-toggle {
    width: 15px;
    height: 15px;
    accent-color: #3b82f6;
    cursor: pointer;
    margin: 0;
}
.cat-toggle:indeterminate {
    accent-color: #3b82f6;
}
.layer-category-arrow {
    margin-left: auto;
    font-size: 11px;
    color: #9ca3af;
    transition: transform 0.2s;
}
.layer-category.collapsed .layer-category-arrow {
    transform: rotate(-90deg);
}
.layer-category-children {
    overflow: hidden;
    transition: max-height 0.2s ease;
}
.layer-category.collapsed .layer-category-children {
    max-height: 0;
}

/* 二级场景折叠组 */
.layer-scene-group {
    margin-bottom: 0;
}
.layer-scene-header {
    cursor: pointer;
    user-select: none;
    position: relative;
}
.layer-scene-arrow {
    margin-left: auto;
    font-size: 10px;
    color: #9ca3af;
    transition: transform 0.2s;
    flex-shrink: 0;
    padding-right: 4px;
}
.layer-scene-group.collapsed .layer-scene-arrow {
    transform: rotate(-90deg);
}
.layer-scene-body {
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.layer-scene-group.collapsed .layer-scene-body {
    max-height: 0;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: background 0.15s;
    user-select: none;
}
.layer-item:hover { background: #f9fafb; }
.layer-item input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}
.layer-color {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.layer-name { flex: 1; }
.layer-item.active-scene {
    background: #eff6ff;
    border-right: 3px solid #3b82f6;
}
.layer-item.active-scene .layer-name {
    font-weight: 600;
    color: #1d4ed8;
}
.layer-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 12px;
}

/* 图层面板统计 */
.panel-stats {
    border-top: 1px solid #f0f0f0;
    padding: 8px 16px 10px;
    font-size: 12px;
}
/* 安全大类内嵌的统计区 */
.layer-category-children .panel-stats {
    margin-bottom: 4px;
    border-top-color: #e5e7eb;
}
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    color: #6b7280;
}
.stat-row span:last-child { font-weight: 600; color: #1a1a1a; }
.stat-row.pending span:last-child { color: #ef4444; }
.stat-row.rectifying span:last-child { color: #f59e0b; }
.stat-row.rectified span:last-child { color: #10b981; }

/* ==================== 右侧控制面板 ==================== */
#control-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    padding: 18px;
    width: 300px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    transition: width 0.25s ease;
}
/* 表单展开时面板加宽 */
#control-panel.has-form {
    width: 520px;
}
#control-panel h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 600;
}

/* 场景按钮 */
.scene-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.scene-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: all 0.2s;
}
.scene-btn:hover { border-color: #93c5fd; background: #f8faff; }
.scene-btn.active {
    border-color: #3b82f6;
    background: #eff6ff;
    font-weight: 600;
    color: #1d4ed8;
}
.scene-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 操作按钮 */
.actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.action-btn {
    flex: 1;
    padding: 9px 0;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.action-btn:hover { background: #e5e7eb; }
.action-btn.primary {
    background: #3b82f6;
    color: white;
}
.action-btn.primary:hover { background: #2563eb; }

/* ==================== 通用隐藏（任何元素加 .hidden 即隐藏） ==================== */
.hidden { display: none !important; }

/* ==================== 用户登录区（更多操作上方） ==================== */
.auth-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 4px;
    border-top: 1px solid #e5e7eb;
}
/* 未登录状态：登录/注册按钮横向排列 */
#auth-logged-out {
    display: flex;
    gap: 8px;
    width: 100%;
}
.auth-btn {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.auth-btn.login {
    background: #b91c1c;
    color: #fff;
}
.auth-btn.login:hover { background: #991b1b; }
.auth-btn.register {
    background: #fff;
    color: #1e3a8a;
    border: 1px solid #1e3a8a;
}
.auth-btn.register:hover { background: #eff6ff; }
.auth-btn.logout {
    flex: 0 0 auto;
    padding: 5px 14px;
    background: #fff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}
.auth-btn.logout:hover { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }
#auth-logged-in {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.auth-user-icon {
    font-size: 16px;
}
.auth-user-name {
    flex: 1;
    font-size: 13px;
    color: #1a1a1a;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.auth-role {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    font-weight: 400;
}
.auth-role.admin { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-role.staff { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.auth-role.village { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
/* 尊贵用户：金色标签（与小程序端一致） */
.auth-role.normal { background: #fffbeb; color: #b45309; border: 1px solid #fcd34d; }
.auth-role.village-name {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    font-weight: 400;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

/* 村级辖区提示条（更多操作面板内） */
.village-scope-tip {
    margin: 0 0 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 12px;
    line-height: 1.6;
}
.village-scope-tip b { color: #b45309; }

/* 登录提示 toast */
.auth-toast {
    margin: 6px 0;
    padding: 9px 12px;
    border-radius: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 12px;
    text-align: center;
}

/* 登录/注册弹窗 */
.auth-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.auth-modal-card {
    background: #fff;
    border-radius: 14px;
    width: 400px;
    max-width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.25);
    animation: authPop 0.22s ease;
}
@keyframes authPop {
    from { transform: scale(0.94) translateY(8px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff;
    border-radius: 14px 14px 0 0;
}
.auth-modal-header h3 { font-size: 16px; color: #fff; }
.auth-modal-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 28px; height: 28px;
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
}
.auth-modal-close:hover { background: rgba(255,255,255,0.3); }
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}
.auth-tab {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.auth-tab.active {
    color: #1e3a8a;
    font-weight: 600;
    border-bottom-color: #1e3a8a;
}
.auth-modal-body { padding: 20px; }
.auth-modal-body label {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-bottom: 12px;
    font-weight: 500;
}
.auth-modal-body input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 5px;
    box-sizing: border-box;
}
.auth-modal-body input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.req { color: #b91c1c; }
.auth-msg {
    min-height: 18px;
    font-size: 12px;
    margin-bottom: 8px;
}
.auth-msg-error { color: #b91c1c; }
.auth-msg-ok { color: #065f46; }
.auth-submit {
    width: 100%;
    padding: 11px 0;
    border: none;
    border-radius: 8px;
    background: #1e3a8a;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
.auth-submit:hover { background: #2563eb; }
.auth-submit:disabled { background: #9ca3af; cursor: not-allowed; }
.auth-register-tip {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 图片验证码行：输入框 + 可点击刷新的图片 */
.auth-captcha-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}
.auth-captcha-row input {
    flex: 1;
    margin-top: 0;
}
.auth-captcha-img {
    width: 110px;
    height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    background: #f3f4f6;
    flex-shrink: 0;
}

/* 短信验证码行：输入框 + 获取验证码按钮 */
.auth-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}
.auth-code-row input {
    flex: 1;
    margin-top: 0;
}
.auth-code-btn {
    padding: 9px 12px;
    border: 1px solid #2563eb;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.auth-code-btn:hover { background: #dbeafe; }
.auth-code-btn:disabled {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

/* 登录模式切换链接（账号密码 ↔ 手机验证码） */
.auth-switch-row {
    text-align: right;
    margin-bottom: 10px;
}
.auth-switch-row a {
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
}
.auth-switch-row a:hover { text-decoration: underline; }

/* 更多操作折叠面板 */
.toggle-more-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 0;
    margin: 8px 0 4px;
    border: none;
    border-top: 1px solid #e5e7eb;
    background: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 13px;
    transition: color 0.2s;
}
.toggle-more-btn:hover { color: #3b82f6; }
.toggle-more-btn .toggle-arrow {
    font-size: 11px;
    transition: transform 0.2s;
    display: inline-block;
}
.toggle-more-btn.expanded .toggle-arrow {
    transform: rotate(90deg);
}
.more-actions-panel {
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.more-actions-panel.collapsed {
    max-height: 0;
}
.more-actions-panel:not(.collapsed) {
    max-height: 1200px;
}

/* 场景信息 */
.scene-info {
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
    font-size: 13px;
    color: #6b7280;
}
.scene-info p { margin: 3px 0; }
.scene-info strong { color: #1a1a1a; }

/* 搜索 */
.search-box { display: flex; gap: 6px; margin-bottom: 8px; }
.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.search-box input:focus { border-color: #3b82f6; }
.search-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}
.search-btn:hover { background: #2563eb; }

/* 搜索结果 */
.search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    background: white;
}
.search-results.hidden { display: none; }
.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    transition: background 0.15s;
}
.search-result-item:hover { background: #eff6ff; }
.search-result-item:last-child { border-bottom: none; }
.search-result-name { font-weight: 600; color: #1a1a1a; }
.search-result-meta { color: #6b7280; font-size: 11px; margin-top: 2px; }

/* 内联点位表单 */
.point-form { border-top: 1px solid #e5e7eb; padding-top: 12px; margin-top: 10px; }
.point-form.hidden { display: none; }
.point-form h3 { font-size: 15px; margin-bottom: 10px; color: #1a1a1a; }

/* 表单头部带关闭按钮 */
.point-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.point-form-header h3 { margin-bottom: 0; }
.point-form-close-btn {
    width: 28px; height: 28px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.point-form-close-btn:hover { background: #e5e7eb; color: #1a1a1a; }

/* 两列表单 */
.form-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}
.form-col { display: flex; flex-direction: column; }
.point-form label {
    display: block;
    margin-bottom: 9px;
    font-size: 12px;
    color: #6b7280;
}
.point-form input,
.point-form select,
.point-form textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 3px;
    outline: none;
}
.point-form input:focus,
.point-form select:focus,
.point-form textarea:focus { border-color: #3b82f6; }

.locate-hint {
    font-size: 12px;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 7px 10px;
    margin-bottom: 10px;
}
.locate-hint.hidden, #locate-search-block.hidden { display: none; }

.photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.photo-preview img {
    width: 60px; height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.upload-section { margin-top: 4px; }
.upload-section label {
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
}
.upload-section input[type="file"] {
    padding: 4px 0;
    font-size: 12px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.btn-primary {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #3b82f6;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.btn-primary:hover { background: #2563eb; }
.btn-secondary {
    flex: 1;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    cursor: pointer;
    font-size: 14px;
}
.btn-secondary:hover { background: #f9fafb; }

/* 导入消息 */
.import-msg {
    font-size: 12px;
    color: #374151;
    margin-top: 6px;
    line-height: 1.5;
}

/* ==================== 村庄详情浮层 ==================== */
.village-detail-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.village-detail-overlay.hidden { display: none; }

.village-detail-card {
    background: white;
    border-radius: 16px;
    width: 720px;
    max-width: 92vw;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,0.2);
    position: relative;
    padding: 32px;
}
.village-detail-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    border: none;
    border-radius: 50%;
    background: #f3f4f6;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.village-detail-close:hover { background: #e5e7eb; color: #1a1a1a; }

.village-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.village-detail-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.village-stat-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}
.village-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e3a8a;
}
.village-stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.village-detail-section {
    margin-bottom: 16px;
}
.village-detail-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.village-detail-section p {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.7;
}
.village-detail-section .info-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}
.village-detail-section .info-row:last-child { border-bottom: none; }
.info-label { color: #9ca3af; }

.village-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.village-photos img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s;
}
.village-photos img:hover { transform: scale(1.03); }

/* ==================== 隐患对比信息窗 v3.1 新版 ==================== */
.hazard-info-window {
    min-width: 340px;
    max-width: 440px;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    padding: 4px;
}
.hazard-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}
.hazard-info-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}
.hazard-status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.hazard-status-badge.pending { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; }
.hazard-status-badge.rectifying { background: #fffbeb; color: #f59e0b; border: 1px solid #fde68a; }
.hazard-status-badge.rectified { background: #ecfdf5; color: #10b981; border: 1px solid #a7f3d0; }
.hazard-status-badge.closed { background: #f9fafb; color: #6b7280; border: 1px solid #e5e7eb; }

.hazard-info-meta {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    line-height: 1.5;
}
.hazard-info-meta span { color: #374151; }

/* 照片对比区 v3.1 重构 */
.hazard-photo-section {
    margin-top: 12px;
}
.hazard-photo-section-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.hazard-photo-section-title.before { color: #ef4444; }
.hazard-photo-section-title.after { color: #10b981; }

.hazard-photo-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-behavior: smooth;
}
.hazard-photo-strip::-webkit-scrollbar {
    height: 4px;
}
.hazard-photo-strip::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}
.hazard-photo-item {
    flex-shrink: 0;
    width: 140px;
    height: 105px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}
.hazard-photo-item:hover {
    transform: scale(1.04);
    border-color: #93c5fd;
}
.hazard-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hazard-photo-empty {
    flex-shrink: 0;
    width: 140px;
    height: 105px;
    border-radius: 8px;
    border: 2px dashed #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 12px;
    text-align: center;
}

.hazard-photo-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 10px 0;
}

.hazard-info-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.hazard-info-actions button {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.hazard-info-actions button:hover { opacity: 0.9; transform: translateY(-1px); }
.hazard-btn-edit { background: #eff6ff; color: #3b82f6; border: 1px solid #bfdbfe; }
.hazard-btn-rectify { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.hazard-btn-delete { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.biz-btn-nav { background: #f0f9ff; color: #0284c7; border: 1px solid #bae6fd !important; }

/* ==================== 生产经营场所信息窗 v3.2 卡片式布局 ==================== */
.biz-info-window {
    min-width: 300px;
    max-width: 380px;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    overflow: hidden;
}
.biz-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-bottom: 1px solid #bfdbfe;
}
.biz-info-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.biz-info-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.biz-info-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.2;
}
/* 点位名称 = 导航入口（导航功能已从按钮集成到名称超链接） */
.nav-point-name {
    cursor: pointer;
    border-bottom: 1px dashed #93c5fd;
    transition: color 0.15s, border-color 0.15s;
}
.nav-point-name:hover {
    color: #2563eb;
    border-bottom: 1px solid #2563eb;
    text-decoration: underline;
}
.biz-info-type-tag {
    display: inline-block;
    font-size: 10px;
    color: #2563eb;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    padding: 1px 8px;
    width: fit-content;
}
/* 相对重点的生产经营场所（烟花爆竹/燃气/加油加气）橙色标签 */
.biz-info-type-key {
    color: #f97316;
    background: #fff7ed;
    border-color: #fed7aa;
    font-weight: 600;
}
.biz-info-body {
    padding: 12px 16px;
}
.biz-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed #f3f4f6;
}
.biz-info-row:last-child {
    border-bottom: none;
}
.biz-info-label {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    min-width: 70px;
}
.biz-info-value {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    word-break: break-all;
}
.biz-info-actions {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}
.biz-info-actions button {
    flex: 1;
    padding: 7px 0;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.biz-info-actions button:hover { opacity: 0.9; transform: translateY(-1px); }
.biz-btn-edit { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe !important; }
.biz-btn-delete { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca !important; }
.biz-btn-nav { background: #f0f9ff; color: #0284c7; border: 1px solid #bae6fd !important; }

/* 照片放大弹窗 */
.photo-zoom-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.photo-zoom-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}

/* ==================== 村部标记样式 ==================== */
.village-office-marker {
    width: 28px; height: 28px;
    background: #8b5cf6;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(139,92,246,0.4);
    cursor: pointer;
}

/* ==================== 统计栏内的点位列表 ==================== */
.village-hazard-list {
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}
.village-hazard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    margin: 4px 0;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.village-hazard-item:hover { background: #f3f4f6; }
.village-hazard-item .hazard-name { font-weight: 500; color: #1a1a1a; }

/* 村庄详情 - 非隐患点位类别标签 */
.village-cat-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==================== 村情点位 - 按场景折叠分组 ==================== */
.vd-scene-group {
    margin-top: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.vd-scene-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-left: 4px solid #6b7280;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.vd-scene-header:hover { background: #f9fafb; }
.vd-scene-ic {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.vd-scene-name { font-size: 13px; font-weight: 600; color: #1f2937; flex: 1; min-width: 0; }
.vd-scene-count {
    font-size: 11px; font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}
.vd-scene-arrow { font-size: 12px; color: #9ca3af; flex-shrink: 0; }
.vd-scene-body { display: none; padding: 0 8px 8px; }
.vd-scene-group.open .vd-scene-body { display: block; }
.vd-scene-group.open .vd-scene-header { background: #f8fafc; }
.vd-point-total { color: #2563eb; font-weight: 700; }
.vd-tip { font-size: 11px; color: #9ca3af; font-weight: 400; }

/* 村名标签为纯文字（不拦截点击，点击村委会标记打开村情） */

/* ==================== 村庄详情 v3.1 新版布局 ==================== */
.vd-header {
    margin-bottom: 20px;
}
.vd-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.vd-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.vd-title-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.vd-calc-tag {
    font-size: 12px;
    font-weight: 500;
    color: #0d9488;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.vd-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e3a8a;
}
.vd-edit-btn {
    padding: 6px 16px;
    border: 1.5px solid #3b82f6;
    border-radius: 8px;
    background: #eff6ff;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.vd-edit-btn:hover { background: #3b82f6; color: white; }
.vd-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.7;
    margin-top: 4px;
}

/* 统计卡片网格 */
.vd-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.vd-stat-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 8px;
    text-align: center;
}
.vd-stat-num {
    font-size: 22px;
    font-weight: 700;
    color: #1e3a8a;
}
.vd-stat-lbl {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 3px;
}

/* 信息区块 */
.vd-section {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}
.vd-section:last-child { border-bottom: none; }
.vd-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}
.vd-section p {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.7;
}

/* 信息行网格 */
.vd-info-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.vd-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}
.vd-label {
    color: #9ca3af;
    flex-shrink: 0;
    margin-right: 16px;
}
.vd-info-row span:last-child {
    color: #1f2937;
    text-align: right;
}
.vd-sub-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
}
.vd-info-block {
    display: flex;
    gap: 12px;
    font-size: 13px;
}
.vd-info-block .vd-sub-label {
    min-width: 60px;
    color: #9ca3af;
    font-weight: 400;
}
.vd-info-block span:last-child { color: #1f2937; }

/* 两委班子表格 */
.vd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 6px;
}
.vd-table th {
    background: #f9fafb;
    padding: 6px 8px;
    text-align: left;
    color: #6b7280;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}
.vd-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

/* 下属委员会 */
.vd-committee-item {
    padding: 6px 0;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px dotted #e5e7eb;
}
.vd-committee-item:last-child { border-bottom: none; }

/* 照片网格 */
.vd-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.vd-photos img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s;
}
.vd-photos img:hover { transform: scale(1.04); }

/* ==================== 村庄编辑表单 ==================== */
.vd-edit-form {
    margin-top: 12px;
}
.vd-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    padding: 10px 0 8px;
    margin-top: 8px;
    border-bottom: 2px solid #e5e7eb;
}
.vd-form-row {
    display: flex;
    gap: 12px;
}
.vd-form-group {
    margin-bottom: 12px;
    flex: 1;
}
.vd-form-group.half { flex: 1; }
.vd-form-group label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}
.vd-form-group input,
.vd-form-group select,
.vd-form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}
.vd-form-group input:focus,
.vd-form-group select:focus,
.vd-form-group textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.1);
}
.vd-form-group textarea {
    resize: vertical;
    min-height: 60px;
}

/* 照片上传区 */
.vd-photo-upload-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}
.vd-photo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.vd-photo-item {
    position: relative;
    width: 90px;
    height: 90px;
}
.vd-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.vd-photo-item.new { opacity: 0.7; }
.vd-photo-new-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #3b82f6;
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
}
.vd-photo-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.vd-add-photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.vd-add-photo-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.vd-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}
.vd-btn-cancel {
    flex: 1;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
}
.vd-btn-cancel:hover { background: #f3f4f6; }
.vd-btn-save {
    flex: 2;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #10b981;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.vd-btn-save:hover { background: #059669; }

/* ==================== 侧边栏隐患状态筛选 ==================== */
.layer-hazard-filters {
    padding: 4px 0 8px;
}
.layer-hazard-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 28px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}
.layer-hazard-filter-item:hover { color: #374151; }
.layer-hazard-filter-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #3b82f6;
    cursor: pointer;
}
.hazard-filter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hazard-filter-dot.unrectified { background: #ef4444; }
.hazard-filter-dot.rectified { background: #10b981; }

/* ==================== 侧边栏生产经营二级类别下拉 ==================== */
.layer-biz-filters {
    padding: 4px 0 8px;
    border-top: 1px dashed #e5e7eb;
    margin-top: 4px;
}
.layer-biz-filters-title {
    font-size: 11px;
    color: #6b7280;
    padding: 6px 28px 4px;
}
.layer-biz-filters-list {
    max-height: 220px;
    overflow-y: auto;
}
.biz-type-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 28px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.biz-type-item:hover { color: #2563eb; background: #eff6ff; }
.biz-type-item input[type="checkbox"] {
    width: 13px;
    height: 13px;
    accent-color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
}
.biz-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.biz-count {
    margin-left: auto;
    font-size: 10px;
    color: #9ca3af;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0 6px;
    flex-shrink: 0;
}
.biz-level-badge {
    font-size: 9px;
    border-radius: 4px;
    padding: 0 4px;
    flex-shrink: 0;
    line-height: 14px;
}

/* ==================== 底部版权 / ICP 备案 ==================== */
.site-footer {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    font-size: 11px;
    color: rgba(17, 24, 39, 0.55);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    z-index: 500;
    user-select: none;
    white-space: nowrap;
}
.site-footer a {
    color: inherit;
    text-decoration: none;
}
.site-footer a:hover {
    color: #185fa5;
}
.footer-sep {
    opacity: 0.5;
}
