/* ==========================================================================
   糖糕后台管理系统 - 全局样式表
   色彩与视觉规范：
   - 主色调：#2B66FF（现代明亮蓝，与截图选中的菜单和新增按钮一致）
   - 背景色：#F5F7FA（浅灰护眼背景）
   - 文字色：#1F2329（主标题深黑）、#4E5969（常规文本）、#86909C（辅助提示）
   ========================================================================== */

:root {
  --primary-color: #2b66ff;
  --primary-hover: #1e54e4;
  --primary-light: #e8f0fe;
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --border-color: #e5e6eb;
  --text-main: #1f2329;
  --text-regular: #4e5969;
  --text-secondary: #86909c;
  --header-height: 60px;
  --sidebar-width: 220px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------------- 登录页样式 ---------------- */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2fe 0%, #e8eeff 50%, #f6f8fc 100%);
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.login-bg-decor {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 102, 255, 0.12) 0%, rgba(43, 102, 255, 0) 70%);
  filter: blur(40px);
  z-index: 1;
}

.login-bg-decor.top-right {
  top: -150px;
  right: -150px;
}

.login-bg-decor.bottom-left {
  bottom: -150px;
  left: -150px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(43, 102, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
  padding: 40px 36px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(255, 126, 64, 0.2);
}

.login-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-regular);
  margin-bottom: 8px;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrapper svg {
  position: absolute;
  left: 14px;
  color: #a8abb2;
  width: 16px;
  height: 16px;
}

.login-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-main);
  transition: all 0.2s;
  outline: none;
  background: #fff;
}

.login-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(43, 102, 255, 0.12);
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 13px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-regular);
  cursor: pointer;
}

.login-btn {
  width: 100%;
  height: 44px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(43, 102, 255, 0.25);
}

.login-btn:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(43, 102, 255, 0.35);
}

.quick-tip {
  margin-top: 20px;
  padding: 10px 14px;
  background: #f2f6fc;
  border-radius: 6px;
  font-size: 12px;
  color: #606266;
  line-height: 1.6;
}

/* ---------------- 后台主布局 ---------------- */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部导航栏 (Navbar) */
.main-header {
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.brand-name-mobile {
  display: none;
}

.brand-name-full {
  display: inline;
}

.page-title-breadcrumb {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  margin-left: 20px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.backend-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  background-color: #f2f3f5;
  color: #86909c;
  border: 1px solid #e5e6eb;
  transition: all 0.2s;
  user-select: none;
}

.backend-status-badge:hover {
  border-color: #c9cdd4;
}

.backend-status-badge .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #f53f3f;
}

.backend-status-badge.online {
  background-color: #e8ffea;
  color: #00b42a;
  border-color: #aff0b5;
}

.backend-status-badge.online .status-dot {
  background-color: #00b42a;
  box-shadow: 0 0 6px rgba(0, 180, 42, 0.6);
}

.status-text-mobile {
  display: none;
}

.status-text-full {
  display: inline;
}

.header-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4e5969;
  transition: all 0.2s;
  background: transparent;
  border: none;
}

.header-action-btn:hover {
  background: #f2f3f5;
  color: var(--primary-color);
}

.header-action-btn.has-badge {
  position: relative;
}

.header-action-btn.has-badge::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f53f3f;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  position: relative;
}

.user-profile:hover {
  background: #f2f3f5;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.user-dropdown-menu {
  position: absolute;
  top: 110%;
  right: 0;
  width: 150px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  border: 1px solid #ebeef5;
  z-index: 200;
}

.dropdown-item {
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-regular);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: #f5f7fa;
  color: var(--primary-color);
}

.dropdown-item.danger {
  color: #f53f3f;
}

.dropdown-item.danger:hover {
  background: #fff0f0;
}

/* 主体容器 (侧边栏 + 内容区) */
.main-body {
  display: flex;
  flex: 1;
}

