/* ============================================
   三资图斑应用 - 全局样式（微信风格）
   ============================================ */
:root {
    --wx-green: #07C160;
    --wx-green-dark: #06AD56;
    --wx-bg: #F5F5F5;
    --wx-card: #FFFFFF;
    --wx-text: #191919;
    --wx-text-sub: #888888;
    --wx-red: #FA5151;
    --wx-orange: #FA9D3B;
    --search-blue: #1677FF;       /* 查找图斑的高亮/指向线（与橙、橙红、琥珀三态区分） */
    --radius: 12px;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
                 "Microsoft YaHei", sans-serif;
    background: var(--wx-bg);
    color: var(--wx-text);
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
}

/* ---------- 顶部栏 ---------- */
.page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--wx-green);
    color: #fff;
    padding: 14px 16px;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.page-header .sub {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 2px;
}

/* ---------- 通用卡片 ---------- */
.card {
    background: var(--wx-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 16px;
    margin: 12px;
}

.card-title {
    font-size: 13px;
    color: var(--wx-text-sub);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---------- 定位状态条 ---------- */
.status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #E9FBF0;
    border-bottom: 1px solid #D5F3E2;
    font-size: 13px;
    color: var(--wx-green-dark);
}
.status-bar.loading { background: #F4F6F8; color: var(--wx-text-sub); border-color: #E5E8EC; }
.status-bar.error   { background: #FDEBEB; color: var(--wx-red); border-color: #F8D7D7; }
.status-bar.warn    { background: #FEF5E9; color: var(--wx-orange); border-color: #F9E4C3; }
#statusText { flex: 1; min-width: 0; }

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--wx-green);
    flex-shrink: 0;
}
.status-bar.loading .status-dot { background: var(--wx-text-sub); animation: pulse 1s infinite; }
.status-bar.error .status-dot   { background: var(--wx-red); }
.status-bar.warn .status-dot    { background: var(--wx-orange); }
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---------- 经纬度显示 ---------- */
.coord-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.coord-value {
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.coord-label { font-size: 12px; color: var(--wx-text-sub); margin-top: 2px; }
.coord-item { text-align: center; flex: 1; }

/* ---------- 真实地址行（首页定位卡片内，防溢出） ---------- */
.addr-line {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0,0,0,0.08);
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}
.addr-icon { flex-shrink: 0; }
.addr-text {
    flex: 1;
    min-width: 0;                       /* 允许收缩，不把卡片撑破 */
    display: -webkit-box;
    -webkit-line-clamp: 2;              /* 最多 2 行 */
    -webkit-box-orient: vertical;
    overflow: hidden;                   /* 超出省略 */
    word-break: break-all;              /* 长地址自动断行 */
}

/* ---------- 图斑信息卡片 ---------- */
.tuban-card {
    border-left: 4px solid var(--wx-green);
    transition: border-color 0.3s;
}
.tuban-card.out {
    border-left-color: #CCCCCC;
}
.tuban-empty {
    text-align: center;
    padding: 18px 0 8px;
    color: var(--wx-text-sub);
    font-size: 15px;
}
.tuban-empty strong { color: var(--wx-text); font-size: 16px; }

.tuban-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-top: 6px;
}
.tuban-grid .item { min-width: 0; }
.tuban-grid .item.full { grid-column: 1 / -1; }
.tuban-grid .k { font-size: 12px; color: var(--wx-text-sub); }
.tuban-grid .v {
    font-size: 14px;
    font-weight: 500;
    word-break: break-all;
    margin-top: 2px;
}
.landcode-text {
    font-family: Consolas, Menlo, monospace;
    background: #F0F6F0;
    color: var(--wx-green-dark);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 13px;
}

/* ---------- 图斑编号查找 ---------- */
.search-bar {
    display: flex;
    gap: 8px;
}
.search-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #E5E8EC;
    border-radius: 8px;
    background: #FAFAFA;
    color: var(--wx-text);
    font-size: 15px;
    font-family: Consolas, Menlo, monospace;
    letter-spacing: 1px;
    -webkit-appearance: none;
    appearance: none;
}
.search-input::placeholder {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    letter-spacing: 0;
    color: #BBBBBB;
}
.search-input:focus {
    outline: none;
    border-color: var(--wx-green);
    background: #fff;
}
.search-btn {
    flex-shrink: 0;
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 8px;
    background: var(--wx-green);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.search-btn:active { background: var(--wx-green-dark); }
.search-btn:disabled { background: #C8E6D4; cursor: default; }
.search-msg {
    font-size: 12px;
    margin-top: 8px;
    color: var(--wx-text-sub);
    line-height: 1.5;
}
.search-msg.err { color: var(--wx-red); }
.search-msg.ok  { color: var(--wx-green-dark); }
.search-result { margin-top: 4px; }
/* 距离行：蓝=还没走到，绿=已进入图斑 */
.search-dist {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #EAF3FF;
    color: var(--search-blue);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}
.search-dist.inside { background: #E9FBF0; color: var(--wx-green-dark); }
.search-dist .weak {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 4px;
}
/* 尾号多命中时的候选行 */
.cand-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px dashed #EEEEEE;
    cursor: pointer;
}
.cand-item:last-child { border-bottom: none; }
.cand-item:active { background: #F7F7F7; }
.cand-item .cand-code {
    flex-shrink: 0;
    font-family: Consolas, Menlo, monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--search-blue);
}
.cand-item .cand-meta {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--wx-text-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 地图 ---------- */
#map {
    height: 46vh;
    min-height: 260px;
    border-radius: var(--radius);
    overflow: hidden;
    z-index: 1;
}
#adminMap {
    height: 69vh;
    min-height: 320px;
    border-radius: var(--radius);
    overflow: hidden;
    z-index: 1;
}
.map-wrap { position: relative; }
/* 命中图斑高亮光晕 */
.hit-poly path { filter: drop-shadow(0 0 5px rgba(232, 67, 10, 0.85)); }
/* 查找图斑高亮光晕（蓝色，与自动匹配的橙红区分）
   注意：Leaflet 把 className 加在 <path> 自身上，故选择器不加后代 path */
.search-poly { filter: drop-shadow(0 0 6px rgba(22, 119, 255, 0.85)); }
/* 查找目标中心的脉冲环 */
.search-pin { pointer-events: none; }
.search-pin i {
    display: block;
    width: 14px;
    height: 14px;
    margin: 5px;
    border-radius: 50%;
    background: var(--search-blue);
    border: 2px solid #fff;
    animation: searchPulse 2s ease-out infinite;
}
@keyframes searchPulse {
    0%   { box-shadow: 0 0 0 0 rgba(22, 119, 255, 0.65); }
    70%  { box-shadow: 0 0 0 16px rgba(22, 119, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(22, 119, 255, 0); }
}
/* 回到我的位置（暂停跟随后显示，左上角） */
.back-to-me {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 800;
    background: #fff;
    color: var(--wx-green-dark);
    border: 1px solid #d0e9da;
    border-radius: 18px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}
/* 取消锁定（地图点选锁定图斑后显示，左上角回退位置） */
.cancel-lock-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 800;
    background: #fff;
    color: #e65100;
    border: 1px solid #ffcc80;
    border-radius: 18px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}
/* 底图切换（影像/矢量） */
.basemap-switch {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 800;
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}
.basemap-switch .bm-btn {
    border: none;
    background: #fff;
    color: var(--wx-text-sub);
    font-size: 13px;
    padding: 6px 14px;
    cursor: pointer;
}
.basemap-switch .bm-btn.active {
    background: var(--wx-green);
    color: #fff;
    font-weight: 600;
}
/* 清除查找（查找命中后显示；放右上角底图切换下方，避开左上角的"回到我的位置/取消锁定"） */
.clear-search-btn {
    position: absolute;
    top: 52px;
    right: 10px;
    z-index: 800;
    background: #fff;
    color: var(--search-blue);
    border: 1px solid #BBD7FF;
    border-radius: 18px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}
.map-tip {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 500;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    pointer-events: none;
}

/* ---------- 上传区 ---------- */
.upload-area {
    text-align: center;
}
.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;                      /* 大按钮 */
    background: var(--wx-green);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.upload-btn:active { background: var(--wx-green-dark); }
.upload-btn .plus { font-size: 24px; font-weight: 400; line-height: 1; }

.upload-submit-btn {
    display: block;
    width: 100%;
    height: 46px;
    margin-top: 12px;
    background: #fff;
    color: var(--wx-green);
    font-size: 16px;
    font-weight: 600;
    border: 1.5px solid var(--wx-green);
    border-radius: var(--radius);
    cursor: pointer;
}
.upload-submit-btn:active { background: #f2fcf7; }

.preview-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
    aspect-ratio: 1;
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-item .del {
    position: absolute;
    top: 4px; right: 4px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    font-size: 13px;
    line-height: 22px;
    cursor: pointer;
}
.preview-item .tag {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    padding: 2px 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-line {
    margin-top: 12px;
    font-size: 13px;
    color: var(--wx-text-sub);
    display: none;
}
.progress-line .bar {
    height: 6px;
    background: #E8E8E8;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}
.progress-line .bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--wx-green);
    transition: width 0.3s;
}

/* ---------- Toast ---------- */
#toast {
    position: fixed;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 80%;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9999;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 后台 ---------- */
.admin-toolbar {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}
.admin-toolbar input, .admin-toolbar select {
    flex: 1;
    min-width: 120px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}
.search-wrap {
    position: relative;
    flex: 1;
    min-width: 160px;
}
.search-wrap input {
    width: 100%;
}
.search-hint {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #aaa;
    pointer-events: none;
    white-space: nowrap;
}
.btn {
    height: 38px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    background: var(--wx-green);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.btn.gray { background: #999; }
.btn.danger { background: var(--wx-red); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }

.photo-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
}
@media (min-width: 720px) { .photo-list { grid-template-columns: repeat(4, 1fr); } }

.photo-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
}
.photo-card .thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: #eee;
}
.photo-card .meta {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--wx-text-sub);
}
.photo-card .meta .code {
    color: var(--wx-green-dark);
    font-weight: 600;
    word-break: break-all;
}
.photo-card .meta .code.no-tuban {
    color: var(--wx-orange);
}
.photo-card.highlight { animation: flash 2s ease; }
@keyframes flash {
    0%, 50% { box-shadow: 0 0 0 3px var(--wx-green); }
    100% { box-shadow: var(--shadow); }
}

