/* ============================================
   全局样式 - 移动端员工打卡系统 H5
   现代卡片式 UI 设计 · 视觉升级版
   ============================================ */

/* ========== 设计系统变量 ========== */
:root {
  /* 主色调 - 现代蓝 */
  --primary: #4F8EF7;
  --primary-dark: #3B7CE0;
  --primary-light: #E8F1FE;

  /* 功能色 */
  --success: #34C759;
  --success-light: #E8F8EC;
  --warning: #FF9500;
  --warning-light: #FFF4E6;
  --danger: #FF3B30;
  --danger-light: #FFEBEA;
  --purple: #AF52DE;
  --purple-light: #F5E9FA;
  --info: #5AC8FA;
  --info-light: #E6F7FE;

  /* 文字色 */
  --text-1: #1A1A2E;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --text-4: #C4C9D4;

  /* 背景色 */
  --bg-page: #F0F2F5;
  --bg-card: #FFFFFF;
  --bg-input: #F7F8FA;

  /* 边框 */
  --border: #E5E7EB;
  --border-light: #F0F1F3;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
  --shadow-primary: 0 4px 16px rgba(79, 142, 247, 0.25);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* 过渡 */
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 重置样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

a { text-decoration: none; color: inherit; }

/* ========== 应用容器 ========== */
#app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg-page);
}

/* ============================================
   动画定义
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -45%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes barGrow {
  from { height: 0; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.96); }
}

/* 页面容器淡入 */
.page-enter {
  animation: fadeInUp 0.35s ease-out;
}

/* 列表项渐入（配合 style="--delay:Ns" 实现交错） */
.stagger-item {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

/* ============================================
   顶部登录状态条
   ============================================ */
.login-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: linear-gradient(90deg, #FF9500 0%, #FF7A00 100%);
  color: #fff;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.2);
}
.login-status-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.login-status-btn {
  background: #fff;
  color: #FF7A00;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 14px;
  font-weight: 600;
  margin-left: 8px;
  transition: var(--transition);
}
.login-status-btn:active {
  transform: scale(0.94);
  opacity: 0.9;
}

/* ============================================
   页面内登录提示卡片
   ============================================ */
.login-prompt-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  margin: 12px;
  box-shadow: var(--shadow-sm);
}
.login-prompt-icon {
  font-size: 44px;
  margin-bottom: 14px;
}
.login-prompt-text {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 18px;
  line-height: 1.6;
}
.login-prompt-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 14px;
  padding: 9px 32px;
  border-radius: 22px;
  font-weight: 500;
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
}
.login-prompt-btn:active {
  transform: scale(0.95);
}

/* ============================================
   备案信息样式
   ============================================ */
.global-beian {
  text-align: center;
  padding: 8px 12px 16px;
  font-size: 11px;
  color: var(--text-4);
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.beian-link {
  color: var(--text-4) !important;
  text-decoration: none;
  transition: color 0.2s;
}
.beian-link:hover {
  color: var(--primary) !important;
}
.beian-gongan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.beian-gongan-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

/* ============================================
   订单管理样式（重构优化版）
   ============================================ */
/* 订单统计卡片 */
.order-summary-card {
  display: flex;
  background: var(--bg-card);
  margin: 12px;
  border-radius: var(--radius-md);
  padding: 16px 12px;
  box-shadow: var(--shadow-sm);
}
.order-summary-item {
  flex: 1;
  text-align: center;
  position: relative;
}
.order-summary-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border-light);
}
.order-summary-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
}
.order-summary-num.primary { color: var(--primary); }
.order-summary-num.success { color: var(--success); }
.order-summary-num.warning { color: var(--warning); }
.order-summary-label {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}

/* 状态筛选 Tab */
.order-status-tabs {
  display: flex;
  overflow-x: auto;
  background: var(--bg-card);
  padding: 10px 12px;
  gap: 8px;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--border-light);
}
.order-status-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-2);
  border-radius: 16px;
  background: var(--bg-input);
  flex-shrink: 0;
  transition: var(--transition);
  font-weight: 500;
}
.order-status-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.order-status-badge {
  font-size: 11px;
  padding: 0 6px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-weight: 600;
}
.order-status-tab.active .order-status-badge {
  background: rgba(255, 255, 255, 0.25);
}