/* 侧边栏 (Sidebar) */
.main-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  padding: 16px 12px;
  flex-shrink: 0;
}

.menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-regular);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.menu-item-btn:hover {
  background: #f2f3f5;
  color: var(--text-main);
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-item-btn svg {
  width: 18px;
  height: 18px;
}

/* 高亮选中菜单项（与截图 1:1 纯蓝圆角高亮） */
.menu-item-btn.active {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(43, 102, 255, 0.2);
}

.menu-item-btn.active svg {
  color: #ffffff;
}

.sub-menu-list {
  list-style: none;
  padding-left: 20px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-menu-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-regular);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.sub-menu-item-btn:hover {
  background: #f2f3f5;
  color: var(--text-main);
}

/* 子菜单激活状态：1:1 复刻截图中的纯蓝圆角高亮 */
.sub-menu-item-btn.active {
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(43, 102, 255, 0.2);
}

.sub-menu-item-btn.active svg {
  color: #ffffff;
}

/* 内容展示主区 (Content Area) */
.main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* 统一卡片样式 */
.content-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #ebeef5;
}

/* ---------------- 顶部筛选 & 动作栏 ---------------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
}

.select-box {
  min-width: 200px;
  height: 36px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-main);
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.select-box:focus {
  border-color: var(--primary-color);
}

/* 新增按钮（与截图 1:1 纯蓝按钮） */
.btn-primary {
  height: 36px;
  padding: 0 20px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(43, 102, 255, 0.25);
}

.action-bar {
  margin-bottom: 16px;
}

/* ---------------- 表格样式 (1:1 复原截图) ---------------- */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background-color: #f7f8fa;
  color: var(--text-regular);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  border-bottom: 1px solid #ebeef5;
}

.custom-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-main);
  border-bottom: 1px solid #ebeef5;
}

.custom-table tr:hover td {
  background-color: #fafbfc;
}

.table-action-link {
  color: var(--primary-color);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  margin-right: 12px;
  font-weight: 500;
}

.table-action-link:hover {
  text-decoration: underline;
}

.table-action-link.danger {
  color: #f53f3f;
}

.openid-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #1d2129;
  letter-spacing: 0.2px;
}

.user-remark-tag {
  display: inline-block;
  padding: 2px 10px;
  background-color: #f2f3f5;
  color: #4e5969;
  border-radius: 4px;
  font-size: 13px;
  line-height: 20px;
}

.user-profile-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ebeef5;
  background-color: #f2f3f5;
}

.user-name-title {
  font-weight: 500;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.2;
}

.user-id-sub {
  font-size: 11px;
  color: #86909c;
  margin-top: 2px;
}

.role-badge-admin {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background-color: #e8ffea;
  color: #00b42a;
  border: 1px solid #aff0b5;
  font-weight: 500;
}

.shop-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  background-color: #e8f0fe;
  color: #2b66ff;
}

.money-badge {
  font-weight: 600;
  color: #ff7d00;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.user-remark-text {
  display: inline-block;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  color: #4e5969;
  background-color: #f7f8fa;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.user-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ebeef5;
  background-color: #f2f3f5;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.user-avatar-default {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #e8f0fe;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin: 0 auto;
  border: 1px solid #d0e0ff;
}

.m-user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------------- 分页组件 ---------------- */
.pagination-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 20px;
  gap: 8px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-regular);
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-btn.active {
  border-color: var(--primary-color);
  background: #fff;
  color: var(--primary-color);
  font-weight: 600;
}

.page-btn:disabled {
  color: #c0c4cc;
  cursor: not-allowed;
  background: #f5f7fa;
}

