/* ============================================================
   1. 变量
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- 图标库 iconfont 显示辅助 ---- */
.iconfont {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

:root {
  --color-primary: #5b5bef;
  --color-primary-active: color-mix(in srgb, var(--color-primary) 70%, black);
  --color-primary-light: color-mix(in srgb, var(--color-primary) 10%, white);
  --color-primary-border: color-mix(in srgb, var(--color-primary) 22%, white);

  --color-success: #10b981;
  --color-success-light: #e8f5e9;
  --color-warning: #f59e0b;
  --color-warning-light: #fff3e0;
  --color-danger: #ef4444;
  --color-danger-light: #ffebee;
  --color-info: #06b6d4;
  --color-info-light: #e0f7fa;
  --color-purple: #8b5cf6;
  --color-purple-light: #f3e5f5;
  --color-orange-card: #f0886e;

  --color-text: #1e2a3a;
  --color-text-secondary: #3e4d5f;
  --color-text-muted: #7b8a9e;
  --color-text-disabled: #b8c4d2;
  --color-bg: #f2f4f8;
  --color-bg-card: #ffffff;
  --color-bg-hover: #f0f4fc;
  --color-bg-subtle: #fafbfd;
  --color-border: #dce3ec;
  --color-border-light: #eef2f7;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.15);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.12);

  --topbar-height: 64px;
  --sidebar-width: 150px;
  --sidebar-collapsed: 64px;
}

[data-theme="green"] { --color-primary: #10b981; }
[data-theme="purple"] { --color-primary: #8b5cf6; }
[data-theme="orange"] { --color-primary: #f59e0b; }
[data-theme="red"] { --color-primary: #ef4444; }
[data-theme="dark"] {
  --color-text: #e8edf5;
  --color-text-secondary: #a8b6c8;
  --color-text-muted: #6b7a8f;
  --color-text-disabled: #4a5a70;
  --color-bg: #0f1a26;
  --color-bg-card: #1e2a3a;
  --color-bg-hover: #2a3a50;
  --color-bg-subtle: #253548;
  --color-border: #2f4055;
  --color-border-light: #253548;
  --color-primary-light: color-mix(in srgb, var(--color-primary) 25%, #0f1a26);
  --color-primary-border: color-mix(in srgb, var(--color-primary) 35%, #0f1a26);
}

html, body {
  height: 100%;
  font-family: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   2. 整体布局
   ============================================================ */
.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ---- 顶部栏：三段式 ---- */
.app-topbar {
  flex-shrink: 0;
  height: var(--topbar-height);
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 100;
}

/* 左段：Logo + 店名 */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}
.topbar-logo .logo-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #5b5bef 0%, #8b5cf6 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.15rem; font-weight: 800;
  box-shadow: 0 4px 12px rgba(91, 91, 239, 0.35);
}

/* 店名下拉 */
.shop-selector {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.shop-selector:hover { background: var(--color-primary-border); }
.shop-selector .shop-arrow {
  font-size: 0.65rem;
  transition: transform 0.2s;
}
.shop-selector.open .shop-arrow { transform: rotate(180deg); }

/* 中段：导航 */
.topbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar-center::-webkit-scrollbar { display: none; }

.topbar-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  text-decoration: none;
  font-weight: 600;
}
.topbar-nav-item .nav-icon {
  line-height: 1;
}
.topbar-nav-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary);
}
.topbar-nav-item.active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

/* 右段：用户 */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-sms {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-bg-subtle);
  border-radius: 16px;
  border: 1px solid var(--color-border-light);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.topbar-sms:hover { background: var(--color-bg-hover); border-color: var(--color-primary-border); }
.topbar-sms .sms-icon { font-size: 0.95rem; }
.topbar-sms b { color: var(--color-primary); font-weight: 600; }

.topbar-action {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.topbar-action:hover { background: var(--color-bg-hover); color: var(--color-primary); }
.topbar-action .action-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--color-topbar-bg, #fff);
  box-sizing: content-box;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 10px 4px 4px;
  border-radius: 30px;
  transition: background 0.15s;
  position: relative;
}
.topbar-user:hover { background: var(--color-bg-hover); }
.topbar-user .user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b5bef 0%, #8b5cf6 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.9rem; font-weight: 600;
  flex-shrink: 0;
}
.topbar-user .user-info { line-height: 1.2; }
.topbar-user .user-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-text);
}
.topbar-user .user-role {
  font-size: 0.68rem;
  color: var(--color-text-muted);
}
.topbar-user .user-arrow {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform 0.2s, color 0.15s;
}
.topbar-user:hover .user-arrow { color: var(--color-primary); }
.topbar-user.open .user-arrow { transform: rotate(180deg); }

/* ---- 主体 ---- */
.app-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ---- 左侧栏 ---- */
.app-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-bg-card);
  border-right: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease;
  overflow: hidden;
}
.app-sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-toggle {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 6px 18px;
  border: none; background: transparent;
  color: var(--color-text-muted);
  font-size: 1rem; cursor: pointer;
  transition: background 0.15s;
}
.sidebar-toggle:hover { background: var(--color-bg-hover); }
.app-sidebar.collapsed .sidebar-toggle {
  justify-content: center;
  padding: 12px 0;
}
.sidebar-toggle .arrow { transition: transform 0.25s; }
.app-sidebar.collapsed .sidebar-toggle .arrow { transform: rotate(180deg); }

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 10px 20px;
}
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }

.sidebar-group { margin-bottom: 14px; }
.sidebar-group-title {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 8px 12px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.15s;
}
.app-sidebar.collapsed .sidebar-group-title {
  opacity: 0;
  height: 8px;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
  text-decoration: none;
  position: relative;
}
.sidebar-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary);
  font-weight: bold;
}
.sidebar-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: bold;
}
.sidebar-item .item-icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.sidebar-item .item-text {
  flex: 1;
  transition: opacity 0.2s;
  font-size: 14px;
}
.sidebar-item .item-arrow {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}
.sidebar-item:hover .item-arrow { color: var(--color-primary); }
.app-sidebar.collapsed .sidebar-item .item-text {
  opacity: 0;
  width: 0;
  flex: none;
}
.app-sidebar.collapsed .sidebar-item .item-arrow { display: none; }
.app-sidebar.collapsed .sidebar-item {
  justify-content: center;
  padding: 10px;
  gap: 0;
  overflow: visible;
}

/* ---- 折叠态菜单 tips ---- */
.sidebar-tip {
  position: fixed;
  z-index: 1002;
  background: rgba(17, 24, 39, 0.85);
  color: #fff;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
}
.sidebar-tip::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 50%;
  width: 10px;
  height: 10px;
  background: rgba(17, 24, 39, 0.85);
  border-radius: 2px;
  transform: translateY(-50%) rotate(45deg);
}

/* ---- 内容区 ---- */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}
.app-content::-webkit-scrollbar { width: 6px; }
.app-content::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.content-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.content-title .title-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.breadcrumb .sep { color: var(--color-text-disabled); }
.breadcrumb .current { color: var(--color-text); font-weight: 500; }

/* ============================================================
   3. 通用组件
   ============================================================ */

.section-title {
  font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--color-text-muted);
  font-weight: 600; margin: 24px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--color-border-light); }