/* 搜索区 - 两行布局避免拥挤 */
.order-search-area {
  background: var(--bg-card);
  padding: 0 12px 12px;
}
.order-search-row {
  display: flex;
  gap: 8px;
}
.order-search-row .form-input {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  padding: 0 12px;
  height: 38px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.order-search-row .form-input:focus {
  border-color: var(--primary);
  background: #fff;
}
.order-search-row .btn {
  width: auto;
  padding: 0 20px;
  height: 38px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.order-date-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.order-date-row .form-input {
  flex: 1;
  height: 38px;
  font-size: 13px;
  padding: 0 10px;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}
.order-date-row .form-input:focus {
  border-color: var(--primary);
  background: #fff;
}
.order-date-sep {
  color: var(--text-3);
  font-size: 12px;
  flex-shrink: 0;
}

/* 订单卡片 */
.order-card {
  background: var(--bg-card);
  margin: 8px 12px;
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}
.order-card:active {
  background: #FAFBFC;
  transform: scale(0.98);
}
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.order-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}
.order-card-status {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  border: 1px solid;
  flex-shrink: 0;
  font-weight: 500;
}
.order-card-body {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-3);
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}
.order-card-amount {
  font-size: 17px;
  font-weight: 700;
  color: var(--danger);
}
/* 订单卡片底部右侧容器（日期 + 修改按钮） */
.order-card-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 订单卡片修改按钮 */
.order-card-edit-btn {
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-light);
  border: none;
  padding: 3px 10px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.order-card-edit-btn:active {
  transform: scale(0.92);
  opacity: 0.85;
}

/* 订单详情 */
.order-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.order-detail-row:last-child {
  border-bottom: none;
}
.order-detail-label {
  color: var(--text-3);
  flex-shrink: 0;
  width: 90px;
}
.order-detail-value {
  color: var(--text-1);
  text-align: right;
  flex: 1;
  word-break: break-all;
}

/* 商品明细 */
.order-item-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.order-item-row:last-child {
  border-bottom: none;
}
.order-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.order-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  flex: 1;
}
.order-item-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
}
.order-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
}
.order-item-meta span {
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 4px;
}
.order-item-remark {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
}
.order-detail-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 4px;
  font-size: 15px;
  font-weight: 600;
  border-top: 2px solid var(--border-light);
  margin-top: 8px;
}
.order-detail-total-amount {
  font-size: 20px;
  color: var(--danger);
  font-weight: 700;
}

/* ========== 订单商品：购物车式行内编辑 ========== */
/* 搜索栏（吸顶，便于连续添加多个商品） */
.oi-search-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-card);
  padding: 10px 0 8px;
  margin-bottom: 4px;
}
.oi-search-wrap {
  position: relative;
}
.oi-search-input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-input);
  font-size: 14px;
  color: var(--text-1);
  box-sizing: border-box;
}
.oi-search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
}
.oi-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 14px;
  pointer-events: none;
}
/* 搜索下拉浮层 */
.oi-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
}
.oi-search-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-1);
}
.oi-search-item:active {
  background: var(--primary-light);
}
.oi-search-item:last-child {
  border-bottom: none;
}
.oi-search-item-info {
  flex: 1;
  min-width: 0;
}
.oi-search-item-name {
  font-weight: 500;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oi-search-item-spec {
  font-size: 12px;
  color: var(--text-3);
}
.oi-search-item-price {
  font-weight: 600;
  color: var(--danger);
  margin-left: 8px;
  flex-shrink: 0;
}
.oi-search-item-tag {
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  flex-shrink: 0;
}
.oi-search-empty {
  padding: 14px 12px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.oi-search-empty .oi-search-add-custom {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
}
.oi-search-empty .oi-search-add-custom:active {
  background: var(--primary-dark);
}

/* 已选清单 - 紧凑两行式列表 */
.oi-list {
  margin-top: 4px;
}
.oi-card {
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
  background: var(--bg-input);
}
.oi-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.oi-card-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  border: none;
  background: transparent;
  padding: 2px 0;
}
.oi-card-name:focus {
  outline: none;
  border-bottom: 1px dashed var(--primary);
}
.oi-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
  white-space: nowrap;
  flex-shrink: 0;
}
.oi-card-del {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  font-size: 13px;
  background: var(--danger-light);
  color: var(--danger);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.oi-card-del:active {
  opacity: 0.7;
}
.oi-card-fields {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}
.oi-card-fields .form-input {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  font-size: 13px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  text-align: center;
}
.oi-card-fields .form-input:focus {
  border-color: var(--primary);
  outline: none;
}
.oi-card-fields .oi-spec {
  text-align: left;
  flex: 1.5;
}
/* 终端客户输入框：文字较长，稍宽于数字列并左对齐 */
.oi-card-fields .oi-customer {
  text-align: left;
  flex: 1.3;
}
.oi-remark {
  width: 100%;
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-2);
}
.oi-remark:focus {
  border-color: var(--primary);
  outline: none;
}