/* ---------------- 模态弹窗 (Modal) ---------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(2px);
}

.modal-dialog {
  width: 90%;
  max-width: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #909399;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #ebeef5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary {
  height: 36px;
  padding: 0 16px;
  background: #f2f3f5;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-regular);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #e5e6eb;
}

.btn-danger-soft,
.btn-danger-outline {
  height: 36px;
  padding: 0 16px;
  background-color: #fff1f0;
  border: 1px solid #ffccc7;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #ff4d4f;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(245, 63, 63, 0.06);
  user-select: none;
  outline: none;
}

.btn-danger-soft:hover,
.btn-danger-outline:hover {
  background-color: #ffe4e4;
  border-color: #ffa39e;
  color: #cf1322;
  box-shadow: 0 3px 10px rgba(245, 63, 63, 0.16);
  transform: translateY(-1px);
}

.btn-danger-soft:active,
.btn-danger-outline:active {
  background-color: #ffd6d6;
  border-color: #f5222d;
  color: #a8071a;
  transform: translateY(0);
  box-shadow: none;
}

.btn-danger-soft:disabled,
.btn-danger-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-danger-soft svg,
.btn-danger-outline svg {
  flex-shrink: 0;
  stroke: currentColor;
  transition: transform 0.2s;
}

.btn-danger-soft:hover svg,
.btn-danger-outline:hover svg {
  transform: scale(1.1);
}

/* 统计卡片网格（仪表盘） */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #ebeef5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
}

/* 消息轻提示 (Toast) */
.toast-notice {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 8px;
  background: #303133;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastFade 0.3s ease-out;
}

.toast-notice.success {
  background: #67c23a;
}

.toast-notice.error {
  background: #f56c6c;
}

@keyframes toastFade {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------- 店铺小程序二维码页面 (1:1 复刻截图 admin.tanggao.love/#/miniappQr) ---------------- */
.miniapp-qr-card {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 24px 60px;
}

.qr-shop-selector-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.qr-select-container {
  position: relative;
  width: 320px;
  max-width: 90%;
}

.qr-shop-select {
  width: 100%;
  height: 40px;
  line-height: 40px;
  padding: 0 36px 0 16px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-main);
  background-color: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.qr-shop-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(43, 102, 255, 0.15);
}

.qr-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #86909c;
  display: flex;
  align-items: center;
}

.qr-code-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.qr-image-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 0;
}

.miniapp-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0;
  transition: filter 0.2s, opacity 0.2s;
}

.qr-loading-blur {
  filter: blur(4px) opacity(0.6);
}

.qr-generate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 0;
  font-size: 13px;
  color: var(--primary-color);
  font-weight: 500;
}

.qr-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(43, 102, 255, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: qr-spin 0.8s linear infinite;
}

@keyframes qr-spin {
  to { transform: rotate(360deg); }
}

.qr-scan-tip {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-main);
  font-weight: 400;
  letter-spacing: 0.5px;
}

.qr-action-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.qr-btn {
  height: 36px;
  padding: 0 18px;
  font-size: 14px;
  border-radius: 4px;
  font-weight: 400;
}

/* ---------------- 店铺列表页面 (Shop List) ---------------- */
.shop-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.shop-list-title-wrap {
  min-width: 0;
  flex: 1;
}

.shop-list-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.shop-list-subtitle {
  font-size: 13px;
  color: #86909c;
}

.shop-refresh-btn {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.mobile-shop-cards {
  display: none;
}

.user-mobile-toolbar {
  display: none;
}

.mobile-user-cards {
  display: none;
}

.qr-material-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-shop-badge-header {
  display: none;
}

.qr-select-icon-box {
  display: none;
}

/* 双卡片并排布局：门店首页小程序码 + 最近订单直达小程序码 */
.qr-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.qr-card-panel {
  background: #ffffff;
  border: 1px solid #ebeef5;
  border-radius: 12px;
  padding: 24px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.qr-card-heading {
  width: 100%;
  text-align: center;
  margin-bottom: 18px;
}

.qr-card-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.qr-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.qr-card-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary-color);
  font-weight: 500;
}

.qr-card-tag-accent {
  background: #e8ffea;
  color: #00b42a;
}