.demo-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.demo-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- 按钮 ---- */
.btn {
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 500;
  border: none;
  background: var(--color-bg-hover);
  color: var(--color-text);
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:hover { background: var(--color-border); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-active); }
.btn-success { background: var(--color-success); color: #fff; }
.btn-success:hover { background: color-mix(in srgb, var(--color-success) 85%, black); }
.btn-warning { background: var(--color-warning); color: #fff; }
.btn-warning:hover { background: color-mix(in srgb, var(--color-warning) 85%, black); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--color-danger) 85%, black); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { background: var(--color-bg-hover); }
.btn-outline-primary { background: transparent; border: 1.5px solid var(--color-primary); color: var(--color-primary); }
.btn-outline-primary:hover { background: var(--color-primary-light); }
.btn-ghost { background: transparent; color: var(--color-primary); }
.btn-ghost:hover { background: var(--color-primary-light); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-xs { padding: 4px 8px; font-size: 0.7rem; border-radius: 6px; }
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* 药丸按钮 */
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 22px; border-radius: 40px;
  font-size: 0.92rem; font-weight: 600; border: none; cursor: pointer;
  transition: all 0.18s; font-family: inherit;
}
.pill-btn-solid { background: var(--color-primary); color: #fff; box-shadow: 0 6px 18px rgba(91, 91, 239, 0.3); }
.pill-btn-solid:hover { background: var(--color-primary-active); }
.pill-btn-light { background: var(--color-primary-light); color: var(--color-primary); }
.pill-btn-light:hover { background: var(--color-primary-border); }

/* ---- 表单 ---- */
.form-group { margin-bottom: 16px; position: relative; }
.form-label { display: block; font-size: 0.82rem; font-weight: 500; color: var(--color-text); margin-bottom: 6px; }
.form-label .required { color: var(--color-danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.88rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--color-text-disabled); }
.form-input:disabled { background: var(--color-bg-subtle); color: var(--color-text-muted); cursor: not-allowed; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b8a9e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.form-hint { font-size: 0.72rem; color: var(--color-text-muted); margin-top: 4px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.input-icon-wrapper { position: relative; }
.input-icon-wrapper .form-input { padding-left: 38px; }
.input-icon-wrapper .input-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  font-size: 0.95rem;
}

/* 开关 */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; inset: 0; background: var(--color-border); border-radius: 24px; transition: background 0.2s; }
.switch-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.switch input:checked + .switch-slider { background: var(--color-primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* 数字加减框 */
.number-input-group {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.number-input-group:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.number-btn {
  width: 36px; height: 36px;
  border: none; background: var(--color-bg-subtle);
  color: var(--color-text); font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  user-select: none; font-weight: 500;
}
.number-btn:hover { background: var(--color-bg-hover); }
.number-btn:disabled { color: var(--color-text-disabled); cursor: not-allowed; }
.number-input {
  width: 70px; height: 36px;
  border: none;
  border-left: 1.5px solid var(--color-border);
  border-right: 1.5px solid var(--color-border);
  text-align: center;
  font-size: 0.9rem; font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg-card);
  outline: none; font-family: inherit;
  -webkit-appearance: textfield; appearance: textfield;
}
.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- 标签 ---- */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: 0.74rem; font-weight: 500; line-height: 1.6; background: var(--color-bg-hover); color: var(--color-text-secondary); }
.tag-primary { background: var(--color-primary-light); color: var(--color-primary); }
.tag-success { background: var(--color-success-light); color: var(--color-success); }
.tag-warning { background: var(--color-warning-light); color: var(--color-warning); }
.tag-danger { background: var(--color-danger-light); color: var(--color-danger); }
.tag-info { background: var(--color-info-light); color: var(--color-info); }
.tag-purple { background: var(--color-purple-light); color: var(--color-purple); }
.tag-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text-secondary); }
.tag-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---- 徽标 ---- */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; font-size: 0.65rem; font-weight: 600; background: var(--color-danger); color: #fff; }
.badge-primary { background: var(--color-primary); }
.badge-success { background: var(--color-success); }
.badge-warning { background: var(--color-warning); }
.badge-dot { width: 8px; height: 8px; min-width: 8px; padding: 0; border-radius: 50%; }

/* ---- 头像 ---- */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--color-primary-light); color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.15rem; }
.avatar-gradient { background: linear-gradient(135deg, #5b5bef 0%, #8b5cf6 100%); color: #fff; }

/* ---- 卡片 ---- */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-bg-subtle);
  gap: 12px;
}
.card-header-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.card-header-title .card-header-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.card-header-actions { display: flex; gap: 6px; flex-shrink: 0; }
.card-header-actions .btn-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}
.card-header-actions .btn-icon:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary);
}
.card-body { padding: 18px; }
.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--color-border-light);
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--color-bg-subtle);
}
.card-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.15s;
  cursor: pointer;
}
.card-list-item:last-child { border-bottom: none; }
.card-list-item:hover { background: var(--color-bg-hover); }
.card-list-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.card-list-body { flex: 1; min-width: 0; }
.card-list-title { font-size: 0.88rem; font-weight: 500; color: var(--color-text); margin-bottom: 2px; }
.card-list-desc { font-size: 0.75rem; color: var(--color-text-muted); }

/* ---- 表格 ---- */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  margin-bottom: 16px;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.84rem; background: var(--color-bg-card); }
.table thead th {
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border-light);
  white-space: nowrap;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: var(--color-bg-hover); }

/* ---- 选项卡 ---- */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--color-border-light);
  margin-bottom: 16px;
  overflow-x: auto;
  padding: 0 4px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-item {
  padding: 10px 18px;
  font-size: 0.86rem;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s, background 0.2s;
  border: none; background: transparent;
  font-family: inherit;
  font-weight: 500;
  border-radius: 10px 10px 0 0;
}
.tab-item:hover:not(.active) { background: var(--color-bg-hover); color: var(--color-text-secondary); }
.tab-item.active { color: var(--color-primary); background: var(--color-primary-light); font-weight: 600; }
.tab-item.active::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: -2px;
  height: 2.5px;
  background: var(--color-primary);
  border-radius: 2px 2px 0 0;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- 分页 ---- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.page-btn {
  min-width: 34px; height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  font-family: inherit;
}
.page-btn:hover:not(:disabled):not(.active) { border-color: var(--color-primary); color: var(--color-primary); }
.page-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); font-weight: 600; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-ellipsis { min-width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--color-text-muted); font-size: 0.82rem; }

/* ---- 进度条 ---- */
.progress { height: 8px; background: var(--color-bg-hover); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--color-primary); border-radius: 4px; transition: width 0.3s; }
.progress-bar.success { background: var(--color-success); }
.progress-bar.warning { background: var(--color-warning); }
.progress-bar.danger { background: var(--color-danger); }

/* ---- 步骤条 ---- */
.steps { display: flex; gap: 8px; }
.step { flex: 1; display: flex; align-items: center; gap: 10px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--color-bg-hover); color: var(--color-text-muted); display: flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 600; flex-shrink: 0; }
.step.active .step-num { background: var(--color-primary); color: #fff; }
.step.done .step-num { background: var(--color-success); color: #fff; }
.step-text { font-size: 0.82rem; color: var(--color-text-secondary); }
.step.active .step-text { color: var(--color-text); font-weight: 500; }
.step-line { flex: 1; height: 1px; background: var(--color-border-light); margin: 0 8px; }

/* ---- 骨架屏 ---- */
.skeleton { background: linear-gradient(90deg, var(--color-bg-hover) 25%, var(--color-border-light) 37%, var(--color-bg-hover) 63%); background-size: 400% 100%; animation: skeleton 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---- 空状态 ---- */
.empty { text-align: center; padding: 40px 20px; color: var(--color-text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-text { font-size: 0.86rem; }

/* ---- Toast ---- */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 99999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  font-size: 0.86rem;
  color: var(--color-text);
  animation: toastIn 0.25s ease-out;
  pointer-events: auto;
  border: 1px solid var(--color-border-light);
  min-width: 200px;
  max-width: 90vw;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
.toast.out { animation: toastOut 0.25s ease-in forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-16px); } }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--color-success); }
.toast.error .toast-icon { color: var(--color-danger); }
.toast.warning .toast-icon { color: var(--color-warning); }
.toast.info .toast-icon { color: var(--color-info); }

/* ---- Loading ---- */
.loading-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 99998; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; }
.loading-mask.active { opacity: 1; visibility: visible; }
.loading-box { background: var(--color-bg-card); border-radius: var(--radius-lg); padding: 24px 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow-pop); }
.loading-spinner { width: 32px; height: 32px; border: 3px solid var(--color-border); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.86rem; color: var(--color-text-secondary); }

/* ---- 弹窗 ---- */
.modal-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-mask.active { display: flex; }
.modal {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  animation: modalIn 0.2s ease-out;
  overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 8px;
}
.modal-title { font-size: 1rem; font-weight: 600; color: var(--color-text); }
.modal-close {
  width: 28px; height: 28px;
  border-radius: 50%; border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--color-bg-hover); }
.modal-body { padding: 8px 20px 16px; font-size: 0.88rem; color: var(--color-text-secondary); line-height: 1.7; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-bg-subtle);
}