/* 状态修改区 */
.order-status-select-row {
  display: flex;
  gap: 8px;
}
.order-status-select-row .form-input {
  flex: 1;
}
.order-status-select-row .btn {
  width: auto;
  padding: 0 20px;
}

/* ============================================
   客户管理样式
   ============================================ */
.customer-card {
  background: #fff;
  margin: 8px 12px;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.customer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.customer-card-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}
.customer-card-debt {
  font-size: 12px;
  color: #e74c3c;
  background: #fdf0ed;
  padding: 2px 8px;
  border-radius: 10px;
}
.customer-card-body {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}
.customer-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f5f5f5;
}

/* ============================================
   商品管理样式
   ============================================ */
.product-card {
  background: #fff;
  margin: 8px 12px;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.product-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.product-card-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}
.product-card-price {
  font-size: 16px;
  font-weight: 600;
  color: #e74c3c;
}
.product-card-body {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

/* ============================================
   编辑表单弹窗（Edit Form Modal）— 紧凑精致、无需滚动
   ============================================ */

/* 弹窗入场动画 */
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayFadeIn 0.2s ease-out;
}
/* 点击遮罩空白区域关闭弹窗 */
.modal-overlay.closable {
  cursor: pointer;
}
.modal-overlay.closable .modal-content {
  cursor: default;
}

.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* 弹窗头部 — 左对齐标题 + 右上角关闭按钮 */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  position: relative;
}
.modal-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16px;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}
.modal-header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: 0.3px;
}
.modal-close-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg-input);
  border-radius: 50%;
  color: var(--text-3);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.modal-close-btn:active {
  transform: scale(0.85);
  background: var(--border);
}

/* 弹窗主体 — 紧凑内边距 */
.modal-body {
  padding: 14px 16px 10px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 弹窗底部 — 紧凑按钮 */
.modal-footer {
  display: flex;
  gap: 10px;
  padding: 10px 16px 14px;
}
.modal-footer .btn {
  flex: 1;
  height: 40px;
  line-height: 40px;
  font-size: 15px;
  border-radius: var(--radius-sm);
}

/* ============================================
   紧凑表单样式
   ============================================ */
.form-group {
  margin-bottom: 10px;
}
.form-group:last-child {
  margin-bottom: 0;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 4px;
}
.form-group .form-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  background: var(--bg-input);
  transition: var(--transition);
}
.form-group .form-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.1);
}
/* textarea 紧凑：单行高度，可手动展开 */
textarea.form-input {
  height: auto;
  min-height: 36px;
  padding: 8px 10px;
  resize: none;
  line-height: 1.4;
}
/* select 紧凑 */
select.form-input {
  height: 36px;
  cursor: pointer;
}

/* 双列表单行 — 短字段并排排列节省垂直空间 */
.form-row-2col {
  display: flex;
  gap: 10px;
}
.form-row-2col .form-group {
  flex: 1;
  margin-bottom: 10px;
}