/* ---------- 右下角新照片提醒弹窗 ---------- */
#notifyPopup {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 2000;
    width: 280px;
    max-width: 90vw;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    border-left: 4px solid var(--wx-green);
    overflow: hidden;
    transform: translateX(120%);
    transition: transform 0.35s ease;
}
#notifyPopup.show { transform: translateX(0); }
.notify-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #F0FAF3;
    font-size: 13px;
    font-weight: 600;
    color: var(--wx-green-dark);
}
.notify-head .close { cursor: pointer; color: var(--wx-text-sub); font-size: 16px; }
.notify-body { padding: 10px 12px; }
.notify-body .n-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}
.notify-body .n-item:last-child { border-bottom: none; }
.notify-body .n-item img {
    width: 42px; height: 42px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.notify-body .n-info { min-width: 0; flex: 1; }
.notify-body .n-info .t { font-size: 13px; color: var(--wx-green-dark); font-weight: 600; word-break: break-all; }
.notify-body .n-info .d { font-size: 11px; color: var(--wx-text-sub); margin-top: 2px; }
.notify-foot {
    text-align: center;
    padding: 8px;
    font-size: 12px;
    color: var(--wx-text-sub);
    border-top: 1px solid #f0f0f0;
    cursor: pointer;
}
.notify-foot:hover { color: var(--wx-green); }

/* ---------- 弹层 ---------- */
.mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.mask.show { display: flex; }
.dialog {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 460px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 16px;
}
.dialog img.full {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 12px;
}
.dialog h3 { font-size: 16px; margin-bottom: 10px; }
.dialog .row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f4f4f4;
}
.dialog .row .k { color: var(--wx-text-sub); flex-shrink: 0; }
.dialog .row .v { text-align: right; word-break: break-all; }
.dialog .close-row { text-align: center; margin-top: 12px; }