/* ---- 弹窗尺寸 / iframe 弹窗 ---- */
#modalBox { width: 100%; }
.modal-sm { max-width: 400px; }
.modal-md { max-width: 560px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }
.modal-body.modal-scroll { max-height: 65vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-iframe-body { padding: 0; }
.modal-iframe { width: 100%; height: 60vh; min-height: 400px; border: 0; display: block; background: var(--color-bg-card); }

/* 键盘快捷键提示 */
.kbd-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; color: var(--color-text-muted); margin-left: 6px; }
.kbd { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--color-bg-hover); border: 1px solid var(--color-border); font-size: 0.65rem; font-family: inherit; color: var(--color-text-secondary); line-height: 1.6; }

/* ---- 侧边栏二级菜单弹层 ---- */
.sidebar-submenu-pop {
  position: fixed;
  z-index: 1001;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  padding: 6px;
  min-width: 168px;
  max-height: var(--dropdown-max-h, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: pickerIn 0.15s ease-out;
}
.sidebar-submenu-pop .submenu-title {
  padding: 6px 12px 4px;
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.sidebar-submenu-pop .submenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 0.84rem;
  color: var(--color-text-secondary);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.sidebar-submenu-pop .submenu-item:hover { background: var(--color-primary-light); color: var(--color-primary); }

/* ---- 侧边栏二级菜单内容（写在页面里，仅作弹层数据源，不直接显示） ---- */
.sidebar-submenu { display: none; }

/* ---- 验证码 ---- */
.verify-code-group {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--color-bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.verify-code-group:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.verify-code-input {
  flex: 1; border: none; background: transparent;
  padding: 8px 12px;
  font-size: 0.9rem; color: var(--color-text);
  outline: none; font-family: inherit; min-width: 0;
}
.verify-code-input::placeholder { color: var(--color-text-disabled); }
.verify-code-btn {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.82rem; font-weight: 600;
  border: none; cursor: pointer;
  background: var(--color-primary);
  color: #fff;
  transition: all 0.18s;
  font-family: inherit;
  white-space: nowrap;
}
.verify-code-btn:hover { background: var(--color-primary-active); }
.verify-code-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.verify-code-btn.countdown { background: var(--color-text-muted); }

/* ---- 日期选择器（下拉面板） ---- */
.picker-trigger { position: relative; }
.picker-popup {
  position: absolute;
  top: calc(100% + 8px); left: 0;
  z-index: 1000;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pickerIn 0.15s ease-out;
  min-width: 280px;
}
@keyframes pickerIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.picker-popup::before {
  content: '';
  position: absolute;
  top: -6px; left: 20px;
  width: 12px; height: 12px;
  background: var(--color-bg-card);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  transform: rotate(45deg);
}
.picker-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--color-border-light); }
.picker-title { font-size: 0.88rem; font-weight: 600; color: var(--color-text); }
.picker-nav { display: flex; gap: 4px; }
.picker-nav button { width: 26px; height: 26px; border-radius: 7px; border: none; background: transparent; color: var(--color-text-secondary); font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.picker-nav button:hover { background: var(--color-bg-hover); color: var(--color-primary); }
.picker-ym { display: flex; gap: 8px; padding: 10px 14px 6px; }
.picker-ym select { flex: 1; padding: 6px 24px 6px 10px; font-size: 0.82rem; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-bg-card); color: var(--color-text); cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%237b8a9e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; font-family: inherit; }
.picker-ym select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.picker-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 0.68rem; color: var(--color-text-muted); padding: 8px 14px 4px; font-weight: 500; }
.picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 0 14px 10px; }
.picker-day { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; border-radius: 8px; background: transparent; border: none; color: var(--color-text); cursor: pointer; font-family: inherit; transition: background 0.12s, color 0.12s; }
.picker-day:hover:not(:disabled):not(.selected) { background: var(--color-primary-light); color: var(--color-primary); }
.picker-day.other-month { color: var(--color-text-disabled); cursor: default; }
.picker-day.today { border: 1px solid var(--color-primary); font-weight: 600; color: var(--color-primary); }
.picker-day.selected { background: var(--color-primary); color: #fff; font-weight: 600; }
.picker-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--color-border-light); background: var(--color-bg-subtle); }
.picker-today-btn { font-size: 0.78rem; color: var(--color-primary); background: transparent; border: none; cursor: pointer; padding: 5px 10px; border-radius: 7px; font-family: inherit; transition: background 0.15s; }
.picker-today-btn:hover { background: var(--color-primary-light); }
.picker-actions { display: flex; gap: 8px; }
.picker-actions button { font-size: 0.78rem; padding: 5px 14px; border-radius: 7px; border: none; cursor: pointer; font-family: inherit; font-weight: 500; }
.picker-cancel-btn { background: transparent; color: var(--color-text-secondary); border: 1px solid var(--color-border); }
.picker-cancel-btn:hover { background: var(--color-bg-hover); }
.picker-confirm-btn { background: var(--color-primary); color: #fff; }
.picker-confirm-btn:hover { background: var(--color-primary-active); }
.picker-time-cols { display: flex; gap: 10px; padding: 14px; }
.picker-time-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.picker-time-col label { font-size: 0.68rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.picker-time-col select { width: 100%; padding: 10px 8px; font-size: 1rem; font-weight: 600; text-align: center; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-card); color: var(--color-text); cursor: pointer; appearance: none; -webkit-appearance: none; font-family: inherit; }
.picker-time-col select:hover { border-color: var(--color-primary); }
.picker-time-col select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.picker-time-preview { text-align: center; font-size: 1.5rem; font-weight: 700; color: var(--color-primary); padding: 12px 0 4px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.picker-time-preview .preview-sep { color: var(--color-text-muted); margin: 0 2px; font-weight: 400; }

/* ============================================================
   4. 扩展组件（抽屉 / 面板 / 菜单 / Tip / 栅格 / 变体）
   ============================================================ */

/* ---- 抽屉 ---- */
.drawer-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(2px); z-index: 99991; opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
.drawer-mask.active { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; left: 0; width: 280px; max-width: 85%; height: 100%; background: var(--color-bg-card); z-index: 99992; transform: translateX(-100%); transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12); }
.drawer.active { transform: translateX(0); }
.drawer.drawer-right { left: auto; right: 0; transform: translateX(100%); box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12); }
.drawer.drawer-right.active { transform: translateX(0); }
.drawer-section { padding: 14px 20px; }
.drawer-section + .drawer-section { border-top: 1px solid var(--color-border-light); }
.drawer-section-title { font-size: 0.76rem; font-weight: 600; color: var(--color-text-muted); margin-bottom: 10px; }
.drawer-tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-tag { padding: 7px 14px; border-radius: 20px; background: var(--color-bg-hover); color: var(--color-text-secondary); font-size: 0.8rem; cursor: pointer; transition: all 0.15s; user-select: none; -webkit-tap-highlight-color: transparent; }
.drawer-tag:hover { background: var(--color-border); }
.drawer-tag.active { background: var(--color-primary); color: #fff; }
.drawer-actions { padding: 14px 20px; border-top: 1px solid var(--color-border-light); display: flex; gap: 10px; flex-shrink: 0; }
.drawer-actions .btn { flex: 1; }
.drawer-header { padding: 20px 20px 16px; border-bottom: 1px solid var(--color-border-light); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.drawer-header .drawer-title { font-size: 1.05rem; font-weight: 600; color: var(--color-text); display: flex; align-items: center; gap: 8px; }
.drawer-close { background: var(--color-bg-hover); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-muted); transition: background 0.15s; line-height: 1; }
.drawer-close:hover { background: var(--color-border); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 0; -webkit-overflow-scrolling: touch; }
.drawer-menu { list-style: none; }
.drawer-menu-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; font-size: 0.9rem; color: var(--color-text); cursor: pointer; transition: background 0.15s; border-left: 3px solid transparent; -webkit-tap-highlight-color: transparent; user-select: none; }
.drawer-menu-item:hover { background: var(--color-bg-hover); }
.drawer-menu-item.active { background: var(--color-primary-light); color: var(--color-primary); border-left-color: var(--color-primary); font-weight: 500; }
.drawer-menu-item .menu-icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.drawer-menu-item .menu-badge { margin-left: auto; background: var(--color-danger); color: #fff; font-size: 0.65rem; padding: 1px 7px; border-radius: 10px; font-weight: 600; }
.drawer-menu-item .arrow { margin-left: auto; font-size: 0.7rem; color: var(--color-text-disabled); transition: transform 0.2s; }
.drawer-menu-item.expanded .arrow { transform: rotate(90deg); }
.drawer-submenu { list-style: none; background: var(--color-bg-subtle); overflow: hidden; max-height: 0; transition: max-height 0.25s ease; }
.drawer-submenu.open { max-height: 300px; }
.drawer-submenu .drawer-menu-item { padding-left: 54px; font-size: 0.85rem; color: var(--color-text-secondary); }
.drawer-footer { padding: 16px 20px; border-top: 1px solid var(--color-border-light); flex-shrink: 0; font-size: 0.75rem; color: var(--color-text-muted); text-align: center; }

/* ---- 顶部快捷菜单 ---- */
.topbar-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.25); backdrop-filter: blur(1px); z-index: 99991; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; }
.topbar-mask.active { opacity: 1; visibility: visible; }
.topbar { position: fixed; top: 0; left: 0; width: 100%; background: var(--color-bg-card); z-index: 99992; transform: translateY(-100%); transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1); border-radius: 0 0 var(--radius-xl) var(--radius-xl); max-height: 80vh; display: flex; flex-direction: column; }
.topbar.active { transform: translateY(0); }
.topbar-header { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--color-border-light); flex-shrink: 0; }
.topbar-header .topbar-title { font-size: 1.05rem; font-weight: 600; color: var(--color-text); display: flex; align-items: center; gap: 8px; }
.topbar-close { background: var(--color-bg-hover); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--color-text-muted); transition: background 0.15s; line-height: 1; }
.topbar-close:hover { background: var(--color-border); }
.topbar-body { overflow-y: auto; padding: 8px 0; -webkit-overflow-scrolling: touch; }
.topbar-menu { list-style: none; }
.topbar-menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; font-size: 0.9rem; color: var(--color-text); cursor: pointer; transition: background 0.15s; -webkit-tap-highlight-color: transparent; user-select: none; }
.topbar-menu-item:hover { background: var(--color-bg-hover); }
.topbar-menu-item .menu-icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.topbar-menu-item .menu-badge { margin-left: auto; background: var(--color-danger); color: #fff; font-size: 0.65rem; padding: 1px 7px; border-radius: 10px; font-weight: 600; }
.topbar-menu-item .menu-desc { margin-left: auto; font-size: 0.75rem; color: var(--color-text-disabled); }
.topbar-icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 16px 20px; }
.topbar-icon-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: var(--radius-md); cursor: pointer; transition: background 0.15s; -webkit-tap-highlight-color: transparent; user-select: none; }
.topbar-icon-item:hover { background: var(--color-bg-hover); }
.topbar-icon-item .icon-circle { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--color-primary-light); color: var(--color-primary); }
.topbar-icon-item .icon-label { font-size: 0.7rem; color: var(--color-text-secondary); text-align: center; }
.icon-circle-green { background: var(--color-success-light); color: var(--color-success); }
.icon-circle-orange { background: var(--color-warning-light); color: var(--color-warning); }
.icon-circle-purple { background: var(--color-purple-light); color: var(--color-purple); }

