/* 号卡结算平台 - 蓝色主题样式 */
:root {
    --primary: #1565c0;
    --primary-light: #1e88e5;
    --primary-dark: #0d47a1;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-500: #9e9e9e;
    --gray-700: #616161;
    --gray-900: #212121;
    --sidebar-width: 220px;
    --header-height: 56px;
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: var(--gray-900);
    background: var(--gray-100);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ============ 布局 ============ */
.layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s;
}
.sidebar .logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar .logo h2 { font-size: 18px; font-weight: 600; }
.sidebar .logo small { opacity: 0.7; font-size: 11px; }
.sidebar .user-info {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar .avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
}
.sidebar .user-info .name { font-size: 14px; font-weight: 500; }
.sidebar .user-info .role { font-size: 12px; opacity: 0.7; }

/* 菜单 */
.sidebar .menu { padding: 10px 0; }
.sidebar .menu-group { padding: 10px 20px 5px; font-size: 11px; opacity: 0.5; text-transform: uppercase; letter-spacing: 1px; }
.sidebar .menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    transition: all 0.2s;
    cursor: pointer;
}
.sidebar .menu-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar .menu-item.active { background: rgba(255,255,255,0.2); color: #fff; border-left: 3px solid #fff; padding-left: 17px; }
.sidebar .menu-item .icon { width: 20px; margin-right: 12px; font-size: 16px; }

/* 主内容区 */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部栏 */
.header {
    height: var(--header-height);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.header .title { font-size: 16px; font-weight: 600; }
.header .actions { display: flex; gap: 10px; align-items: center; }
.btn-logout {
    padding: 8px 16px;
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-700);
}
.btn-logout:hover { background: var(--gray-200); }

/* 内容区 */
.content { flex: 1; padding: 24px; }

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #388e3c; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #d32f2f; color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-outline.active, .time-btn.active { background: var(--primary); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-link { background: none; border: none; color: var(--primary); padding: 4px 8px; }
.btn-link:hover { text-decoration: underline; }

/* ============ 卡片 ============ */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* ============ 统计卡片 ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--primary);
}
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }
.stat-card .label { color: var(--gray-500); font-size: 13px; margin-bottom: 8px; }
.stat-card .value { font-size: 24px; font-weight: 700; color: var(--gray-900); }
.stat-card .value.small { font-size: 18px; }

/* ============ 表格 ============ */
.table-wrapper { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
}
.table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}
.table tbody tr:hover { background: var(--gray-50); }
.table .actions { display: flex; gap: 6px; }
.table .amount { color: var(--primary); font-weight: 600; }
.table .status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.status-badge.active { background: #e8f5e9; color: #2e7d32; }
.status-badge.inactive { background: #ffebee; color: #c62828; }

/* ============ 表单 ============ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}
.form-group label .required { color: var(--danger); margin-left: 2px; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: #fff;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}
.form-group .help { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============ 模态框 ============ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}
.modal {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-500);
}
.modal-body { padding: 20px; }
.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============ 筛选栏 ============ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 16px;
    align-items: flex-end;
}
.filter-bar .form-group { margin-bottom: 0; flex: 0 0 auto; min-width: 160px; }
.filter-bar .form-control { padding: 8px 12px; }

/* ============ 提示消息 ============ */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    z-index: 300;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============ 分页 ============ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    flex-wrap: wrap;
}
.pagination .page-info { color: var(--gray-500); font-size: 13px; margin-right: auto; }
.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background: #fff;
    color: var(--gray-700);
    font-size: 13px;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============ 空状态 ============ */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}
.empty .icon { font-size: 48px; margin-bottom: 12px; }

/* ============ 登录页 ============ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1565c0 0%, #1e88e5 50%, #42a5f5 100%);
    padding: 20px;
}
.login-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 100%;
    padding: 40px;
}
.login-box h1 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 26px;
}
.login-box .subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 30px;
}
.login-box .form-control {
    padding: 12px 14px;
    font-size: 14px;
}
.login-box .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 10px;
}

/* ============ 移动端适配 ============ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .content { padding: 16px; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .table th, .table td { padding: 8px; font-size: 12px; }
    
    /* 汉堡菜单按钮 */
    .mobile-toggle {
        display: flex;
        width: 36px; height: 36px;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        cursor: pointer;
        background: var(--gray-100);
    }
    .mobile-toggle span {
        width: 20px; height: 2px;
        background: var(--gray-700);
        position: relative;
    }
    .mobile-toggle span::before,
    .mobile-toggle span::after {
        content: '';
        position: absolute;
        left: 0;
        width: 20px; height: 2px;
        background: var(--gray-700);
    }
    .mobile-toggle span::before { top: -6px; }
    .mobile-toggle span::after { top: 6px; }
    
    /* 遮罩 */
    .sidebar-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
        display: none;
    }
    .sidebar-overlay.show { display: block; }
}

