/* ===== 中世纪 RPG 冒险地图主题 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Cinzel', Georgia, 'Times New Roman', serif;
    background: #2c1810;
    overflow: hidden;
    color: #f5edd6;
}

/* ---- 顶栏：英雄旗帜 ---- */
.topbar {
    height: 56px;
    background: linear-gradient(135deg, #1a0f08 0%, #3e2723 50%, #2c1810 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: #f5edd6;
    z-index: 2000;
    position: relative;
    border-bottom: 3px solid #d4a574;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.topbar::before {
    content: '';
    position: absolute;
    top: 3px; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,165,116,0.3), transparent);
}
.topbar h1 {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    color: #f5edd6;
}
.topbar h1 .brand-mobile-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    background: linear-gradient(135deg, #2196f3, #42a5f5);
    color: #fff;
    padding: 1px 7px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    border: 1px solid rgba(33,150,243,0.5);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.topbar h1 .brand-subtitle {
    display: inline;
    font-size: 10px;
    font-weight: 400;
    font-family: 'MedievaSharp', '楷体', 'KaiTi', serif;
    color: rgba(245,237,214,0.55);
    letter-spacing: 1.5px;
    margin-left: 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.topbar h1 .brand-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    font-family: 'MedievaSharp', cursive;
    background: linear-gradient(135deg, #6b3f00, #d4a574);
    color: #f5edd6;
    padding: 2px 10px;
    border-radius: 3px;
    margin-left: 8px;
    vertical-align: middle;
    border: 1px solid #c9a96e;
    letter-spacing: 1px;
}
.topbar .nav-tabs { display: flex; gap: 2px; }
.topbar .nav-tab {
    padding: 8px 18px;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Cinzel', serif;
    transition: all 0.2s;
    opacity: 0.7;
    color: #d4c5a9;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
}
.topbar .nav-tab:hover {
    opacity: 1;
    background: rgba(212,165,116,0.1);
    border-color: rgba(212,165,116,0.2);
    color: #f5edd6;
}
.topbar .nav-tab.active {
    opacity: 1;
    background: rgba(212,165,116,0.15);
    border-color: #d4a574;
    border-bottom-color: #2c1810;
    font-weight: 600;
    color: #f5edd6;
    text-shadow: 0 0 8px rgba(212,165,116,0.3);
}
.topbar .nav-tab .badge {
    background: #c0392b;
    color: #f5edd6;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    font-family: Georgia, serif;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

/* ---- 主体 ---- */
.main-content { display: flex; height: calc(100vh - 56px - 50px); }

/* ---- 左面板：羊皮卷轴 ---- */
.left-panel {
    width: 380px;
    background: linear-gradient(180deg, #e8dcc4 0%, #f0e6d0 100%);
    box-shadow: 4px 0 16px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    border-right: 3px solid #c4b493;
}

/* ---- 面板段落 ---- */
.panel-section {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(139,115,85,0.2);
}
.panel-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b3f00;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    text-shadow: none;
}
.panel-section-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, #b8860b, #8b6914);
    border-radius: 2px;
}

/* ---- 统计卡：石碑 ---- */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-card {
    background: linear-gradient(135deg, rgba(139,115,85,0.08) 0%, rgba(200,180,150,0.3) 100%);
    border: 1px solid rgba(139,115,85,0.25);
    border-radius: 4px;
    padding: 12px;
    text-align: center;
}
.stat-card .number {
    font-size: 22px;
    font-weight: 700;
    color: #6b3f00;
    text-shadow: 0 0 8px rgba(139,115,85,0.2);
}
.stat-card .label {
    font-size: 10px;
    color: #8b7355;
    margin-top: 2px;
    font-family: Georgia, serif;
}

/* ---- 筛选徽章 ---- */
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border: 1px solid rgba(139,115,85,0.3);
    border-radius: 3px;
    background: rgba(200,180,150,0.3);
    cursor: pointer;
    font-size: 11px;
    font-family: Georgia, serif;
    color: #5c4a2e;
    transition: all 0.2s;
    user-select: none;
}
.chip:hover {
    border-color: #b8860b;
    color: #6b3f00;
    background: rgba(184,134,11,0.08);
}
.chip.active {
    background: linear-gradient(135deg, #8b6914, #b8860b);
    color: #f5edd6;
    border-color: #b8860b;
    box-shadow: 0 0 8px rgba(184,134,11,0.25);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.chip.active .dot { background: #f5edd6 !important; }

/* ---- 搜索框 ---- */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(200,180,150,0.4);
    border-radius: 4px;
    padding: 8px 12px;
    border: 1px solid rgba(139,115,85,0.3);
}
.search-box svg { color: #8b7355; flex-shrink: 0; }
.search-box input {
    border: none;
    outline: none;
    font-size: 12px;
    flex: 1;
    background: transparent;
    color: #3d2e1a;
    font-family: Georgia, serif;
}
.search-box input::placeholder { color: #a08060; }


/* ---- 门店列表：卷宗 ---- */
.store-list { flex: 1; overflow-y: auto; padding: 0; }
.store-list::-webkit-scrollbar { width: 6px; }
.store-list::-webkit-scrollbar-track { background: rgba(44,24,16,0.5); }
.store-list::-webkit-scrollbar-thumb { background: #6b5b3e; border-radius: 3px; }
.store-list::-webkit-scrollbar-thumb:hover { background: #8b7355; }

.store-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(139,115,85,0.12);
    cursor: pointer;
    transition: background 0.15s;
}
.store-item:hover {
    background: rgba(184,134,11,0.06);
}
.store-item.active {
    background: rgba(184,134,11,0.12);
    border-left: 3px solid #b8860b;
}
.store-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: rgba(139,115,85,0.15);
}
.store-item-info { flex: 1; min-width: 0; }
.store-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #3d2e1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
}
.store-item-addr {
    font-size: 10px;
    color: #8b7355;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: Georgia, serif;
}
.store-item-tags { display: flex; gap: 4px; margin-top: 4px; }
.store-item-tag { font-size: 9px; padding: 1px 6px; border-radius: 2px; font-family: Georgia, serif; }
.store-item-assignee {
    font-size: 10px;
    color: #6b3f00;
    margin-top: 3px;
    font-weight: 500;
    font-family: Georgia, serif;
}

/* ---- 地图区 ---- */
.map-area {
    flex: 1;
    position: relative;
    background: #c4b493;
    padding: 6px;
}
.map-area::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 9999;
    border: 2px solid rgba(92,74,46,0.2);
    box-shadow: inset 0 0 40px rgba(92,74,46,0.12);
}

/* 地图容器 + 羊皮纸效果 */
#map {
    width: 100%;
    height: 100%;
    position: relative;
    filter: sepia(0.2) saturate(1.1) contrast(1.02) brightness(1.0);
    border: 6px solid #8b7a5a;
    box-sizing: border-box;
    box-shadow: inset 0 0 60px rgba(92,74,46,0.15);
}
/* 隐藏高德地图版权信息 */
.amap-logo,
.amap-copyright,
.amap-layers .amap-copyright,
.amap-layers .amap-logo,
.amap-layers a[title^="高德"],
.amap-layers a[href*="amap"],
.amap-layers a[href*="高德"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
#map::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            0deg,
            transparent, transparent 3px,
            rgba(160,130,80,0.015) 3px, rgba(160,130,80,0.015) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent, transparent 5px,
            rgba(160,130,80,0.01) 5px, rgba(160,130,80,0.01) 6px
        );
}

/* 地图搜索 */
.amap-search-box {
    position: absolute; top: 16px; left: 16px; z-index: 1000;
    display: flex; gap: 6px;
    background: rgba(62,39,35,0.9);
    border-radius: 3px; padding: 6px 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    border: 1px solid #8b7a5a;
    font-family: Georgia, 'Times New Roman', serif;
}
.amap-search-box input {
    border: 1px solid #6b5b3e; border-radius: 2px;
    padding: 6px 10px; font-size: 12px; width: 240px;
    outline: none; background: rgba(44,24,16,0.6); color: #f5edd6;
    font-family: Georgia, 'Times New Roman', serif;
}
.amap-search-box input:focus {
    border-color: #d4a574;
    box-shadow: 0 0 0 3px rgba(212,165,116,0.15);
}
.amap-search-box button {
    background: linear-gradient(135deg,#6b3f00,#8b6914);
    color: #f5edd6;
    border: 1px solid #d4a574;
    border-radius: 2px; width: 34px; cursor: pointer; font-size: 14px;
}
.amap-search-box button:hover {
    background: linear-gradient(135deg,#8b6914,#d4a574);
}
.search-results {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(62,39,35,0.95);
    border: 1px solid #6b5b3e; border-top: none;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    max-height: 320px; overflow-y: auto; z-index: 1001;
}
.search-result-item {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(212,165,116,0.1);
    cursor: pointer;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 12px;
}
.search-result-item:hover { background: rgba(212,165,116,0.1); }

/* 地图控制按钮 */
.map-controls {
    position: absolute; right: 16px; bottom: 80px;
    z-index: 1000; display: flex; flex-direction: column; gap: 6px;
}
.map-btn {
    width: 36px; height: 36px;
    background: rgba(62,39,35,0.85);
    border: 1px solid #8b7a5a;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #d4c5a9;
    transition: all 0.2s;
    font-size: 15px;
    font-family: Georgia, serif;
}
.map-btn:hover {
    background: #8b6914;
    color: #f5edd6;
    border-color: #d4a574;
}

/* 📍 定位按钮放大 + 脉冲动画 */
.locate-btn {
    width: 42px !important;
    height: 42px !important;
    font-size: 20px !important;
    background: rgba(62,39,35,0.9) !important;
    border-color: #d4a574 !important;
    animation: locatePulse 2.5s ease-in-out infinite;
    position: relative;
}
.locate-btn:hover {
    background: #8b6914 !important;
    animation: none !important;
    transform: scale(1.1);
}
@keyframes locatePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212,165,116,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(212,165,116,0); }
}

/* 📍 定位标签提示 */
.locate-label {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(62,39,35,0.9);
    color: #f5edd6;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-family: Georgia, serif;
    border: 1px solid #d4a574;
    animation: labelFadeIn 1s ease-out, labelHint 2.5s ease-in-out infinite 0.3s;
    pointer-events: none;
    z-index: 1001;
}
@keyframes labelFadeIn {
    0% { opacity: 0; transform: translateY(-50%) translateX(6px); }
    100% { opacity: 1; transform: translateY(-50%) translateX(0); }
}
@keyframes labelHint {
    0%, 100% { opacity: 1; }
    70% { opacity: 0.5; }
    80% { opacity: 1; }
}

/* 图例 */
.map-legend {
    position: absolute; right: 16px; top: 76px;
    z-index: 1000;
    background: rgba(62,39,35,0.9);
    padding: 8px 12px;
    border-radius: 3px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    border: 1px solid #6b5b3e;
    max-width: 200px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}
.map-legend::-webkit-scrollbar { width: 4px; }
.map-legend::-webkit-scrollbar-thumb { background: #6b5b3e; border-radius: 2px; }
.map-legend-title {
    font-size: 11px;
    font-weight: 600;
    color: #d4a574;
    margin-bottom: 5px;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    white-space: nowrap;
}
.legend-section {
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(139,115,85,0.2);
    padding-bottom: 4px;
}
.legend-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.legend-section-title {
    font-size: 9px;
    font-weight: 600;
    color: #b8956a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    font-family: Georgia, serif;
}
.legend-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1px 0;
    font-size: 10px;
    color: #c4b493;
    font-family: Georgia, serif;
}
.legend-item .legend-label {
    display: flex; align-items: center; gap: 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.legend-item .legend-count {
    color: #a08060;
    font-size: 9px;
    margin-left: auto;
    padding-left: 6px;
    flex-shrink: 0;
}
.legend-item .legend-num {
    color: #d4a574;
    font-weight: 600;
    font-size: 10px;
}
.legend-icon {
    flex-shrink: 0;
    line-height: 0;
}

/* ---- 门店列表路线按钮 ---- */
.store-item-route {
    display: flex; gap: 4px; margin-top: 5px;
}
.store-item-route.from-a {
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px dashed rgba(139,115,85,0.2);
}
.route-btn {
    flex: 1; padding: 4px 6px;
    border: none; border-radius: 3px;
    cursor: pointer; font-size: 10px;
    font-family: Georgia, serif;
    transition: all 0.2s;
    line-height: 1.4;
}
.route-btn.walking {
    background: #4caf50; color: #fff;
}
.route-btn.walking:hover {
    background: #388e3c;
}
.route-btn.driving {
    background: #2196f3; color: #fff;
}
.route-btn.driving:hover {
    background: #1976d2;
}
.route-btn.walking-from {
    background: #795548; color: #fff;
}
.route-btn.walking-from:hover {
    background: #5d4037;
}
.route-btn.driving-from {
    background: #e65100; color: #fff;
}
.route-btn.driving-from:hover {
    background: #bf360c;
}

/* ---- 自定义起点A ---- */
.map-start-bar {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 1000;
    width: 220px;
    background: rgba(30,20,15,0.88);
    border: 1px solid #6b5b3e;
    border-radius: 4px;
    padding: 5px 8px;
}
.map-start-bar-inner {
    display: flex; flex-direction: column; gap: 3px;
}
.map-start-box {
    display: flex; gap: 4px;
}
.map-start-box input {
    flex: 1;
    min-width: 0;
    padding: 4px 7px;
    border: 1px solid #6b5b3e;
    border-radius: 3px;
    font-size: 11px;
    font-family: Georgia, serif;
    color: #f5edd6;
    background: rgba(44,24,16,0.6);
    outline: none;
}
.map-start-box input:focus {
    border-color: #d4a574;
    box-shadow: 0 0 0 3px rgba(212,165,116,0.15);
}
.map-start-box input::placeholder { color: #a08060; font-size: 10px; }
.map-start-box .custom-start-set-btn {
    padding: 4px 10px;
    background: linear-gradient(135deg,#e65100,#ff9800);
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-family: Georgia, serif;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}
.map-start-box .custom-start-set-btn:hover {
    background: linear-gradient(135deg,#bf360c,#e65100);
}
.map-start-bar .custom-start-info {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 5px;
    background: rgba(76,175,80,0.1);
    border: 1px solid rgba(76,175,80,0.25);
    border-radius: 3px;
    font-size: 10px;
    color: #81c784;
    font-family: Georgia, serif;
}
.map-start-bar .custom-start-addr {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.map-start-bar .custom-start-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #999;
    line-height: 1;
    padding: 0 3px;
}
.map-start-bar .custom-start-clear:hover {
    color: #e57373;
}

/* 起点A地图标注 */
.custom-start-marker {
    position: relative;
    width: 24px; height: 24px;
}
.start-dot {
    width: 24px; height: 24px;
    background: linear-gradient(135deg,#e65100,#ff9800);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.start-pulse {
    position: absolute;
    top: 0; left: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(255,152,0,0.35);
    animation: startPulse 2s infinite;
}
@keyframes startPulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.8); opacity: 0.1; }
    100% { transform: scale(1); opacity: 0.6; }
}

/* ---- 路线面板 ---- */
.route-panel {
    position: absolute; right: 16px; top: 16px;
    width: 260px; z-index: 1001;
    background: #f0e6d0; border: 2px solid #6b5b3e;
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    font-family: Georgia, serif;
}
.route-panel-header {
    background: linear-gradient(135deg,#5c4a2e,#8b7355);
    color: #f5edd6; padding: 10px 14px;
    font-size: 13px; font-weight: 600;
    display: flex; justify-content: space-between; align-items: center;
}
.route-panel-body {
    padding: 14px;
}
.route-stat {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px;
}
.route-stat:last-child { margin-bottom: 0; }
.route-stat-icon { font-size: 20px; width: 28px; text-align: center; }
.route-stat-val { font-size: 14px; font-weight: 700; color: #3d2e1a; }
.route-stat-label { font-size: 11px; color: #7a6a5a; }
.route-panel-footer {
    padding: 0 14px 10px;
}

/* ---- 面板遮罩层 ---- */
.panel-overlay {
    position: fixed; inset: 0;
    background: rgba(10,5,2,0.35);
    z-index: 1400;
    display: none;
}
.panel-overlay.show { display: block; }

/* ---- 底部面板拖拽手柄 ---- */
.panel-handle {
    display: flex; align-items: center; justify-content: center;
    padding: 8px 0 2px; flex-shrink: 0;
}
.panel-handle .handle-bar {
    width: 36px; height: 4px;
    border-radius: 3px;
    background: rgba(139,115,85,0.35);
}

/* ---- 领取面板：底部滑入 ---- */
.assign-panel {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 75vh; max-height: 75vh;
    background: linear-gradient(180deg, #f0e6d0 0%, #e8dcc4 100%);
    box-shadow: 0 -6px 30px rgba(0,0,0,0.3);
    z-index: 1500;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex; flex-direction: column;
    border-radius: 14px 14px 0 0;
    border-top: 3px solid #c4b493;
}
.assign-panel.open { transform: translateY(0); }
.assign-panel-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(139,115,85,0.2);
    display: flex; align-items: center; justify-content: space-between;
}
.assign-panel-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #6b3f00;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}
.assign-panel-header .close-btn {
    width: 30px; height: 30px;
    border-radius: 3px;
    border: 1px solid rgba(139,115,85,0.25);
    background: rgba(200,180,150,0.3);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #5c4a2e;
}
.assign-panel-body {
    flex: 1; overflow-y: auto;
    padding: 18px 24px;
}
.assign-panel-body::-webkit-scrollbar { width: 6px; }
.assign-panel-body::-webkit-scrollbar-track { background: rgba(200,180,150,0.3); }
.assign-panel-body::-webkit-scrollbar-thumb { background: #c4b493; border-radius: 3px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #6b3f00;
    margin-bottom: 6px;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
}
.form-label .required { color: #c0392b; margin-left: 2px; }
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(139,115,85,0.3);
    border-radius: 3px;
    font-size: 12px;
    font-family: Georgia, serif;
    color: #3d2e1a;
    transition: all 0.2s;
    background: rgba(232,220,196,0.5);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #b8860b;
    box-shadow: 0 0 0 3px rgba(184,134,11,0.12);
}
.form-textarea { resize: vertical; min-height: 60px; }
.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b7355' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 门店选择显示 */
.store-select-display {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(139,115,85,0.25);
    border-radius: 3px;
    background: rgba(232,220,196,0.4);
    cursor: pointer; transition: all 0.2s;
}
.store-select-display:hover {
    border-color: #b8860b;
    background: rgba(184,134,11,0.06);
}
.store-select-display .store-icon {
    width: 32px; height: 32px;
    border-radius: 4px;
    background: rgba(139,115,85,0.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.store-select-display .store-info { flex: 1; }
.store-select-display .store-name {
    font-size: 12px;
    font-weight: 600;
    color: #3d2e1a;
    font-family: 'Cinzel', serif;
}
.store-select-display .store-addr {
    font-size: 10px;
    color: #8b7355;
    font-family: Georgia, serif;
}
.store-select-display .store-change {
    font-size: 11px;
    color: #6b3f00;
    font-weight: 500;
    font-family: Georgia, serif;
}

/* ---- 内联下拉门店列表 ---- */
.inline-store-list {
    display: none;
    margin-top: 8px;
    border: 1px solid rgba(139,115,85,0.3);
    border-radius: 6px;
    background: rgba(245,237,214,0.95);
    overflow: hidden;
    max-height: 280px;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.inline-store-list.show { display: flex; }

.inline-store-search {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(139,115,85,0.15);
    flex-shrink: 0;
}
.inline-store-search input {
    width: 100%;
    border: 1px solid rgba(139,115,85,0.25);
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 12px;
    background: rgba(255,255,255,0.8);
    color: #3d2e1a;
    outline: none;
    box-sizing: border-box;
}
.inline-store-search input:focus { border-color: #b8860b; }

.inline-store-items {
    flex: 1; overflow-y: auto;
    padding: 4px 0;
}
.inline-store-items::-webkit-scrollbar { width: 5px; }
.inline-store-items::-webkit-scrollbar-thumb { background: #c4b493; border-radius: 3px; }

.inline-store-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid rgba(139,115,85,0.15);
    flex-shrink: 0;
}
.inline-store-footer #inline-selected-count {
    font-size: 11px; color: #5c4a2e;
}
.btn-confirm-sm {
    background: linear-gradient(135deg, #6b3f00, #8b6914);
    color: #f5edd6;
    border: 1px solid #d4a574;
    border-radius: 4px;
    padding: 6px 18px;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
}
.btn-confirm-sm:hover { background: linear-gradient(135deg, #8b6914, #6b3f00); }

/* ---- 按钮 ---- */
.btn-primary {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #6b3f00, #8b6914);
    color: #f5edd6;
    border: 1px solid #d4a574;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212,165,116,0.3);
    background: linear-gradient(135deg, #8b6914, #d4a574);
}
.btn-secondary {
    width: 100%;
    padding: 10px;
    background: rgba(78,52,46,0.6);
    color: #c4b493;
    border: 1px solid rgba(212,165,116,0.2);
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}
.btn-secondary:hover {
    background: rgba(212,165,116,0.1);
    color: #f5edd6;
    border-color: #d4a574;
}

/* ---- 模态框：石板书（底部滑入） ---- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(10,5,2,0.4);
    z-index: 2000;
    display: none;
    align-items: flex-end; /* 底部对齐 */
    justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-content {
    background: linear-gradient(180deg, #f0e6d0 0%, #e8dcc4 100%);
    border-radius: 14px 14px 0 0;
    width: 100%; max-width: 700px;
    height: 75vh; max-height: 75vh;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -6px 30px rgba(0,0,0,0.3);
    border-top: 3px solid #c4b493;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.modal-overlay.show .modal-content { transform: translateY(0); }
.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(139,115,85,0.2);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #6b3f00;
    font-family: 'Cinzel', serif;
}
.modal-header .close-btn {
    width: 30px; height: 30px;
    border-radius: 3px;
    border: 1px solid rgba(139,115,85,0.25);
    background: rgba(200,180,150,0.3);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #5c4a2e;
}
.modal-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.modal-search {
    padding: 10px 24px;
    border-bottom: 1px solid rgba(139,115,85,0.15);
}
.modal-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(139,115,85,0.3);
    border-radius: 3px;
    font-size: 12px;
    font-family: Georgia, serif;
    background: rgba(232,220,196,0.5);
    color: #3d2e1a;
}
.modal-search input:focus {
    outline: none;
    border-color: #b8860b;
}
.modal-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.modal-list::-webkit-scrollbar { width: 6px; }
.modal-list::-webkit-scrollbar-track { background: rgba(200,180,150,0.3); }
.modal-list::-webkit-scrollbar-thumb { background: #c4b493; border-radius: 3px; }

.modal-list-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 24px;
    cursor: pointer; transition: background 0.15s;
    border-bottom: 1px solid rgba(139,115,85,0.08);
}
.modal-list-item:hover { background: rgba(184,134,11,0.06); }
.modal-list-item.selected { background: rgba(184,134,11,0.12); }
.modal-list-item.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background: rgba(200,180,150,0.1);
    pointer-events: none;
}
.modal-list-item.disabled:hover { background: rgba(200,180,150,0.1); }
.modal-list-item.disabled .checkbox {
    border-color: rgba(139,115,85,0.15);
    background: rgba(200,180,150,0.2);
}
.modal-list-item .checkbox {
    width: 18px; height: 18px;
    border: 2px solid rgba(139,115,85,0.35);
    border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.2s;
}
.modal-list-item.selected .checkbox {
    border-color: #b8860b;
    background: #b8860b;
}
.modal-list-item.selected .checkbox::after {
    content: '\2713';
    color: #f5edd6;
    font-size: 12px;
}
.modal-list-item .item-info { flex: 1; }
.modal-list-item .item-name {
    font-size: 12px;
    font-weight: 500;
    color: #3d2e1a;
    font-family: 'Cinzel', serif;
}
.modal-list-item .item-addr {
    font-size: 10px;
    color: #8b7355;
    margin-top: 2px;
    font-family: Georgia, serif;
}
.modal-list-item .item-tags { display: flex; gap: 4px; margin-top: 3px; }
.modal-list-item .item-tag {
    font-size: 9px; padding: 2px 6px;
    border-radius: 2px;
    background: rgba(200,180,150,0.4);
    color: #5c4a2e;
    font-family: Georgia, serif;
}
.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid rgba(139,115,85,0.2);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-footer .selected-count {
    font-size: 12px;
    color: #8b7355;
    font-family: Georgia, serif;
}
.modal-footer .btn-group { display: flex; gap: 10px; }
.modal-footer .btn {
    padding: 8px 18px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Cinzel', serif;
    cursor: pointer; transition: all 0.2s;
    border: 1px solid transparent;
}
.modal-footer .btn-cancel {
    background: rgba(200,180,150,0.4);
    color: #5c4a2e;
    border-color: rgba(139,115,85,0.25);
}
.modal-footer .btn-confirm {
    background: linear-gradient(135deg, #8b6914, #b8860b);
    color: #f5edd6;
    border-color: #b8860b;
}

/* ---- 领取记录面板：底部滑入 ---- */
.records-panel {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: 75vh; max-height: 75vh;
    background: linear-gradient(180deg, #f0e6d0 0%, #e8dcc4 100%);
    box-shadow: 0 -6px 30px rgba(0,0,0,0.3);
    z-index: 1500;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex; flex-direction: column;
    border-radius: 14px 14px 0 0;
    border-top: 3px solid #c4b493;
}
.records-panel.open { transform: translateY(0); }
.records-panel-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(139,115,85,0.2);
    display: flex; align-items: center; justify-content: space-between;
}
.records-panel-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #6b3f00;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}
.records-panel-header .close-btn {
    width: 30px; height: 30px;
    border-radius: 3px;
    border: 1px solid rgba(139,115,85,0.25);
    background: rgba(200,180,150,0.3);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #5c4a2e;
}
.records-panel-body {
    flex: 1; overflow-y: auto; padding: 14px 24px;
}
.records-panel-body::-webkit-scrollbar { width: 6px; }
.records-panel-body::-webkit-scrollbar-track { background: rgba(200,180,150,0.3); }
.records-panel-body::-webkit-scrollbar-thumb { background: #c4b493; border-radius: 3px; }

/* 部门章节 */
.dept-section { margin-bottom: 16px; }
.dept-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(184,134,11,0.08), rgba(200,180,150,0.3));
    border-radius: 3px;
    border: 1px solid rgba(139,115,85,0.2);
    margin-bottom: 8px;
}
.dept-icon {
    width: 32px; height: 32px;
    border-radius: 4px;
    background: rgba(139,115,85,0.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.dept-name {
    font-size: 13px;
    font-weight: 600;
    color: #6b3f00;
    flex: 1;
    font-family: 'Cinzel', serif;
}
.dept-count {
    font-size: 10px;
    color: #8b7355;
    background: rgba(200,180,150,0.4);
    padding: 2px 10px;
    border-radius: 8px;
    font-family: Georgia, serif;
}

/* 人员卡片 */
.person-card {
    background: rgba(232,220,196,0.4);
    border: 1px solid rgba(139,115,85,0.15);
    border-radius: 3px;
    padding: 12px 14px;
    margin-bottom: 8px;
}
.person-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.person-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b6914, #b8860b);
    color: #f5edd6;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    border: 1px solid #d4a574;
}
.person-info { flex: 1; }
.person-name {
    font-size: 13px;
    font-weight: 600;
    color: #3d2e1a;
    font-family: 'Cinzel', serif;
}
.person-phone {
    font-size: 11px;
    color: #8b7355;
    font-family: Georgia, serif;
}
.person-stores { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.person-store-tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(184,134,11,0.08);
    color: #6b3f00;
    cursor: pointer; transition: all 0.2s;
    font-family: Georgia, serif;
    border: 1px solid rgba(139,115,85,0.2);
}
.person-store-tag:hover {
    background: #b8860b;
    color: #f5edd6;
    border-color: #b8860b;
}
.person-store-tag .remove { margin-left: 4px; opacity: 0.6; }
.person-store-tag:hover .remove { opacity: 1; }

/* 空状态 */
.empty-state { text-align: center; padding: 30px 20px; color: #8b7355; }
.empty-state-icon { font-size: 40px; margin-bottom: 10px; }
.empty-state-text { font-size: 13px; font-family: Georgia, serif; }

/* ---- FAB 按钮：魔法徽记 ---- */
.fab {
    position: fixed; right: 20px; bottom: 70px;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b3f00, #8b6914);
    color: #f5edd6;
    border: 2px solid #d4a574;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    z-index: 1200;
    transition: all 0.2s;
}
.fab:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(212,165,116,0.3);
}

/* ---- Toast：卷轴消息 ---- */
.toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(44,24,16,0.95);
    color: #f5edd6;
    padding: 12px 24px;
    border-radius: 3px;
    font-size: 13px;
    font-family: Georgia, serif;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    border: 1px solid #6b5b3e;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 自定义图标 */
.custom-div-icon { background: transparent; border: none; }
.info-card {
    padding: 12px;
    min-width: 220px;
    background: rgba(62,39,35,0.95);
    border: 1px solid #6b5b3e;
    border-radius: 4px;
}

/* 高亮选中标注 */
.highlight-marker { position: relative; z-index: 1000 !important; }
.highlight-marker .marker-pulse {
    position: absolute; width: 72px; height: 72px;
    left: -6px; top: -10px;
    border-radius: 50%;
    background: rgba(212,165,116,0.25);
    animation: markerPulse 2s ease-in-out infinite;
    pointer-events: none;
}
.highlight-marker .medieval-tower {
    position: relative;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
    animation: towerBounce 2s ease-in-out infinite;
}
@keyframes markerPulse {
    0% { transform: scale(0.8); opacity: 0.4; }
    50% { transform: scale(1.6); opacity: 0.1; }
    100% { transform: scale(0.8); opacity: 0.4; }
}
@keyframes towerBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* ---- 闪烁五角星标注（搜索匹配用） ---- */
.star-marker {
    position: relative;
    z-index: 950 !important;
    pointer-events: none;
}
.star-marker .star-glow {
    position: absolute;
    width: 48px; height: 48px;
    left: -10px; top: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.3) 0%, transparent 70%);
    animation: starPulse 0.8s ease-in-out infinite;
}
.star-marker .star-svg {
    display: block;
    animation: starFlash 0.8s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255,215,0,0.8));
}
@keyframes starPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.4); opacity: 1; }
}
@keyframes starFlash {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    25% { transform: scale(1.15) rotate(5deg); opacity: 0.9; }
    50% { transform: scale(0.9) rotate(-3deg); opacity: 1; }
    75% { transform: scale(1.1) rotate(3deg); opacity: 0.85; }
}

/* 高德地图信息窗口样式 */
.amap-info-content {
    border-radius: 4px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
    border: 1px solid #6b5b3e !important;
    background: rgba(62,39,35,0.95) !important;
}
.amap-info-content .info-card { padding: 0; background: transparent; border: none; }
.amap-info-sharp { display: none; }
.info-card-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid rgba(212,165,116,0.15);
}
.info-card-icon {
    width: 30px; height: 30px;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.info-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #f5edd6;
    font-family: 'Cinzel', serif;
}
.info-card-body {
    font-size: 11px;
    color: #c4b493;
    line-height: 1.6;
    font-family: Georgia, serif;
}
.info-card-body p { margin: 3px 0; }
.info-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 2px;
    font-size: 10px;
    margin-top: 2px;
    font-family: Georgia, serif;
}
.tag-blue { background: rgba(25,103,210,0.2); color: #82b1ff; }
.tag-pink { background: rgba(194,24,91,0.2); color: #f48fb1; }
.tag-purple { background: rgba(123,31,162,0.2); color: #ce93d8; }
.tag-green { background: rgba(46,125,50,0.2); color: #81c784; }
.assignee-tag {
    display: inline-block; padding: 2px 8px;
    border-radius: 2px; font-size: 10px; margin-top: 4px;
    background: rgba(230,81,0,0.15);
    color: #ff8a65;
    font-family: Georgia, serif;
    border: 1px solid rgba(230,81,0,0.2);
}

/* ---- 附近门店 ---- */
.nearby-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(107,142,35,0.08), rgba(200,180,150,0.3));
    border-bottom: 1px solid rgba(107,142,35,0.25);
}
.nearby-header .icon { font-size: 18px; }
.nearby-header .info { flex: 1; }
.nearby-header .title {
    font-size: 13px;
    font-weight: 600;
    color: #4a7c20;
    font-family: 'Cinzel', serif;
}
.nearby-header .sub {
    font-size: 10px;
    color: #6b8e23;
    font-family: Georgia, serif;
}
.nearby-header .back-btn {
    padding: 5px 12px;
    border-radius: 3px;
    background: linear-gradient(135deg, #556b2f, #6b8e23);
    color: #f5edd6;
    border: 1px solid #81c784;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Cinzel', serif;
}
.nearby-header .back-btn:hover {
    background: linear-gradient(135deg, #6b8e23, #81c784);
}
.store-item .distance {
    font-size: 10px;
    color: #4a7c20;
    font-weight: 500;
    margin-left: 4px;
    font-family: Georgia, serif;
}

/* 定位用户标注 */
.user-loc-marker { position: relative; z-index: 900; }
.user-loc-marker .loc-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #6b3f00;
    border: 3px solid #f5edd6;
    box-shadow: 0 0 0 2px rgba(212,165,116,0.3);
}
.user-loc-marker .loc-pulse {
    position: absolute; width: 48px; height: 48px;
    left: -16px; top: -16px;
    border-radius: 50%;
    background: rgba(212,165,116,0.15);
    animation: locPulse 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes locPulse {
    0% { transform: scale(0.6); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 0.2; }
    100% { transform: scale(0.6); opacity: 0.8; }
}

/* =========================================================
   移动端响应式适配（手机 & 小平板）
   重新设计：底部导航 + 底部抽屉式门店列表
   ========================================================= */

/* ---- 桌面端隐藏元素 ---- */
.left-panel-handle,
.left-panel-header,
.left-panel-close {
    display: none;
}
.bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, #1a0f08 0%, #3e2723 50%, #2c1810 100%);
    border-top: 2px solid #d4a574;
    z-index: 5000;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
}

/* 移动端列表切换按钮（默认隐藏） */
.mobile-list-toggle {
    display: none !important;
}

/* 白天/夜晚模式切换按钮 */
.style-toggle {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.style-toggle:hover {
    transform: scale(1.15);
}
.style-toggle:active {
    transform: scale(0.95);
}

/* 响应式断点：768px */
@media (max-width: 768px) {

    /* ========== 通用 ========== */
    body { overflow: hidden; }
    ::-webkit-scrollbar { width: 3px; }
    ::-webkit-scrollbar-thumb { background: #6b5b3e; border-radius: 2px; }

    /* ========== 顶部导航栏精简 ========== */
    .topbar {
        height: 46px;
        padding: 0 10px;
        z-index: 3000;
    }
    .topbar h1 {
        font-size: 14px;
        letter-spacing: 0.5px;
    }
    .topbar h1 .brand-tag {
        display: none; /* 手机上隐藏副标题，节省空间 */
    }
    .topbar h1 .brand-mobile-tag {
        font-size: 8px;
        padding: 1px 5px;
    }
    .topbar .nav-tabs {
        display: none !important; /* 桌面导航标签移到底部导航栏 */
    }

    /* ========== 底部导航栏 ========== */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: linear-gradient(135deg, #1a0f08 0%, #3e2723 50%, #2c1810 100%);
        border-top: 2px solid #d4a574;
        z-index: 5000;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.4);
        justify-content: space-around;
        align-items: center;
        padding: 0 4px;
    }
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        cursor: pointer;
        position: relative;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.2s;
        padding: 2px 0;
    }
    .bottom-nav-item .bnav-icon {
        font-size: 22px;
        line-height: 1.2;
        transition: transform 0.2s;
    }
    .bottom-nav-item .bnav-label {
        font-size: 9px;
        color: #c4b493;
        line-height: 1.3;
        transition: color 0.2s;
    }
    .bottom-nav-item.active .bnav-icon {
        transform: scale(1.15);
    }
    .bottom-nav-item.active .bnav-label {
        color: #d4a574;
        font-weight: 600;
    }
    .bottom-nav-item .bnav-badge {
        position: absolute;
        top: 0;
        right: 50%;
        margin-right: -16px;
        background: #c0392b;
        color: #f5edd6;
        font-size: 8px;
        padding: 1px 5px;
        border-radius: 8px;
        min-width: 16px;
        text-align: center;
        line-height: 1.4;
        box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    }

    /* ========== 主体布局 ========== */
    .main-content {
        display: block;
        height: calc(100vh - 46px - 56px); /* 减去顶栏 + 底栏 */
        position: relative;
        overflow: hidden;
    }

    /* ========== 地图区 ========== */
    .map-area {
        flex: none;
        width: 100%;
        height: 100%;
        padding: 2px;
    }
    #map {
        border-width: 2px;
        filter: sepia(0.1) saturate(1.05) contrast(1.01) brightness(1.0);
    }

    /* ========== 移动端列表切换按钮 ========== */
    .mobile-list-toggle {
        display: flex !important;
    }

    /* ========== 左面板 → 底部抽屉 ========== */
    .left-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 75vh;
        background: linear-gradient(180deg, #e8dcc4 0%, #f0e6d0 100%);
        z-index: 4000;
        border-radius: 14px 14px 0 0;
        border: none;
        box-shadow: 0 -6px 30px rgba(0,0,0,0.4);
        transform: translateY(calc(100% - 40px)); /* 默认只显示拖拽手柄区域 */
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding-bottom: 50px; /* 留出底部导航空间 */
    }
    .left-panel.mobile-show {
        transform: translateY(0);
    }

    /* 抽屉手柄 */
    .left-panel-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 0 2px;
        cursor: pointer;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
    }
    .handle-bar {
        width: 36px;
        height: 4px;
        border-radius: 3px;
        background: rgba(139,115,85,0.4);
    }

    /* 抽屉头部（含关闭按钮） */
    .left-panel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 2px 16px 8px;
        flex-shrink: 0;
        font-size: 13px;
        font-weight: 600;
        color: #6b3f00;
        font-family: 'Cinzel', serif;
    }
    .left-panel-close {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: none;
        background: rgba(139,115,85,0.25);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: #5c4a2e;
        z-index: 10;
        -webkit-tap-highlight-color: transparent;
    }

    /* 抽屉内容滚动 */
    .left-panel > .panel-section:first-of-type {
        padding-top: 0;
    }
    .left-panel .store-list {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ---- 抽屉内段落 ---- */
    .left-panel .panel-section {
        padding: 6px 14px;
        flex-shrink: 0;
    }
    .left-panel .panel-section-title {
        font-size: 11px;
        margin-bottom: 5px;
    }

    /* ---- 统计卡 ---- */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }
    .stat-card {
        padding: 7px 6px;
    }
    .stat-card .number {
        font-size: 17px;
    }
    .stat-card .label {
        font-size: 9px;
    }

    /* ---- 筛选项 ---- */
    .filter-chips { gap: 4px; }
    .chip {
        padding: 3px 8px;
        font-size: 10px;
    }
    .chip .dot { width: 6px; height: 6px; }

    /* ---- 搜索框 ---- */
    .search-box {
        padding: 6px 10px;
    }
    .search-box input {
        font-size: 11px;
    }

    /* ---- 门店列表 ---- */
    .store-item {
        padding: 8px 14px;
        gap: 8px;
    }
    .store-item-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    .store-item-name {
        font-size: 11px;
    }
    .store-item-addr {
        font-size: 9px;
    }
    .store-item-tag { font-size: 8px; }
    .store-item-assignee { font-size: 9px; }

    /* 路线按钮 - 触摸友好 */
    .route-btn {
        font-size: 9px;
        padding: 5px 8px;
        min-height: 28px;
    }

    /* ========== 地图搜索框 ========== */
    .amap-search-box {
        top: 50px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 75%;
        max-width: 320px;
        padding: 3px 6px;
    }
    .amap-search-box input {
        width: 100%;
        font-size: 11px;
        padding: 6px 8px;
        min-height: 30px;
    }
    .amap-search-box button {
        width: 30px;
        font-size: 12px;
        flex-shrink: 0;
        min-height: 30px;
    }
    .search-results {
        max-height: 180px;
        left: 0;
        right: 0;
    }
    .search-result-item {
        padding: 8px 12px;
        font-size: 11px;
        min-height: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* ========== 地图控制按钮 ========== */
    .map-controls {
        right: 6px;
        bottom: 10px;
        gap: 4px;
    }
    .map-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-radius: 8px;
        min-height: 40px;
    }
    /* 手机版定位按钮更大 */
    .locate-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }
    .locate-label {
        font-size: 12px !important;
        padding: 5px 12px !important;
    }

    /* ========== 图例 ========== */
    .map-legend {
        right: 6px;
        top: 50px;
        max-width: 150px;
        max-height: calc(100vh - 200px);
        padding: 5px 8px;
    }
    .map-legend-title {
        font-size: 10px;
    }
    .legend-section-title {
        font-size: 8px;
    }
    .legend-item {
        font-size: 9px;
        padding: 2px 0;
    }

    /* ========== 自定义起点条 ========== */
    .map-start-bar {
        width: auto;
        left: 6px;
        right: 6px;
        bottom: 6px;
        transform: none;
    }
    .map-start-bar-inner { gap: 3px; }
    .map-start-box input {
        font-size: 10px;
        padding: 6px 8px;
        min-height: 30px;
    }
    .map-start-box .custom-start-set-btn {
        font-size: 10px;
        padding: 6px 10px;
        min-height: 30px;
    }
    .map-start-bar .custom-start-info {
        font-size: 9px;
        padding: 4px 6px;
    }

    /* ========== 路线面板 ========== */
    .route-panel {
        right: auto;
        top: auto;
        bottom: 60px;
        left: 2px;
        transform: none;
        width: 33.33%;
        min-width: 140px;
        max-width: 220px;
        max-height: 45vh;
        overflow-y: auto;
        border-radius: 8px;
    }
    .route-panel-header {
        font-size: 11px;
        padding: 8px 12px;
    }
    .route-panel-body {
        padding: 8px 12px;
    }
    .route-stat { gap: 6px; margin-bottom: 5px; }
    .route-stat-icon { font-size: 20px; width: 26px; }
    .route-stat-val { font-size: 12px; }
    .route-stat-label { font-size: 10px; }

    /* ========== 领取面板（移动端：底部 75vh） ========== */
    .assign-panel {
        z-index: 6000 !important;
    }
    .assign-panel-header {
        padding: 12px 16px;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
    }
    .assign-panel-header h2 {
        font-size: 14px;
    }
    .assign-panel-body {
        padding: 14px 16px;
        padding-bottom: calc(14px + 20px);
    }
    .form-group { margin-bottom: 12px; }
    .form-label { font-size: 10px; }
    .form-input, .form-select, .form-textarea {
        font-size: 12px;
        padding: 10px 12px;
        min-height: 40px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .btn-primary, .btn-secondary {
        font-size: 13px;
        padding: 12px;
        min-height: 44px;
        border-radius: 6px;
    }

    /* ========== 领取记录面板（移动端：底部 75vh） ========== */
    .records-panel {
        z-index: 6000 !important;
    }
    .records-panel-header {
        padding: 12px 16px;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
    }
    .records-panel-header h2 {
        font-size: 14px;
    }
    .records-panel-body {
        padding: 10px 16px;
        padding-bottom: calc(10px + 20px);
    }

    /* ========== 人员卡片 ========== */
    .dept-header {
        padding: 10px 12px;
    }
    .dept-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    .dept-name { font-size: 12px; }
    .dept-count { font-size: 9px; }
    .person-card {
        padding: 10px 12px;
    }
    .person-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .person-name { font-size: 12px; }
    .person-phone { font-size: 10px; }
    .person-store-tag {
        font-size: 9px;
        padding: 4px 8px;
        min-height: 26px;
        display: inline-flex;
        align-items: center;
    }

    /* ========== 模态框（移动端：底部滑入） ========== */
    .modal-content {
        max-width: 100%;
        height: 80vh;
        max-height: 80vh;
    }
    .modal-header {
        padding: 12px 16px;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
    }
    .modal-header h3 { font-size: 13px; }
    .modal-body { flex: 1; overflow: hidden; }
    .modal-search {
        padding: 8px 16px;
    }
    .modal-search input {
        font-size: 12px;
        padding: 10px 12px;
        min-height: 40px;
    }
    .modal-list {
        -webkit-overflow-scrolling: touch;
    }
    .modal-list-item {
        padding: 10px 16px;
        min-height: 48px;
    }
    .modal-list-item .item-name { font-size: 11px; }
    .modal-list-item .item-addr { font-size: 9px; }
    .modal-list-item .checkbox {
        width: 20px;
        height: 20px;
        min-width: 20px;
    }
    .modal-footer {
        padding: 10px 16px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
    .modal-footer .btn {
        font-size: 12px;
        padding: 10px 18px;
        min-height: 40px;
        border-radius: 6px;
    }

    /* ========== FAB 按钮 ========== */
    .fab {
        right: 60px; /* 往左移一大步 */
        bottom: 80px;
        width: 48px;
        height: 48px;
        font-size: 22px;
        z-index: 3000;
    }

    /* ========== Toast ========== */
    .toast {
        font-size: 12px;
        padding: 10px 18px;
        max-width: 85%;
        bottom: 70px;
    }

    /* ========== 信息窗口 ========== */
    .info-card {
        min-width: 160px;
        padding: 8px;
    }
    .info-card-title { font-size: 12px; }
    .info-card-body { font-size: 10px; }

    /* 信息窗口按钮触摸优化 */
    .info-card-body button {
        min-height: 36px;
        font-size: 11px !important;
        border-radius: 6px !important;
    }

    /* ========== 附近门店 ========== */
    .nearby-header {
        padding: 8px 14px;
    }
    .nearby-header .icon { font-size: 22px; }
    .nearby-header .title { font-size: 12px; }
    .nearby-header .sub { font-size: 9px; }
    .nearby-header .back-btn {
        font-size: 10px;
        padding: 6px 10px;
        min-height: 30px;
    }
    .store-item .distance { font-size: 9px; }

    /* ========== 门店选择显示 ========== */
    .store-select-display {
        padding: 10px 12px;
    }
    .store-select-display .store-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    .store-select-display .store-name { font-size: 12px; }
    .store-select-display .store-addr { font-size: 10px; }
    .store-select-display .store-change { font-size: 11px; }
    /* 内联门店列表移动端适配 */
    .inline-store-list { max-height: 260px; }
    .inline-store-search { padding: 6px 8px; }
    .inline-store-search input { font-size: 12px; padding: 6px 8px; }
    .inline-store-footer { padding: 6px 10px; }
    .btn-confirm-sm { font-size: 11px; padding: 5px 14px; }
}

/* ========== 极小屏（< 400px）额外优化 ========== */
@media (max-width: 400px) {
    .topbar {
        height: 42px;
    }
    .topbar h1 {
        font-size: 13px;
    }
    .topbar h1 .brand-mobile-tag {
        font-size: 7px;
        padding: 0 4px;
    }
    .bottom-nav {
        height: 46px;
    }
    .bottom-nav-item .bnav-icon {
        font-size: 20px;
    }
    .bottom-nav-item .bnav-label {
        font-size: 8px;
    }
    .main-content {
        height: calc(100vh - 42px - 50px);
    }
    .left-panel {
        max-height: 80vh;
    }
    .stats-grid {
        gap: 3px;
    }
    .stat-card .number { font-size: 15px; }
    .stat-card .label { font-size: 8px; }
    .stat-card { padding: 5px 4px; }
    .map-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
        min-height: 36px;
    }
    .locate-btn {
        width: 46px !important;
        height: 46px !important;
        font-size: 22px !important;
    }
    .locate-label {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }
    .map-controls {
        right: 4px;
        gap: 3px;
    }
    .amap-search-box {
        top: 42px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 80%;
        max-width: 280px;
        padding: 2px 4px;
    }
    .amap-search-box input {
        font-size: 10px;
        padding: 5px 6px;
        min-height: 28px;
    }
    .map-legend {
        right: 4px;
        top: 44px;
        max-width: 120px;
        padding: 4px 6px;
    }
    .fab {
        right: 50px;
        bottom: 70px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