/* 按钮变体 */
.btn-success {
  background: #4CAF50;
  color: #fff;
}
.btn-danger {
  background: #e74c3c;
  color: #fff;
}
.btn-cancel {
  background: #f5f6fa;
  color: #666;
}
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
  height: auto;
  width: auto;
}

/* 管理后台入口项可点击 */
.admin-entry-item {
  cursor: pointer;
}
.admin-entry-item:active {
  background: #f9f9f9;
}

#page-container {
  min-height: 100vh;
  padding-bottom: 70px;
}
#page-container.no-tabbar {
  padding-bottom: 0;
}

/* ============================================
   底部导航栏
   ============================================ */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 58px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.04);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-3);
  font-size: 10px;
  cursor: pointer;
  transition: color 0.2s;
  gap: 2px;
}
.tabbar-item.active {
  color: var(--primary);
}
.tabbar-item.active .tabbar-icon {
  transform: scale(1.1);
}
.tabbar-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.2s;
}

/* ============================================
   通用组件
   ============================================ */

/* 页面头部 - 渐变装饰 */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 24px 18px 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
/* 头部装饰圆 */
.page-header::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.page-header::before {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 40px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}
.page-header h1 {
  font-size: 21px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.page-header .subtitle {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* 页面头部返回按钮 — SVG 矢量箭头 + 弹簧动画，原生级体验 */
.page-back-btn {
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  /* 弹簧曲线：按下回弹时有自然的弹性感 */
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.25s ease,
              opacity 0.2s ease;
}
/* SVG 箭头：圆角线帽，比例精致 */
.page-back-btn svg {
  width: 11px;
  height: 18px;
  opacity: 0.92;
  /* 箭头自身的过渡：位移 + 透明度联动 */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.2s ease;
}
/* 按压：柔和光晕 + 弹性缩小 + 箭头左滑 */
.page-back-btn:active {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-50%) scale(0.85);
}
.page-back-btn:active svg {
  opacity: 1;
  transform: translateX(-2px);
}
/* 有返回按钮时标题右移避免重叠 */
.page-header.has-back h1 {
  padding-left: 50px;
}
.page-header.has-back .subtitle {
  padding-left: 50px;
}

/* 卡片 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 2px;
  margin-right: 8px;
}

/* 按钮系统 */
.btn {
  display: block;
  width: 100%;
  height: 46px;
  line-height: 46px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}
.btn:active {
  transform: scale(0.97);
  opacity: 0.9;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-success {
  background: linear-gradient(135deg, #34C759, #24B554);
  color: #fff;
  box-shadow: 0 4px 16px rgba(52, 199, 89, 0.25);
}
.btn-warning {
  background: linear-gradient(135deg, #FF9500, #FF7A00);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 149, 0, 0.25);
}
.btn-danger {
  background: linear-gradient(135deg, #FF3B30, #D70015);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.25);
}
.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-disabled {
  background: #D9DCE1;
  color: #fff;
  cursor: not-allowed;
  box-shadow: none;
}

/* 表单 */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: var(--bg-input);
  transition: var(--transition);
}
.form-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.1);
}

/* 列表项 */
.list-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s;
}
.list-item:last-child {
  border-bottom: none;
}
.list-item:active {
  background: var(--bg-input);
}
.list-item-content {
  flex: 1;
}
.list-item-title {
  font-size: 15px;
  color: var(--text-1);
  font-weight: 500;
}
.list-item-desc {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}
.list-item-arrow {
  color: var(--text-4);
  font-size: 18px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}
.empty-state-text {
  font-size: 14px;
}

/* ============================================
   登录页
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 30%, var(--bg-page) 60%);
  position: relative;
  overflow: hidden;
}
/* 登录页装饰 */
.login-page::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.login-page::after {
  content: "";
  position: absolute;
  top: 80px;
  left: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}
.login-logo {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-xl);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
  animation: scaleIn 0.5s ease-out;
}
/* 登录页 LOGO 图片样式 */
.login-logo-img {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-xl);
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
  animation: scaleIn 0.5s ease-out;
  object-fit: cover;
}
.login-title {
  font-size: 25px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.login-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}