/* ---- 底部操作面板 ---- */
.actionsheet-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(2px); z-index: 99991; opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
.actionsheet-mask.active { opacity: 1; visibility: visible; }
.actionsheet { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--color-bg-card); z-index: 99992; transform: translateY(100%); transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12); padding-bottom: env(safe-area-inset-bottom, 0); }
.actionsheet.active { transform: translateY(0); }
.actionsheet-header { padding: 16px 20px; text-align: center; font-size: 0.8rem; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border-light); position: relative; }
.actionsheet-header::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 36px; height: 4px; background: var(--color-border); border-radius: 2px; }
.actionsheet-menu { list-style: none; padding: 8px 0; max-height: 50vh; overflow-y: auto; }
.actionsheet-menu-item { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 20px; font-size: 0.95rem; color: var(--color-text); cursor: pointer; transition: background 0.15s; -webkit-tap-highlight-color: transparent; }
.actionsheet-menu-item:hover { background: var(--color-bg-hover); }
.actionsheet-menu-item.danger { color: var(--color-danger); }
.actionsheet-cancel { border-top: 8px solid var(--color-bg); padding: 14px 20px; text-align: center; font-size: 0.95rem; color: var(--color-text-secondary); cursor: pointer; font-weight: 500; transition: background 0.15s; -webkit-tap-highlight-color: transparent; }
.actionsheet-cancel:hover { background: var(--color-bg-hover); }

