/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background-color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand a {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 主内容区 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 80px; /* 底部导航栏空间 */
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 12px;
}

.nav-item:active {
    color: #1890ff;
}

.nav-item.active {
    color: #1890ff;
    font-weight: 600;
}

.navbar-user-name {
    font-size: 14px;
    color: #666;
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

/* 登录页 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
    color: #333;
}

.login-subtitle {
    text-align: center;
    color: #999;
    margin-bottom: 30px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #40a9ff;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-danger {
    background-color: #ff4d4f;
    color: #fff;
}

.btn-danger:hover {
    background-color: #ff7875;
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* 提示消息 */
.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

.alert-error {
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
}

.alert-warning {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    color: #faad14;
}

.alert-info {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #1890ff;
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
}

/* 页面容器 */
.page-container {
    max-width: 800px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 24px;
    color: #333;
}

/* 欢迎区 */
.welcome-section {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-section h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.user-name {
    font-size: 18px;
    color: #666;
}

/* 快捷操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.action-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.action-card:active {
    transform: scale(0.98);
}

.action-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.action-text {
    font-size: 16px;
    font-weight: 500;
}

/* 信息区 */
.info-section {
    margin-top: 30px;
}

.info-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.info-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-card p {
    margin-bottom: 8px;
}

/* 表单卡片 */
.form-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* 登录页脚 */
.login-footer {
    margin-top: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .main-content {
        padding: 16px;
        padding-bottom: 80px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .action-card {
        padding: 20px 16px;
    }

    .action-icon {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .action-card {
        padding: 20px 10px;
    }

    .action-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }

    .login-box {
        padding: 30px 20px;
    }
}

/* 页面头部（标题 + 操作按钮） */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* 表格通用样式 */
.table-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

.data-table th {
    background: #fafafa;
    font-weight: 500;
}

.data-table tr:hover {
    background: #fafafa;
}

.text-center {
    text-align: center;
    color: #999;
}

.text-danger {
    color: #ff4d4f;
    font-weight: bold;
}

.text-warning {
    color: #faad14;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

/* 角标 / 状态 / 角色 */
.action-card {
    position: relative;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #ff4d4f;
    color: #fff;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
}

.badge-warning {
    background: #faad14;
}

.status-badge,
.role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 20px;
}

.status-active {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.status-inactive {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.role-admin {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.role-store {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.role-staff {
    background: #fafafa;
    color: #666;
    border: 1px solid #e8e8e8;
}

/* 首页管理区 / 系统设置入口 */
.admin-section {
    margin-bottom: 30px;
}

.admin-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.admin-actions,
.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quick-link-card:active {
    transform: scale(0.98);
}

.quick-link-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.quick-link-text {
    font-size: 15px;
    font-weight: 500;
}

/* 系统设置子导航 */
.settings-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.settings-subnav a {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
}

.settings-subnav a.active {
    background: #1890ff;
    color: #fff;
}

/* 卡号格式预览 */
.card-format-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.format-part {
    padding: 6px 12px;
    background: #e6f7ff;
    color: #1890ff;
    border-radius: 6px;
    font-size: 14px;
}

.form-help {
    font-size: 14px;
    color: #999;
    margin-top: 6px;
}

.form-hint {
    padding: 12px;
    background-color: #f0f7ff;
    border-radius: 6px;
    margin-top: 12px;
}

.form-hint p {
    margin: 0;
    color: #1890ff;
}

/* 备份页 */
.backup-actions,
.backup-list,
.settings-section {
    margin-bottom: 30px;
}

.backup-actions h2,
.backup-list h2,
.settings-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.backup-actions form {
    margin-bottom: 8px;
}

/* 统计卡片 / 筛选表单（无内联样式时兜底） */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-card.highlight .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

.filter-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-form .form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-form .form-group {
    flex: 1;
    min-width: 150px;
}

/* 报表区间快捷按钮 */
.range-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.range-links a {
    padding: 6px 14px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.range-links a.active {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.range-hint {
    color: #999;
    font-size: 14px;
}

.current-store-tag {
    display: inline-block;
    padding: 8px 14px;
    background: #f0f7ff;
    color: #333;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    align-self: flex-end;
}

@media (max-width: 768px) {
    .admin-actions,
    .quick-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .admin-actions,
    .quick-links {
        grid-template-columns: 1fr;
    }
}

/* ===== 生日选择器（开卡页） ===== */
.form-optional {
    color: #999;
    font-size: 13px;
    font-weight: normal;
}

.birthday-picker {
    display: flex;
    gap: 8px;
}

.birthday-select {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 8px;
    font-size: 16px;  /* ≥16px 防止 iOS 聚焦自动放大 */
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    text-align-last: center;
}

.birthday-select:disabled {
    opacity: 1;
}

/* ===== 到期/生日提醒区块 ===== */
.expiring-section {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 16px;
}

.section-title .count {
    color: #999;
    font-size: 14px;
    font-weight: normal;
}

.badge-birthday {
    background: #fff0f6;
    color: #c41d7f;
    border: 1px solid #ffadd2;
}

.badge-urgent {
    background: #fff1f0;
    color: #cf1322;
    border: 1px solid #ffa39e;
}

.badge-warning-badge {
    background: #fffbe6;
    color: #d48806;
    border: 1px solid #ffe58f;
}

.badge-birthday,
.badge-urgent,
.badge-warning-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.text-birthday { color: #c41d7f; font-weight: 500; }
.text-warning { color: #d48806; font-weight: 500; }

.btn-birthday {
    background: #fff0f6;
    color: #c41d7f;
    border: 1px solid #ffadd2;
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 24px 12px;
    color: #999;
    font-size: 14px;
}

.row-actions {
    white-space: nowrap;
}

.subtitle {
    color: #999;
    font-size: 14px;
    margin: 4px 0 0;
}

.data-table a:not(.btn) {
    color: #1890ff;
    text-decoration: none;
}

/* ===== 生日短文弹窗（手机上为底部抽屉） ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.45);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 92%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 17px;
}

.modal-close {
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: #999;
    padding: 4px 8px;
    cursor: pointer;
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
}

.modal-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.modal-tab.active {
    color: #c41d7f;
    border-bottom-color: #c41d7f;
    font-weight: 500;
}

.modal-textarea {
    flex: 1;
    margin: 12px 16px;
    padding: 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 0 16px 12px;
}

.modal-footer .btn {
    flex: 1;
    padding: 10px;
}

.modal-help {
    margin: 0;
    padding: 0 16px 12px;
    color: #bbb;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 480px) {
    .modal.show {
        align-items: flex-end;
    }
    .modal-content {
        width: 100%;
        max-width: none;
        max-height: 85vh;
        border-radius: 12px 12px 0 0;
    }
}

/* ============================================================
   移动端优先适配（会员登记系统）
   设计原则：单列布局、大触控目标、卡片列表替代宽表格、吸顶筛选
   ============================================================ */

/* 触控目标：按钮/输入最小 48px，避免误触 */
.btn,
.form-group input,
.form-group select,
.form-group textarea {
    min-height: 48px;
}

.btn-small {
    min-height: 36px;
}

/* 输入框字号 16px，防止 iOS 聚焦时自动放大 */
.form-group input,
.form-group select {
    font-size: 16px;
}

/* iPhone 底部安全区 */
.bottom-nav {
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.main-content {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

/* 底部导航小屏压缩 */
@media (max-width: 420px) {
    .nav-item {
        font-size: 11px;
    }
    .nav-icon {
        font-size: 20px;
    }
}

/* 页面标题 */
.page-header {
    align-items: flex-start;
}

.page-header h1 {
    font-size: 20px;
}

/* 统计卡片网格 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.stat-card.wide {
    grid-column: 1 / -1;
}

/* 首页统计卡可点击跳转筛选 */
a.stat-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.stat-card:hover,
a.stat-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

a.stat-card.wide {
    grid-column: 1 / -1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1890ff;
}

.stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

@media (min-width: 769px) {
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 区块卡片 */
.section-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* 吸顶筛选栏 */
.filter-bar {
    position: sticky;
    top: 56px;
    z-index: 50;
    background: #f5f5f5;
    padding: 10px 0;
    margin: -8px 0 12px;
}

.filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-row .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 130px;
}

.filter-row .btn {
    min-height: 48px;
    align-self: flex-end;
}

/* 筛选行：主搜索行 + 紧凑条件行 */
.filter-row-main .form-group {
    flex: 1 1 0;
    min-width: 0;
    margin-bottom: 0;
}

.filter-row-main .form-group input {
    width: 100%;
}

.filter-row-compact {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.filter-row-compact .form-group {
    margin-bottom: 0;
}

.filter-row-compact select {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
    padding: 4px 6px;
}

.filter-reset {
    min-height: 44px;
}

@media (min-width: 769px) {
    .filter-row-compact {
        grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    }
}

.list-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

/* 会员卡片列表（移动端替代宽表格） */
.member-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.member-item {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.member-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.member-item-name {
    font-size: 17px;
    font-weight: 600;
}

.member-item-phone {
    color: #666;
    font-size: 14px;
    margin-top: 2px;
}

.member-item-body {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 13px;
    color: #666;
}

.member-item-body .k {
    color: #999;
    margin-right: 4px;
}

.member-item-actions {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 标签 */
.chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    background: #f0f0f0;
    color: #666;
}

.chip-level {
    background: #e6f7ff;
    color: #1890ff;
}

.chip-muted {
    background: #fafafa;
    color: #999;
}

.chip-warn {
    background: #fff7e6;
    color: #fa8c16;
}

.chip-danger {
    background: #fff1f0;
    color: #f5222d;
}

.chip-success {
    background: #f6ffed;
    color: #52c41a;
}

/* 详情页 */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 92px;
    color: #999;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    color: #333;
    word-break: break-all;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 40px;
    margin-bottom: 12px;
}

/* 表单行：桌面两列、移动单列 */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 769px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 0 16px;
    }
}

/* 移动端隐藏宽表格（用卡片列表呈现） */
@media (max-width: 768px) {
    .data-table {
        display: none;
    }
}

/* 大按钮（主操作） */
.btn-lg {
    min-height: 52px;
    font-size: 17px;
    border-radius: 10px;
}

/* 分段控件（天数选择） */
.seg {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.seg label {
    position: relative;
}

.seg input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.seg span {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 14px;
    min-height: 40px;
    line-height: 22px;
    color: #333;
}

.seg input:checked + span {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

/* 底部固定操作条 */
.action-bar {
    position: sticky;
    bottom: 76px;
    background: #f5f5f5;
    padding: 10px 0;
    margin-top: 16px;
}

/* 区块（无外框，卡片直接铺在灰底，避免卡片套卡片） */
.section-plain {
    margin-bottom: 22px;
}

.section-plain > .section-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

/* 去掉内部网格自身的下间距，避免与区块间距叠加 */
.section-plain > .quick-actions,
.section-plain > .member-list {
    margin-bottom: 0;
}

/* 返回条 */
.back-bar {
    margin-bottom: 14px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.back-link:active {
    background: #f0f0f0;
}

/* 页面主标题 */
.page-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

/* 同步结果汇总 */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.summary-item {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.summary-item .num {
    font-size: 22px;
    font-weight: 700;
}

.summary-item .txt {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.summary-item.ok .num {
    color: #52c41a;
}

.summary-item.warn .num {
    color: #fa8c16;
}

.summary-item.err .num {
    color: #f5222d;
}

/* 门店扫码登记二维码 */
.qr-card {
    background: #fff;
    border-radius: 10px;
    padding: 24px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.qr-store-name {
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.qr-store-sub {
    font-size: 14px;
    color: #999;
    margin-top: 4px;
}

.qr-image {
    margin: 18px auto 14px;
    display: flex;
    justify-content: center;
}

.qr-image svg {
    width: 260px;
    height: 260px;
    display: block;
}

.qr-tip {
    font-size: 14px;
    white-space: nowrap;
    color: #333;
}

.qr-url {
    font-size: 12px;
    color: #aaa;
    word-break: break-all;
    margin-top: 6px;
}

.qr-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qr-settings code {
    background: #f5f5f5;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 13px;
}

@media (min-width: 769px) {
    .qr-image svg {
        width: 320px;
        height: 320px;
    }
}

/* 打印时只保留二维码，方便直接打印张贴 */
@media print {
    .navbar,
    .bottom-nav,
    .back-bar,
    .qr-settings,
    .qr-actions,
    .page-header,
    .flash-messages {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .main-content {
        padding: 0;
        max-width: none;
    }

    .qr-card {
        box-shadow: none;
        border-radius: 0;
        padding: 12px;
        margin: 0;
    }

    .qr-image svg {
        width: 78mm;
        height: 78mm;
    }
}

/* 提交前二次确认弹窗 */
.confirm-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; padding: 16px;
}
.confirm-box {
    background: #fff; border-radius: 12px; padding: 24px;
    width: 100%; max-width: 360px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.confirm-box h3 { margin: 0 0 12px; font-size: 18px; color: #333; }
.confirm-body {
    white-space: pre-line; color: #555; font-size: 15px;
    line-height: 1.8; margin-bottom: 20px;
    background: #f7f8fa; border-radius: 8px; padding: 12px;
}
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn { flex: 1; }