.login-form {
  width: 100%;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.5s ease-out 0.1s both;
}
.login-form .form-group:last-of-type {
  margin-bottom: 20px;
}
.privacy-check {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 20px;
  cursor: pointer;
}
.privacy-check-box {
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 5px;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  font-size: 12px;
  color: transparent;
}
.privacy-check-box.checked {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.privacy-link {
  color: var(--primary);
}
.login-footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ============================================
   首页
   ============================================ */
/* 首页顶部应用标识（LOGO+名称） */
.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
}
.app-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}
.app-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}

.home-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 28px 18px 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.home-header::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.home-user {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}
.home-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 12px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.15);
}
.home-user-name {
  font-size: 19px;
  font-weight: 600;
}
.home-user-date {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}
.home-clock-status {
  display: flex;
  margin-top: 20px;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.home-clock-item {
  flex: 1;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.home-clock-label {
  font-size: 12px;
  opacity: 0.85;
}
.home-clock-time {
  font-size: 19px;
  font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.home-clock-time.placeholder {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
}

/* 快捷入口网格 */
.quick-grid {
  display: flex;
  flex-wrap: wrap;
  padding: 4px 0;
}
.quick-item {
  width: 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  cursor: pointer;
  transition: var(--transition);
}
.quick-item:active {
  transform: scale(0.92);
}
.quick-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 6px;
}
.quick-icon.blue { background: var(--primary-light); color: var(--primary); }
.quick-icon.green { background: var(--success-light); color: var(--success); }
.quick-icon.orange { background: var(--warning-light); color: var(--warning); }
.quick-icon.purple { background: var(--purple-light); color: var(--purple); }
.quick-text {
  font-size: 12px;
  color: var(--text-2);
}

/* ============================================
   工时柱状图（首页数据可视化）
   ============================================ */
.weekly-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 120px;
  padding: 8px 4px 0;
  gap: 6px;
}
.weekly-chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.weekly-chart-bar {
  width: 100%;
  max-width: 28px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  position: relative;
  transition: height 0.5s ease-out;
  animation: barGrow 0.6s ease-out;
}
.weekly-chart-bar.rest {
  background: linear-gradient(180deg, #D9DCE1, #C4C9D4);
}
.weekly-chart-bar.today {
  background: linear-gradient(180deg, var(--success), #24B554);
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.3);
}
.weekly-chart-value {
  font-size: 10px;
  color: var(--text-3);
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.weekly-chart-label {
  font-size: 11px;
  color: var(--text-3);
}
.weekly-chart-label.today {
  color: var(--success);
  font-weight: 600;
}

/* ============================================
   环形图（记录页数据可视化）
   ============================================ */
.ring-chart {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}
.ring-chart svg {
  transform: rotate(-90deg);
}
.ring-chart-track {
  fill: none;
  stroke: var(--border-light);
  stroke-width: 8;
}
.ring-chart-progress {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease-out;
}
.ring-chart-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.ring-chart-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
}
.ring-chart-label {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 2px;
}

/* 统计行 */
.stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.stats-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}
.stats-info-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* 月度趋势图 */
.trend-chart {
  display: flex;
  align-items: flex-end;
  height: 100px;
  gap: 4px;
  padding: 8px 0 0;
}
.trend-chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
  justify-content: flex-end;
}
.trend-chart-bar {
  width: 100%;
  max-width: 20px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 3px 3px 0 0;
  min-height: 3px;
  transition: height 0.4s ease-out;
}
.trend-chart-bar.zero {
  background: var(--border-light);
}
.trend-chart-label {
  font-size: 9px;
  color: var(--text-3);
}

/* ============================================
   打卡页
   ============================================ */
.checkin-page {
  padding-bottom: 20px;
}
.checkin-date-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  margin: 12px;
  border-radius: var(--radius-md);
  padding: 24px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-primary);
}
.checkin-date-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.checkin-date {
  font-size: 32px;
  font-weight: 700;
  opacity: 0.95;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}