/* ---- Tip 气泡 ---- */
.tip-trigger { display: inline-flex; align-items: center; gap: 6px; background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: 30px; padding: 8px 18px; font-size: 0.9rem; color: var(--color-text); cursor: pointer; transition: all 0.2s; user-select: none; -webkit-tap-highlight-color: transparent; }
.tip-trigger:hover { background: var(--color-bg-hover); }
.tip-trigger .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary); }
.hover-tip-wrapper { position: relative; display: inline-block; cursor: help; border-bottom: 1px dashed var(--color-primary); color: var(--color-text); font-weight: 500; padding: 2px 0; }
.hover-tip-content { position: absolute; background: var(--color-text); color: var(--color-bg-card); font-size: 0.8rem; padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s; pointer-events: none; z-index: 100; font-weight: 400; line-height: 1.4; max-width: 260px; white-space: normal; text-align: center; }
.hover-tip-content::after { content: ''; position: absolute; width: 0; height: 0; border: 6px solid transparent; }
/* 方向：上（默认） */
.hover-tip-wrapper:not([data-placement]) .hover-tip-content,
.hover-tip-wrapper[data-placement="top"] .hover-tip-content { bottom: 130%; left: 50%; transform: translateX(-50%) translateY(4px); }
.hover-tip-wrapper:not([data-placement]) .hover-tip-content::after,
.hover-tip-wrapper[data-placement="top"] .hover-tip-content::after { top: 100%; left: 50%; transform: translateX(-50%); border-top-color: var(--color-text); border-bottom-width: 0; }
.hover-tip-wrapper:not([data-placement]):hover .hover-tip-content, .hover-tip-wrapper:not([data-placement]):active .hover-tip-content,
.hover-tip-wrapper[data-placement="top"]:hover .hover-tip-content, .hover-tip-wrapper[data-placement="top"]:active .hover-tip-content { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
/* 方向：下 */
.hover-tip-wrapper[data-placement="bottom"] .hover-tip-content { bottom: auto; top: 130%; left: 50%; transform: translateX(-50%) translateY(-4px); }
.hover-tip-wrapper[data-placement="bottom"] .hover-tip-content::after { top: auto; bottom: 100%; left: 50%; transform: translateX(-50%); border-bottom-color: var(--color-text); border-top-width: 0; }
.hover-tip-wrapper[data-placement="bottom"]:hover .hover-tip-content, .hover-tip-wrapper[data-placement="bottom"]:active .hover-tip-content { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
/* 方向：左 */
.hover-tip-wrapper[data-placement="left"] .hover-tip-content { bottom: auto; top: 50%; left: auto; right: 130%; transform: translateY(-50%) translateX(4px); }
.hover-tip-wrapper[data-placement="left"] .hover-tip-content::after { top: 50%; left: 100%; transform: translateY(-50%); border-left-color: var(--color-text); border-right-width: 0; }
.hover-tip-wrapper[data-placement="left"]:hover .hover-tip-content, .hover-tip-wrapper[data-placement="left"]:active .hover-tip-content { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
/* 方向：右 */
.hover-tip-wrapper[data-placement="right"] .hover-tip-content { bottom: auto; top: 50%; left: 130%; transform: translateY(-50%) translateX(-4px); }
.hover-tip-wrapper[data-placement="right"] .hover-tip-content::after { top: 50%; right: 100%; left: auto; transform: translateY(-50%); border-right-color: var(--color-text); border-left-width: 0; }
.hover-tip-wrapper[data-placement="right"]:hover .hover-tip-content, .hover-tip-wrapper[data-placement="right"]:active .hover-tip-content { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }
.tip-bubble { position: fixed; z-index: 99990; background: var(--color-text); color: var(--color-bg-card); font-size: 0.85rem; padding: 10px 16px; border-radius: 10px; line-height: 1.4; box-shadow: var(--shadow-md); max-width: 260px; word-break: break-word; opacity: 0; transform: translateY(6px) scale(0.96); transition: opacity 0.15s, transform 0.15s; pointer-events: none; white-space: normal; }
.tip-bubble.show { opacity: 1; transform: translateY(0) scale(1); }
.tip-bubble::after { content: ''; position: absolute; width: 0; height: 0; border: 6px solid transparent; }
.tip-bubble[data-placement="top"]::after { top: 100%; left: 50%; transform: translateX(-50%); border-top-color: var(--color-text); border-bottom-width: 0; }
.tip-bubble[data-placement="bottom"]::after { bottom: 100%; left: 50%; transform: translateX(-50%); border-bottom-color: var(--color-text); border-top-width: 0; }
.tip-bubble[data-placement="left"]::after { top: 50%; left: 100%; transform: translateY(-50%); border-left-color: var(--color-text); border-right-width: 0; }
.tip-bubble[data-placement="right"]::after { top: 50%; right: 100%; transform: translateY(-50%); border-right-color: var(--color-text); border-left-width: 0; }

/* ---- 栅格系统 ---- */
.row { display: flex; flex-wrap: wrap; margin: 0 -8px 12px; }
.col { padding: 0 8px; margin-bottom: 12px; }
.col-1 { flex: 0 0 8.3333%; max-width: 8.3333%; }
.col-2 { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-5th { flex: 0 0 20%; max-width: 20%; }
.col-resp { flex: 0 0 100%; max-width: 100%; }
@media (min-width: 480px) { .col-resp { flex: 0 0 50%; max-width: 50%; } }
@media (min-width: 640px) { .col-resp { flex: 0 0 33.3333%; max-width: 33.3333%; } }
.col-offset-2 { margin-left: 16.6667%; }
.col-offset-3 { margin-left: 25%; }
.col-offset-4 { margin-left: 33.3333%; }
.col-offset-6 { margin-left: 50%; }
.grid-box { background: var(--color-primary-light); color: var(--color-primary); border-radius: 10px; padding: 14px 8px; text-align: center; font-size: 0.8rem; font-weight: 500; border: 1px solid var(--color-primary-border); }
.grid-box-green { background: var(--color-success-light); color: var(--color-success); border-color: color-mix(in srgb, var(--color-success) 25%, white); }
.grid-box-orange { background: var(--color-warning-light); color: var(--color-warning); border-color: color-mix(in srgb, var(--color-warning) 25%, white); }
.grid-box-purple { background: var(--color-purple-light); color: var(--color-purple); border-color: color-mix(in srgb, var(--color-purple) 25%, white); }
.grid-box-dark { background: var(--color-text); color: var(--color-bg-card); border-color: var(--color-text); }

/* ---- 文字大小 ---- */
.fs-10 { font-size: 10px; } .fs-12 { font-size: 12px; } .fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; } .fs-18 { font-size: 18px; } .fs-20 { font-size: 20px; }

/* ---- 数字加减框尺寸 ---- */
.number-input-group-sm .number-btn { width: 32px; height: 32px; font-size: 0.9rem; }
.number-input-group-sm .number-input { width: 56px; height: 32px; font-size: 0.8rem; }
.number-input-group-lg .number-btn { width: 46px; height: 46px; font-size: 1.2rem; }
.number-input-group-lg .number-input { width: 80px; height: 46px; font-size: 1.05rem; }
.number-input-group-xs { border-width: 1px; border-radius: var(--radius-sm); }
.number-input-group-xs .number-btn { width: 26px; height: 26px; font-size: 0.82rem; }
.number-input-group-xs .number-input { width: 44px; height: 26px; font-size: 0.78rem; border-left-width: 1px; border-right-width: 1px; }
.number-input-group-mini { border-width: 1px; border-radius: var(--radius-sm); }
.number-input-group-mini .number-btn { width: 20px; height: 20px; font-size: 0.7rem; }
.number-input-group-mini .number-input { width: 34px; height: 20px; font-size: 0.7rem; padding: 0; border-left-width: 1px; border-right-width: 1px; }

/* 竖直紧凑版 */
.number-input-group.num-vertical { align-items: stretch; height: 26px; border-radius: var(--radius-sm); }
.num-vertical .number-input { width: 42px; height: 100%; padding: 0; border: none; border-right: 1px solid var(--color-border); font-size: 0.78rem; }
.num-vertical .num-vertical-btns { display: flex; flex-direction: column; width: 18px; flex-shrink: 0; }
.num-vertical .number-btn { width: 100%; height: 50%; font-size: 0.6rem; background: var(--color-bg-card); line-height: 1; }
.num-vertical .number-btn:first-child { border-bottom: 1px solid var(--color-border-light); }
.num-vertical .number-btn:hover { background: var(--color-bg-hover); }
.num-vertical.num-vertical-mini { height: 22px; }
.num-vertical.num-vertical-mini .number-input { width: 34px; font-size: 0.72rem; }
.num-vertical.num-vertical-mini .num-vertical-btns { width: 16px; }
.num-vertical.num-vertical-mini .number-btn { font-size: 0.55rem; }

/* ---- 下拉菜单 ---- */
.dropdown { position: relative; display: inline-block; width: 100%; }
.dropdown-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; font-size: 0.88rem; font-family: inherit; text-align: left;
  color: var(--color-text); background: var(--color-bg-card);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.dropdown-toggle:hover { border-color: var(--color-primary-border); }
.dropdown.open .dropdown-toggle { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.dropdown-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-toggle.placeholder .dropdown-value { color: var(--color-text-disabled); }
.dropdown-arrow { font-size: 0.7rem; color: var(--color-text-muted); flex-shrink: 0; transition: transform 0.2s; }
.dropdown.open .dropdown-arrow { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  padding: 6px;
  max-height: var(--dropdown-max-h, 240px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu.h-160 { max-height: 160px; }
.dropdown-menu.h-200 { max-height: 200px; }
.dropdown-menu.h-240 { max-height: 240px; }
.dropdown-menu.h-300 { max-height: 300px; }
.dropdown-menu.h-auto { max-height: none; }

.dropdown-group + .dropdown-group { margin-top: 6px; }
.dropdown-group-title {
  position: sticky; top: -6px; z-index: 1;
  padding: 0 10px;
  line-height: 28px;
  font-size: 0.75rem; font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.4px;
  background: var(--color-bg-card);
}
.dropdown-group .dropdown-item { padding-left: 22px; }
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 8px;
  font-size: 0.86rem; color: var(--color-text-secondary);
  cursor: pointer; transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.dropdown-item:hover { background: var(--color-bg-hover); }
.dropdown-item.active { background: var(--color-primary-light); color: var(--color-primary); font-weight: 500; }
.dropdown-check { margin-left: auto; font-size: 0.72rem; opacity: 0; transition: opacity 0.15s; }
.dropdown-item.active .dropdown-check { opacity: 1; }
.dropdown-divider { height: 1px; background: var(--color-border-light); margin: 6px 4px; }

/* ---- 图文卡片 / 列表卡片 ---- */
.media-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}
.media-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.media-card-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; color: var(--color-text); }
.media-card-title .iconfont { color: var(--color-warning); }
.media-card-more { display: inline-flex; align-items: center; gap: 2px; font-size: 0.85rem; color: var(--color-text-secondary); cursor: pointer; transition: color 0.15s; }
.media-card-more:hover { color: var(--color-primary); }

.media-list { display: flex; flex-direction: column; gap: 8px; }
.media-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--color-bg);
  cursor: pointer; transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.media-item:hover { background: var(--color-primary-border); }
.media-item-main { flex: 1; min-width: 0; }
.media-item-title { font-size: 0.9rem; font-weight: 600; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-item-sub { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 3px; }
.media-item-badge {
  flex-shrink: 0; padding: 4px 12px; border-radius: 20px;
  font-size: 0.82rem; font-weight: 700;
  background: var(--color-danger-light); color: var(--color-danger);
}
.media-item-badge.badge-primary { background: var(--color-primary-light); color: var(--color-primary); }
.media-item-badge.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
.media-item-thumb { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--color-bg-hover); }
.media-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- 表格扩展：两行单元格 / 头像单元格 / 操作组 ---- */
.table .cell-stack { display: flex; flex-direction: column; gap: 2px; }
.table .cell-main { font-weight: 500; color: var(--color-text); font-size: 0.88rem; line-height: 1.3; }
.table .cell-sub { font-size: 0.72rem; color: var(--color-text-muted); line-height: 1.3; }
.table .cell-avatar { display: flex; align-items: center; gap: 10px; }
.table .cell-avatar .avatar { width: 36px; height: 36px; font-size: 1rem; flex-shrink: 0; }
.table .cell-avatar .cell-stack { flex: 1; min-width: 0; }
.table .cell-actions { display: flex; gap: 6px; flex-wrap: nowrap; }

/* ---- 表格扩展：横向滚动容器 ---- */
.table-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--color-border-light); border-radius: var(--radius-md); background: var(--color-bg-card); box-shadow: var(--shadow-sm); }
.table-scroll-x .table { min-width: 720px; margin-bottom: 0; white-space: nowrap; }
.table-scroll-x .table th, .table-scroll-x .table td { padding: 12px 16px; vertical-align: middle; }

/* ---- 表格扩展：紧凑 / 垂直居中 ---- */
.table.table-sm thead th { padding: 8px 12px; }
.table.table-sm tbody td { padding: 8px 12px; }
.table.table-align-middle td, .table.table-align-middle th { vertical-align: middle; }

/* ---- 时间轴 ---- */
.timeline { position: relative; padding: 0; margin: 0; list-style: none; }
.timeline-item { position: relative; padding-left: 36px; padding-bottom: 28px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: -8px; width: 2px; background: var(--color-border-light); }
.timeline-item:last-child::before { display: none; }
.timeline-badge { position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #fff; background: var(--color-primary); z-index: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 14%, transparent); }
.timeline-badge.success { background: var(--color-success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-success) 16%, transparent); }
.timeline-badge.warning { background: var(--color-warning); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-warning) 16%, transparent); }
.timeline-badge.danger { background: var(--color-danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-danger) 16%, transparent); }
.timeline-content { background: var(--color-bg-card); border: 1px solid var(--color-border-light); border-radius: var(--radius-md); padding: 12px 16px; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s; }
.timeline-content:hover { box-shadow: var(--shadow-md); }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; flex-wrap: wrap; gap: 4px 12px; }
.timeline-title { font-weight: 600; font-size: 0.92rem; color: var(--color-text); }
.timeline-time { font-size: 0.72rem; color: var(--color-text-muted); white-space: nowrap; }
.timeline-desc { font-size: 0.8rem; color: var(--color-text-secondary); line-height: 1.5; }
.timeline-footer { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: var(--color-text-muted); }