/* ---------- 设置弹窗（图斑显示设置） ---------- */
.settings-dialog { max-width: 520px; }
.settings-tip {
    font-size: 12px;
    color: #999;
    background: #f7f7f7;
    border-radius: 8px;
    padding: 8px 10px;
    margin: 4px 0 10px;
    line-height: 1.6;
}
.settings-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.settings-state { font-size: 12px; color: #999; margin-left: auto; }
.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 46vh;
    overflow-y: auto;
}
.filter-grid label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 7px 8px;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    user-select: none;
}
.filter-grid label.checked {
    border-color: var(--wx-green);
    background: rgba(7, 193, 96, 0.06);
    color: var(--wx-green);
}
.filter-grid input { accent-color: var(--wx-green); }

/* ---------- 图斑详情悬浮窗 ---------- */
.tuban-dialog { max-width: 420px; }
.tuban-map {
    width: 100%;
    height: 240px;
    border-radius: 10px;
    margin: 6px 0 10px;
    background: #eef1f5;
    overflow: hidden;
}
.tuban-info {
    max-height: 40vh;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 4px 12px;
}
.ti-row {
    display: flex;
    padding: 7px 0;
    border-bottom: 1px dashed #f0f0f0;
    font-size: 13px;
}
.ti-row:last-child { border-bottom: none; }
.ti-k { width: 78px; color: #999; flex-shrink: 0; }
.ti-v { flex: 1; color: #333; word-break: break-all; }

/* 图斑照片列表弹层（地图查看该图斑全部照片） */
#tubanPhotoList { max-height: 55vh; overflow-y: auto; }
.tb-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 4px 0;
}
.tb-photo-item {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #fafafa;
    transition: transform .1s;
}
.tb-photo-item:active { transform: scale(.97); }
.tb-photo-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
    background: #eee;
}
.tb-photo-item .t {
    font-size: 11px;
    color: #888;
    padding: 4px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tuban-empty { text-align: center; color: #999; padding: 24px 0; font-size: 14px; }

/* ---------- 登录页 ---------- */
.login-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
}
.login-box {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
}
.login-box h2 { text-align: center; margin-bottom: 20px; color: var(--wx-green); }
.login-box input {
    width: 100%;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 16px;               /* >=16px 防止 iOS 聚焦缩放 */
    margin-bottom: 12px;
}
.login-box button {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--wx-green);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.login-box .err { color: var(--wx-red); font-size: 13px; text-align: center; min-height: 18px; margin-bottom: 6px; }

/* 输入框字号防 iOS 缩放 */
input, select, textarea { font-size: 16px; }

/* ===== 后台照片分组显示 ===== */
.stat-bar {
    padding: 10px 12px 2px;
    font-size: 13px;
    color: var(--wx-text-sub);
}
.filter-bar {
    display: flex;
    gap: 8px;
    padding: 8px 12px 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar .f-btn {
    border: 1px solid #eee;
    background: #fff;
    color: var(--wx-text-sub);
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.filter-bar .f-btn.active {
    background: var(--wx-green);
    border-color: var(--wx-green);
    color: #fff;
    font-weight: 600;
}
/* 筛选条分组分隔符（固定/分类 与 审核状态之间） */
.filter-bar .f-sep {
    width: 1px;
    height: 18px;
    background: #e3e3e3;
    margin: 0 2px;
    flex-shrink: 0;
    align-self: center;
}
.filter-bar .f-btn.aud { border-color: #f0e6ff; color: #8b5cf6; }
.filter-bar .f-btn.aud.active { background: #8b5cf6; border-color: #8b5cf6; color: #fff; }

.photo-groups {
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.group-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
}
.g-arrow {
    transition: transform 0.25s;
    color: #999;
    font-size: 12px;
    flex-shrink: 0;
}
.group-card.collapsed .g-arrow { transform: rotate(-90deg); }
.g-title-wrap { flex: 1; min-width: 0; }
.g-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    word-break: break-all;
    line-height: 1.3;
}
.g-title.no { color: #FA9D3B; }
.g-sub { font-size: 12px; color: #999; margin-top: 2px; }
.g-badge {
    font-size: 12px;
    background: var(--wx-green);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.g-badge.warn { background: #FA9D3B; }
.g-zip {
    font-size: 12px;
    padding: 3px 10px;
    border: 1px solid var(--wx-green);
    color: var(--wx-green);
    background: #fff;
    border-radius: 10px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}
.g-zip:active { background: #E9FBF0; }
.g-range {
    font-size: 11px;
    color: #bbb;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 审核状态胶囊行：合格/不合格（可点）+ 新（角标） */
.g-audit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px 10px;
    flex-wrap: wrap;
}
.audit-pill {
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 11px;
    border: 1px solid #eee;
    background: #fff;
    color: #999;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    line-height: 1.5;
}
.audit-pill.ok { border-color: #c9f0d8; color: var(--wx-green); }
.audit-pill.ok.active { background: var(--wx-green); border-color: var(--wx-green); color: #fff; font-weight: 600; }
.audit-pill.bad { border-color: #f5c6c6; color: #e64340; }
.audit-pill.bad.active { background: #e64340; border-color: #e64340; color: #fff; font-weight: 600; }
.audit-pill.new {
    background: #fff6e5;
    border-color: #ffd591;
    color: #fa8c16;
    cursor: default;
    font-weight: 600;
}

.group-body { padding: 0 12px 12px; }
.g-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}
.g-thumb {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 2px solid transparent;
    cursor: pointer;
}
.g-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.g-thumb .gt-time {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 10px;
    text-align: center;
    padding: 2px 0;
    pointer-events: none;
}
.g-thumb.highlight {
    border-color: var(--wx-green);
    animation: gflash 0.8s ease 2;
}
@keyframes gflash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(7, 193, 96, 0); }
    50% { box-shadow: 0 0 0 6px rgba(7, 193, 96, 0.45); }
}
.g-empty { color: #999; font-size: 13px; padding: 12px 0; }

/* ---------- 图斑地图（后台独立视图） ---------- */
.tuban-class-bar {
    background: var(--wx-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 12px;
    padding: 10px 12px;
}
.tuban-class-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.tuban-class-head .tcb-title { font-size: 13px; font-weight: 600; }
.tuban-class-head .tcb-state { font-size: 12px; color: var(--wx-text-sub); }
.tuban-class-head .tcb-hint { font-size: 12px; color: #bbb; margin-left: auto; }
.tuban-class-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tuban-class-list .f-btn {
    border: 1px solid #eee;
    background: #fff;
    color: var(--wx-text-sub);
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.tuban-class-list .f-btn.active {
    background: var(--wx-green);
    border-color: var(--wx-green);
    color: #fff;
    font-weight: 600;
}
.tcb-empty { font-size: 13px; color: var(--wx-text-sub); }

/* 图斑编号查询 */
.tuban-query-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.tuban-query-bar input {
    flex: 1;
    min-width: 150px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.tuban-query-bar .tq-msg { font-size: 12px; color: var(--wx-text-sub); word-break: break-all; }
.tuban-query-bar .tq-msg.err { color: var(--wx-red); }
.tuban-query-bar .tq-msg.ok { color: var(--wx-green-dark); }
.tb-query-dot { background: none; border: none; }
.tb-query-tip { font-weight: 400; }
#tubanMap {
    height: 69vh;
    min-height: 320px;
    border-radius: var(--radius);
    overflow: hidden;
    z-index: 1;
}
/* 图斑悬浮窗（tooltip）内容 */
.tt-tuban { font-size: 12px; line-height: 1.6; }
.tt-tuban .tt-row { display: flex; gap: 8px; white-space: nowrap; }
.tt-tuban .tt-row span { color: #888; }
.tt-tuban .tt-row b { font-weight: 600; }
.leaflet-tooltip { font-size: 12px; line-height: 1.6; }

/* ---------- 取点坐标面板（F3） ---------- */
.coord-panel {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 1000;
    width: 240px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    padding: 10px 12px;
}
.coord-panel .cp-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.coord-panel .cp-close { cursor: pointer; color: #999; font-size: 16px; line-height: 1; padding: 0 2px; }
.coord-panel .cp-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    padding: 3px 0;
}
.coord-panel .cp-k { color: var(--wx-text-sub); flex-shrink: 0; }
.coord-panel .cp-v {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}
.coord-panel .cp-link { color: var(--wx-green-dark); text-decoration: underline; cursor: pointer; }
.coord-panel .cp-actions { display: flex; gap: 8px; margin-top: 8px; }
.coord-panel .cp-actions .btn { flex: 1; }

/* ---------- 修改照片经纬度弹窗（F4） ---------- */
.gps-photo-info { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.gps-photo-info img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.gps-photo-info .gpi-text { font-size: 12px; color: #666; line-height: 1.5; min-width: 0; }
.gps-photo-info .gpi-text .t { font-size: 13px; font-weight: 600; color: var(--wx-text); word-break: break-all; }
.gps-tip {
    font-size: 12px;
    color: #999;
    background: #f7f7f7;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
}
.gps-tip .warn { color: var(--wx-orange); font-weight: 600; }
.gps-form label { display: block; font-size: 13px; color: var(--wx-text-sub); margin-bottom: 8px; }
.gps-form input {
    display: block;
    width: 100%;
    height: 36px;
    margin-top: 4px;
    padding: 0 10px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.gps-err { color: var(--wx-red); font-size: 12px; min-height: 16px; }

/* ---------- 上传照片 · 修改经纬度弹窗（F5） ---------- */
.pe-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--wx-text);
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
}
.pe-check input { width: 16px; height: 16px; margin: 0; }
#peLat, #peLng, #peAddr { background: #f7f7f7; color: var(--wx-text-sub); }
