/* ========== 基础样式 ========== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --card-shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    /* 侧边栏 */
    --sidebar-width: 170px;
    --sidebar-collapsed-width: 60px;
    --sidebar-bg: #212529;
    --sidebar-hover-bg: #2c3034;
    --sidebar-active-bg: #0d6efd;
    --sidebar-text: #adb5bd;
    --sidebar-text-active: #ffffff;
    --sidebar-border: #2c3034;
    --topbar-height: 50px;
    --sidebar-transition: 0.25s ease;
}

/* 暗色主题 */
[data-theme="dark"] {
    --light-color: #1a1a2e;
    --dark-color: #eaeaea;
    --card-bg: #16213e;
    --body-bg: #0f0f23;
    --text-color: #eaeaea;
    --border-color: #2a2a4a;
}

[data-theme="dark"] body {
    background-color: var(--body-bg);
    color: var(--text-color);
}

[data-theme="dark"] .card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .table {
    color: var(--text-color);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .modal-content {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
}

/* ========== 登录页面 ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

/* ========== 侧边栏布局 ========== */
/* 侧边栏（默认折叠仅图标，hover/expanded 展开） */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-collapsed-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width var(--sidebar-transition);
    overflow: hidden;
}

.sidebar.expanded {
    width: var(--sidebar-width);
}

/* 侧边栏头部 - 品牌 */
.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-header a {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-header a i {
    font-size: 1.25rem;
    min-width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-brand-text {
    margin-left: 0;
    width: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.sidebar.expanded .sidebar-brand-text {
    margin-left: 8px;
    width: auto;
    opacity: 1;
    pointer-events: auto;
}

/* 侧边栏菜单区域 */
.sidebar-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
}

.sidebar-body::-webkit-scrollbar {
    width: 4px;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

/* 侧边栏导航列表 */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .nav-section-title {
    font-size: 0;
    text-transform: uppercase;
    color: #6c757d;
    padding: 10px 0 2px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
}

.sidebar-nav .nav-section-title::after {
    content: '···';
    font-size: 0.7rem;
    color: #6c757d;
}

.sidebar.expanded .nav-section-title {
    font-size: 0.7rem;
    text-align: left;
    padding: 12px 16px 4px;
}

.sidebar.expanded .nav-section-title::after {
    content: none;
}

.sidebar-nav .nav-item {
    position: relative;
}

/* 默认折叠态：图标居中 */
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    color: var(--sidebar-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color 0.15s ease, color 0.15s ease;
    font-size: 0.9rem;
    position: relative;
}

/* 展开态：图标+文字左对齐 */
.sidebar.expanded .nav-link {
    justify-content: flex-start;
    padding: 9px 16px;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--sidebar-text-active);
}

/* 折叠态 active：左侧蓝条指示 */
.sidebar-nav .nav-link.active {
    background-color: rgba(13, 110, 253, 0.15);
    color: var(--sidebar-text-active);
    border-left: 3px solid var(--sidebar-active-bg);
}

/* 展开态 active：保持蓝色左边框 */
.sidebar.expanded .nav-link.active {
    border-left-color: var(--sidebar-active-bg);
}

.sidebar-nav .nav-link i {
    min-width: 28px;
    font-size: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-link .nav-text {
    margin-left: 0;
    width: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.sidebar.expanded .nav-link .nav-text {
    margin-left: 8px;
    width: auto;
    opacity: 1;
    pointer-events: auto;
}

/* 折叠态纯CSS tooltip（hover图标时显示菜单名） */
.sidebar-nav .nav-link::after {
    content: attr(data-title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 6px;
    padding: 4px 10px;
    background-color: #333;
    color: #fff;
    font-size: 0.8rem;
    white-space: nowrap;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 1050;
}

.sidebar-nav .nav-link:hover::after {
    opacity: 1;
}

/* 展开时隐藏tooltip（文字已可见） */
.sidebar.expanded .nav-link::after {
    display: none;
}

/* 侧边栏底部 - 折叠按钮（hover模式下隐藏） */
.sidebar-footer {
    display: none;
}

/* 侧边栏遮罩（移动端） */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1035;
}

/* 顶部栏（始终基于折叠宽度定位） */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-collapsed-width);
    height: var(--topbar-height);
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 1030;
}

[data-theme="dark"] .top-header {
    background-color: #1a1a2e;
    border-bottom-color: #2a2a4a;
}

.top-header .btn-link {
    color: #6c757d;
    font-size: 1.1rem;
    padding: 4px 8px;
}

[data-theme="dark"] .top-header .btn-link {
    color: #adb5bd;
}

.top-header .btn-link:hover {
    color: #333;
}

[data-theme="dark"] .top-header .btn-link:hover {
    color: #fff;
}

#sidebar-mobile-toggle {
    display: none;
}

/* 主内容包裹器（始终基于折叠宽度） */
.main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
    min-height: 100vh;
}