.checkin-week {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 6px;
  position: relative;
  z-index: 1;
}
.checkin-clock-btns {
  display: flex;
  gap: 12px;
  margin: 12px;
}
.checkin-clock-btns .btn {
  flex: 1;
}
.checkin-status-card {
  margin: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.checkin-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.checkin-status-row:last-child {
  border-bottom: none;
}
.checkin-status-label {
  font-size: 14px;
  color: var(--text-3);
}
.checkin-status-value {
  font-size: 15px;
  color: var(--text-1);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.checkin-status-value.success { color: var(--success); }
.checkin-status-value.warning { color: var(--warning); }

/* ============================================
   记录列表页
   ============================================ */
.record-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s;
}
.record-item:active {
  background: var(--bg-input);
}
.record-date {
  width: 50px;
  text-align: center;
  flex-shrink: 0;
}
.record-date-day {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
}
.record-date-month {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.record-info {
  flex: 1;
  margin-left: 14px;
}
.record-time {
  font-size: 14px;
  color: var(--text-2);
}
.record-hours {
  font-size: 13px;
  color: var(--primary);
  margin-top: 2px;
  font-weight: 500;
}
.record-badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}
.record-badge.normal { background: var(--success-light); color: var(--success); }
.record-badge.leave { background: var(--warning-light); color: var(--warning); }

/* ============================================
   休假页
   ============================================ */
.vacation-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.vacation-type-item {
  flex: 1;
  min-width: 70px;
  text-align: center;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}
.vacation-type-item.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 142, 247, 0.15);
}

/* ============================================
   个人中心
   ============================================ */
.profile-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 34px 16px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.profile-header::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin: 0 auto 10px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 1;
}
.profile-name {
  font-size: 21px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.profile-role {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* ============================================
   Loading 遮罩
   ============================================ */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-text {
  color: #fff;
  font-size: 14px;
  margin-top: 12px;
}

/* ============================================
   Toast 提示
   ============================================ */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 10000;
  max-width: 80%;
  text-align: center;
  line-height: 1.5;
  animation: toastIn 0.25s ease-out;
}

/* ============================================
   确认对话框（Confirm Dialog）— 使用 .confirm-* 前缀避免与编辑弹窗冲突
   ============================================ */
.modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  animation: fadeIn 0.2s;
}
.modal-dialog {
  width: 82%;
  max-width: 320px;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: scaleIn 0.25s ease-out;
}
.modal-title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  padding: 22px 16px 8px;
  color: var(--text-1);
}
.confirm-text {
  font-size: 14px;
  color: var(--text-2);
  text-align: center;
  padding: 0 16px 20px;
  line-height: 1.6;
  white-space: pre-line;
}
.confirm-footer {
  display: flex;
  border-top: 1px solid var(--border-light);
}
.confirm-btn {
  flex: 1;
  height: 48px;
  line-height: 48px;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
  background: none;
  border: none;
  transition: background 0.2s;
}
.confirm-btn:active {
  background: var(--bg-input);
}
.confirm-btn.cancel {
  color: var(--text-3);
  border-right: 1px solid var(--border-light);
}
.confirm-btn.confirm {
  color: var(--primary);
  font-weight: 600;
}

/* 滚动区域 */
.scroll-list {
  max-height: 400px;
  overflow-y: auto;
}

/* 日期选择器 */
.date-picker-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.date-picker-row input {
  flex: 1;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 14px;
  background: var(--bg-input);
}

/* 订单状态分布饼图 */
.order-status-chart {
  display: flex;
  align-items: center;
  gap: 16px;
}
.order-status-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-status-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.order-status-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.order-status-legend-num {
  margin-left: auto;
  font-weight: 600;
  color: var(--text-1);
}

/* ========== 第三批功能样式：统计卡 / 月份选择器 / 记录卡 / 用户卡 / 浮动按钮 ========== */

/* 统计卡横排容器（自适应换行） */
.stat-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.stat-card-item {
  flex: 1 1 calc(50% - 5px);
  min-width: 140px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.stat-card-label {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 6px;
}
.stat-card-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

/* 月份选择器 */
.month-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.month-picker-btn {
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  font-size: 20px;
  color: var(--primary);
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition);
}
.month-picker-btn:active {
  background: var(--bg-input);
}
.month-picker-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}