/* ---- 卡片变体 ---- */
.card-bordered { border: 1px solid var(--color-border); }
.card-flat { box-shadow: none; border: 1px solid var(--color-border-light); }
.card-glow { box-shadow: 0 8px 30px rgba(91, 91, 239, 0.12); border-color: var(--color-primary-border); }
.card-glow:hover { box-shadow: 0 12px 40px rgba(91, 91, 239, 0.2); }

/* ---- 验证码变体 ---- */
.verify-code-row { display: flex; gap: 10px; align-items: stretch; }
.verify-code-row .verify-code-input-wrap { flex: 1; display: flex; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.verify-code-row .verify-code-input-wrap:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.verify-code-row .verify-code-input { border: none; background: transparent; padding: 10px 12px; font-size: 0.9rem; color: var(--color-text); outline: none; font-family: inherit; width: 100%; }

/* ---- 分页变体 ---- */
.pagination-simple { display: flex; align-items: center; justify-content: center; gap: 12px; }
.pagination-simple .page-info { font-size: 0.85rem; color: var(--color-text-secondary); }
.pagination-simple .page-info strong { color: var(--color-primary); font-weight: 600; }
.pagination-with-size { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pagination-with-size .page-size-select { padding: 6px 28px 6px 12px; font-size: 0.8rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg-card); color: var(--color-text); cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%237b8a9e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; font-family: inherit; }

/* ---- 药丸选项卡 ---- */
.tabs-pill { display: flex; gap: 8px; padding: 4px; background: var(--color-bg-hover); border-radius: var(--radius-md); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs-pill::-webkit-scrollbar { display: none; }
.tabs-pill .tab-item { flex: 1; text-align: center; border-radius: 8px; padding: 10px 16px; color: var(--color-text-muted); }
.tabs-pill .tab-item.active { background: var(--color-bg-card); color: var(--color-primary); box-shadow: var(--shadow-sm); }
.tabs-pill .tab-item.active::after { display: none; }

/* ---- 按钮补充 ---- */
.btn-blue { background: var(--color-primary); color: #fff; }
.btn-blue:hover { background: var(--color-primary-active); }
.btn-green { background: var(--color-success); color: #fff; }
.btn-green:hover { background: color-mix(in srgb, var(--color-success) 85%, black); }
.btn-orange { background: var(--color-warning); color: #fff; }
.btn-orange:hover { background: color-mix(in srgb, var(--color-warning) 85%, black); }
.btn-red { background: var(--color-danger); color: #fff; }
.btn-red:hover { background: color-mix(in srgb, var(--color-danger) 85%, black); }

/* ---- 表单尺寸 ---- */
.form-input-sm { padding: 8px 12px; font-size: 0.8rem; border-radius: 10px; }
.form-input-lg { padding: 14px 18px; font-size: 1rem; border-radius: 14px; }

/* ---- 业务卡片 ---- */
.card-birthday { display: flex; align-items: center; gap: 14px; background: var(--color-bg-card); border-radius: var(--radius-lg); padding: 12px 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border-light); margin-bottom: 14px; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; -webkit-tap-highlight-color: transparent; }
.card-birthday:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--color-primary-border); }
.card-birthday:active { transform: scale(0.985); box-shadow: var(--shadow-md); }
.card-birthday .birthday-icon { width: 40px; height: 40px; border-radius: 14px; background: var(--color-orange-card); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; color: #fff; }
.card-birthday:hover .birthday-icon { box-shadow: 0 6px 16px rgba(240, 136, 110, 0.35); }
.card-birthday .birthday-body { flex: 1; min-width: 0; }
.card-birthday .birthday-title { font-size: 0.9rem; font-weight: 600; color: var(--color-text); margin-bottom: 2px; }
.card-birthday .birthday-sub { font-size: 0.7rem; color: var(--color-text-muted); margin-top:5px;}
.card-birthday .birthday-count { font-size: 1.2rem; font-weight: 600; color: var(--color-primary); flex-shrink: 0; padding-left: 8px; }
.card-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--color-bg-card); border-radius: var(--radius-lg); padding: 15px 12px 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border-light); cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; -webkit-tap-highlight-color: transparent; }
.card-add:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--color-primary-border); }
.card-add:active { transform: scale(0.985); box-shadow: var(--shadow-md); }
.card-add .add-icon { width: 40px; height: 40px; border-radius: 15px; background: var(--color-primary); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.6rem; font-weight: 300; box-shadow: 0 8px 20px rgba(91, 91, 239, 0.35); }
.card-add:hover .add-icon { box-shadow: 0 10px 24px rgba(91, 91, 239, 0.45); }
.card-add .add-title { font-size: 0.85rem; font-weight: 600; color: var(--color-text); }
.card-row { display: flex; gap: 14px; }
.card-row .card-add { flex: 1; }

/* ---- 页面内导航栏 ---- */
.page-navbar { display: flex; align-items: center; justify-content: space-between; background: var(--color-bg-card); border-radius: 14px; padding: 10px 16px; border: 1px solid var(--color-border-light); box-shadow: var(--shadow-sm); }
.page-navbar .nav-left, .page-navbar .nav-right { display: flex; align-items: center; gap: 8px; }
.page-navbar .nav-title { font-size: 0.95rem; font-weight: 600; color: var(--color-text); }
.nav-icon-btn { width: 36px; height: 36px; border-radius: 10px; border: none; background: var(--color-bg-hover); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; transition: background 0.15s; color: var(--color-text); -webkit-tap-highlight-color: transparent; }
.nav-icon-btn:hover { background: var(--color-border); }

/* ---- 移动端底部导航（演示） ---- */
.mobile-frame {
  position: relative;
  width: 300px;
  height: 400px;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  background: var(--color-bg-subtle);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}