/* ========== 主布局 ========== */
.main-content {
    padding-top: var(--topbar-height);
    min-height: 100vh;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
}

/* ========== 侧边栏移动端适配 ========== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar.mobile-open ~ .sidebar-backdrop {
        display: block;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .top-header {
        left: 0 !important;
    }

    #sidebar-mobile-toggle {
        display: block;
    }
}

/* ========== 卡片样式 ========== */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-header .card-title {
    margin-bottom: 0;
    font-size: 1rem;
}

/* ========== 模块标题背景色 ========== */
.card-header-order-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-bottom: 2px solid #ffc107;
}

.card-header-overdue-debt {
    background: linear-gradient(135deg, #ffe5e5 0%, #ffd6d6 100%);
    border-bottom: 2px solid #e57373;
}

.card-header-followed {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-bottom: 2px solid #ffc107;
}

.card-header-safe {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-bottom: 2px solid #4caf50;
}

.card-header-loss-risk {
    background: linear-gradient(135deg, #cff4fc 0%, #9eeaf9 100%);
    border-bottom: 2px solid #0dcaf0;
}

.card-header-new-customer {
    background: linear-gradient(135deg, #d1e7dd 0%, #a3cfbb 100%);
    border-bottom: 2px solid #198754;
}

.card-header-product-replace {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-bottom: 2px solid #fd7e14;
}

.card-header-product-recommend {
    background: linear-gradient(135deg, #d1e7dd 0%, #badbcc 100%);
    border-bottom: 2px solid #20c997;
}

.card-header-bestseller {
    background: linear-gradient(135deg, #cff4fc 0%, #9eeaf9 100%);
    border-bottom: 2px solid #0dcaf0;
}

.card-header-monthly-new {
    background: linear-gradient(135deg, #e2d9f3 0%, #c5b3e6 100%);
    border-bottom: 2px solid #6f42c1;
}

.card-header-products {
    background: linear-gradient(135deg, #cfe2ff 0%, #9ec5fe 100%);
    border-bottom: 2px solid #0d6efd;
}

.card-header-customer-info {
    background: linear-gradient(135deg, #e2e3e5 0%, #c6c8ca 100%);
    border-bottom: 2px solid #6c757d;
}

.card-header-rd-bestseller {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-bottom: 2px solid #ff9800;
    font-weight: 600;
}

.card-header-rd-peer {
    background: linear-gradient(135deg, #cff4fc 0%, #9eeaf9 100%);
    border-bottom: 2px solid #0dcaf0;
    font-weight: 600;
}

.card-header-rd-market {
    background: linear-gradient(135deg, #d1e7dd 0%, #a3cfbb 100%);
    border-bottom: 2px solid #198754;
    font-weight: 600;
}

/* 暗色主题适配 */
[data-theme="dark"] .card-header-order-warning {
    background: linear-gradient(135deg, #4a4528 0%, #3d3a1f 100%);
    border-bottom-color: #ffc107;
}

[data-theme="dark"] .card-header-overdue-debt {
    background: linear-gradient(135deg, #4a2828 0%, #3d1f1f 100%);
    border-bottom-color: #e57373;
}

[data-theme="dark"] .card-header-followed {
    background: linear-gradient(135deg, #4a4528 0%, #3d3a1f 100%);
    border-bottom-color: #ffc107;
}

[data-theme="dark"] .card-header-safe {
    background: linear-gradient(135deg, #1a3a28 0%, #153020 100%);
    border-bottom-color: #4caf50;
}

[data-theme="dark"] .card-header-loss-risk {
    background: linear-gradient(135deg, #1a3a40 0%, #153035 100%);
    border-bottom-color: #0dcaf0;
}

[data-theme="dark"] .card-header-new-customer {
    background: linear-gradient(135deg, #1a3a28 0%, #153020 100%);
    border-bottom-color: #198754;
}

[data-theme="dark"] .card-header-product-replace {
    background: linear-gradient(135deg, #4a3a28 0%, #3d3020 100%);
    border-bottom-color: #fd7e14;
}

[data-theme="dark"] .card-header-product-recommend {
    background: linear-gradient(135deg, #1a3a30 0%, #153028 100%);
    border-bottom-color: #20c997;
}

[data-theme="dark"] .card-header-bestseller {
    background: linear-gradient(135deg, #1a3a40 0%, #153035 100%);
    border-bottom-color: #0dcaf0;
}

[data-theme="dark"] .card-header-monthly-new {
    background: linear-gradient(135deg, #2a2840 0%, #252238 100%);
    border-bottom-color: #6f42c1;
}

[data-theme="dark"] .card-header-products {
    background: linear-gradient(135deg, #1a2a40 0%, #152538 100%);
    border-bottom-color: #0d6efd;
}

[data-theme="dark"] .card-header-customer-info {
    background: linear-gradient(135deg, #2a2a30 0%, #252528 100%);
    border-bottom-color: #6c757d;
}

[data-theme="dark"] .card-header-rd-bestseller {
    background: linear-gradient(135deg, #4a3a20 0%, #3d3018 100%);
    border-bottom-color: #ff9800;
}

[data-theme="dark"] .card-header-rd-peer {
    background: linear-gradient(135deg, #1a3a40 0%, #153035 100%);
    border-bottom-color: #0dcaf0;
}

[data-theme="dark"] .card-header-rd-market {
    background: linear-gradient(135deg, #1a3a28 0%, #153020 100%);
    border-bottom-color: #198754;
}

.card-body {
    padding: 1.25rem;
}

/* ========== 统计卡片 ========== */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.15;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
}

.stat-card .stat-change {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

/* ========== 数据表格 ========== */
.table-responsive {
    border-radius: 0.5rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

[data-theme="dark"] .table thead th {
    background-color: #1a1a2e;
    border-bottom-color: #2a2a4a;
}

[data-theme="dark"] .table-light,
[data-theme="dark"] .table-light th,
[data-theme="dark"] .table-light td {
    background-color: #1a1a2e !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .table-bordered {
    border-color: #2a2a4a;
}

[data-theme="dark"] .table-bordered th,
[data-theme="dark"] .table-bordered td {
    border-color: #2a2a4a;
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.08);
}

.table tbody td {
    vertical-align: middle;
    font-size: 0.875rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* ========== 徽章样式 ========== */
.badge-status {
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-followed {
    background-color: var(--success-color);
}

.badge-unfollowed {
    background-color: var(--warning-color);
    color: #000;
}

/* ========== 进度条 ========== */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 0.25rem;
}

/* ========== 搜索框 ========== */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
    border-radius: 2rem;
}

.search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* ========== 客户列表卡片 ========== */
.customer-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.customer-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.customer-card .customer-name {
    font-weight: 600;
    color: #333;
}

.customer-card .customer-score {
    font-size: 1.25rem;
    font-weight: 700;
}

.customer-card .trend-up {
    color: var(--success-color);
}

.customer-card .trend-down {
    color: var(--danger-color);
}

/* ========== 迷你图表 ========== */
.mini-chart {
    height: 60px;
}

/* ========== 加载遮罩 ========== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

[data-theme="dark"] #loading-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ========== 模块标题 ========== */
.module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.module-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* ========== 快捷操作按钮 ========== */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    margin: -0.25rem; /* iOS 12 兼容：用margin替代gap */
}
.quick-actions > * {
    margin: 0.25rem; /* iOS 12 兼容：用margin替代gap */
}

.quick-actions .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* ========== 响应式调整 ========== */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-icon {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .module-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .module-header > * {
        margin-bottom: 0.75rem; /* iOS 12 兼容：用margin替代gap */
    }
    .module-header > *:last-child {
        margin-bottom: 0;
    }
    
    .module-header .module-title {
        width: 100%;
        text-align: center;
    }
    
    .module-header .btn {
        width: 100%;
    }
    
    .login-box {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    /* 产品洞察页搜索框移动端适配 */
    .card-header .d-flex.gap-2 {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .card-header .d-flex.gap-2 input,
    .card-header .d-flex.gap-2 select {
        width: 100% !important;
        min-width: 0;
    }
    
    .card-header .d-flex.gap-2 button {
        width: 100%;
    }
    
    /* 模块标题保持一行显示 */
    .card-header.d-flex {
        flex-wrap: nowrap;
        font-size: 0.85rem;
    }
    
    .card-header .badge {
        flex-shrink: 0;
        font-size: 0.7rem;
        padding: 0.2em 0.5em;
        white-space: nowrap;
    }
    
    .card-header > span:first-child {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 产品洞察页搜索框card-header换行 */
    .card-header.flex-wrap {
        flex-wrap: wrap !important;
    }
}

@media (max-width: 576px) {
    .stat-card .stat-value {
        font-size: 1.25rem;
    }
    
    .quick-actions {
        width: 100%;
    }
    
    .quick-actions .btn {
        flex: 1;
    }
}

/* ========== 动画效果 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1a1a2e;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #3a3a5a;
}

/* ========== 切换按钮组 ========== */
.view-toggle .btn {
    padding: 0.375rem 1rem;
}

.view-toggle .btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* ========== 详情页面 ========== */
.detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.detail-header .back-btn {
    color: white;
    opacity: 0.8;
}

.detail-header .back-btn:hover {
    opacity: 1;
}

.detail-header .detail-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.detail-header .detail-score {
    font-size: 2.5rem;
    font-weight: 700;
}

/* ========== 迷你趋势图 ========== */
.mini-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 160px;
}

.mini-chart-container canvas {
    display: block;
}

.mini-chart-label {
    font-size: 0.75rem;
    margin-top: 2px;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .detail-header .detail-score {
        font-size: 1.8rem;
    }
    /* 移动端综合评分与柱状图间距 */
    .detail-header .text-md-end {
        margin-right: 1rem;
    }
    .mini-chart-container {
        min-width: 120px;
        margin-right: 0.75rem;
    }
    .mini-chart-container canvas {
        width: 120px !important;
        height: 60px !important;
    }
}

/* ========== 标签页 ========== */
.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    padding: 0.75rem 1.25rem;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    background-color: transparent;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--primary-color);
}

/* ========== 分页 ========== */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
}

/* ========== iOS 12 兼容性修复 ========== */
/* Safari 12 知道 gap(grid) 但不支持 flex gap，@supports 检测不可靠 */
/* 由 ios12-compat.js 在 <html> 上添加 .no-flex-gap 类来激活 */
.no-flex-gap .d-flex.gap-1 > *,
.no-flex-gap .d-flex.flex-wrap.gap-1 > * {
    margin: 0.125rem;
}
.no-flex-gap .d-flex.gap-2 > *,
.no-flex-gap .d-flex.flex-wrap.gap-2 > * {
    margin: 0.25rem;
}
.no-flex-gap .d-flex.gap-3 > *,
.no-flex-gap .d-flex.flex-wrap.gap-3 > * {
    margin: 0.5rem;
}
.no-flex-gap .d-flex.gap-4 > *,
.no-flex-gap .d-flex.flex-wrap.gap-4 > * {
    margin: 0.75rem;
}
.no-flex-gap .d-flex.gap-1,
.no-flex-gap .d-flex.gap-2,
.no-flex-gap .d-flex.gap-3,
.no-flex-gap .d-flex.gap-4 {
    gap: 0 !important;
}
.no-flex-gap .g-2 > * {
    padding: 0.25rem;
}
.no-flex-gap .g-3 > * {
    padding: 0.5rem;
}
/* #modules-row flex gap fallback */
.no-flex-gap #modules-row {
    gap: 0 !important;
}
.no-flex-gap #modules-row > * {
    margin: 8px;
}

/* ========== 苏州区域地图样式 ========== */
.region-map-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-radius: 8px;
    overflow: visible;
    margin: 0 auto;
}

#region-overlays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.region-overlay {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    transition: top 0.15s ease, left 0.15s ease;
}

.region-overlay .region-img {
    width: 100%;
    height: auto;
    transition: filter 0.3s ease, transform 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

.region-overlay:hover .region-img {
    filter: brightness(1.1) saturate(1.3) !important;
    transform: scale(1.02);
}

/* 编辑模式样式 */
.region-map-container.edit-mode {
    border: 2px dashed #0d6efd;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecf1 100%);
}

.region-overlay.edit-mode {
    cursor: grab;
    border: 1px dashed rgba(13, 110, 253, 0.4);
    border-radius: 4px;
}

.region-overlay.edit-mode:hover {
    border-color: rgba(13, 110, 253, 0.8);
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.3);
}

.region-overlay.dragging {
    cursor: grabbing !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

/* 选中状态 */
.region-overlay.selected {
    border: 2px solid #0d6efd !important;
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(13, 110, 253, 0.5);
}

.region-label.edit-mode {
    opacity: 0.4;
}

.map-edit-toolbar {
    padding: 6px 0;
}

.region-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 2px;
    z-index: 2;
}

.region-label-name {
    font-size: 12px;
    font-weight: bold;
    color: #444;
    white-space: nowrap;
    text-shadow: none;
    line-height: 1.3;
}

.region-label-value {
    font-size: 11px;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(255,0,0,0.9), 0 0 12px rgba(255,0,0,0.6);
    line-height: 1.3;
}

.dimension-btn {
    margin-bottom: 5px;
}

.dimension-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.region-rank-item:hover {
    background-color: #f8f9fa;
}

/* 模块拖拽调整大小 */
.resizable-module {
    position: relative;
    box-sizing: border-box;
}

.resizable-module .card {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.resizable-module .card .card-body {
    overflow: auto;
}

.resize-handle {
    position: absolute;
    z-index: 20;
    display: none;
}

.resizable-module.resizing-enabled .resize-handle {
    display: block;
}

.resize-handle-right {
    right: -4px;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
}

.resize-handle-bottom {
    bottom: -4px;
    left: 0;
    height: 8px;
    width: 100%;
    cursor: ns-resize;
}

.resize-handle-corner {
    right: -4px;
    bottom: -4px;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
}

.resize-handle-right:hover,
.resize-handle-bottom:hover,
.resize-handle-corner:hover {
    background: rgba(13, 110, 253, 0.15);
}

.resizable-module.resizing-enabled {
    outline: 2px dashed rgba(13, 110, 253, 0.5);
    outline-offset: 2px;
    border-radius: 6px;
}

.resize-handle-corner::after {
    content: '';
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(13, 110, 253, 0.6);
    border-bottom: 2px solid rgba(13, 110, 253, 0.6);
}

.resizable-module.resizing-enabled .resize-handle-corner::after {
    display: block;
}

#modules-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    /* 地图模块在移动端不缩小，保持与PC端编辑时相同的尺寸，通过横向滚动查看 */
    #modules-row {
        flex-direction: column;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 地图模块保持固定最小宽度，不随屏幕缩小 */
    #map-module {
        min-width: 700px !important;
        flex: none !important;
    }
    
    /* 排行模块正常自适应 */
    #ranking-module {
        width: 100% !important;
        flex: none !important;
    }
    
    .region-label {
        padding: 2px 4px;
    }
    
    .region-label-name {
        font-size: 10px;
    }
    
    .region-label-value {
        font-size: 9px;
    }
    
    .dimension-btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ========== 日程管理日历 ========== */
.schedule-calendar {
    table-layout: fixed;
}

.schedule-calendar th {
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--light-color);
}

.calendar-cell {
    height: 100px;
    vertical-align: top;
    padding: 4px 6px !important;
    position: relative;
}

.calendar-empty {
    background: rgba(0,0,0,0.02);
}

[data-theme="dark"] .calendar-empty {
    background: rgba(255,255,255,0.02);
}

.calendar-today {
    background: rgba(13, 110, 253, 0.06) !important;
}

[data-theme="dark"] .calendar-today {
    background: rgba(13, 110, 253, 0.15) !important;
}

.calendar-weekend {
    background: rgba(0,0,0,0.015);
}

[data-theme="dark"] .calendar-weekend {
    background: rgba(255,255,255,0.015);
}

.calendar-day-num {
    font-weight: 600;
    font-size: 0.85rem;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.calendar-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.calendar-item {
    font-size: 0.65rem !important;
    padding: 1px 4px !important;
    line-height: 1.4;
    cursor: default;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-clickable {
    cursor: pointer;
    transition: background-color 0.15s;
}
.calendar-clickable:hover {
    background-color: rgba(13, 110, 253, 0.08) !important;
}
.calendar-selected {
    background-color: rgba(13, 110, 253, 0.12) !important;
    border-color: #0d6efd !important;
}

.cal-nav-bar {
    flex-wrap: nowrap !important;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .calendar-cell {
        height: 70px;
        padding: 2px 3px !important;
    }
    .calendar-item {
        font-size: 0.55rem !important;
    }
    .schedule-calendar th {
        font-size: 0.7rem;
    }
    .cal-nav-bar {
        margin-top: 4px;
    }
    .cal-nav-bar .btn {
        padding: 0.15rem 0.4rem;
        font-size: 0.75rem;
    }
    .cal-nav-bar .fw-bold {
        font-size: 0.85rem;
        min-width: 70px !important;
    }
}

/* ========== 公司资料 - 文档阅读器样式 ========== */
.doc-reader-content {
    font-size: 15px;
    line-height: 1.85;
    color: #2c3e50;
    max-width: 900px;
    margin: 0 auto;
}

.doc-reader-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 1.8em 0 0.8em;
    padding-bottom: 0.4em;
    border-bottom: 2px solid #e9ecef;
}

.doc-reader-content h1:first-child {
    margin-top: 0;
}

.doc-reader-content h1.doc-title {
    font-size: 2rem;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}

.doc-reader-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 1.5em 0 0.6em;
    padding-left: 0.6em;
    border-left: 4px solid var(--primary-color);
}

.doc-reader-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #34495e;
    margin: 1.3em 0 0.5em;
}

.doc-reader-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #495057;
    margin: 1.1em 0 0.4em;
}

.doc-reader-content h2.doc-subtitle {
    text-align: center;
    color: #6c757d;
    border-left: none;
    padding-left: 0;
    font-weight: 400;
}

.doc-reader-content p {
    margin-bottom: 0.8em;
    text-align: justify;
}

.doc-reader-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.2em auto;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.doc-reader-content .doc-figure {
    text-align: center;
    margin: 1.5em 0;
}

.doc-reader-content .doc-figure img {
    margin-bottom: 0.4em;
}

.doc-reader-content .doc-figure figcaption {
    font-size: 0.85em;
    color: #999;
}

.doc-reader-content table {
    margin: 1em 0;
    font-size: 0.9em;
}

.doc-reader-content table th {
    background-color: #f1f3f5 !important;
    font-weight: 600;
    white-space: nowrap;
}

.doc-reader-content ul, .doc-reader-content ol {
    padding-left: 1.5em;
    margin-bottom: 0.8em;
}

.doc-reader-content li {
    margin-bottom: 0.3em;
}

.doc-reader-content blockquote {
    border-left: 4px solid #dee2e6;
    padding: 0.5em 1em;
    margin: 1em 0;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 0 4px 4px 0;
}

.doc-reader-content code {
    background: #f1f3f5;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    color: #d63384;
}

.doc-reader-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85em;
    line-height: 1.5;
}

.doc-reader-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.doc-reader-content .sheet-title {
    background: #e3f2fd;
    padding: 0.5em 0.8em;
    border-radius: 4px;
    font-size: 1.1rem;
    margin-top: 1.5em;
}

.doc-reader-content .pdf-page {
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px dashed #dee2e6;
}

.doc-reader-content .pdf-page-header {
    font-size: 0.75em;
    color: #adb5bd;
    text-align: right;
    margin-bottom: 0.5em;
}

.doc-reader-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.doc-reader-content strong, .doc-reader-content b {
    font-weight: 600;
    color: #1a1a2e;
}

/* 暗色主题下的文档阅读器 */
[data-theme="dark"] .doc-reader-content {
    color: #d4d4d4;
}

[data-theme="dark"] .doc-reader-content h1,
[data-theme="dark"] .doc-reader-content h2,
[data-theme="dark"] .doc-reader-content h3,
[data-theme="dark"] .doc-reader-content h4 {
    color: #e0e0e0;
}

[data-theme="dark"] .doc-reader-content h1 {
    border-bottom-color: #444;
}

[data-theme="dark"] .doc-reader-content table th {
    background-color: #2a2a4a !important;
}

[data-theme="dark"] .doc-reader-content blockquote {
    background: #1a1a2e;
    border-left-color: #444;
}

[data-theme="dark"] .doc-reader-content .sheet-title {
    background: #1a2a4a;
}

[data-theme="dark"] .doc-reader-content strong,
[data-theme="dark"] .doc-reader-content b {
    color: #f0f0f0;
}

/* ========== AI回答Markdown样式 ========== */
.ai-content h1, .ai-content h2, .ai-content h3,
.ai-content h4, .ai-content h5, .ai-content h6 {
    margin-top: 0.6em;
    margin-bottom: 0.3em;
    font-weight: 600;
    line-height: 1.4;
}
.ai-content h1 { font-size: 1.25em; }
.ai-content h2 { font-size: 1.15em; }
.ai-content h3 { font-size: 1.08em; }
.ai-content h4, .ai-content h5, .ai-content h6 { font-size: 1em; }

.ai-content p { margin-bottom: 0.5em; }
.ai-content ul, .ai-content ol { padding-left: 1.4em; margin-bottom: 0.5em; }
.ai-content li { margin-bottom: 0.2em; }
.ai-content blockquote {
    border-left: 3px solid #dee2e6;
    padding: 0.3em 0.8em;
    margin: 0.5em 0;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 0 4px 4px 0;
}
.ai-content code {
    background: #f1f3f5;
    padding: 0.1em 0.35em;
    border-radius: 3px;
    font-size: 0.9em;
    color: #d63384;
}
.ai-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 0.8em;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85em;
    margin: 0.5em 0;
}
.ai-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}
.ai-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    margin: 0.5em 0;
}
.ai-content table th, .ai-content table td {
    border: 1px solid #dee2e6;
    padding: 0.3em 0.6em;
}
.ai-content table th {
    background: #f1f3f5;
    font-weight: 600;
}

.source-doc-link:hover {
    background-color: #d1ecf1 !important;
    border-color: #17a2b8 !important;
}

/* ========== AI销售策略Markdown样式 ========== */
.strategy-md-content {
    line-height: 1.8;
    font-size: 15px;
}
.strategy-md-content h1 { font-size: 1.4em; margin-top: 1em; margin-bottom: 0.4em; font-weight: 700; color: #1a1a2e; border-bottom: 2px solid #e9ecef; padding-bottom: 0.3em; }
.strategy-md-content h2 { font-size: 1.2em; margin-top: 0.8em; margin-bottom: 0.3em; font-weight: 600; color: #2c3e50; }
.strategy-md-content h3 { font-size: 1.08em; margin-top: 0.6em; margin-bottom: 0.3em; font-weight: 600; color: #34495e; }
.strategy-md-content strong { color: #1a1a2e; }
.strategy-md-content ul, .strategy-md-content ol { padding-left: 1.5em; }
.strategy-md-content li { margin-bottom: 0.3em; }
.strategy-md-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 0.5em 1em;
    margin: 0.5em 0;
    background: #f8f9fa;
    border-radius: 0 4px 4px 0;
}

/* ========== 搜索关键词高亮 ========== */
mark.search-highlight {
    background-color: #fff3cd;
    color: inherit;
    padding: 0.05em 0.15em;
    border-radius: 2px;
    border-bottom: 2px solid #ffc107;
    transition: background-color 0.2s;
}

mark.search-highlight-active {
    background-color: #ff9800 !important;
    color: #fff !important;
    border-bottom-color: #e65100;
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.4);
}

[data-theme="dark"] mark.search-highlight {
    background-color: #5c4a00;
    border-bottom-color: #ffc107;
}

[data-theme="dark"] mark.search-highlight-active {
    background-color: #e65100 !important;
    border-bottom-color: #ff6d00;
}

/* ========== 平台Slogan ========== */
.platform-slogan {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 12px 0 8px;
    letter-spacing: 1px;
    -webkit-user-select: none;
    user-select: none;
    border-top: 1px solid #eee;
    margin-top: auto;
}
.platform-slogan i {
    font-size: 10px;
    opacity: 0.6;
}
[data-theme="dark"] .platform-slogan {
    color: #777;
    border-top-color: #333;
}

/* ========== ICP 备案号 ========== */
.login-icp {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 10px 0;
    z-index: 1;
}
.login-icp a {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    text-decoration: none;
}
.login-icp a:hover {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}
.icp-footer {
    text-align: center;
    font-size: 12px;
    padding: 8px 0;
    color: #999;
    margin-top: auto;
}
.icp-footer a {
    color: #999;
    text-decoration: none;
}
.icp-footer a:hover {
    color: #666;
    text-decoration: underline;
}
[data-theme="dark"] .icp-footer a {
    color: #666;
}
[data-theme="dark"] .icp-footer a:hover {
    color: #999;
}

/* ========== 扫码组件 ========== */
.scanner-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    min-height: 200px;
}
.scanner-viewport video {
    width: 100%;
    display: block;
}
.scanner-guide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    pointer-events: none;
}
.scanner-guide-box {
    position: relative;
    width: 75%;
    height: 45%;
    min-width: 200px;
    min-height: 80px;
}
.scanner-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #00ff00;
    border-style: solid;
    border-width: 0;
}
.scanner-corner.tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-radius: 4px 0 0 0; }
.scanner-corner.tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-radius: 0 4px 0 0; }
.scanner-corner.bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 4px; }
.scanner-corner.br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 4px 0; }
.scanner-line {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: -webkit-linear-gradient(left, transparent 0%, #00ff00 50%, transparent 100%);
    background: linear-gradient(90deg, transparent 0%, #00ff00 50%, transparent 100%);
    -webkit-animation: scanline-move 2s ease-in-out infinite;
    animation: scanline-move 2s ease-in-out infinite;
}
@-webkit-keyframes scanline-move {
    0%, 100% { top: 10%; opacity: 0.5; }
    50% { top: 90%; opacity: 1; }
}
@keyframes scanline-move {
    0%, 100% { top: 10%; opacity: 0.5; }
    50% { top: 90%; opacity: 1; }
}

/* ========== 帮助按钮 ========== */
.help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #999;
    color: #777;
    font-size: 11px;
    font-weight: 600;
    font-family: serif;
    cursor: pointer;
    background: transparent;
    margin-left: 6px;
    line-height: 1;
    padding: 0;
    vertical-align: middle;
    transition: all 0.2s;
    flex-shrink: 0;
}
.help-btn:hover {
    color: #333;
    border-color: #555;
    background: rgba(0,0,0,0.05);
}
[data-theme="dark"] .help-btn {
    border-color: #666;
    color: #888;
}
[data-theme="dark"] .help-btn:hover {
    border-color: #aaa;
    color: #ccc;
    background: rgba(255,255,255,0.1);
}
/* 详情页头部（渐变背景）内的帮助按钮：白色 */
.detail-header .help-btn {
    border-color: rgba(255,255,255,0.8);
    color: #fff;
}
.detail-header .help-btn:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255,255,255,0.2);
}

/* ========== 数据管理表格：吸顶表头 ========== */
#dm-table-wrap {
    max-height: calc(100vh - 260px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
#dm-table-wrap thead th {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f8f9fa;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}
[data-theme="dark"] #dm-table-wrap thead th {
    background-color: #1a1a2e;
}

/* ========== 帮助弹窗内容 ========== */
.help-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    margin: 1em 0 0.4em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #eee;
}
.help-content h3:first-child {
    margin-top: 0;
}
.help-content p {
    font-size: 13.5px;
    line-height: 1.7;
    margin-bottom: 0.5em;
}
.help-content ul, .help-content ol {
    font-size: 13.5px;
    padding-left: 1.5em;
    margin-bottom: 0.5em;
}
.help-content li {
    margin-bottom: 0.25em;
}
[data-theme="dark"] .help-content h3 {
    color: #ccc;
    border-bottom-color: #444;
}

/* ========== 仓库管理：移动端扫码按钮突出 ========== */
.wh-scan-hero {
    display: none;
}
@media (max-width: 767.98px) {
    /* --- 扫码按钮英雄区：大按钮 + 渐变背景 --- */
    .wh-scan-hero {
        display: block;
        padding: 10px 12px 6px;
        background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
        border-radius: 0 0 12px 12px;
        margin: -1px -1px 0;
    }
    .wh-scan-hero .btn {
        width: 100%;
        padding: 12px 0;
        font-size: 16px;
        font-weight: 600;
        border-radius: 10px;
        letter-spacing: 1px;
    }
    .wh-scan-hero .btn .fas {
        font-size: 18px;
    }
    .wh-scan-hero .wh-hero-sub {
        display: -webkit-flex;
        display: flex;
        margin-top: 8px;
        margin-bottom: 2px;
    }
    .wh-scan-hero .wh-hero-sub .btn {
        -webkit-flex: 1;
        flex: 1;
        padding: 6px 0;
        font-size: 13px;
        font-weight: 500;
        border-radius: 8px;
        letter-spacing: 0;
    }

    /* --- 工具栏精简 --- */
    .wh-toolbar-mobile {
        padding: 8px 10px !important;
        -webkit-flex-wrap: wrap !important;
        flex-wrap: wrap !important;
    }
    .wh-toolbar-mobile .input-group {
        width: 100% !important;
        margin: 0 !important;
    }
    .wh-toolbar-mobile .form-select {
        width: auto !important;
        -webkit-flex: 1;
        flex: 1;
        min-width: 0;
    }
    /* 隐藏工具栏中原来的扫码和新增按钮（已移到hero区） */
    .wh-toolbar-mobile .wh-btn-desktop {
        display: none !important;
    }
    /* 移动端按钮文字精简（隐藏冗余文本，只保留关键字） */
    .wh-btn-desktop-text {
        display: none !important;
    }

    /* --- 表格隐藏次要列 --- */
    .wh-col-hide-mobile {
        display: none !important;
    }

    /* --- 表格单元格紧凑 --- */
    .wh-table-mobile td,
    .wh-table-mobile th {
        padding: 6px 5px !important;
        font-size: 12.5px !important;
    }
    .wh-table-mobile th {
        font-size: 11.5px !important;
        white-space: nowrap;
    }

    /* --- 酒店餐饮客户列表移动端 --- */
    .hotel-search-main {
        width: 100% !important;
        -webkit-flex: 1 1 100% !important;
        flex: 1 1 100% !important;
        min-width: 0;
    }
    .hotel-search-main select {
        max-width: 80px !important;
        -webkit-flex: 0 0 80px !important;
        flex: 0 0 80px !important;
    }
    .hotel-search-card .d-flex {
        -webkit-flex-wrap: wrap !important;
        flex-wrap: wrap !important;
    }
    .hotel-btn-nearby {
        -webkit-flex: 1;
        flex: 1;
    }
    #hotel-filter-panel .d-flex.ms-auto {
        margin-left: 0 !important;
        width: 100%;
    }
    #hotel-filter-panel .d-flex.ms-auto .input-group {
        width: 100% !important;
        -webkit-flex: 1;
        flex: 1;
    }

    /* --- 波次二次分拣移动端 --- */
    .ss-mobile-header {
        -webkit-flex-direction: column !important;
        flex-direction: column !important;
        -webkit-align-items: flex-start !important;
        align-items: flex-start !important;
    }
    .ss-mobile-header .ms-auto {
        margin-left: 0 !important;
        width: 100%;
        margin-top: 6px;
    }
    .ss-mobile-header .ms-auto input {
        width: 100% !important;
    }
}