/* 记录卡片（出货/成本/休假通用） */
.record-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.record-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.record-card-date {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.record-card-amount {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}
.record-card-body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.record-card-operator {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.record-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

/* 用户卡片 */
.user-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.user-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.user-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}
.user-card-body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.user-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

/* 角色标签 */
.role-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-3);
}

/* ==================== 配货管理页面 ==================== */

/* 筛选栏 */
.picking-toolbar .filter-bar {
  display: flex; gap: 8px; padding: 0 12px 10px;
}
.filter-bar {
  display: flex; gap: 8px; padding: 0 12px 10px;
}
.filter-search {
  flex: 1; display: flex; align-items: center; gap: 6px;
  background: var(--bg-input); border-radius: 8px; padding: 0 10px;
}
.filter-search .icon { font-size: 14px; opacity: 0.5; }
.filter-search input {
  flex: 1; border: none; background: transparent;
  padding: 8px 0; font-size: 14px; color: var(--text-1); outline: none;
}
.filter-status select {
  padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; color: var(--text-1);
  background: var(--bg-card); outline: none;
}

/* 视图切换标签 */
.view-tabs {
  display: flex; background: var(--bg-input);
  padding: 3px; border-radius: 8px;
}
.view-tab {
  flex: 1; padding: 7px 0; border: none; background: transparent;
  font-size: 13px; color: var(--text-2); border-radius: 6px;
  cursor: pointer; transition: all 0.2s;
}
.view-tab.active {
  background: var(--bg-card); color: var(--primary);
  font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 未分拣快速筛选 */
.unpicked-filter {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 10px; background: #FFF3E0; border: 1px solid #FF9800;
  border-radius: 6px; font-size: 12px; color: #FF9800;
  cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.unpicked-filter.active { background: #FF9800; color: #fff; }
.unpicked-filter .count { font-weight: 700; }

/* 统计栏 */
.stats-bar {
  padding: 8px 12px; font-size: 12px; color: var(--text-2);
}
.stats-bar .num { color: var(--primary); font-weight: 600; }

/* 客户分组 */
.picking-group {
  margin: 0 12px 10px; background: var(--bg-card);
  border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.picking-group-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; cursor: pointer; user-select: none;
  border-bottom: 1px solid var(--border-light);
}
.picking-group-name { font-size: 15px; font-weight: 600; color: var(--text-1); flex: 1; }
.picking-group-count {
  font-size: 12px; color: var(--text-3);
  background: var(--bg-input); padding: 2px 8px; border-radius: 10px;
}
.picking-group-arrow { font-size: 10px; color: var(--text-3); transition: transform 0.2s; }
.picking-group.collapsed .picking-group-arrow { transform: rotate(-90deg); }
.picking-group.collapsed .picking-group-body { display: none; }
.picking-group-body { padding: 8px 12px 12px; }

/* 订单标签 */
.picking-order-tag {
  font-size: 11px; color: var(--text-3); margin: 8px 0 4px;
}

/* 紧凑卡片网格 */
.cards-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}

/* 紧凑商品卡片 */
.compact-card {
  position: relative;
  background: var(--bg-input); border-radius: 8px;
  padding: 8px 10px; border-left: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.compact-card.modified {
  background: #FFF8E1; border-left-color: #FF9800;
}
/* 已分拣状态（发货数量>0，保存后或重新进入页面均显示黄色背景） */
.compact-card.picked {
  background: #FFF8E1; border-left-color: #FFC107;
}
.compact-card .cc-name {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 1px;
}
.compact-card .cc-spec {
  font-size: 11px; color: var(--text-3); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.compact-card .cc-row {
  display: flex; justify-content: space-between; align-items: center; font-size: 12px;
}
.compact-card .cc-qty { color: var(--text-2); }
.compact-card .cc-qty b { color: var(--text-1); font-weight: 600; }
.compact-card .cc-ship-val {
  display: inline-block; min-width: 28px; padding: 2px 5px;
  background: var(--bg-card); border: 1px dashed var(--border);
  border-radius: 4px; cursor: pointer; color: var(--primary);
  font-weight: 600; text-align: center;
}
.compact-card .cc-ship-input {
  width: 40px; padding: 2px 4px; text-align: center;
  border: 1px solid var(--primary); border-radius: 4px;
  font-size: 12px; font-weight: 600; color: var(--primary);
  background: var(--bg-card); outline: none;
}
.compact-card .cc-customer {
  font-size: 10px; color: var(--primary); margin-top: 5px;
  padding-top: 4px; border-top: 1px dashed var(--border-light);
}

/* 撤销按钮 */
.cc-undo {
  position: absolute; top: 4px; right: 4px;
  font-size: 10px; color: #FF9800;
  background: rgba(255,255,255,0.85); padding: 2px 6px;
  border-radius: 4px; cursor: pointer; user-select: none;
}
.cc-undo:hover { background: #FF9800; color: #fff; }

/* 已分拣标签（黄色角标，与撤销按钮位置一致，二者不会同时出现） */
.cc-tag-done {
  position: absolute; top: 4px; right: 4px;
  font-size: 10px; color: #fff; background: #FFC107;
  padding: 2px 6px; border-radius: 4px; user-select: none;
  font-weight: 600; line-height: 1.4;
}

/* 备注信息（单品卡片底部虚线分隔的备注行） */
.compact-card .cc-remark {
  font-size: 11px; color: var(--text-2); margin-top: 5px;
  padding-top: 4px; border-top: 1px dashed var(--border-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 浮动保存按钮 */
.picking-save-btn {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  padding: 12px 32px; background: var(--primary); color: #fff;
  border: none; border-radius: 24px; font-size: 15px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2); cursor: pointer; z-index: 100;
  transition: all 0.2s;
}
.picking-save-btn:active { transform: translateX(-50%) scale(0.96); }
.picking-save-btn:disabled { opacity: 0.6; }
.role-tag.admin {
  background: rgba(79, 142, 247, 0.12);
  color: var(--primary);
  font-weight: 500;
}

/* 浮动新增按钮 */
.fab-btn {
  position: fixed;
  right: 20px;
  bottom: 30px;
  width: 52px;
  height: 52px;
  line-height: 52px;
  text-align: center;
  font-size: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(79, 142, 247, 0.4);
  cursor: pointer;
  z-index: 50;
  transition: var(--transition);
}
.fab-btn:active {
  transform: scale(0.92);
}

/* 复选框标签 */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-1);
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* 禁用按钮样式 */
.btn:disabled,
.btn[disabled] {
  background: var(--text-4);
  color: #fff;
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}
.btn:disabled:active,
.btn[disabled]:active {
  transform: none;
}

/* ==================== 语音录入按钮状态 ==================== */
/* 录音中：红色 + 脉冲扩散动画，直观提示正在收音 */
@keyframes voice-recording-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.65); }
  70%  { box-shadow: 0 0 0 12px rgba(244, 67, 54, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}
#order-voice-btn.voice-recording {
  background: #f44336 !important;
  color: #fff;
  font-weight: bold;
  animation: voice-recording-pulse 1.2s ease-out infinite;
}
/* 解析中：橙色，提示正在处理识别结果 */
#order-voice-btn.voice-parsing {
  background: #FF9800 !important;
  color: #fff;
  font-weight: bold;
}

/* 语音录入状态条：按钮下方实时显示识别文字 */
.voice-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 8px 0 12px;
  background: #fff5f5;
  border: 1px solid #ffcdd2;
  border-radius: 10px;
  min-height: 24px;
}
.voice-status-bar .voice-dot {
  width: 12px;
  height: 12px;
  background: #f44336;
  border-radius: 50%;
  flex-shrink: 0;
  animation: voice-dot-blink 1s ease-in-out infinite;
}
@keyframes voice-dot-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.7); }
}
.voice-status-bar .voice-text {
  flex: 1;
  color: #333;
  font-size: 16px;
  line-height: 1.4;
  word-break: break-all;
}
/* 识别完成后状态条变绿（圆点停止闪烁） */
.voice-status-bar.done {
  background: #f1f8f1;
  border-color: #c8e6c9;
}
.voice-status-bar.done .voice-dot {
  background: #4CAF50;
  animation: none;
}