.mobile-frame-head {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  background: var(--color-bg-card, #fff);
  border-bottom: 1px solid var(--color-border-light);
}
.mobile-tab-view {
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  bottom: 54px;
  overflow-y: auto;
  padding: 16px;
}
.tab-page { display: none; }
.tab-page.active { display: block; }
.tab-page-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 10px; color: var(--color-text); }
.tab-page-desc { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 10px; line-height: 1.5; }
.mini-stat-row { display: flex; gap: 10px; }
.mini-stat {
  flex: 1;
  padding: 12px 8px;
  border-radius: 12px;
  background: var(--color-bg-card, #fff);
  border: 1px solid var(--color-border-light);
  text-align: center;
}
.mini-stat-num { font-size: 0.95rem; font-weight: 700; color: var(--color-text); }
.mini-stat-num.orange { color: #f59e0b; font-size: 1.1rem; }
.mini-stat-label { font-size: 0.68rem; color: var(--color-text-muted); margin-top: 3px; }
.mini-msg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--color-bg-card, #fff);
  border: 1px solid var(--color-border-light);
  font-size: 0.78rem;
  color: var(--color-text);
}
.mini-msg-time { font-size: 0.68rem; color: var(--color-text-muted); flex-shrink: 0; }
.mobile-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54px;
  display: flex;
  background: var(--color-bg-card, #fff);
  border-top: 1px solid var(--color-border-light);
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  position: relative;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.tabbar-item .tab-icon { font-size: 1.15rem; line-height: 1; }
.tabbar-item.active { color: var(--color-primary); }
.tabbar-item .tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 22px);
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  border-radius: 8px;
  font-size: 0.6rem;
  text-align: center;
}

/* ---- 手机滚轮选择器 ---- */
.picker-modal { background: var(--color-bg-card); width: 88%; max-width: 340px; border-radius: 20px; box-shadow: var(--shadow-lg); animation: modalIn 0.2s ease-out; overflow: hidden; margin: 0 auto; }
.picker-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--color-border-light); }
.picker-modal-header .picker-title { font-size: 0.95rem; font-weight: 600; color: var(--color-text); }
.picker-modal-header .picker-cancel { font-size: 0.85rem; color: var(--color-text-muted); cursor: pointer; border: none; background: transparent; font-family: inherit; padding: 4px 8px; }
.picker-modal-header .picker-confirm { font-size: 0.85rem; color: var(--color-primary); cursor: pointer; border: none; background: transparent; font-family: inherit; padding: 4px 8px; font-weight: 600; }
.picker-modal-body { padding: 8px 16px 16px; }
.wheel-picker { position: relative; display: flex; height: 200px; overflow: hidden; background: var(--color-bg-subtle); border-radius: 14px; border: 1px solid var(--color-border-light); }
.wheel-col { flex: 1; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; position: relative; padding: 80px 0; text-align: center; }
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-item { height: 40px; line-height: 40px; font-size: 1rem; color: var(--color-text-muted); scroll-snap-align: center; transition: color 0.15s, font-size 0.15s; cursor: pointer; user-select: none; }
.wheel-item.active { color: var(--color-text); font-weight: 600; font-size: 1.1rem; }
.wheel-picker::before { content: ''; position: absolute; top: 50%; left: 8px; right: 8px; height: 40px; transform: translateY(-50%); border-top: 1.5px solid var(--color-primary-border); border-bottom: 1.5px solid var(--color-primary-border); pointer-events: none; z-index: 1; border-radius: 6px; background: color-mix(in srgb, var(--color-primary) 5%, transparent); }
.wheel-picker::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: linear-gradient(to bottom, var(--color-bg-subtle) 0%, transparent 30%, transparent 70%, var(--color-bg-subtle) 100%); }

/* ============================================================
   表单组件 · 搜索筛选栏
   ============================================================ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-item .form-input, .filter-item .form-select { height: 38px; }
.filter-actions { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; }
.filter-actions .btn { white-space: nowrap; }

/* ============================================================
   表单组件 · 金额输入框
   ============================================================ */
.money-input-group { display: flex; align-items: stretch; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-card); overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.money-input-group:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.money-prefix { display: flex; align-items: center; padding: 0 12px; font-size: 1rem; font-weight: 600; color: var(--color-text-secondary); background: var(--color-bg-subtle); border-right: 1.5px solid var(--color-border); }
.money-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; padding: 10px 14px; font-size: 1rem; font-weight: 600; color: var(--color-text); font-family: inherit; text-align: right; }
.money-input::placeholder { color: var(--color-text-disabled); font-weight: 400; }

/* ============================================================
   表单组件 · 大备注框
   ============================================================ */
.remark-box { border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-card); overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.remark-box:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.remark-box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--color-border-light); background: var(--color-bg-subtle); }
.remark-box-title { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 500; color: var(--color-text); }
.remark-box-tools { display: flex; align-items: center; gap: 4px; }
.remark-box-tool { border: none; background: transparent; color: var(--color-text-muted); cursor: pointer; font-size: 0.8rem; padding: 4px 8px; border-radius: 6px; transition: background 0.15s, color 0.15s; font-family: inherit; }
.remark-box-tool:hover { background: var(--color-bg-hover); color: var(--color-primary); }
.remark-box-textarea { display: block; width: 100%; border: none; outline: none; resize: vertical; min-height: 120px; padding: 12px 14px; font-size: 0.88rem; line-height: 1.6; color: var(--color-text); background: transparent; font-family: inherit; }
.remark-box-textarea::placeholder { color: var(--color-text-disabled); }
.remark-box-lg .remark-box-textarea { min-height: 200px; }
.remark-box-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--color-border-light); background: var(--color-bg-subtle); font-size: 0.72rem; color: var(--color-text-muted); }
.remark-box-count b { color: var(--color-primary); font-weight: 600; }
.remark-box-count.over, .remark-box-count.over b { color: var(--color-danger); }

/* ============================================================
   顶部通知条
   ============================================================ */
.notice-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-md); font-size: 0.84rem; line-height: 1.5; color: var(--color-text); border: 1px solid var(--color-primary-border); background: var(--color-primary-light); }
.notice-bar + .notice-bar { margin-top: 10px; }
.notice-bar .notice-icon { display: flex; flex-shrink: 0; font-size: 1rem; color: var(--color-primary); }
.notice-bar .notice-text { flex: 1; min-width: 0; }
.notice-bar .notice-text b { font-weight: 600; }
.notice-bar .notice-action { flex-shrink: 0; font-size: 0.8rem; font-weight: 500; color: var(--color-primary); cursor: pointer; white-space: nowrap; }
.notice-bar .notice-action:hover { text-decoration: none; }
.notice-bar .notice-close { flex-shrink: 0; border: none; background: transparent; color: var(--color-text-muted); cursor: pointer; font-size: 0.95rem; line-height: 1; padding: 2px 5px; border-radius: 6px; transition: background 0.15s, color 0.15s; }
.notice-bar .notice-close:hover { background: rgba(0, 0, 0, 0.06); color: var(--color-text); }
.notice-bar.notice-success { border-color: color-mix(in srgb, var(--color-success) 30%, white); background: var(--color-success-light); }
.notice-bar.notice-success .notice-icon, .notice-bar.notice-success .notice-action { color: var(--color-success); }
.notice-bar.notice-warning { border-color: color-mix(in srgb, var(--color-warning) 35%, white); background: var(--color-warning-light); }
.notice-bar.notice-warning .notice-icon, .notice-bar.notice-warning .notice-action { color: var(--color-warning); }
.notice-bar.notice-danger { border-color: color-mix(in srgb, var(--color-danger) 30%, white); background: var(--color-danger-light); }
.notice-bar.notice-danger .notice-icon, .notice-bar.notice-danger .notice-action { color: var(--color-danger); }
.notice-bar.notice-plain { border-color: var(--color-border-light); background: var(--color-bg-subtle); }
.notice-bar.notice-plain .notice-icon { color: var(--color-text-muted); }
.notice-bar.notice-closing { opacity: 0; transform: translateY(-6px); transition: opacity 0.2s, transform 0.2s; }

/* ============================================================
   表格 · 批量选择
   ============================================================ */
.table-checkbox { width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer; vertical-align: middle; }
.table-select-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px; border: 1px solid var(--color-primary-border); border-radius: var(--radius-md); background: var(--color-primary-light); }
.table-select-bar .select-count { font-size: 0.82rem; color: var(--color-text-secondary); }
.table-select-bar .select-count b { color: var(--color-primary); font-size: 0.95rem; }
.table-select-bar .select-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   项目 / 商品选择器
   ============================================================ */