.qr-card-desc {
  font-size: 12px;
  color: #86909c;
  line-height: 1.5;
}

.qr-empty-placeholder {
  width: 100%;
  height: 100%;
  border: 1.5px dashed #d9e1ec;
  border-radius: 10px;
  background: #fafbfd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #86909c;
  font-size: 13px;
  padding: 20px;
  text-align: center;
}

@media (max-width: 768px) {
  .qr-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .qr-card-panel {
    padding: 18px 14px 22px;
  }
}

/* ==========================================================================
   移动端与响应式适配系统 (Mobile Responsive System)
   专为 iPhone / iPad / Android 等移动终端深度定制
   ========================================================================== */

/* ---------------- 基础响应式组件容器 ---------------- */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: none;
  background: #f2f3f5;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.mobile-menu-toggle:active {
  background: #e5e6eb;
  transform: scale(0.96);
}

.mobile-sidebar-header {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 6px;
  border: 1px solid #ebeef5;
  margin-bottom: 16px;
  background: #ffffff;
}

.table-responsive-wrapper::-webkit-scrollbar {
  height: 6px;
}

.table-responsive-wrapper::-webkit-scrollbar-track {
  background: #f2f3f5;
  border-radius: 3px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb {
  background: #c9cdd4;
  border-radius: 3px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb:hover {
  background: #86909c;
}

.desktop-only {
  display: inline-flex;
}

/* ---------------- 平板与中等屏幕 (<= 992px) ---------------- */
@media (max-width: 992px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------------- 手机端核心适配 (<= 768px，如 iPhone / Android) ---------------- */
@media (max-width: 768px) {
  /* 1. 顶部导航栏自适应 */
  .main-header {
    height: 54px;
    padding: 0 12px;
  }

  .header-left {
    gap: 8px;
    min-width: 0;
    flex: 1;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .brand-box {
    gap: 8px;
    min-width: 0;
  }

  .brand-logo {
    width: 28px;
    height: 28px;
  }

  .brand-name {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-name-full {
    display: none !important;
  }

  .brand-name-mobile {
    display: inline !important;
  }

  .page-title-breadcrumb {
    display: none !important;
  }

  .desktop-only {
    display: none !important;
  }

  .header-right {
    gap: 8px;
    flex-shrink: 0;
  }

  .backend-status-badge {
    padding: 3px 8px;
    font-size: 11px;
    gap: 4px;
    flex-shrink: 0;
  }

  .status-text-full {
    display: none !important;
  }

  .status-text-mobile {
    display: inline !important;
  }

  .header-action-btn {
    width: 32px;
    height: 32px;
  }

  .user-profile {
    padding: 2px 6px;
    gap: 4px;
  }

  .user-name {
    font-size: 13px;
    max-width: 65px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 2. 侧边栏抽屉与遮罩层 */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
  }

  .main-body {
    position: relative;
    width: 100%;
    min-width: 0;
  }

  .main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    max-width: 80vw;
    height: 100vh;
    height: 100dvh;
    z-index: 999;
    background: #ffffff;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    padding: 0 12px 24px 12px;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-right: none;
  }

  .main-sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    border-bottom: 1px solid var(--border-color);
    margin: 0 -12px 14px -12px;
    padding: 0 16px;
  }

  .mobile-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-sidebar-brand .brand-logo {
    width: 26px;
    height: 26px;
  }

  .mobile-sidebar-brand .brand-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
  }

  .mobile-sidebar-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f2f3f5;
    border-radius: 6px;
    color: var(--text-regular);
    cursor: pointer;
  }

  .mobile-sidebar-close:active {
    background: #e5e6eb;
  }

  .menu-item-btn {
    padding: 12px 14px;
    font-size: 15px;
  }

  .sub-menu-item-btn {
    padding: 11px 14px;
    font-size: 14px;
  }

  /* 3. 主内容区域 */
  .main-content {
    width: 100%;
    min-width: 0;
    flex: 1;
    padding: 12px 10px 24px 10px;
  }

  .content-card {
    padding: 14px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
  }

  /* 4. 筛选与操作栏 */
  /* 4. 用户管理手机端深度适配 */
  .user-desktop-toolbar {
    display: none !important;
  }

  .user-desktop-table {
    display: none !important;
  }

  .user-mobile-toolbar {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .user-mobile-select-card {
    position: relative;
    width: 100%;
    height: 42px;
    background: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .user-mobile-select-card:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(43, 102, 255, 0.12);
  }

  .u-select-icon-box {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
  }

  .user-mobile-select {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 36px 0 38px;
    font-size: 15px;
    color: var(--text-main);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
  }

  .u-select-arrow {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: #86909c;
  }

  .user-mobile-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 2px 2px;
  }

  .user-mobile-count-tip {
    font-size: 13px;
    color: #86909c;
  }

  .user-mobile-add-btn {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(43, 102, 255, 0.2);
  }

  /* 移动端专属用户卡片流 */
  .mobile-user-cards {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 14px;
  }

  .mobile-user-card {
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 10px;
    padding: 14px 14px 12px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-user-card:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .m-user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f2f3f5;
  }

  .m-user-avatar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .m-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .m-user-name-group {
    min-width: 0;
    flex: 1;
  }

  .m-user-beizhu-row {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .m-user-beizhu {
    font-size: 15px;
    font-weight: 600;
    color: #1d2129;
    word-break: break-all;
    line-height: 1.3;
  }

  .m-user-beizhu.m-user-no-beizhu {
    color: #86909c;
    font-weight: normal;
    font-style: italic;
  }

  .m-user-role-badge {
    font-size: 11px;
    color: #00b42a;
    background: #e8ffea;
    padding: 1px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 3px;
    border: 1px solid #b7f4be;
    font-weight: 500;
    line-height: 1.3;
  }

  .m-user-shop-badge {
    font-size: 12px;
    color: #2b66ff;
    background: #e8f0fe;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
  }

  .m-user-openid-box {
    background: #f7f8fa;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .m-user-openid-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
  }

  .m-user-openid-label {
    font-size: 11px;
    color: #86909c;
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }

  .m-user-openid-val {
    font-size: 12px;
    color: #4e5969;
    font-family: -apple-system, BlinkMacSystemFont, "SF Mono", Menlo, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .m-user-copy-btn {
    border: 1px solid #dcdfe6;
    background: #ffffff;
    color: #4e5969;
    font-size: 11px;
    border-radius: 4px;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
  }

  .m-user-copy-btn:active {
    background: #f2f3f5;
    transform: scale(0.96);
  }

  .m-user-card-actions {
    display: flex;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px dashed #f2f3f5;
  }

  .m-user-action-btn {
    flex: 1;
    height: 36px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .m-user-action-btn.btn-edit {
    background: #ffffff;
    color: #2b66ff;
    border: 1px solid #d0e0ff;
  }

  .m-user-action-btn.btn-edit:active {
    background: #e8f0fe;
  }

  .m-user-action-btn.btn-remove {
    background: #fff1f0;
    color: #f53f3f;
    border: 1px solid #ffccc7;
  }

  .m-user-action-btn.btn-remove:active {
    background: #ffccc7;
  }

  .m-user-empty-state {
    text-align: center;
    padding: 36px 16px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px dashed #dcdfe6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .m-user-empty-icon {
    margin-bottom: 8px;
  }

  .m-user-empty-text {
    font-size: 13px;
    color: #86909c;
  }

  /* 5. 数据表格通用防挤压 */
  .custom-table {
    min-width: 580px !important;
    width: 100% !important;
  }

  .custom-table th,
  .custom-table td {
    padding: 10px 10px !important;
    font-size: 13px !important;
  }

  .openid-text {
    font-size: 12px !important;
    word-break: break-all;
  }

  /* 6. 分页栏 */
  .pagination-wrapper {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 14px;
  }

  .page-btn {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
    padding: 0 6px;
  }

  /* 6.5 店铺列表手机端深度适配 (精美卡片流布局) */
  .shop-list-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
  }

  .shop-list-title-wrap {
    min-width: 0;
  }

  .shop-list-title {
    font-size: 15px;
  }

  .shop-list-subtitle {
    font-size: 12px;
    display: block;
    margin-top: 2px;
  }

  .shop-refresh-btn {
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
  }

  /* 手机端隐藏宽表格，无缝切换为专属移动端卡片流 */
  .shop-desktop-table {
    display: none !important;
  }

  .mobile-shop-cards {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  /* 单个店铺移动端卡片 */
  .mobile-shop-card {
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 10px;
    padding: 14px 14px 12px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-shop-card:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .m-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f3f5;
  }

  .m-card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .m-card-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #ebeef5;
    background: #fff;
    flex-shrink: 0;
  }

  .m-card-title-group {
    min-width: 0;
    flex: 1;
  }

  .m-card-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
  }

  .m-card-shop-name {
    font-size: 15px;
    font-weight: 600;
    color: #1d2129;
    word-break: break-all;
    line-height: 1.3;
  }

  .m-card-status-badge {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    line-height: 1.4;
    white-space: nowrap;
  }

  .m-card-status-badge.badge-enabled {
    background: #e8ffea;
    color: #00b42a;
    border: 1px solid #b7f4be;
  }

  .m-card-status-badge.badge-disabled {
    background: #fff1f0;
    color: #f53f3f;
    border: 1px solid #ffccc7;
  }

  .m-card-address {
    font-size: 12px;
    color: #86909c;
    word-break: break-all;
    line-height: 1.4;
  }

  .m-card-code {
    font-size: 12px;
    font-weight: 700;
    color: #2b66ff;
    background: #e8f0fe;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
  }

  /* 内容信息网格 */
  .m-card-meta-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0 10px 0;
  }

  .m-card-meta-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    gap: 8px;
  }

  .m-card-meta-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #86909c;
    font-size: 12px;
    flex-shrink: 0;
  }

  .m-card-meta-value {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .m-time-text {
    color: #1d2129;
    font-weight: 500;
    font-size: 13px;
  }

  .m-open-badge {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
  }

  .m-open-badge.badge-open {
    background: #e8ffea;
    color: #00b42a;
    border: 1px solid #b7f4be;
  }

  .m-open-badge.badge-closed {
    background: #f2f3f5;
    color: #86909c;
    border: 1px solid #e5e6eb;
  }

  .m-qrcode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .m-qrcode-thumb {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #dcdfe6;
    object-fit: cover;
  }

  .m-qrcode-text-green {
    font-size: 12px;
    color: #00b42a;
    font-weight: 500;
  }

  .m-qrcode-text-gray {
    font-size: 12px;
    color: #86909c;
  }

  /* 卡片底部操作栏 */
  .m-card-actions {
    padding-top: 10px;
    border-top: 1px dashed #f2f3f5;
  }

  .m-btn-toggle-status {
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }

  .m-btn-toggle-status.btn-status-disable {
    background: #fff1f0;
    color: #f53f3f;
    border: 1px solid #ffccc7;
  }

  .m-btn-toggle-status.btn-status-disable:active {
    background: #ffccc7;
  }

  .m-btn-toggle-status.btn-status-enable {
    background: #e8ffea;
    color: #00b42a;
    border: 1px solid #b7f4be;
  }

  .m-btn-toggle-status.btn-status-enable:active {
    background: #b7f4be;
  }

  /* 7. 店铺小程序手机端深度适配 */
  .miniapp-qr-card {
    min-height: calc(100vh - 100px);
    min-height: calc(100dvh - 100px);
    padding: 16px 12px 28px 12px;
    align-items: center;
    justify-content: flex-start;
  }

  .qr-shop-selector-wrapper {
    margin-bottom: 16px;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .qr-select-container {
    width: 100%;
    max-width: 360px;
    height: 44px;
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .qr-select-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(43, 102, 255, 0.12);
  }

  .qr-select-icon-box {
    position: absolute;
    left: 12px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
  }

  .qr-shop-select {
    width: 100%;
    height: 100%;
    padding: 0 36px 0 38px;
    font-size: 15px;
    border: none;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
  }

  .qr-code-body {
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .qr-material-card {
    width: 100%;
    max-width: 360px;
    background: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 14px;
    padding: 20px 16px 18px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .qr-shop-badge-header {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    margin-bottom: 14px;
    width: 100%;
    text-align: center;
  }

  .qr-shop-badge-title {
    font-size: 17px;
    font-weight: 700;
    color: #1d2129;
    line-height: 1.3;
  }

  .qr-shop-badge-sub {
    font-size: 12px;
    color: #86909c;
  }

  .qr-image-wrapper {
    width: min(240px, 66vw);
    height: min(240px, 66vw);
    margin: 4px auto 0 auto;
    border-radius: 0;
    box-shadow: none;
  }

  .qr-scan-tip {
    margin-top: 16px;
    font-size: 13px;
    color: #4e5969;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    line-height: 1.4;
  }

  .qr-action-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .qr-btn {
    flex: 1;
    height: 44px;
    font-size: 14px;
    border-radius: 8px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
  }

  .qr-btn-download {
    background: #2b66ff;
    color: #ffffff;
    border: 1px solid #2b66ff;
    box-shadow: 0 2px 8px rgba(43, 102, 255, 0.25);
  }

  .qr-btn-download:active {
    background: #1a53e6;
  }

  .qr-btn-generate {
    background: #f2f3f5;
    color: #1d2129;
    border: 1px solid #e5e6eb;
  }

  .qr-btn-generate:active {
    background: #e5e6eb;
  }

  .qr-icon-spin {
    animation: qr-spin 1s linear infinite;
  }

  /* 8. 数据概览页面 */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  .stat-card {
    padding: 12px 10px;
  }

  .stat-label {
    font-size: 12px;
  }

  .stat-value {
    font-size: 20px;
    margin-top: 4px;
  }

  /* 9. 模态弹窗移动端适配 */
  .modal-overlay {
    padding: 12px;
    align-items: center;
  }

  .modal-dialog {
    width: 94% !important;
    max-width: 420px !important;
    max-height: 90vh !important;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-title {
    font-size: 16px;
  }

  .modal-body {
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(88vh - 120px);
  }

  .modal-footer {
    padding: 12px 16px;
  }

  .modal-footer-user-edit {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .modal-footer-user-edit .btn-danger-soft,
  .modal-footer-user-edit .btn-danger-outline {
    width: 100% !important;
    height: 40px !important;
    justify-content: center !important;
  }

  .modal-footer-user-edit .modal-footer-actions {
    display: flex;
    width: 100%;
    gap: 10px;
  }

  .modal-footer-user-edit .modal-footer-actions button {
    flex: 1;
    height: 40px;
  }

  /* 10. iOS 表单输入控件防自动缩放 (font-size >= 16px) */
  .login-input,
  .select-box,
  .qr-shop-select {
    font-size: 16px !important;
  }

  /* 11. 登录页面适配 */
  .login-container {
    padding: 16px;
  }

  .login-card {
    padding: 28px 20px;
    border-radius: 14px;
  }

  .login-title {
    font-size: 20px;
  }
}

/* ---------------- 超窄屏幕适配 (<= 400px，如 iPhone SE) ---------------- */
@media (max-width: 400px) {
  .brand-name {
    font-size: 14px;
  }

  .backend-status-badge .status-text {
    max-width: 50px;
  }

  .user-name {
    display: none;
  }

  .user-profile {
    padding: 2px 4px;
  }
}