@media (min-width: 769px) {
    .mobile-toggle { display: none; }
    .sidebar-overlay { display: none !important; }
}

/* 打印样式 */
@media print {
    .sidebar, .header, .no-print { display: none !important; }
    .main { margin-left: 0; }
    body { background: #fff; }
}

/* ============ 可搜索下拉框 ============ */
.search-select {
    position: relative;
}
.search-select .search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}
.search-select .search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}
.search-select .dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
}
.search-select .dropdown-list.show { display: block; }
.search-select .dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-100);
}
.search-select .dropdown-item:last-child { border-bottom: none; }
.search-select .dropdown-item:hover,
.search-select .dropdown-item.active {
    background: var(--primary);
    color: #fff;
}
.search-select .dropdown-empty {
    padding: 12px;
    text-align: center;
    color: var(--gray-500);
    font-size: 13px;
}
.filter-bar .search-select .search-input { padding: 8px 12px; }

/* ============ 首页桌面/移动端切换 ============ */
.mobile-dashboard { display: none; }

@media (max-width: 768px) {
    .desktop-dashboard { display: none; }
    .mobile-dashboard { display: block; }

    /* 移动端内容区不留内边距，让蓝色头部铺满 */
    .content { padding: 0; }

    /* 顶部蓝色头部 */
    .m-hero {
        background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
        color: #fff;
        text-align: center;
        padding: 32px 16px 40px;
    }
    .m-hero-label {
        font-size: 13px;
        opacity: 0.85;
        margin-bottom: 8px;
    }
    /* 录入页无标题，收紧顶部留白 */
    .mobile-records .m-hero {
        padding: 24px 16px 36px;
    }
    .m-hero-number {
        font-size: 56px;
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: -1px;
    }
    .m-hero-sub {
        font-size: 15px;
        margin-top: 8px;
        opacity: 0.9;
    }

    /* 四个数据卡片 2x2 */
    .m-mini-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: -24px 12px 16px;
        position: relative;
        z-index: 2;
    }
    .m-mini-card {
        background: #fff;
        border-radius: 10px;
        padding: 14px 10px;
        text-align: center;
        box-shadow: 0 2px 10px rgba(21,101,192,0.12);
    }
    .m-mini-value {
        font-size: 20px;
        font-weight: 700;
        color: var(--primary);
        margin-bottom: 4px;
    }
    .m-mini-label {
        font-size: 12px;
        color: var(--gray-500);
    }

    /* 区块 */
    .m-section {
        margin: 0 12px 16px;
        background: #fff;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    }
    .m-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 14px;
        font-size: 14px;
        font-weight: 600;
        color: var(--gray-900);
        border-bottom: 1px solid var(--gray-100);
    }
    .m-section-more {
        font-size: 12px;
        color: var(--primary);
        font-weight: normal;
    }

    /* 最近录入列表 */
    .m-empty {
        padding: 24px;
        text-align: center;
        color: var(--gray-500);
        font-size: 13px;
    }
    .m-record-list { padding: 0; }
    .m-record-item {
        padding: 12px 14px;
        border-bottom: 1px solid var(--gray-100);
    }
    .m-record-item:last-child { border-bottom: none; }
    .m-record-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
    }
    .m-record-store {
        font-size: 14px;
        font-weight: 600;
        color: var(--gray-900);
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-right: 10px;
    }
    .m-record-amount {
        font-size: 15px;
        font-weight: 700;
        color: var(--primary);
        white-space: nowrap;
    }
    .m-record-bottom {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 12px;
        color: var(--gray-500);
    }
    .m-record-cards { color: var(--success); }
    .m-record-remark {
        color: var(--gray-700);
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ============ 门店页桌面/移动端切换 ============ */
.mobile-stores { display: none; }

@media (max-width: 768px) {
    .desktop-stores { display: none; }
    .mobile-stores { display: block; }

    /* 移动端搜索栏 */
    .m-search-bar {
        display: flex;
        gap: 8px;
        padding: 10px 12px;
        background: #fff;
        border-bottom: 1px solid var(--gray-200);
    }
    .m-search-bar .form-control {
        flex: 1;
        padding: 8px 10px;
        font-size: 13px;
    }
    .m-search-bar .btn {
        padding: 8px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* 门店卡片列表 */
    .m-store-list {
        padding: 10px 12px 80px;
    }
    .m-store-card {
        background: #fff;
        border-radius: 10px;
        padding: 14px;
        margin-bottom: 10px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        overflow: hidden;
        max-width: 100%;
    }
    .m-store-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 8px;
        max-width: 100%;
    }
    .m-store-name {
        flex: 1;
        min-width: 0;
        max-width: 70%;
        font-size: 15px;
        font-weight: 700;
        color: var(--gray-900);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
    }
    /* 库存徽标 */
    .m-store-stock {
        flex-shrink: 0;
        max-width: 30%;
        font-size: 12px;
        font-weight: 700;
        padding: 4px 11px;
        border-radius: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .m-stock-ok {
        background: rgba(21,101,192,0.1);
        color: var(--primary);
    }
    .m-stock-low {
        background: rgba(255,152,0,0.14);
        color: #ef6c00;
    }
    .m-stock-empty {
        background: rgba(244,67,54,0.12);
        color: #d32f2f;
    }
    .m-store-info {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        font-size: 13px;
        color: var(--gray-700);
        margin-bottom: 8px;
    }
    .m-store-phone { color: var(--primary); }
    .m-store-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 12px;
        color: var(--gray-500);
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--gray-100);
    }
    .m-store-actions {
        display: flex;
        gap: 8px;
    }
    /* 门店卡片数据统计行 */
    .m-store-stats {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px dashed var(--gray-200);
    }
    .m-store-stat {
        text-align: center;
        min-width: 0;
    }
    .m-store-stat-value {
        font-size: 14px;
        font-weight: 700;
        color: #0a9d6e;
        margin-bottom: 3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .m-store-stat-sub {
        font-size: 11px;
        color: #78909c;
        white-space: nowrap;
        margin-bottom: 2px;
    }
    /* 卡类胶囊标签 */
    .m-type-pills {
        display: inline-flex;
        align-items: center;
        gap: 2px;
    }
    .m-type-pill {
        display: inline-flex;
        align-items: center;
        padding: 0 4px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.6;
        white-space: nowrap;
    }
    .m-type-pill .num {
        font-size: 15px;
        font-weight: 800;
        margin-left: 1px;
    }
    .m-type-pill.mobile {
        background: rgba(21,101,192,0.1);
        color: #1565c0;
    }
    .m-type-pill.broadband {
        background: rgba(255,152,0,0.16);
        color: #ef6c00;
    }
    .m-type-pill.on-dark {
        background: #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,0.16);
    }
    .m-type-pill.on-dark.mobile { color: #1565c0; }
    .m-type-pill.on-dark.broadband { color: #ef6c00; }
    .m-hero .m-type-pills { gap: 6px; }
    .m-hero .m-type-pill {
        padding: 1px 9px;
        font-size: 14px;
        line-height: 1.5;
    }
    .m-hero .m-type-pill .num {
        font-size: 18px;
        margin-left: 2px;
    }
    .m-store-stat-label {
        font-size: 11px;
        color: var(--gray-500);
        white-space: nowrap;
    }
    .m-btn {
        flex: 1;
        padding: 8px;
        border: none;
        border-radius: 6px;
        font-size: 13px;
        cursor: pointer;
        font-weight: 500;
    }
    .m-btn-edit {
        background: var(--primary);
        color: #fff;
    }
    .m-btn-del {
        background: #fff;
        color: var(--danger);
        border: 1px solid var(--danger);
    }

    /* 浮动新增按钮 */
    .m-fab {
        position: fixed;
        bottom: 80px;
        right: 20px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: var(--primary);
        color: #fff;
        border: none;
        font-size: 28px;
        font-weight: 300;
        box-shadow: 0 4px 12px rgba(21,101,192,0.4);
        cursor: pointer;
        z-index: 50;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 移动端分页 */
    .m-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px;
        padding: 16px 0;
    }
    .m-page-btn {
        padding: 6px 16px;
        border: 1px solid var(--gray-300);
        background: #fff;
        border-radius: 6px;
        font-size: 13px;
        cursor: pointer;
        color: var(--gray-700);
    }
    .m-page-info {
        font-size: 13px;
        color: var(--gray-500);
    }
}

/* ============ 开卡录入页桌面/移动端切换 ============ */
.mobile-records { display: none; }

@media (max-width: 768px) {
    .desktop-records { display: none; }
    .mobile-records { display: block; }

    /* 移动端录入表单卡片 */
    .m-form-card {
        margin: -24px 12px 12px;
        background: #fff;
        border-radius: 10px;
        padding: 14px;
        box-shadow: 0 2px 10px rgba(21,101,192,0.12);
        position: relative;
        z-index: 2;
    }
    .m-form-title {
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 14px;
        color: var(--gray-900);
    }

    /* 字段通用 */
    .m-field {
        margin-bottom: 14px;
    }
    .m-field-label {
        display: block;
        font-size: 13px;
        color: var(--gray-700);
        margin-bottom: 8px;
        font-weight: 500;
    }
    /* 双字段并排（渠道 / 卡类） */
    .m-field-row {
        display: flex;
        gap: 10px;
        margin-bottom: 14px;
    }
    .m-field-row .m-field {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }
    .m-field-row .m-qty-btns { gap: 6px; }
    .m-field-row .m-qty-btn {
        padding: 8px 4px;
        font-size: 14px;
    }

    /* 门店搜索 */
    .m-store-select .search-input {
        width: 100%;
        height: 44px;
        padding: 0 14px;
        font-size: 15px;
        border: 1.5px solid var(--gray-200);
        border-radius: 8px;
        background: var(--gray-50);
    }
    .m-store-select .search-input:focus {
        border-color: var(--primary);
        background: #fff;
        outline: none;
    }

    /* 日期快捷选择 */
    .m-date-quick {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .m-date-item {
        flex: 1;
        min-width: 52px;
        text-align: center;
        padding: 8px 4px;
        border: 1.5px solid var(--gray-200);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
        background: #fff;
    }
    .m-date-item.active {
        border-color: var(--primary);
        background: var(--primary);
        color: #fff;
    }
    .m-date-day {
        font-size: 18px;
        font-weight: 700;
        line-height: 1.2;
    }
    .m-date-label {
        font-size: 11px;
        margin-top: 2px;
        opacity: 0.85;
    }

    /* 开卡数量按钮 */
    .m-qty-btns {
        display: flex;
        gap: 8px;
    }
    .m-qty-btn {
        flex: 1;
        padding: 10px;
        border: 1.5px solid var(--gray-200);
        background: #fff;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 600;
        color: var(--gray-700);
        cursor: pointer;
        transition: all 0.2s;
    }
    .m-qty-btn.active {
        border-color: var(--primary);
        background: var(--primary);
        color: #fff;
    }
    .m-qty-input {
        width: 100%;
        margin-top: 8px;
        padding: 8px 12px;
        font-size: 14px;
    }

    /* 佣金金额按钮 */
    .m-amount-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-bottom: 10px;
    }
    .m-amount-btn {
        padding: 10px 4px;
        border: 1.5px solid var(--gray-200);
        background: #fff;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        color: var(--gray-700);
        cursor: pointer;
        transition: all 0.2s;
    }
    .m-amount-btn.active {
        border-color: var(--primary);
        background: var(--primary);
        color: #fff;
    }
    .m-amount-input {
        width: 100%;
        padding: 8px 12px;
        font-size: 14px;
    }

    /* 底部按钮 */
    .m-form-footer {
        display: flex;
        gap: 10px;
        margin-top: 16px;
    }
    .m-btn-cancel {
        flex: 1;
        padding: 12px;
        border: 1.5px solid var(--gray-300);
        background: #fff;
        border-radius: 8px;
        font-size: 14px;
        color: var(--gray-700);
        cursor: pointer;
        font-weight: 600;
    }
    .m-btn-submit {
        flex: 2;
        padding: 12px;
        border: none;
        background: var(--primary);
        color: #fff;
        border-radius: 8px;
        font-size: 14px;
        cursor: pointer;
        font-weight: 600;
    }

    /* 移动端筛选栏 */
    .m-filter-bar {
        display: flex;
        gap: 8px;
        padding: 8px 12px;
        align-items: center;
    }
    .m-filter-bar .form-control {
        padding: 6px 8px;
        font-size: 12px;
    }

    /* 移动端统计摘要 */
    .m-summary {
        margin: 8px 12px;
        padding: 10px 12px;
        background: #fff;
        border-radius: 8px;
        font-size: 13px;
        color: var(--gray-700);
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    /* 移动端记录卡片列表 */
    .m-record-list {
        padding: 0 12px 80px;
    }
    .m-record-card {
        background: #fff;
        border-radius: 10px;
        padding: 12px 14px;
        margin-bottom: 10px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    .m-record-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }
    .m-record-store {
        font-size: 14px;
        font-weight: 700;
        color: var(--gray-900);
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-right: 10px;
    }
    .m-record-amount {
        font-size: 15px;
        font-weight: 700;
        color: var(--primary);
        white-space: nowrap;
    }
    .m-record-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 12px;
        color: var(--gray-500);
        margin-bottom: 6px;
    }
    .m-record-cards { color: var(--success); }
    .m-record-remark-line {
        font-size: 12px;
        color: var(--gray-700);
        margin-bottom: 8px;
        padding: 6px 8px;
        background: var(--gray-50);
        border-radius: 4px;
    }
    .m-record-actions {
        display: flex;
        gap: 8px;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--gray-100);
    }
}

/* ============ 数据统计页桌面/移动端切换 ============ */
.mobile-stats { display: none; }

@media (max-width: 768px) {
    .desktop-stats { display: none; }
    .mobile-stats { display: block; }

    /* 筛选卡片 */
    .m-filter-card {
        margin: -24px 12px 12px;
        background: #fff;
        border-radius: 10px;
        padding: 12px;
        box-shadow: 0 2px 10px rgba(21,101,192,0.12);
        position: relative;
        z-index: 2;
    }
    .m-time-quick {
        display: flex;
        gap: 6px;
        margin-bottom: 10px;
        overflow-x: auto;
    }
    .m-time-btn {
        flex: 1;
        min-width: 50px;
        padding: 7px 4px;
        border: 1.5px solid var(--gray-200);
        background: #fff;
        border-radius: 6px;
        font-size: 12px;
        color: var(--gray-700);
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.2s;
    }
    .m-time-btn.active {
        border-color: var(--primary);
        background: var(--primary);
        color: #fff;
    }
    .m-date-range {
        display: flex;
        gap: 6px;
        align-items: center;
        margin-bottom: 10px;
    }
    .m-date-range .form-control {
        flex: 1;
        padding: 6px 8px;
        font-size: 12px;
    }
    .m-date-sep {
        font-size: 12px;
        color: var(--gray-500);
    }
    .m-group-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
    .m-group-row .form-control {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        padding: 8px 10px;
        font-size: 13px;
        border: 1px solid #d5e2f5;
        border-radius: 10px;
        background-color: #fff;
        color: var(--gray-900);
        box-shadow: 0 1px 2px rgba(21,101,192,0.06);
    }
    .m-group-row .form-control:focus {
        border-color: var(--primary);
        outline: none;
    }
    #filter_sales_m { flex: 1 0 100%; }

    /* 概览卡片 */
    .m-stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 0 12px 12px;
    }
    .m-stat-card {
        background: #fff;
        border-radius: 10px;
        padding: 14px 12px;
        text-align: center;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }
    .m-stat-label {
        font-size: 12px;
        color: var(--gray-500);
        margin-bottom: 6px;
    }
    .m-stat-value {
        font-size: 20px;
        font-weight: 700;
        color: var(--primary);
    }

    /* 排行条目 */
    .m-rank-item {
        padding: 12px 14px;
        border-bottom: 1px solid var(--gray-100);
    }
    .m-rank-item:last-child { border-bottom: none; }
    .m-rank-top {
        display: flex;
        align-items: center;
        margin-bottom: 6px;
    }
    .m-rank-no {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: var(--gray-100);
        color: var(--gray-600);
        font-size: 12px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 8px;
        flex-shrink: 0;
    }
    .m-rank-item:nth-child(1) .m-rank-no { background: #FFD700; color: #fff; }
    .m-rank-item:nth-child(2) .m-rank-no { background: #C0C0C0; color: #fff; }
    .m-rank-item:nth-child(3) .m-rank-no { background: #CD7F32; color: #fff; }
    .m-rank-name {
        flex: 1;
        font-size: 14px;
        font-weight: 600;
        color: var(--gray-900);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .m-rank-amount {
        font-size: 14px;
        font-weight: 700;
        color: var(--primary);
        margin-left: 8px;
    }
    .m-rank-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 12px;
        color: var(--gray-500);
        padding-left: 30px;
    }
}

/* ============ 移动端底部导航 ============ */
.m-tabbar { display: none; }

@media (max-width: 768px) {
    .m-tabbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid var(--gray-200);
        box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
        z-index: 200;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .m-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 0 6px;
        color: var(--gray-400);
        text-decoration: none;
        transition: color 0.2s;
        gap: 2px;
    }
    .m-tab svg {
        transition: transform 0.2s;
    }
    .m-tab span {
        font-size: 11px;
    }
    .m-tab.active {
        color: var(--primary);
    }
    .m-tab.active svg {
        transform: translateY(-1px);
    }
    /* 内容区底部留空，避免被导航遮挡 */
    .content {
        padding-bottom: 70px;
    }
    .mobile-dashboard,
    .mobile-stores,
    .mobile-records,
    .mobile-stats {
        padding-bottom: 70px;
    }
}

@media (min-width: 769px) {
    .m-tabbar { display: none !important; }
}

/* ============ 用户管理页 移动端 ============ */
.mobile-users { display: none; }

@media (max-width: 768px) {
    .desktop-users { display: none; }
    .mobile-users { display: block; padding-bottom: 70px; }

    .m-search-bar {
        display: flex;
        gap: 8px;
        padding: 10px 12px;
        background: #fff;
        border-bottom: 1px solid var(--gray-200);
    }
    .m-search-bar #keyword_m {
        flex: 1;
        min-width: 0;
    }
    .m-search-bar #role_filter_m {
        width: 100px;
        flex-shrink: 0;
    }
    .m-user-list {
        padding: 10px 12px;
    }
    .m-user-card {
        background: #fff;
        border-radius: 10px;
        padding: 12px;
        margin-bottom: 10px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        display: flex;
        gap: 12px;
        align-items: flex-start;
    }
    .m-user-avatar {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        color: #fff;
        font-size: 18px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .m-user-main {
        flex: 1;
        min-width: 0;
    }
    .m-user-top {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 4px;
    }
    .m-user-name {
        font-size: 15px;
        font-weight: 700;
        color: var(--gray-800);
    }
    .m-user-role {
        font-size: 12px;
        font-weight: 600;
    }
    .m-user-sub {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 13px;
        color: var(--gray-500);
        margin-bottom: 6px;
    }
    .m-user-phone {
        color: var(--primary);
    }
    .m-user-meta {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 12px;
        color: var(--gray-400);
    }
    .m-user-created {
        color: var(--gray-400);
    }
    .m-user-actions {
        display: flex;
        flex-direction: column;
        gap: 6px;
        flex-shrink: 0;
    }
    .m-user-actions .m-btn {
        padding: 5px 12px;
        font-size: 12px;
        min-width: 50px;
    }
    .m-user-actions form {
        margin: 0;
    }
    .status-badge {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 11px;
        font-weight: 600;
    }
    .status-badge.active {
        background: #e8f5e9;
        color: #2e7d32;
    }
    .status-badge.inactive {
        background: #ffebee;
        color: #c62828;
    }
}

/* ===== 库存调整底部弹出抽屉 ===== */
.stock-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0);
    visibility: hidden;
    transition: background .3s ease, visibility .3s;
}
.stock-sheet-overlay.open {
    background: rgba(0,0,0,.45);
    visibility: visible;
}
.stock-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform .3s ease;
    box-shadow: 0 -4px 24px rgba(0,0,0,.15);
}
.stock-sheet-overlay.open .stock-sheet {
    transform: translateY(0);
}
.stock-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.stock-sheet-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900, #222);
}
.stock-sheet-close {
    width: 30px;
    height: 30px;
    line-height: 28px;
    text-align: center;
    font-size: 20px;
    color: var(--gray-500, #999);
    cursor: pointer;
    border-radius: 50%;
    background: var(--gray-100, #f5f5f5);
}
.stock-current {
    font-size: 14px;
    color: var(--gray-600, #666);
    margin-bottom: 14px;
}
.stock-current b {
    color: var(--primary);
    font-size: 18px;
}
.stock-type-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.stock-type-btn {
    padding: 11px;
    border: 1.5px solid var(--gray-200);
    background: #fff;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all .2s;
}
.stock-type-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.stock-type-btn.active[data-type="decrease"] {
    border-color: #d32f2f;
    background: #d32f2f;
}
.stock-quick-btns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.stock-quick-btn {
    padding: 10px 0;
    border: 1.5px solid var(--gray-200);
    background: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all .2s;
}
.stock-quick-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.stock-quick-btn.minus.active {
    border-color: #d32f2f;
    background: #d32f2f;
}
.stock-qty-input {
    width: 100%;
    padding: 11px 12px;
    font-size: 15px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    margin-bottom: 14px;
    box-sizing: border-box;
}
.stock-qty-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* 库存抽屉确认按钮 */
.stock-submit-btn {
    width: 100%;
    padding: 13px 0;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.35);
    transition: all .2s ease;
}
.stock-submit-btn:hover {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    box-shadow: 0 6px 16px rgba(21, 101, 192, 0.45);
    transform: translateY(-1px);
}
.stock-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(21, 101, 192, 0.3);
}

/* ===== 跟进记录 ===== */
.follow-banner {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff8e1;
    border: 1px solid #ffe0a3;
    color: #92400e;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}
.follow-banner:hover { filter: brightness(0.98); }
.follow-banner b { color: #d97706; }
.follow-banner.active {
    background: #e8f0fe;
    border-color: #b6d0f5;
    color: var(--primary);
}
.follow-banner.active b { color: var(--primary); }
.follow-banner-link { font-weight: 600; text-decoration: underline; white-space: nowrap; }

.btn-follow { position: relative; color: #f57c00; border-color: #ffb74d; }
.btn-follow:hover { background: #f57c00; border-color: #f57c00; color: #fff; }

.follow-badge {
    position: absolute;
    top: -7px; right: -7px;
    min-width: 16px; height: 16px; line-height: 16px;
    background: #f44336; color: #fff;
    border-radius: 8px; font-size: 10px; font-weight: 700;
    padding: 0 4px; text-align: center;
    pointer-events: none;
}

.m-btn-follow {
    background: #fff3e0; color: #f57c00; border: 1px solid #ffcc80;
    position: relative;
}

.follow-sheet { max-height: 72vh; display: flex; flex-direction: column; }
.follow-add { display: flex; gap: 8px; margin: 12px 0; }
.follow-add .form-control { flex: 1; }
.follow-add .btn { flex-shrink: 0; }
.follow-list { overflow-y: auto; flex: 1; padding-right: 2px; }
.follow-item {
    display: flex; gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fff;
}
.follow-item.done { opacity: .78; background: var(--gray-50); }
.follow-item-main { flex: 1; min-width: 0; }
.follow-content { font-size: 14px; color: var(--gray-900); word-break: break-all; line-height: 1.5; }
.follow-item.done .follow-content { text-decoration: line-through; color: var(--gray-500); }
.follow-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.follow-status { font-size: 11px; padding: 1px 8px; border-radius: 10px; font-weight: 600; }
.follow-status.st-pending { background: #fff3e0; color: #f57c00; }
.follow-status.st-done { background: #e8f5e9; color: #2e7d32; }
.follow-time { font-size: 11px; color: var(--gray-500); }
.follow-item-actions { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.follow-act-btn {
    border: none; background: none; cursor: pointer;
    color: var(--primary); font-size: 12px; padding: 4px 8px;
    border-radius: 6px; white-space: nowrap;
}
.follow-act-btn:hover { background: #e8f0fe; }
.follow-act-btn.del { color: var(--danger); }
.follow-act-btn.del:hover { background: #ffebee; }
.follow-empty { text-align: center; color: var(--gray-500); font-size: 13px; padding: 28px 0; }

/* 首页待跟进铃铛 */
.m-hero { position: relative; }
.m-hero-bell {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 20px;
    text-decoration: none;
    line-height: 1;
    z-index: 2;
}
.m-hero-bell-badge {
    position: absolute;
    top: -6px;
    right: -9px;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    background: #f44336;
    color: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* ===== 统计页 · 日期明细美化 ===== */
/* 汇总胶囊（桌面） */
.daily-sum {
    padding: 14px 20px;
    background: linear-gradient(180deg, #f7faff 0%, #fff 100%);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.daily-sum .sum-title { font-size: 12px; color: var(--gray-500); }
.stat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-700);
}
.stat-chip b { font-size: 14px; }
.stat-chip .amt { opacity: .75; font-weight: 500; }
.stat-chip.blue { background: rgba(21,101,192,0.1); color: var(--primary); }
.stat-chip.green { background: rgba(7,193,96,0.12); color: #07a14f; }
.stat-chip.slate { background: rgba(84,110,122,0.12); color: #546e7a; }
.stat-chip.orange { background: rgba(245,124,0,0.12); color: #ef6c00; }
.stat-chip.total {
    background: linear-gradient(135deg, #1565c0 0%, #1e88e5 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(21,101,192,0.3);
}
.stat-chip.total .amt { opacity: .9; }

/* 小胶囊（表格/日期卡通用） */
.mini-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.6;
}
.mini-pill.blue { background: rgba(21,101,192,0.08); color: var(--primary); }
.mini-pill.green { background: rgba(7,193,96,0.1); color: #07a14f; }
.mini-pill.slate { background: rgba(84,110,122,0.1); color: #546e7a; }
.mini-pill.orange { background: rgba(245,124,0,0.1); color: #ef6c00; }

/* 移动端汇总卡 */
.m-summary-v2 {
    margin: 0 0 12px;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 55%, #1e88e5 100%);
    border-radius: 14px;
    padding: 16px 14px;
    color: #fff;
    box-shadow: 0 6px 16px rgba(21,101,192,0.3);
}
.m-summary-v2 .sum-head { display: flex; align-items: center; }
.m-summary-v2 .sum-label { font-size: 12px; opacity: .85; letter-spacing: .5px; }
.m-summary-v2 .sum-main {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.18);
}
.m-summary-v2 .sum-num { font-size: 34px; font-weight: 800; line-height: 1; }
.m-summary-v2 .sum-unit { font-size: 13px; opacity: .85; }
.m-summary-v2 .sum-amt { margin-left: auto; font-size: 19px; font-weight: 700; color: #ffe082; }
.m-summary-v2 .sum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}
.m-summary-v2 .sum-cell {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 9px 11px;
}
.m-summary-v2 .sum-cell .lab { font-size: 11px; opacity: .85; }
.m-summary-v2 .sum-cell .val { font-size: 19px; font-weight: 800; margin-top: 3px; line-height: 1.1; }
.m-summary-v2 .sum-cell .val small { font-size: 11px; font-weight: 500; opacity: .8; }
.m-summary-v2 .sum-cell .amt { font-size: 11px; opacity: .85; margin-top: 2px; }
.m-summary-v2 .sum-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}
.m-summary-v2 .sum-foot .fp {
    background: rgba(255,255,255,0.14);
    border-radius: 10px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
}

/* 移动端日期卡胶囊行 */
.m-day-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* 移动端日期明细卡片 */
.m-day-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border-left: 3px solid var(--primary);
}
.m-day-card .dc-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}
.m-day-card .dc-date { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.m-day-card .dc-amt { font-size: 17px; font-weight: 700; color: #0a9d6e; }
.m-day-card .dc-mid {
    display: flex;
    gap: 12px;
    margin-top: 5px;
    font-size: 12px;
    color: var(--gray-500);
}
.m-day-card .dc-mid b { color: var(--primary); font-size: 15px; }
.m-day-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 10px;
}
.m-day-cell {
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.m-day-cell b { font-size: 14px; }
.m-day-cell small { font-weight: 500; opacity: .8; font-size: 11px; }
.m-day-cell.blue { background: rgba(21,101,192,0.08); color: var(--primary); }
.m-day-cell.green { background: rgba(7,193,96,0.1); color: #07a14f; }
.m-day-cell.slate { background: rgba(84,110,122,0.08); color: #546e7a; }
.m-day-cell.orange { background: rgba(245,124,0,0.1); color: #ef6c00; }

/* 移动端门店业绩卡片 */
.m-sr-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.m-sr-card .sr-top {
    display: flex;
    align-items: center;
    gap: 8px;
}
.m-sr-card .sr-no {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-700);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.m-sr-card .sr-no.gold { background: linear-gradient(135deg, #ffb300, #ff8f00); color: #fff; box-shadow: 0 2px 5px rgba(255,143,0,0.4); }
.m-sr-card .sr-no.silver { background: linear-gradient(135deg, #b0bec5, #90a4ae); color: #fff; }
.m-sr-card .sr-no.bronze { background: linear-gradient(135deg, #d7a075, #b3774a); color: #fff; }
.m-sr-card .sr-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.m-sr-card .sr-amt { flex-shrink: 0; font-size: 16px; font-weight: 700; color: #0a9d6e; }
.m-sr-card .sr-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--gray-500);
}
.m-sr-card .sr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 10px;
}
.m-sr-card .sr-cell {
    border-radius: 8px;
    padding: 7px 6px;
    text-align: center;
}
.m-sr-card .sr-cell .lab { display: block; font-size: 11px; opacity: .85; }
.m-sr-card .sr-cell .val { display: block; font-size: 17px; font-weight: 800; margin-top: 2px; line-height: 1.1; }
.m-sr-card .sr-cell .val small { font-size: 10px; font-weight: 500; opacity: .8; }
.m-sr-card .sr-cell.total { background: rgba(21,101,192,0.09); color: var(--primary); }
.m-sr-card .sr-cell.slate { background: rgba(84,110,122,0.08); color: #546e7a; }
.m-sr-card .sr-cell.orange { background: rgba(245,124,0,0.1); color: #ef6c00; }