.goods-picker { border: 1px solid var(--color-border-light); border-radius: var(--radius-md); background: var(--color-bg-card); overflow: hidden; }
.goods-search { padding: 12px; border-bottom: 1px solid var(--color-border-light); }
.goods-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; padding: 8px; }
.goods-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--color-border-light); border-radius: var(--radius-md); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.goods-item:hover { background: var(--color-bg-hover); }
.goods-item.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
.goods-thumb { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--color-bg-subtle); }
.goods-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.goods-info { flex: 1; min-width: 0; }
.goods-name { font-size: 0.88rem; font-weight: 500; color: var(--color-text); }
.goods-meta { margin-top: 2px; font-size: 0.74rem; color: var(--color-text-muted); }
.goods-check { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex-shrink: 0; border: 1.5px solid var(--color-border); border-radius: 50%; color: transparent; font-size: 0.68rem; transition: all 0.15s; }
.goods-item.selected .goods-check { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.goods-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-top: 1px solid var(--color-border-light); background: var(--color-bg-subtle); }
.goods-selected { font-size: 0.82rem; color: var(--color-text-secondary); }
.goods-selected b { color: var(--color-primary); }
.goods-empty { padding: 28px 16px; text-align: center; font-size: 0.82rem; color: var(--color-text-muted); }

/* ============================================================
   下拉刷新 / 上拉加载
   ============================================================ */
.pull-refresh, .load-more { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px; font-size: 0.82rem; color: var(--color-text-muted); background: var(--color-bg-subtle); border-radius: var(--radius-md); cursor: pointer; user-select: none; transition: color 0.15s; }
.pull-refresh { margin-bottom: 10px; }
.load-more { margin-top: 10px; }
.pull-refresh:hover, .load-more:hover { color: var(--color-primary); }
.pull-refresh.loading, .load-more.loading { color: var(--color-primary); pointer-events: none; }
.pull-refresh.loading .iconfont, .load-more.loading .iconfont { animation: spin 0.8s linear infinite; }

/* ============================================================
   表单组件 · 日期区间
   ============================================================ */
.date-range { display: flex; align-items: center; gap: 8px; }
.date-range .picker-trigger { flex: 1; min-width: 0; }
.date-range .date-range-sep { flex: 0 0 auto; font-size: 0.82rem; color: var(--color-text-muted); user-select: none; }
.date-range-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.filter-bar .date-range-presets { margin-top: 0; flex: 0 0 auto; }
.date-range-chip { border: 1px solid var(--color-border); background: var(--color-bg-card); color: var(--color-text-secondary); font-size: 0.76rem; font-family: inherit; line-height: 1.4; padding: 4px 10px; border-radius: 999px; cursor: pointer; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.date-range-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.date-range-chip.active { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary); font-weight: 500; }

/* ============================================================
   表单组件 · 会员搜索
   ============================================================ */
.member-search { position: relative; }
.member-search-panel { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60; display: none; max-height: 264px; overflow-y: auto; padding: 6px; border: 1px solid var(--color-border-light); border-radius: var(--radius-md); background: var(--color-bg-card); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10); }
.member-search.open .member-search-panel { display: block; }
.member-search-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s; }
.member-search-item:hover { background: var(--color-primary-light); }
.member-search-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.member-search-name { font-size: 0.84rem; color: var(--color-text); }
.member-search-meta { font-size: 0.72rem; color: var(--color-text-muted); }
.member-search-empty { padding: 18px 10px; text-align: center; font-size: 0.8rem; color: var(--color-text-muted); }
.member-search-item .avatar { width: 32px; height: 32px; font-size: 0.78rem; }

/* ============================================================
   表单组件 · 日期时间一体选择器
   ============================================================ */
.picker-popup.picker-with-time { min-width: 306px; }
.picker-datetime-time { display: flex; align-items: flex-end; gap: 8px; padding: 12px 14px 4px; border-top: 1px solid var(--color-border-light); }
.picker-datetime-time .picker-time-field { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.picker-datetime-time .picker-time-field label { font-size: 0.68rem; color: var(--color-text-muted); font-weight: 500; letter-spacing: 0.5px; }
.picker-datetime-time .picker-time-field select { width: 100%; padding: 7px 4px; font-size: 0.92rem; font-weight: 600; text-align: center; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-bg-card); color: var(--color-text); cursor: pointer; appearance: none; -webkit-appearance: none; font-family: inherit; }
.picker-datetime-time .picker-time-field select:hover { border-color: var(--color-primary); }
.picker-datetime-time .picker-time-field select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.picker-datetime-time .picker-time-sep { padding-bottom: 10px; font-size: 0.95rem; font-weight: 600; color: var(--color-text-muted); }
.wheel-picker.wheel-5 .wheel-item { font-size: 0.88rem; }
.wheel-picker.wheel-5 .wheel-item.active { font-size: 0.98rem; }

/* ---- 表单类组件：窄屏适配 ---- */
@media (max-width: 768px) {
  .filter-item, .filter-item-keyword { flex: 1 1 100%; }
  .filter-actions { flex: 1 1 100%; }
  .filter-actions .btn { flex: 1; }
  .table-select-bar { flex-direction: column; align-items: stretch; }
  .table-select-bar .select-actions { justify-content: space-between; }
  .table-select-bar .select-actions .btn { flex: 1; }
}

/* ---- 响应式 ---- */
@media (max-width: 900px) {
  .topbar-nav-item span:not(.nav-icon) { display: none; }
  .topbar-nav-item { padding: 10px; }
}
@media (max-width: 768px) {
  .app-sidebar { width: var(--sidebar-collapsed); }
  .app-sidebar .sidebar-group-title { opacity: 0; height: 8px; padding: 0; }
  .app-sidebar .sidebar-item .item-text,
  .app-sidebar .sidebar-item .item-badge { opacity: 0; width: 0; }
  .app-sidebar .sidebar-item { justify-content: center; padding: 10px; }
  .app-sidebar .sidebar-toggle { justify-content: center; padding: 12px 0; }
  .app-content { padding: 16px; }
  .topbar-center { display: none; }
  .topbar-user .user-info { display: none; }
}
/* ---- 消息气泡面板（用户点击消息图标） ---- */
.msg-popover {
  position: fixed;
  z-index: 1001;
  width: 300px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--color-card-bg, #fff);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  padding: 6px;
}
.msg-pop-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}
.msg-pop-title .msg-count {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 2px 8px;
  border-radius: 10px;
}
.msg-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.msg-item:hover { background: var(--color-bg-hover); }
.msg-item.unread { background: var(--color-primary-light); }
.msg-item .msg-item-icon { font-size: 1.1rem; line-height: 1.4; }
.msg-item .msg-item-title { font-size: 0.82rem; color: var(--color-text); }
.msg-item .msg-item-time { font-size: 0.7rem; color: var(--color-text-muted); margin-top: 2px; }
.msg-item .msg-dot {
  width: 7px; height: 7px;
  margin-left: auto;
  margin-top: 5px;
  background: #ef4444;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- 气泡卡片（用户下拉菜单） ---- */
.popover {
  position: absolute;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  padding: 8px 0;
  min-width: 160px;
  z-index: 1000;
  animation: pickerIn 0.15s ease-out;
}
.popover-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  font-size: 0.84rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.popover-item:hover { background: var(--color-bg-hover); color: var(--color-primary); }
.popover-item.danger:hover { background: var(--color-danger-light); color: var(--color-danger); }
.popover-divider { height: 1px; background: var(--color-border-light); margin: 6px 0; }
.popover-header { padding: 10px 16px 8px; font-size: 0.72rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

/* ---- 门店切换弹窗 ---- */
.shop-list { display: flex; flex-direction: column; gap: 4px; max-height: 48vh; overflow-y: auto; }
.shop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.shop-item:hover { background: var(--color-bg-hover); }
.shop-item.active { background: var(--color-primary-light); border-color: var(--color-primary-border); }
.shop-item-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--color-text);
}
.shop-item-tag {
  font-size: 0.6rem; font-weight: 500;
  color: var(--color-primary);
  background: var(--color-bg-card);
  border: 1px solid var(--color-primary-border);
  padding: 0 6px;
  border-radius: 8px;
  flex-shrink: 0;
}
.shop-item-addr { font-size: 0.72rem; color: var(--color-text-muted); margin-top: 3px; }
.shop-item-check {
  margin-left: auto; flex-shrink: 0;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  background: var(--color-bg-subtle);
  border-radius: 50%;
  color: transparent;
  transition: all 0.15s;
}
.shop-item.active .shop-item-check { background: var(--color-primary); color: #fff; }