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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  font-size: 14px;
}

/* 横向溢出保护：手机 WebView 会因个别元素超宽触发"自动缩放重算"，
   导致页面打开一秒后突然被放大、需要左右滑动。掐死溢出 + viewport 禁缩放双保险。 */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========== 登录页 ========== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #12a06a 0%, #0b7a50 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 400px;
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo h1 {
  color: #12a06a;
  font-size: 28px;
  margin-bottom: 8px;
}

.login-logo p {
  color: #999;
  font-size: 14px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
  outline: none;
}

.form-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  accent-color: #12a06a;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #12a06a;
  box-shadow: 0 0 0 3px rgba(18, 160, 106, 0.12);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.btn-primary {
  background: #12a06a;
  color: #fff;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
}

.btn-primary:hover {
  background: #0b7a50;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

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

.btn-success {
  background: #10b981;
  color: #fff;
}

.btn-success:hover {
  background: #059669;
}

.btn-warning {
  background: #f59e0b;
  color: #fff;
}

.btn-warning:hover {
  background: #d97706;
}

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

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  width: auto;
  padding: 6px 12px;
  font-size: 12px;
}

.btn + .btn {
  margin-left: 8px;
}

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

/* 左侧菜单 */
.sidebar {
  width: 240px;
  background: #1e293b;
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #334155;
}

.sidebar-logo h2 {
  font-size: 20px;
  color: #fff;
}

.sidebar-menu {
  padding: 16px 0;
  list-style: none;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: #94a3b8;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
  background: #334155;
  color: #fff;
  border-left-color: #12a06a;
}

.sidebar-menu li a .icon {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 主内容区 */
.main-wrapper {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶部导航 */
.header {
  height: 60px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left h1 {
  font-size: 18px;
  color: #1e293b;
}

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

.admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #12a06a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.admin-name {
  color: #374151;
  font-weight: 500;
}

.logout-btn {
  color: #64748b;
  cursor: pointer;
  transition: color 0.3s;
}

.logout-btn:hover {
  color: #ef4444;
}

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

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 20px;
}

/* 卡片 */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-info h3 {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-info .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
}

.stat-info .stat-change {
  font-size: 12px;
  color: #10b981;
  margin-top: 6px;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.blue {
  background: #dbeafe;
  color: #12a06a;
}

.stat-icon.green {
  background: #d1fae5;
  color: #10b981;
}

.stat-icon.orange {
  background: #ffedd5;
  color: #f97316;
}

.stat-icon.purple {
  background: #ede9fe;
  color: #8b5cf6;
}

/* 图表区域 */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-container {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chart-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 20px;
}

/* 模拟柱状图 */
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  padding: 0 10px;
  border-bottom: 1px solid #e5e7eb;
}

.bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 60px;
  /* 必须有确定高度，否则子元素的百分比高度无法解析 */
  height: 100%;
}

/* 柱子绘制区：占满除标签外的空间，柱子的百分比高度以它为基准 */
.bar-area {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-height: 0;
}

.bar-value {
  font-size: 12px;
  font-weight: 600;
  color: #12a06a;
  margin-bottom: 4px;
}

.bar {
  width: 30px;
  min-height: 2px;
  background: linear-gradient(to top, #12a06a, #34d399);
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
  position: relative;
}

.bar:hover::after {
  content: attr(data-value);
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}

.bar-label {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}

/* ========== 图表标题行（含汇总） ========== */
.chart-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.chart-title-row .chart-title {
  margin-bottom: 0;
}
.chart-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: #64748b;
}
.chart-summary b {
  color: #1e293b;
  font-weight: 700;
}
.chart-summary .sum-delta {
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.chart-summary .sum-delta.up {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.chart-summary .sum-delta.down {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

/* ========== 用户增长专属（绿渐变柱 + 每日环比） ========== */
.user-growth-chart .bar {
  background: linear-gradient(to top, #16a34a, #4ade80);
}
.user-growth-chart .bar-value {
  color: #16a34a;
}
.bar-item {
  position: relative;
}
.bar-delta {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 8px;
  line-height: 1.4;
}
.bar-delta.up {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
}
.bar-delta.down {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
}

/* ========== 最近订单 ========== */

/* 搜索栏 */
.search-bar {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-item label {
  color: #64748b;
  white-space: nowrap;
}

.search-item input,
.search-item select {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  min-width: 140px;
}

.search-item input:focus,
.search-item select:focus {
  border-color: #12a06a;
}

.search-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

/* 表格 */
.table-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

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

.data-table th {
  background: #f8fafc;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  border-bottom: 1px solid #e2e8f0;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 14px;
}

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

.data-table img.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.data-table img.thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

/* 状态标签 */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background: #d1fae5;
  color: #059669;
}

.badge-warning {
  background: #fef3c7;
  color: #d97706;
}

.badge-danger {
  background: #fee2e2;
  color: #dc2626;
}

.badge-info {
  background: #dbeafe;
  color: #0b7a50;
}

.badge-secondary {
  background: #f1f5f9;
  color: #64748b;
}

/* 操作按钮组 */
.action-btns {
  display: flex;
  gap: 6px;
}

.action-btn {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.3s;
}

.action-btn.view {
  color: #12a06a;
  border-color: #12a06a;
}

.action-btn.view:hover {
  background: #12a06a;
  color: #fff;
}

.action-btn.edit {
  color: #f59e0b;
  border-color: #f59e0b;
}

.action-btn.edit:hover {
  background: #f59e0b;
  color: #fff;
}

.action-btn.delete {
  color: #ef4444;
  border-color: #ef4444;
}

.action-btn.delete:hover {
  background: #ef4444;
  color: #fff;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px 20px;
  gap: 8px;
  background: #fff;
  border-radius: 0 0 12px 12px;
}

.pagination-info {
  color: #64748b;
  font-size: 13px;
  margin-right: 16px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
  border-color: #12a06a;
  color: #12a06a;
}

.page-btn.active {
  background: #12a06a;
  border-color: #12a06a;
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #fff;
  border-radius: 12px;
  width: 500px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-20px);
  transition: transform 0.3s;
}

.modal-overlay.show .modal {
  transform: translateY(0);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}

.modal-close {
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

.modal-close:hover {
  color: #64748b;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 表单行 */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

/* 系统设置表单 */
.config-form {
  max-width: 600px;
}

/* 最近订单 */
.recent-orders {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.recent-orders th {
  background: #f8fafc;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  font-size: 13px;
  border-bottom: 1px solid #e2e8f0;
}

.recent-orders td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 14px;
}

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

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* Toast 提示 */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 24px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  z-index: 2000;
  transform: translateX(120%);
  transition: transform 0.3s;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: #10b981;
}

.toast.error {
  background: #ef4444;
}

.toast.info {
  background: #12a06a;
}

.toast.warning {
  background: #f59e0b;
}

/* 公告列表 */
.notice-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-info {
  flex: 1;
}

.notice-title {
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 6px;
}

.notice-meta {
  font-size: 12px;
  color: #94a3b8;
}

.notice-actions {
  display: flex;
  gap: 8px;
}

/* 星级评分显示 */
.stars {
  color: #f59e0b;
}

/* 响应式 */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-row {
    grid-template-columns: 1fr;
  }
}

/* ========== 手机端适配（App 内嵌 webview / 手机浏览器） ========== */
/* 汉堡按钮：桌面隐藏，手机显示 */
.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #1e293b;
  cursor: pointer;
  border-radius: 8px;
}
.menu-toggle:active {
  background: #f1f5f9;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* 手机端抽屉遮罩（common.js 动态注入） */
.sidebar-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 90;
}
.sidebar-mask.show {
  display: block;
}

/* ========== 手机端：基础响应式兜底（纯 CSS，任何情况生效） ========== */
@media (max-width: 640px) {
  /* 侧边栏变抽屉，主内容占满全宽 */
  .main-wrapper {
    margin-left: 0;
  }
  .sidebar {
    width: 230px;
    left: -240px;
    transition: left 0.25s ease;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
  }
  .menu-toggle {
    display: inline-flex;
  }

  /* 顶栏瘦身，管理员名字藏起来省空间 */
  .header {
    height: 52px;
    padding: 0 12px;
  }
  .header-left h1 {
    font-size: 16px;
  }
  .header-right {
    gap: 12px;
  }
  .admin-name {
    display: none;
  }

  /* 内容与卡片收紧 */
  .content {
    padding: 12px;
  }
  .card,
  .chart-container {
    padding: 14px;
    border-radius: 10px;
  }

  /* 仪表盘：统计卡 2 列，图表单列 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
  }
  .stat-card {
    padding: 14px;
  }
  .stat-info .stat-value {
    font-size: 22px;
  }
  .stat-info h3 {
    font-size: 12px;
  }
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .charts-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }

  /* 筛选栏：每项独占一行，输入框吃满剩余宽度、加高好点按 */
  .search-bar {
    padding: 14px 12px;
    gap: 12px;
  }
  .search-item {
    width: 100%;
  }
  .search-item label {
    min-width: 66px;
    font-size: 13px;
  }
  .search-item input,
  .search-item select {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 38px;
  }
  .search-actions {
    margin-left: 0;
    width: 100%;
  }
  .search-actions .btn {
    flex: 1;
    height: 40px;
  }

  /* 分页换行居中 */
  .pagination {
    justify-content: center;
    flex-wrap: wrap;
    padding: 12px;
  }

  /* 弹窗：手机上全屏，表单双列变单列 */
  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .modal-body {
    padding: 16px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }

  /* 登录页卡片留边距、收窄内边距 */
  .login-container {
    width: calc(100% - 32px);
    padding: 28px 22px;
  }

  /* 机手位置弹窗：手机端地图压到 300px 高 */
  #trackMap {
    height: 300px;
  }
  .track-row-sub {
    margin-top: 6px;
  }
  .track-stats {
    gap: 6px 12px;
    font-size: 12px;
    padding: 8px 10px;
  }
}

/* ========== 手机端：增强排版（html.mobile-viewport 由 common.js 开启） ==========
   核心变化：数据表格 → 卡片列表（每条记录一张白卡，字段名+值成对显示，
   操作按钮通栏在卡片底部），彻底告别横向拖动大表格。
   页面标题隐藏：与顶栏当前页名重复，省空间。 */
html.mobile-viewport .page-title {
  display: none;
}

/* 表格卡片化：容器与表不再横向滚动 */
html.mobile-viewport .table-wrapper {
  overflow: visible;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}
html.mobile-viewport .data-table {
  display: block;
  min-width: 0;
}
html.mobile-viewport .data-table thead {
  display: none; /* 字段名由 data-label 提供 */
}
html.mobile-viewport .data-table tbody {
  display: block;
}
/* 每行 = 一张卡片 */
html.mobile-viewport .data-table tbody tr {
  display: block;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
html.mobile-viewport .data-table tbody tr td {
  display: block;
  padding: 9px 14px;
  border-bottom: 1px dashed #eef2f7;
  font-size: 14px;
  white-space: normal;
  word-break: break-all;
}
html.mobile-viewport .data-table tbody tr td:last-child {
  border-bottom: none;
}
/* 有字段名的 td：「字段名 …… 值」两端对齐 */
html.mobile-viewport .data-table tbody tr td[data-label] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: right;
}
html.mobile-viewport .data-table tbody tr td[data-label]::before {
  content: attr(data-label);
  color: #94a3b8;
  font-size: 12px;
  flex-shrink: 0;
}
/* 首列加粗做卡片标题 */
html.mobile-viewport .data-table tbody tr td:first-child[data-label] {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
}
/* 操作按钮列（无 data-label）：通栏浅灰底，贴卡片底部 */
html.mobile-viewport .data-table tbody tr td:not([data-label]) {
  padding: 10px 14px;
  background: #f8fafc;
}
html.mobile-viewport .data-table .action-btns {
  flex-wrap: wrap;
  justify-content: flex-end;
}
html.mobile-viewport .data-table .action-btn {
  padding: 8px 14px;
  font-size: 13px;
}
html.mobile-viewport .data-table img.thumb {
  width: 48px;
  height: 48px;
}

/* ========== 机手实时位置弹窗（订单管理页） ========== */
.modal.modal-wide {
  width: 780px;
  max-width: 96%;
}
.track-toolbar {
  margin-bottom: 12px;
  font-size: 13px;
  color: #475569;
}
.track-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.track-row-sub {
  margin-top: 8px;
  font-size: 12px;
  color: #94a3b8;
}
.track-toolbar input[type="date"] {
  padding: 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
}
.track-toolbar .btn {
  width: auto;
  padding: 7px 18px;
  font-size: 13px;
}
.track-auto {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  color: #475569;
  font-size: 13px;
}
.track-tip {
  color: #94a3b8;
  font-size: 12px;
}
/* 卫星/电子图切换按钮 */
.track-mode-btn {
  width: auto;
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #606266;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.4;
}
.track-mode-btn:hover { border-color: #2b6de8; color: #2b6de8; }
#trackMap {
  height: 430px;
  border-radius: 10px;
  background: #eef2f7;
}
.track-stats {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  align-items: center;
}
.track-stats .warn {
  color: #dc2626;
  font-weight: 600;
}
/* 地址行：整行通栏、深色强调（地名是管理员最关心的信息） */
.track-stats .track-addr {
  width: 100%;
  color: #1e293b;
  font-weight: 600;
}
/* 经纬度等次要信息：浅色小字 */
.track-stats .dim {
  color: #cbd5e1;
  font-size: 12px;
}
/* 机手最新位置标记：圆形白底 + 拖拉机 emoji */
.track-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #fff;
  border: 2px solid #22c55e;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ========== 手机版专用界面层 ==========
   思路：手机上当 App 用 —— 底部标签栏 + 上滑「更多」面板 + 首页常用入口，
   电脑端完全不受影响（所有规则都挂在 html.mobile-viewport 下，
   这个类由 common.js 检测到手机时添加）。 */

html.mobile-viewport body {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

/* 手机上不用侧边栏，导航交给底部标签栏 */
html.mobile-viewport .sidebar,
html.mobile-viewport .sidebar-mask {
  display: none !important;
}
html.mobile-viewport .main-wrapper {
  margin-left: 0;
}
html.mobile-viewport .menu-toggle {
  display: none !important;
}

/* 顶栏：白底吸顶，只留标题 + 头像 */
html.mobile-viewport .header {
  height: 50px;
  padding: 0 14px;
  background: #fff;
  border-bottom: 1px solid #eef2f7;
  position: sticky;
  top: 0;
  z-index: 60;
}
html.mobile-viewport .header-left h1 {
  font-size: 17px;
}
html.mobile-viewport .admin-avatar {
  width: 32px;
  height: 32px;
  line-height: 32px;
}

/* ---------- 底部标签栏 ---------- */
.m-tabbar {
  display: none;
}
html.mobile-viewport .m-tabbar {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 130;
  background: #fff;
  border-top: 1px solid #e8edf4;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
}
.m-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0;
  color: #94a3b8;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.m-tab-icon {
  font-size: 20px;
  line-height: 1;
}
.m-tab-text {
  font-size: 11px;
}
.m-tab.active {
  color: #12a06a;
}
.m-tab-badge {
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: 6px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  text-align: center;
  display: none;
}

/* ---------- 「更多」面板 ---------- */
.m-sheet-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 140;
}
.m-sheet-mask.show {
  display: block;
}
.m-sheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  background: #f5f7fa;
  border-radius: 16px 16px 0 0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  transform: translateY(102%);
  transition: transform 0.25s ease;
  max-height: 78vh;
  overflow-y: auto;
}
html.mobile-viewport .m-sheet {
  display: block;
}
.m-sheet.show {
  transform: translateY(0);
}
.m-sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: #cbd5e1;
  margin: 8px auto 12px;
}
.m-sheet-title {
  padding: 0 18px 10px;
  font-size: 13px;
  color: #64748b;
}
.m-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 0 8px;
}
.m-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 10px;
  color: #334155;
  font-size: 12px;
  text-align: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.m-grid-item:active {
  background: #e8edf4;
}
.m-grid-icon {
  font-size: 22px;
  line-height: 1;
}
.m-grid-badge {
  position: absolute;
  top: 4px;
  right: 10px;
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  display: none;
}
.m-sheet-actions {
  display: flex;
  gap: 10px;
  padding: 14px 16px 6px;
  margin-top: 10px;
  border-top: 1px solid #e8edf4;
}
.m-sheet-btn {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  background: #fff;
  color: #334155;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.m-sheet-btn.primary {
  background: #12a06a;
  color: #fff;
}

/* ---------- 首页常用入口（核心模块大按钮） ---------- */
.m-quick {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
html.mobile-viewport .m-quick {
  display: grid;
}
.m-quick-item {
  background: #fff;
  border-radius: 12px;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.m-quick-item:active {
  background: #f1f5f9;
}
.m-quick-icon {
  font-size: 22px;
  line-height: 1;
}
.m-quick-badge {
  position: absolute;
  top: 4px;
  right: 10px;
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  display: none;
}

/* ==========================================================================
   视觉升级 v2（2026-11）— 绿色品牌主题
   纯覆盖层：只改视觉，不动结构与交互，所有后台页面统一生效
   ========================================================================== */
:root {
  --brand: #12a06a;
  --brand-light: #34d399;
  --brand-deep: #0b7a50;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #7b8a84;
  --line: rgba(15, 23, 42, .07);
  --bg: #f3f7f5;
  --surface: #ffffff;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .03);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, .04), 0 14px 30px -16px rgba(16, 24, 40, .22);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1100px 560px at 100% -12%, rgba(18, 160, 106, .08), transparent 62%), var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* 细滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c8d6d0; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #a7bcb3; }

/* ===== 侧边栏 ===== */
.sidebar {
  background: linear-gradient(180deg, #0c2a22 0%, #0d332a 55%, #0a2620 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06), 10px 0 30px -26px rgba(0, 0, 0, .6);
}
.sidebar::after {
  content: "";
  position: absolute;
  top: -80px;
  left: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(52, 211, 153, .22), transparent 68%);
  pointer-events: none;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.sidebar-logo h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.sidebar-menu {
  padding: 14px 12px 24px;
}
.sidebar-menu li {
  margin-bottom: 2px;
}
.sidebar-menu li a {
  position: relative;
  padding: 10px 14px;
  border-left: none;
  border-radius: 10px;
  color: #9fb5ad;
  font-size: 13.5px;
  font-weight: 500;
  transition: background .18s ease, color .18s ease;
}
.sidebar-menu li a:hover {
  background: rgba(255, 255, 255, .06);
  color: #e8f5ef;
}
.sidebar-menu li.active a {
  background: linear-gradient(90deg, rgba(22, 184, 122, .28), rgba(22, 184, 122, .07));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(22, 184, 122, .26);
}
.sidebar-menu li.active a::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6ee7b7, #10b981);
  box-shadow: 0 0 10px rgba(52, 211, 153, .8);
}
.sidebar-menu li a .icon {
  width: 22px;
  height: 22px;
  margin-right: 10px;
  font-size: 15px;
  opacity: .92;
}
.sidebar-badge {
  margin-left: auto;
  background: linear-gradient(135deg, #fb7185, #ef4444);
  box-shadow: 0 4px 10px -4px rgba(239, 68, 68, .8);
}

/* ===== 顶栏 ===== */
.header {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  border-bottom: none;
}
.header-left h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
}
.header-right { gap: 14px; }
.admin-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #34d399, #0b7a50);
  box-shadow: 0 8px 16px -8px rgba(12, 120, 80, .75);
}
.admin-name {
  font-weight: 600;
  color: var(--ink-2);
}

/* ===== 卡片 / 容器 ===== */
.card,
.chart-container,
.table-wrapper,
.search-bar,
.recent-orders {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-title,
.chart-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .01em;
}
.page-title {
  position: relative;
  padding-left: 14px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}
.page-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #34d399, #0b7a50);
  box-shadow: 0 2px 8px rgba(16, 185, 129, .45);
}

/* ===== 统计卡 ===== */
.stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -56px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, .16), transparent 70%);
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-info h3 {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: .02em;
}
.stat-info .stat-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.stat-icon {
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.stat-icon.blue { background: linear-gradient(135deg, #e9fbf3, #d5f5e6); }
.stat-icon.green { background: linear-gradient(135deg, #e4fbf1, #ccf5e3); }
.stat-icon.orange { background: linear-gradient(135deg, #fff2e4, #ffe4c7); }
.stat-icon.purple { background: linear-gradient(135deg, #f2edff, #e7dcff); }

/* ===== 柱状图 ===== */
.bar-chart {
  border-bottom: 1px dashed #e5eeea;
}
.bar {
  background: linear-gradient(to top, #0f8a5b, #34d399);
  border-radius: 6px 6px 0 0;
  box-shadow: 0 8px 16px -10px rgba(15, 138, 91, .7);
}
.bar-value {
  color: #0f8a5b;
  font-weight: 700;
}
.bar-label {
  color: var(--ink-3);
  font-size: 12px;
}

/* ===== 表单 / 搜索 ===== */
.search-item input,
.search-item select,
.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid #e3eae6;
  border-radius: 10px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search-item input:focus,
.search-item select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #16b87a;
  box-shadow: 0 0 0 3px rgba(22, 184, 122, .14);
  outline: none;
}
.search-item label,
.form-group label {
  color: var(--ink-2);
  font-weight: 500;
}

/* ===== 按钮 ===== */
.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #16b87a, #0f8a5b);
  box-shadow: 0 10px 20px -10px rgba(15, 138, 91, .7);
  border-radius: 10px;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1ac888, #0e7f53);
  transform: translateY(-1px);
  box-shadow: 0 14px 24px -12px rgba(15, 138, 91, .8);
}
.btn-secondary {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: var(--ink-2);
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* ===== 表格 ===== */
.data-table th,
.recent-orders th {
  background: #f7faf8;
  color: #6b7a74;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  border-bottom: 1px solid #eaf1ed;
}
.data-table td,
.recent-orders td {
  border-bottom: 1px solid #f2f6f4;
  color: #334155;
}
.data-table tbody tr:hover,
.recent-orders tbody tr:hover {
  background: #f6fbf8;
}
.data-table tbody tr:last-child td,
.recent-orders tbody tr:last-child td {
  border-bottom: none;
}

/* ===== 状态标签 ===== */
.badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.badge-success { border-color: rgba(16, 185, 129, .18); }
.badge-warning { border-color: rgba(245, 158, 11, .2); }
.badge-danger { border-color: rgba(239, 68, 68, .18); }
.badge-info { border-color: rgba(18, 160, 106, .18); }

/* ===== 分页 ===== */
.page-btn {
  border-radius: 10px;
  border-color: #e3eae6;
  transition: all .18s ease;
}
.page-btn:hover:not(:disabled) {
  border-color: #16b87a;
  color: #0f8a5b;
  background: #f2fbf7;
}
.page-btn.active {
  background: linear-gradient(135deg, #16b87a, #0f8a5b);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 16px -8px rgba(15, 138, 91, .7);
}

/* ===== 弹窗 ===== */
.modal {
  border-radius: 16px;
  box-shadow: 0 30px 80px -30px rgba(15, 23, 42, .45);
}

/* ===== 登录页 ===== */
.login-page {
  background:
    radial-gradient(720px 520px at 18% 12%, rgba(52, 211, 153, .35), transparent 62%),
    radial-gradient(680px 520px at 82% 88%, rgba(6, 78, 59, .55), transparent 60%),
    linear-gradient(135deg, #0f3d31 0%, #0b7a50 100%);
}
.login-container {
  border-radius: 22px;
  box-shadow: 0 40px 90px -40px rgba(2, 44, 34, .75), 0 0 0 1px rgba(255, 255, 255, .5) inset;
}
.login-logo h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.login-logo .login-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #16b87a, #0b7a50);
  box-shadow: 0 14px 26px -12px rgba(11, 122, 80, .85);
}
.login-logo .login-mark svg { width: 28px; height: 28px; }

/* ===== 桌面端尺寸微调（手机端媒体查询保持原样） ===== */
@media (min-width: 641px) {
  .header { height: 68px; padding: 0 28px; }
  .content { padding: 26px 28px; }
  .stat-card { padding: 22px 24px; }
  .recent-orders { padding: 22px 24px; }
}

/* ===== 线性图标统一（替换 emoji） ===== */
.sidebar-logo .sidebar-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6ee7b7;
  background: linear-gradient(135deg, rgba(52, 211, 153, .26), rgba(6, 78, 59, .5));
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, .28);
  flex: none;
}
.sidebar-logo .sidebar-mark svg { width: 20px; height: 20px; }
.sidebar-menu li a .icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.sidebar-menu li a .icon {
  color: #7ea79a;
  transition: color .18s ease;
}
.sidebar-menu li a:hover .icon { color: #a7f3d0; }
.sidebar-menu li.active a .icon { color: #6ee7b7; }

/* 统计卡线性图标：底色浅、图标品牌色，比彩色 emoji 更克制 */
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.blue   { color: #0f8a5b; background: linear-gradient(135deg, #e9fbf3, #d5f5e6); }
.stat-icon.green  { color: #12a06a; background: linear-gradient(135deg, #e9fbf3, #d5f5e6); }
.stat-icon.orange { color: #b45309; background: linear-gradient(135deg, #fff5e8, #ffe8cc); }
.stat-icon.purple { color: #6d5bd0; background: linear-gradient(135deg, #f4f0ff, #e9e0ff); }

/* 金额等数字统一等宽，表格更整齐 */
.recent-orders td:nth-child(3),
.data-table td .money {
  font-variant-numeric: tabular-nums;
}

/* 按钮文字不换行（窄搜索栏里「重置」曾被挤成两行） */
.btn,
.action-btn,
.page-btn {
  white-space: nowrap;
}

/* ==========================================================================
   侧边栏视觉升级 v3 —— 分区标题 + 图标底板 + 底部信息，解决“一整条深绿太单调”
   ========================================================================== */
.sidebar {
  background:
    radial-gradient(480px 320px at 6% -8%, rgba(52, 211, 153, .20), transparent 66%),
    radial-gradient(420px 340px at 104% 106%, rgba(6, 78, 59, .52), transparent 62%),
    linear-gradient(180deg, #0b2721 0%, #0d332a 52%, #08211c 100%);
}
.sidebar-logo-text { min-width: 0; }
.sidebar-logo .brand-sub {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .2em;
  color: rgba(167, 243, 208, .5);
}

.sidebar-menu { padding: 6px 10px 16px; position: relative; }

/* 分组标题：小字 + 渐隐细线 */
.sidebar-menu li.menu-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 8px 6px;
  padding: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  color: rgba(167, 243, 208, .42);
}
.sidebar-menu li.menu-group-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(110, 231, 183, .26), rgba(110, 231, 183, 0));
}

/* 菜单项：紧凑 + 图标底板 */
.sidebar-menu li {
  margin-bottom: 2px;
}
.sidebar-menu li a {
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
}
.sidebar-menu li a .icon {
  width: 28px;
  height: 28px;
  margin-right: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
  color: #8fafa4;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.sidebar-menu li a .icon svg { width: 16px; height: 16px; }
.sidebar-menu li a .menu-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-menu li a:hover .icon {
  background: rgba(52, 211, 153, .16);
  color: #bff3e0;
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, .22);
}

/* 激活胶囊滑块：切页时从上一项顺滑「滑」到当前项，替换原来瞬间跳过去的高亮 */
.sidebar-menu .menu-glider {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 40px;
  border-radius: 11px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(22, 184, 122, .34), rgba(22, 184, 122, .05));
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .3), 0 12px 24px -18px rgba(0, 0, 0, .9);
  transform: translateY(0);
  will-change: transform;
  /* 不再给 opacity 加过渡：切页时胶囊必须是"立刻可见"，否则会闪一下 */
  transition:
    transform .55s cubic-bezier(.34, 1.3, .5, 1),
    height .35s cubic-bezier(.34, 1.3, .5, 1);
}
.sidebar-menu .menu-glider.glide-in { opacity: 1; }
/* 左侧高亮竖条 + 右侧亮点，跟着滑块一起走 */
.sidebar-menu .menu-glider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6ee7b7, #10b981);
  box-shadow: 0 0 10px rgba(52, 211, 153, .8);
}
.sidebar-menu .menu-glider::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 9px rgba(52, 211, 153, .9);
}

/* 滑块接管高亮后，激活项自身就不必再画一层胶囊（避免重影）；JS 没跑起来时保留原样式兜底 */
.sidebar-menu.glider-ready li.active a {
  background: transparent;
  box-shadow: none;
}
.sidebar-menu.glider-ready li.active a::before,
.sidebar-menu.glider-ready li.active a::after { display: none; }

/* 激活项：更亮 + 渐变胶囊 + 描边 + 右侧亮点 */
.sidebar-menu li.active a {
  color: #f4fffb;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(22, 184, 122, .34), rgba(22, 184, 122, .05));
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .3), 0 12px 24px -18px rgba(0, 0, 0, .9);
}
.sidebar-menu li.active a .icon {
  background: rgba(52, 211, 153, .22);
  color: #d6fff0;
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, .35);
}
.sidebar-menu li.active a::before {
  left: 3px;
  height: 16px;
}
.sidebar-menu li.active a::after {
  content: "";
  margin-left: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 9px rgba(52, 211, 153, .9);
  flex: none;
}

/* 底部版本信息，收住整栏视觉 */
.sidebar-foot {
  margin: 8px 18px 22px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: rgba(167, 243, 208, .34);
  white-space: nowrap;
}

/* 分组色相：五组图标各一种色，配同色分组小圆点，整栏不再一味深绿 */
.sidebar-menu li.tone-overview .icon { color: #6ee7b7; }
.sidebar-menu li.tone-ops .icon      { color: #7dd3fc; }
.sidebar-menu li.tone-credit .icon   { color: #fcd34d; }
.sidebar-menu li.tone-data .icon     { color: #c4b5fd; }
.sidebar-menu li.tone-system .icon   { color: #dbe6f2; }
.sidebar-menu li a .icon {
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.sidebar-menu li a:hover .icon {
  background: rgba(255, 255, 255, .13);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
/* 激活项保持品牌绿（优先级需盖过分组色） */
.sidebar-menu li.active a .icon,
.sidebar-menu li.active a:hover .icon {
  color: #d6fff0;
  background: rgba(52, 211, 153, .22);
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, .35);
}

/* 分组标题：同色小方块 + 渐隐细线 */
.sidebar-menu li.menu-group-label {
  color: rgba(210, 255, 238, .58);
}
.sidebar-menu li.menu-group-label::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 1px;
  flex: none;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}
.sidebar-menu li.menu-group-label::after {
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: .5;
}
.sidebar-menu li.menu-group-label.tone-overview { color: rgba(110, 231, 183, .72); }
.sidebar-menu li.menu-group-label.tone-ops      { color: rgba(125, 211, 252, .68); }
.sidebar-menu li.menu-group-label.tone-credit   { color: rgba(252, 211, 77, .66); }
.sidebar-menu li.menu-group-label.tone-data     { color: rgba(196, 181, 253, .70); }
.sidebar-menu li.menu-group-label.tone-system   { color: rgba(219, 230, 242, .68); }

/* ==========================================================================
   管理后台动效 —— 参照参赛版 page-enter / adminBounceIn 错落动画
   1) 登录跳转：品牌幕布圆形扩散
   2) 进入页面：侧栏菜单逐项滑入、顶栏下落、内容条目 Q 弹错落飞入
   3) 条目之后：按钮、表格行、行内操作按钮依次弹入
   4) 菜单切页：内容整体退场 + 幕布擦过
   ========================================================================== */
@keyframes adminBounceIn {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes adminBounceOut {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(16px) scale(.97); }
}
@keyframes sideItemIn {
  0%   { opacity: 0; transform: translateX(-16px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes headerDropIn {
  0%   { opacity: 0; transform: translateY(-14px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes btnPopIn {
  0%   { opacity: 0; transform: scale(.88); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes cardSoftIn {
  0%   { opacity: 0; transform: scale(.97); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes rowIn {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 1) 侧栏菜单逐项滑入（只在进入后台的第一屏播放，由 common.js 给 body 加 boot-in） */
.boot-in .sidebar-menu > li {
  animation: sideItemIn .4s cubic-bezier(.34, 1.75, .5, 1) backwards;
}
.boot-in .sidebar-menu > li:nth-child(1)  { animation-delay: 30ms; }
.boot-in .sidebar-menu > li:nth-child(2)  { animation-delay: 48ms; }
.boot-in .sidebar-menu > li:nth-child(3)  { animation-delay: 66ms; }
.boot-in .sidebar-menu > li:nth-child(4)  { animation-delay: 84ms; }
.boot-in .sidebar-menu > li:nth-child(5)  { animation-delay: 102ms; }
.boot-in .sidebar-menu > li:nth-child(6)  { animation-delay: 120ms; }
.boot-in .sidebar-menu > li:nth-child(7)  { animation-delay: 138ms; }
.boot-in .sidebar-menu > li:nth-child(8)  { animation-delay: 156ms; }
.boot-in .sidebar-menu > li:nth-child(n+9) { animation-delay: 174ms; }

/* 顶栏下落（同样只在进入后台的第一屏） */
.boot-in .header {
  animation: headerDropIn .45s cubic-bezier(.22, 1, .36, 1) backwards;
}

/* 2) 内容区顶层条目柔和上浮错落（page-enter 由 common.js 添加，1.5s 后移除） */
.content.page-enter > * {
  animation: adminBounceIn .42s cubic-bezier(.22, 1, .36, 1) backwards;
}
.content.page-enter > *:nth-child(1)  { animation-delay: 30ms; }
.content.page-enter > *:nth-child(2)  { animation-delay: 50ms; }
.content.page-enter > *:nth-child(3)  { animation-delay: 70ms; }
.content.page-enter > *:nth-child(4)  { animation-delay: 90ms; }
.content.page-enter > *:nth-child(5)  { animation-delay: 110ms; }
.content.page-enter > *:nth-child(6)  { animation-delay: 130ms; }
.content.page-enter > *:nth-child(7)  { animation-delay: 150ms; }
.content.page-enter > *:nth-child(8)  { animation-delay: 170ms; }
.content.page-enter > *:nth-child(n+9){ animation-delay: 190ms; }

/* 统计卡在栅格内再错落一次，四张卡先后轻轻浮现（位移交给父级栅格，避免叠加位移） */
.content.page-enter .stats-grid .stat-card {
  animation: cardSoftIn .44s cubic-bezier(.34, 1.75, .5, 1) backwards;
}
.content.page-enter .stats-grid .stat-card:nth-child(1) { animation-delay: 75ms; }
.content.page-enter .stats-grid .stat-card:nth-child(2) { animation-delay: 100ms; }
.content.page-enter .stats-grid .stat-card:nth-child(3) { animation-delay: 125ms; }
.content.page-enter .stats-grid .stat-card:nth-child(n+4) { animation-delay: 150ms; }

/* 3) 按钮在条目之后弹入（表格行内的 action-btn 单独处理，不重复叠加） */
.content.page-enter .btn:not(.action-btn) {
  animation: btnPopIn .4s cubic-bezier(.34, 1.75, .5, 1) 320ms backwards;
}

/* 表格数据行飞入（每次渲染/翻页都会播放，异步加载的数据也能覆盖到） */
.data-table tbody tr,
.recent-orders tbody tr {
  animation: rowIn .4s cubic-bezier(.22, 1, .36, 1) backwards;
}
.data-table tbody tr:nth-child(1),
.recent-orders tbody tr:nth-child(1)  { animation-delay: 200ms; }
.data-table tbody tr:nth-child(2),
.recent-orders tbody tr:nth-child(2)  { animation-delay: 240ms; }
.data-table tbody tr:nth-child(3),
.recent-orders tbody tr:nth-child(3)  { animation-delay: 280ms; }
.data-table tbody tr:nth-child(4),
.recent-orders tbody tr:nth-child(4)  { animation-delay: 320ms; }
.data-table tbody tr:nth-child(5),
.recent-orders tbody tr:nth-child(5)  { animation-delay: 360ms; }
.data-table tbody tr:nth-child(6),
.recent-orders tbody tr:nth-child(6)  { animation-delay: 400ms; }
.data-table tbody tr:nth-child(7),
.recent-orders tbody tr:nth-child(7)  { animation-delay: 440ms; }
.data-table tbody tr:nth-child(8),
.recent-orders tbody tr:nth-child(8)  { animation-delay: 480ms; }
.data-table tbody tr:nth-child(n+9),
.recent-orders tbody tr:nth-child(n+9) { animation-delay: 520ms; }

/* 4) 切页退场：内容整体下沉淡出（page-leave 由 common.js 添加） */
.content.page-leave > * {
  animation: adminBounceOut .15s ease-in forwards;
}

/* 4.1) 快速切页的入场：整块内容淡入，替代"瞬间出现" */
.content.page-enter-soft {
  animation: adminSoftIn .32s cubic-bezier(.22, .8, .3, 1) 40ms both;
}
@keyframes adminSoftIn {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   转场幕布 v2 —— 深空青绿 + 极光流光 + 金/青点缀
   ① 从点击位置长出的圆形扩散  ② 缓慢旋转的极光  ③ 环形进度 + 百分比
   ========================================================================== */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

/* 承载所有背景层的舞台：整体做圆形裁剪扩散 */
.page-transition .pt-stage {
  position: absolute;
  inset: 0;
  clip-path: circle(0px at var(--pt-x, 50%) var(--pt-y, 50%));
  transition: clip-path .68s cubic-bezier(.72, 0, .2, 1);
}
.page-transition.pt-run .pt-stage {
  clip-path: circle(160% at var(--pt-x, 50%) var(--pt-y, 50%));
}

.page-transition .pt-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 560px at 16% 10%, rgba(16, 185, 129, .30), transparent 66%),
    radial-gradient(720px 600px at 88% 90%, rgba(34, 211, 238, .22), transparent 64%),
    radial-gradient(560px 460px at 78% 8%, rgba(243, 217, 164, .16), transparent 62%),
    linear-gradient(150deg, #04150f 0%, #06231c 48%, #030f0c 100%);
}

/* 极光：两团缓慢漂移的色场（翡翠绿 / 青蓝 + 香槟金），比单一圆锥渐变更有层次 */
.page-transition .pt-aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.page-transition .pt-aurora::before {
  content: '';
  position: absolute;
  left: -20%;
  top: -28%;
  width: 96vmax;
  height: 96vmax;
  background: radial-gradient(circle at 50% 50%,
    rgba(52, 211, 153, .50),
    rgba(16, 185, 129, .26) 44%,
    transparent 68%);
  filter: blur(60px);
  animation: ptDriftA 16s ease-in-out infinite;
}
.page-transition .pt-aurora::after {
  content: '';
  position: absolute;
  right: -26%;
  bottom: -32%;
  width: 104vmax;
  height: 104vmax;
  background:
    radial-gradient(circle at 40% 40%, rgba(34, 211, 238, .34), transparent 58%),
    radial-gradient(circle at 62% 58%, rgba(243, 217, 164, .26), transparent 56%);
  filter: blur(72px);
  animation: ptDriftB 21s ease-in-out infinite;
}
@keyframes ptDriftA {
  50% { transform: translate3d(9vmax, 6vmax, 0) scale(1.12); }
}
@keyframes ptDriftB {
  50% { transform: translate3d(-8vmax, -7vmax, 0) scale(1.14); }
}

/* 细网格 + 四角暗角 */
.page-transition .pt-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(72% 72% at 50% 50%, #000, transparent 78%);
  mask-image: radial-gradient(72% 72% at 50% 50%, #000, transparent 78%);
}
.page-transition .pt-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(82% 72% at 50% 50%, transparent 38%, rgba(0, 12, 8, .58) 100%);
}
/* 中央柔光：让品牌区从背景里"浮"出来 */
.page-transition .pt-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(44% 38% at 50% 46%, rgba(52, 211, 153, .18), transparent 72%);
  pointer-events: none;
}

/* 一道斜向高光扫过，增加“质感” */
.page-transition .pt-sheen {
  position: absolute;
  inset: -20%;
  background: linear-gradient(102deg, transparent 42%, rgba(255, 255, 255, .09) 50%, transparent 58%);
  transform: translateX(-62%);
  animation: ptSheen 1.5s cubic-bezier(.4, 0, .2, 1) .12s forwards;
  pointer-events: none;
}
@keyframes ptSheen { to { transform: translateX(62%); } }

/* —— 中央品牌区 —— */
.page-transition .pt-brand {
  position: relative;
  z-index: 2;
  text-align: center;
  opacity: 0;
  transform: translateY(14px) scale(.96);
  /* 等圆形扩散铺开再浮现，避免文字浮在"半遮半掩"的背景上显脏 */
  transition:
    opacity .4s cubic-bezier(.22, 1, .36, 1) .4s,
    transform .5s cubic-bezier(.34, 1.4, .5, 1) .4s;
}
.page-transition.pt-run .pt-brand { opacity: 1; transform: none; }

.pt-ring {
  position: relative;
  width: 94px;
  height: 94px;
  margin: 0 auto 18px;
}
.pt-orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.pt-orbit-track {
  fill: none;
  stroke: rgba(255, 255, 255, .1);
  stroke-width: 1.2;
}
.pt-orbit-arc {
  fill: none;
  stroke: url(#ptGrad);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, .65));
  transition: stroke-dashoffset .12s linear;
}
.pt-orbit-spin {
  fill: none;
  stroke: rgba(243, 217, 164, .55);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 7 232;
  transform-origin: 50% 50%;
  animation: ptSpin 2.6s linear infinite;
}
@keyframes ptSpin { to { transform: rotate(360deg); } }

.pt-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eafff6;
  background: linear-gradient(150deg, rgba(52, 211, 153, .34), rgba(6, 46, 37, .92));
  box-shadow:
    inset 0 0 0 1px rgba(167, 243, 208, .34),
    0 0 40px -6px rgba(52, 211, 153, .55);
}
.pt-mark svg { width: 26px; height: 26px; }

.pt-name {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .18em;
  text-indent: .18em;
  background: linear-gradient(100deg, #ffffff 8%, #a7f3d0 50%, #f3d9a4 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.pt-sub {
  margin-top: 10px;
  font-size: 11.5px;
  letter-spacing: .26em;
  color: rgba(214, 245, 233, .5);
}
.pt-pct {
  color: #f3d9a4;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}

.pt-bar {
  position: relative;
  width: 168px;
  height: 2px;
  margin: 20px auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}
.pt-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #6ee7b7, #22d3ee 55%, #f3d9a4);
  box-shadow: 0 0 14px rgba(52, 211, 153, .8);
  transition: width .12s linear;
}

/* ===== 跨页衔接遮罩：跳转后新页面立刻盖上同色幕布，加载完再淡出 ===== */
.page-veil {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background:
    radial-gradient(720px 520px at 18% 12%, rgba(16, 185, 129, .24), transparent 64%),
    radial-gradient(660px 540px at 86% 88%, rgba(34, 211, 238, .14), transparent 62%),
    linear-gradient(150deg, #04160f 0%, #062a20 46%, #03120d 100%);
  transition: opacity .38s ease, visibility .38s ease;
}
.page-veil.veil-out { opacity: 0; visibility: hidden; }
.page-veil .pv-mark {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eafff6;
  background: linear-gradient(150deg, rgba(52, 211, 153, .34), rgba(6, 46, 37, .92));
  box-shadow:
    inset 0 0 0 1px rgba(167, 243, 208, .34),
    0 0 40px -6px rgba(52, 211, 153, .5);
  animation: pvPulse 1.4s ease-in-out infinite;
}
.page-veil .pv-mark svg { width: 24px; height: 24px; }
@keyframes pvPulse {
  0%, 100% { transform: scale(1); opacity: .96; }
  50%      { transform: scale(1.06); opacity: 1; }
}
.page-veil .pv-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .28em;
  text-indent: .28em;
  color: rgba(214, 245, 233, .72);
}

/* 无障碍：用户系统开启「减少动态效果」时，全部动效关闭 */
@media (prefers-reduced-motion: reduce) {
  .boot-in .sidebar-menu > li,
  .boot-in .header,
  .content.page-enter > *,
  .content.page-enter .stats-grid .stat-card,
  .content.page-enter .btn:not(.action-btn),
  .data-table tbody tr,
  .recent-orders tbody tr,
  .content.page-leave > *,
  .page-transition .pt-brand,
  .page-transition .pt-aurora,
  .page-transition .pt-aurora::before,
  .page-transition .pt-aurora::after,
  .page-transition .pt-sheen,
  .pt-orbit-spin,
  .page-veil .pv-mark {
    animation: none !important;
  }
  .page-transition .pt-stage { transition-duration: .01s !important; }
  .sidebar-menu .menu-glider { transition: none !important; }
}

/* ==========================================================================
   登录页 v4 —— 左品牌 / 右表单 分栏（替代原先整屏一块深绿）
   ========================================================================== */
body.login-split {
  display: block;
  background: #f6faf8;
}
.login-shell {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  min-height: 100vh;
}

/* —— 左侧品牌区 —— */
.login-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 46px clamp(28px, 3.8vw, 56px);
  color: #effff8;
  background:
    radial-gradient(760px 580px at 2% -6%, rgba(52, 211, 153, .30), transparent 60%),
    radial-gradient(660px 540px at 102% 104%, rgba(2, 36, 28, .82), transparent 62%),
    linear-gradient(158deg, #0c3128 0%, #0e5140 50%, #052a22 100%);
}
/* 细网格纹理：左上清晰、右下渐隐 */
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(140% 110% at 10% 0%, #000 0%, rgba(0, 0, 0, .22) 46%, transparent 74%);
  mask-image: radial-gradient(140% 110% at 10% 0%, #000 0%, rgba(0, 0, 0, .22) 46%, transparent 74%);
  pointer-events: none;
}
.lb-watermark {
  position: absolute;
  right: -64px;
  bottom: -76px;
  width: 310px;
  height: 310px;
  color: rgba(167, 243, 208, .075);
  pointer-events: none;
  z-index: 0;
}
.lb-watermark svg { width: 100%; height: 100%; stroke-width: .55; }

.lb-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-logo {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}
.lb-logo svg { width: 22px; height: 22px; }
.lb-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  white-space: nowrap;
  flex: none;
}
.lb-tag {
  margin-left: 2px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(167, 243, 208, .72);
  border: 1px solid rgba(110, 231, 183, .26);
  white-space: nowrap;
  flex: none;
}

.lb-mid {
  position: relative;
  z-index: 1;
  max-width: 470px;
}
.lb-mid h2 {
  font-size: clamp(25px, 3.3vw, 40px);
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -.01em;
  background: linear-gradient(118deg, #ffffff 12%, #a7f3d0 88%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.lb-desc {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(226, 255, 245, .62);
}
.lb-points {
  margin-top: 28px;
  list-style: none;
  display: grid;
  gap: 12px;
}
.lb-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(226, 255, 245, .8);
}
.lb-points li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  margin-top: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, .85);
}
.lb-foot {
  position: relative;
  z-index: 1;
  font-size: 11.5px;
  letter-spacing: .06em;
  color: rgba(167, 243, 208, .42);
  white-space: nowrap;
}

/* —— 右侧表单区 —— */
.login-form-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px 32px;
  background:
    radial-gradient(580px 470px at 90% 2%, rgba(18, 160, 106, .13), transparent 62%),
    radial-gradient(520px 430px at 0% 100%, rgba(52, 211, 153, .13), transparent 60%),
    #f6faf8;
}
.login-mobile-brand { display: none; }

body.login-split .login-container {
  width: 392px;
  max-width: 100%;
  padding: 38px 34px 32px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow:
    0 1px 2px rgba(16, 24, 40, .04),
    0 34px 66px -38px rgba(6, 46, 37, .5);
}
.login-head { margin-bottom: 26px; }
.login-head h1 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #0f172a;
}
.login-head p {
  margin-top: 8px;
  font-size: 13px;
  color: #7b8a84;
}
body.login-split .form-group { margin-bottom: 18px; }
body.login-split .form-group label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #55655f;
}
body.login-split .form-group input {
  padding: 12px 14px;
  border-radius: 10px;
  border-color: rgba(15, 23, 42, .09);
  background: #f8fbf9;
}
body.login-split .form-group input:focus {
  background: #fff;
  border-color: #16b87a;
}
body.login-split .btn-primary {
  margin-top: 4px;
  border-radius: 11px;
  letter-spacing: .18em;
  font-size: 15px;
}
/* 浏览器自动填充的淡蓝底在绿色主题里很跳，压成浅绿 */
body.login-split .login-container input:-webkit-autofill,
body.login-split .login-container input:-webkit-autofill:hover,
body.login-split .login-container input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  -webkit-box-shadow: 0 0 0 1000px #f4f9f6 inset;
  caret-color: #0f172a;
  transition: background-color 100000s ease-in-out 0s;
}

/* 窄屏：收成单列，品牌区折叠为顶部一行 */
@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .login-mobile-brand .lb-logo {
    background: linear-gradient(135deg, #16b87a, #0b7a50);
    box-shadow: 0 12px 24px -14px rgba(11, 122, 80, .9);
  }
  .login-mobile-brand .lb-name { font-size: 18px; }
}
@media (max-width: 480px) {
  .login-form-side { padding: 32px 18px; }
  body.login-split .login-container { padding: 30px 22px 26px; border-radius: 18px; }
  .login-head h1 { font-size: 21px; }
}

/* ===== 仪表盘：待处理事项 / 平台构成 ===== */
.dash-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.mini-item {
  display: block;
  padding: 14px 12px;
  border-radius: 12px;
  background: #f7fbf9;
  border: 1px solid #e8f1ec;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.mini-item:hover {
  transform: translateY(-2px);
  border-color: #bfe8d5;
  box-shadow: 0 10px 20px -14px rgba(15, 138, 91, .65);
}
.mini-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: #0f172a;
  letter-spacing: -.01em;
}
.mini-value.warn { color: #d97706; }
.mini-value.ok { color: #0f8a5b; }
.mini-label {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-bar {
  margin-top: 9px;
  height: 5px;
  border-radius: 4px;
  background: #eaf2ee;
  overflow: hidden;
}
.mini-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #34d399, #12a06a);
  transition: width .7s cubic-bezier(.22, 1, .36, 1);
}
.mini-bar i.warn {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

/* 订单状态环形图 */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 196px;
}
.donut {
  width: 164px;
  height: 164px;
  flex: 0 0 auto;
}
.donut-seg {
  transition: stroke-dasharray .8s cubic-bezier(.22, 1, .36, 1), stroke-dashoffset .8s cubic-bezier(.22, 1, .36, 1);
}
.donut-legend {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 9px;
}
.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.2;
}
.donut-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.donut-legend-item .name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.donut-legend-item .num {
  font-weight: 600;
  color: #0f172a;
}
.donut-legend-item .pct {
  width: 42px;
  text-align: right;
  color: #94a3b8;
  font-size: 12px;
}

/* 用户结构横向条形图 */
.hbar-list {
  display: grid;
  gap: 15px;
  padding-top: 6px;
}
.hbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #475569;
  margin-bottom: 6px;
}
.hbar-head b {
  color: #0f172a;
  font-weight: 600;
}
.hbar-track {
  height: 10px;
  border-radius: 6px;
  background: #f1f5f9;
  overflow: hidden;
}
.hbar-track i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #34d399, #12a06a);
  transition: width .8s cubic-bezier(.22, 1, .36, 1);
}
.hbar-track i.cyan { background: linear-gradient(90deg, #67e8f9, #22d3ee); }
.hbar-track i.warn { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.pending-card { margin-bottom: 24px; }

/* 详情弹窗顶部数据块（用户 / 农机） */
.detail-metrics {
  display: grid;
  gap: 10px;
  margin: 0 0 6px;
}
.detail-metrics-4 { grid-template-columns: repeat(4, 1fr); }
.detail-metrics-5 { grid-template-columns: repeat(5, 1fr); }
.detail-metric {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7fbf9;
  border: 1px solid #e8f1ec;
  min-width: 0;
}
.detail-metric-center {
  padding: 10px 8px;
  text-align: center;
}
.dm-label {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-value {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
  word-break: break-all;
}
.dm-value.ok { color: #0f8a5b; }
.dm-value.warn { color: #d97706; }
.dm-value.danger { color: #e11d48; }

/* 手机排版（html.mobile-viewport 由 common.js 按屏宽 / UA 开启） */
html.mobile-viewport .dash-split {
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
html.mobile-viewport .pending-card { margin-bottom: 12px; }
html.mobile-viewport .mini-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
html.mobile-viewport .mini-item { padding: 10px; }
html.mobile-viewport .mini-value { font-size: 18px; }
html.mobile-viewport .mini-label { font-size: 11px; }
html.mobile-viewport .donut-wrap {
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
html.mobile-viewport .donut { width: 140px; height: 140px; }
html.mobile-viewport .donut-legend {
  width: 100%;
  grid-template-columns: repeat(2, 1fr);
}
html.mobile-viewport .detail-metrics-4,
html.mobile-viewport .detail-metrics-5 { grid-template-columns: repeat(2, 1fr); }
html.mobile-viewport .dm-value { font-size: 15px; }

/* 手机端弹窗：全屏、表单单列、底部按钮等宽好点按 */
html.mobile-viewport .modal {
  width: 100%;
  max-width: 100%;
  max-height: 100vh;
  border-radius: 0;
}
html.mobile-viewport .modal-body { padding: 16px; }
html.mobile-viewport .form-row { grid-template-columns: 1fr; }
html.mobile-viewport .modal-footer {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}
html.mobile-viewport .modal-footer .btn { flex: 1; }

@media (max-width: 1024px) {
  .dash-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dash-split { gap: 12px; margin-bottom: 12px; }
  .pending-card { margin-bottom: 12px; }
  .mini-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .mini-item { padding: 10px; }
  .mini-value { font-size: 18px; }
  .mini-label { font-size: 11px; }
  .donut-wrap { flex-direction: column; gap: 14px; min-height: 0; }
  .donut { width: 140px; height: 140px; }
  .donut-legend { width: 100%; grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   iOS 液态玻璃主题（覆盖层）
   浅色磨砂玻璃 + 柔和光晕 + 自然圆角，去掉深色科技感
   ============================================================ */
:root {
  --brand: #1f9d6f;
  --brand-light: #63cca6;
  --brand-deep: #17835c;
  --ink: #1f2a37;
  --ink-2: #4b5563;
  --ink-3: #8a949e;
  --line: rgba(15, 23, 42, 0.055);
  --bg: #eef2f7;
  --surface: rgba(255, 255, 255, 0.64);
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-sm: 0 12px 30px -26px rgba(31, 45, 61, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --shadow-md: 0 24px 46px -30px rgba(31, 45, 61, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --glass: rgba(255, 255, 255, 0.6);
  --glass-soft: rgba(255, 255, 255, 0.42);
  --glass-border: rgba(255, 255, 255, 0.72);
}

/* 页面底色：极淡的浅蓝/浅绿/浅杏光晕，安静自然 */
body {
  background:
    radial-gradient(520px 640px at 1% 2%, rgba(148, 204, 255, 0.5) 0%, rgba(148, 204, 255, 0) 66%),
    radial-gradient(480px 560px at -2% 98%, rgba(166, 238, 208, 0.48) 0%, rgba(166, 238, 208, 0) 66%),
    radial-gradient(920px 540px at 6% -8%, rgba(168, 213, 255, 0.4) 0%, rgba(168, 213, 255, 0) 62%),
    radial-gradient(860px 540px at 98% 2%, rgba(178, 234, 212, 0.42) 0%, rgba(178, 234, 212, 0) 60%),
    radial-gradient(780px 520px at 56% 106%, rgba(255, 226, 198, 0.34) 0%, rgba(255, 226, 198, 0) 62%),
    linear-gradient(180deg, #f3f6fa 0%, #eaeff6 100%);
  color: var(--ink);
}

/* 滚动条：更淡 */
::-webkit-scrollbar-thumb { background: rgba(31, 45, 61, 0.16); }
::-webkit-scrollbar-thumb:hover { background: rgba(31, 45, 61, 0.26); }

/* ===== 侧边栏：白色磨砂玻璃 ===== */
.sidebar {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.65), 14px 0 44px -38px rgba(31, 45, 61, 0.45);
}
.sidebar::after { display: none; }
.sidebar-logo { border-bottom: 1px solid rgba(15, 23, 42, 0.06); }
.sidebar-logo h2 {
  color: #16202b;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-shadow: none;
}
.sidebar-menu li a { color: #55616e; }
.sidebar-menu li a:hover {
  background: rgba(255, 255, 255, 0.55);
  color: #16202b;
}
.sidebar-menu li.active a { color: #101a24; }
.sidebar-menu li a .icon,
.sidebar-menu li.tone-overview .icon,
.sidebar-menu li.tone-ops .icon,
.sidebar-menu li.tone-credit .icon,
.sidebar-menu li.tone-data .icon,
.sidebar-menu li.tone-system .icon { color: #6b7784; }
.sidebar-menu li a:hover .icon { color: #38424f; }
.sidebar-menu li.active a .icon,
.sidebar-menu li.active a:hover .icon { color: var(--brand); }
.sidebar-menu li.menu-group-label,
.sidebar-menu li.menu-group-label.tone-overview,
.sidebar-menu li.menu-group-label.tone-ops,
.sidebar-menu li.menu-group-label.tone-credit,
.sidebar-menu li.menu-group-label.tone-data,
.sidebar-menu li.menu-group-label.tone-system { color: #9aa4b0; }
.sidebar-menu li.menu-group-label::before,
.sidebar-menu li.menu-group-label::after { background: rgba(15, 23, 42, 0.09); }

/* 激活胶囊：一块白色玻璃，不再有绿色渐变和竖条 */
.sidebar-menu .menu-glider {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px -16px rgba(31, 45, 61, 0.5), inset 0 1px 0 #fff;
}
.sidebar-menu .menu-glider::before,
.sidebar-menu .menu-glider::after { display: none; }

/* 兜底：强制浅色玻璃侧栏，避免任何旧深色规则抢回背景 */
#sidebar.sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.55) 46%, rgba(255, 255, 255, 0.76) 100%) !important;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-right: 1px solid rgba(15, 23, 42, 0.09);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    12px 0 30px -26px rgba(31, 45, 61, 0.5) !important;
}
/* 白色胶囊是定位层，必须垫到菜单项下面，否则会盖住文字 */
.sidebar-menu > li {
  position: relative;
  z-index: 1;
}
.sidebar-menu .menu-glider { z-index: 0; }
/* 选中项：白胶囊 + 深色文字 + 品牌绿图标（用 ID 前缀压住所有旧规则） */
#sidebar .sidebar-menu .menu-glider {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 2px 4px -1px rgba(31, 45, 61, 0.1),
    0 8px 18px -10px rgba(31, 45, 61, 0.28) !important;
}
/* 菜单项胶囊与选中胶囊对齐、圆角统一，hover 是一层很淡的白雾 */
#sidebar .sidebar-menu li a {
  border-radius: 12px;
}
#sidebar .sidebar-menu li a:hover {
  background: rgba(255, 255, 255, 0.72);
}
#sidebar .sidebar-menu li.active > a { color: #0f172a !important; }
#sidebar .sidebar-menu li.active > a .icon {
  background: rgba(31, 157, 111, 0.12) !important;
  color: #17835c !important;
  box-shadow: inset 0 0 0 1px rgba(31, 157, 111, 0.14) !important;
}
#sidebar .sidebar-menu li a:hover .icon {
  background: rgba(31, 157, 111, 0.08);
  color: #1f9d6f;
  box-shadow: inset 0 0 0 1px rgba(31, 157, 111, 0.1);
}
#sidebar .sidebar-menu li a:hover { color: #16202b; }
/* 分组标题原本太淡，加深一档 */
#sidebar .sidebar-menu li.menu-group-label,
#sidebar .sidebar-menu li.menu-group-label.tone-overview,
#sidebar .sidebar-menu li.menu-group-label.tone-ops,
#sidebar .sidebar-menu li.menu-group-label.tone-credit,
#sidebar .sidebar-menu li.menu-group-label.tone-data,
#sidebar .sidebar-menu li.menu-group-label.tone-system { color: #7c8794 !important; }
/* LOGO：绿底 + 白色图标（原来浅绿图标压在绿底上，看不清） */
.sidebar-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px !important;
  background: linear-gradient(160deg, #5ad9ae 0%, #24ab7c 52%, #14805a 100%) !important;
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), inset 0 -1px 2px rgba(9, 61, 44, 0.28), 0 10px 20px -12px rgba(21, 127, 89, 0.8) !important;
}
/* 原来用浅色半透明白字的几处，放到浅底上会看不见 */
.brand-sub {
  color: #8a949e !important;
  font-size: 10.5px;
  letter-spacing: 1.6px;
}
.sidebar-foot {
  color: #9aa4b0 !important;
  border-top-color: rgba(15, 23, 42, 0.07) !important;
}
.sidebar-menu li.menu-group-label::before,
.sidebar-menu li.menu-group-label::after { background: rgba(15, 23, 42, 0.09) !important; }

/* ===== 顶栏：浅玻璃 ===== */
.header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 34px -34px rgba(31, 45, 61, 0.5);
}
.header-left h1 { color: #16202b; }
.admin-avatar {
  background: linear-gradient(180deg, #46c797 0%, #1f9d6f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 18px -12px rgba(31, 157, 111, 0.8);
}
.admin-name { color: #38424f; }
.logout-btn { color: #7b8794; }

/* ===== 卡片：磨砂玻璃（不逐卡实时模糊；边缘用 3px 透明描边 + 渐变背景做出渐隐白边） ===== */
.card,
.chart-container,
.stat-card,
.detail-card,
.ov-card,
.table-card {
  border: 3px solid transparent;
  border-radius: var(--radius-lg);
  box-sizing: border-box;
  background-color: transparent;
  background-image:
    linear-gradient(148deg, rgba(255, 255, 255, 0.60) 0%, rgba(255, 255, 255, 0.28) 52%, rgba(255, 255, 255, 0.42) 100%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.45) 15%, rgba(255, 255, 255, 0.12) 38%, rgba(255, 255, 255, 0.06) 56%, rgba(255, 255, 255, 0.40) 80%, rgba(255, 255, 255, 0.90) 100%);
  background-clip: padding-box, border-box;
  box-shadow:
    inset 0 5px 11px -6px rgba(255, 255, 255, 0.28),
    inset 0 -7px 13px -6px rgba(15, 23, 42, 0.14),
    0 3px 8px -5px rgba(15, 23, 42, 0.22);
}
.card { border-radius: var(--radius-lg); }
.chart-container { border-radius: var(--radius-lg); }
.stat-card { border-radius: var(--radius-lg); }
.stat-card::after { display: none; }
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-info h3 { color: #7c8794; }
.stat-info .stat-value { color: #16202b; }

/* 统计图标：淡彩玻璃小方块，饱和度收一收 */
.stat-icon {
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px -16px rgba(31, 45, 61, 0.4);
}
.stat-icon.blue { background: linear-gradient(155deg, rgba(222, 240, 255, 0.9), rgba(196, 224, 252, 0.62)); }
.stat-icon.green { background: linear-gradient(155deg, rgba(219, 246, 233, 0.9), rgba(188, 235, 213, 0.62)); }
.stat-icon.orange { background: linear-gradient(155deg, rgba(255, 240, 224, 0.9), rgba(253, 226, 194, 0.62)); }
.stat-icon.purple { background: linear-gradient(155deg, rgba(238, 232, 255, 0.9), rgba(219, 208, 251, 0.62)); }

/* 页面标题：去掉发光竖条，换成一根淡淡的细条 */
.page-title { color: #16202b; }
.page-title::before {
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, #8edcbd, #35ac80);
  box-shadow: none;
  opacity: 0.85;
}

/* ===== 表格：通透、轻分隔 ===== */
.data-table th {
  background: transparent;
  color: #7c8794;
  font-weight: 600;
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}
.data-table td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.045);
  color: #38424f;
}
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.5); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ===== 按钮：柔和的玻璃胶囊 ===== */
.btn { border-radius: 12px; font-weight: 500; }
.btn-primary {
  background: linear-gradient(180deg, #40c295 0%, #1f9d6f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 12px 24px -16px rgba(31, 157, 111, 0.8);
}
.btn-primary:hover { background: linear-gradient(180deg, #37b98b 0%, #189060 100%); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.07);
  color: #38424f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.92); }
.btn-danger { background: linear-gradient(180deg, #f8837a, #e75d52); }
.btn-success { background: linear-gradient(180deg, #4bc99a, #22a173); }
.btn-warning { background: linear-gradient(180deg, #f8c274, #eaa644); }

/* ===== 表单控件：半透明白 ===== */
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(31, 157, 111, 0.45);
  box-shadow: 0 0 0 4px rgba(31, 157, 111, 0.1);
}

/* ===== 弹窗：一块会呼吸的玻璃 ===== */
.modal {
  background-color: transparent;
  background-image:
    linear-gradient(148deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.86) 100%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.45) 15%, rgba(255, 255, 255, 0.12) 38%, rgba(255, 255, 255, 0.06) 56%, rgba(255, 255, 255, 0.40) 80%, rgba(255, 255, 255, 0.90) 100%);
  background-clip: padding-box, border-box;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 3px solid transparent;
  box-sizing: border-box;
  border-radius: 24px;
  box-shadow: 0 46px 96px -46px rgba(31, 45, 61, 0.55);
}
.modal-header { border-bottom: 1px solid rgba(15, 23, 42, 0.06); background: transparent; }
.modal-footer { border-top: 1px solid rgba(15, 23, 42, 0.06); background: transparent; }

/* ===== 仪表盘零碎元素 ===== */
.mini-item,
.detail-metric {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.bar { background: linear-gradient(to top, #35b98c, #93dfc4); box-shadow: 0 10px 20px -14px rgba(31, 157, 111, 0.55); }
.bar-chart { border-bottom: 1px dashed rgba(15, 23, 42, 0.08); }

/* ===== 登录页：浅色玻璃 ===== */
.login-page {
  background:
    radial-gradient(900px 620px at 10% -6%, rgba(168, 213, 255, 0.55) 0%, rgba(168, 213, 255, 0) 62%),
    radial-gradient(820px 600px at 92% 6%, rgba(178, 234, 212, 0.6) 0%, rgba(178, 234, 212, 0) 62%),
    radial-gradient(700px 520px at 50% 110%, rgba(255, 226, 198, 0.45) 0%, rgba(255, 226, 198, 0) 62%),
    linear-gradient(180deg, #f2f6fa 0%, #e8eef6 100%);
}
.login-container {
  background-color: transparent;
  background-image:
    linear-gradient(148deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.60) 100%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.45) 15%, rgba(255, 255, 255, 0.12) 38%, rgba(255, 255, 255, 0.06) 56%, rgba(255, 255, 255, 0.40) 80%, rgba(255, 255, 255, 0.90) 100%);
  background-clip: padding-box, border-box;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 3px solid transparent;
  box-sizing: border-box;
  border-radius: 24px;
  box-shadow: 0 44px 90px -44px rgba(31, 45, 61, 0.5);
}
.login-logo h1 { color: #16202b; }
.login-logo p { color: #7c8794; }

/* ===== 手机底部标签栏：玻璃 ===== */
.m-tabbar {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 -12px 30px -26px rgba(31, 45, 61, 0.45);
}

/* ===== 分页：白玻璃小方块 ===== */
.page-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 10px;
  color: #4b5563;
}
.page-btn:hover:not(:disabled) {
  background: #fff;
  border-color: rgba(31, 157, 111, 0.32);
  color: #17835c;
}
.page-btn.active {
  background: linear-gradient(180deg, #40c295 0%, #1f9d6f 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 20px -14px rgba(31, 157, 111, 0.85);
}

/* ===== 登录页左侧品牌区：改成浅色自然光 ===== */
.login-page .login-brand {
  background:
    radial-gradient(640px 480px at 4% -8%, rgba(178, 234, 212, 0.55) 0%, rgba(178, 234, 212, 0) 60%),
    radial-gradient(560px 440px at 102% 108%, rgba(186, 216, 255, 0.45) 0%, rgba(186, 216, 255, 0) 62%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.45) 100%);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-right: 1px solid rgba(255, 255, 255, 0.7);
  color: #1f2a37;
}
/* 去掉科技感网格纹理 */
.login-page .login-brand::before { display: none; }
.lb-watermark { color: rgba(31, 157, 111, 0.06); }
.lb-logo {
  color: #17835c;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 10px 22px -18px rgba(31, 45, 61, 0.45);
}
.lb-name { color: #16202b; }
.lb-tag {
  color: #17835c;
  border-color: rgba(31, 157, 111, 0.22);
  background: rgba(255, 255, 255, 0.55);
}
.lb-mid h2 {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #16202b;
}
.lb-desc { color: #5b6672; }
.lb-points li { color: #4b5563; }
.lb-points li::before {
  background: #2faa7c;
  box-shadow: 0 0 0 3px rgba(31, 157, 111, 0.12);
}
.lb-foot { color: #98a2ad; }
.login-page .login-form-side {
  background:
    radial-gradient(560px 440px at 92% 0%, rgba(178, 234, 212, 0.32) 0%, rgba(178, 234, 212, 0) 60%),
    radial-gradient(500px 420px at 0% 100%, rgba(186, 216, 255, 0.28) 0%, rgba(186, 216, 255, 0) 62%),
    transparent;
}
/* 窄屏登录页的品牌 LOGO：白玻璃底 + 绿色图标（原来绿底配深绿图标，糊成一团） */
.login-mobile-brand .lb-logo {
  background: rgba(255, 255, 255, 0.92);
  color: #17835c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95), 0 12px 24px -18px rgba(31, 45, 61, 0.45);
}
/* 登录卡：盖住 login-split 的纯白底，换成玻璃 */
body.login-split .login-container {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

/* ==========================================================================
   登录页 v5 —— 浅薄荷极光品牌栏 + 微噪点颗粒质感
   （替换此前"一片浅白、没有层次"的版本）
   ========================================================================== */
body.login-split {
  background:
    radial-gradient(980px 760px at 6% -10%, #9fe9c9 0%, rgba(159, 233, 201, 0) 58%),
    radial-gradient(900px 700px at 104% 4%, #b3d4ff 0%, rgba(179, 212, 255, 0) 56%),
    radial-gradient(1000px 780px at 80% 112%, #ffd9b0 0%, rgba(255, 217, 176, 0) 58%),
    radial-gradient(760px 640px at 26% 106%, #cfe8ff 0%, rgba(207, 232, 255, 0) 62%),
    linear-gradient(158deg, #f6fbf8 0%, #eef6f2 44%, #f8f2ea 100%);
  background-attachment: fixed;
}

/* —— 左栏：不再自己铺底色，直接透出整幅彩色柔光 —— */
.login-page .login-brand {
  background: transparent;
  color: #16202b;
  border-right: 1px solid rgba(255, 255, 255, .6);
}
/* 细网格（此前被 close 掉，这里重新打开，压在浅底上） */
.login-page .login-brand::before {
  display: block;
  background-image:
    linear-gradient(rgba(31, 157, 111, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 157, 111, .075) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(132% 104% at 12% 2%, #000 0%, rgba(0, 0, 0, .25) 48%, transparent 76%);
  mask-image: radial-gradient(132% 104% at 12% 2%, #000 0%, rgba(0, 0, 0, .25) 48%, transparent 76%);
  z-index: 0;
}
/* 噪点颗粒：整块面板的"颗粒感"来源 */
.login-page .login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
.login-page .login-brand .lb-logo {
  color: #17835c;
  background: rgba(255, 255, 255, .94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .95),
    0 14px 28px -20px rgba(31, 45, 61, .38);
}
.login-page .login-brand .lb-name { color: #16202b; }
.login-page .login-brand .lb-tag {
  color: #17835c;
  border-color: rgba(31, 157, 111, .24);
  background: rgba(255, 255, 255, .62);
}
.login-page .login-brand .lb-mid h2 {
  background: linear-gradient(118deg, #14251d 8%, #1d8a63 94%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none;
}
.login-page .login-brand .lb-desc { color: #5b6672; }
/* 三条卖点做成小玻璃片，比裸文字更有质感 */
.login-page .login-brand .lb-points li {
  padding: 9px 14px;
  border-radius: 12px;
  color: #45514d;
  background: rgba(255, 255, 255, .46);
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 10px 22px -18px rgba(10, 70, 50, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.login-page .login-brand .lb-points li::before {
  margin-top: 6px;
  background: #2faa7c;
  box-shadow: 0 0 0 3px rgba(31, 157, 111, .14), 0 0 14px rgba(31, 157, 111, .28);
}
.login-page .login-brand .lb-foot { color: #98a2ad; }
.lb-watermark { color: rgba(31, 157, 111, .08); }

/* —— 右栏：同样透明，让柔光连成一片 —— */
.login-page .login-form-side {
  position: relative;
  background: transparent;
}
/* 浅色面也铺一层极淡的颗粒，避免"塑料白" */
.login-page .login-form-side::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
/* 卡片身后的一团柔光，把玻璃"托"起来 */
.login-page .login-form-side::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 480px;
  height: 480px;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .88) 0%, rgba(255, 255, 255, .38) 46%, rgba(255, 255, 255, 0) 72%);
  filter: blur(34px);
}
.login-mobile-brand { position: relative; z-index: 1; }

/* —— 登录卡：厚实玻璃，带镜面高光 —— */
body.login-split .login-container {
  position: relative;
  z-index: 1;
  width: 392px;
  max-width: 100%;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .85);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .60) 0%, rgba(255, 255, 255, .42) 58%, rgba(255, 255, 255, .54) 100%);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 0 0 1px rgba(255, 255, 255, .35),
    inset 0 -1px 0 rgba(20, 60, 45, .06),
    0 2px 8px rgba(20, 60, 45, .05),
    0 30px 60px -30px rgba(10, 70, 50, .38),
    0 90px 130px -80px rgba(10, 70, 50, .32);
  animation: loginCardIn .52s cubic-bezier(.22, .9, .32, 1) both;
}
/* 斜向镜面反光，让玻璃有"厚"的感觉 */
body.login-split .login-container::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, .34) 0%,
    rgba(255, 255, 255, 0) 26%,
    rgba(255, 255, 255, 0) 72%,
    rgba(255, 255, 255, .26) 100%);
}
/* 顶部镜面高光条 */
body.login-split .login-container::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 1px;
  border-radius: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95) 22%, rgba(255, 255, 255, .95) 78%, transparent);
}
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.login-head h1 { letter-spacing: -.015em; }
.login-head p { color: #7d8b85; }

/* —— 输入框：内凹手感 —— */
body.login-split .form-group input {
  background: rgba(246, 250, 248, .94);
  border: 1px solid rgba(15, 23, 42, .085);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, .055),
    inset 0 -1px 0 rgba(255, 255, 255, .9);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
body.login-split .form-group input::placeholder { color: #9fada6; }
body.login-split .form-group input:focus {
  background: #fff;
  border-color: rgba(31, 157, 111, .55);
  box-shadow:
    0 0 0 4px rgba(31, 157, 111, .12),
    inset 0 1px 2px rgba(15, 23, 42, .04);
}
body.login-split .login-container input:-webkit-autofill,
body.login-split .login-container input:-webkit-autofill:hover,
body.login-split .login-container input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  -webkit-box-shadow: 0 0 0 1000px #f4f9f6 inset;
  caret-color: #0f172a;
  transition: background-color 100000s ease-in-out 0s;
}

/* —— 登录按钮：立体感 —— */
body.login-split .btn-primary {
  background: linear-gradient(180deg, #35c191 0%, #19986b 55%, #12805a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -2px 6px rgba(4, 45, 33, .22),
    0 14px 26px -14px rgba(14, 120, 86, .7);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
body.login-split .btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
body.login-split .btn-primary:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 7px rgba(4, 45, 33, .3);
}

@media (prefers-reduced-motion: reduce) {
  body.login-split .login-container { animation: none; }
}

/* ==========================================================================
   全站 v6 —— 统一玻璃质感（登录页之外的所有后台页面）
   思路：① 底色补足色彩层次，玻璃才有东西可"透"
        ② 铺一层极淡的胶片颗粒，去掉塑料感
        ③ 侧栏 / 顶栏 / 卡片 / 表格 / 表单 / 按钮统一到同一套玻璃语言
   ========================================================================== */

/* —— 1. 底色：固定视口层，所有页面颜色完全一致（不受页面长短影响） —— */
body:not(.login-page) { background: #e9f1ec; }
body:not(.login-page)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 820px at 50% -22%, rgba(126, 214, 176, .55) 0%, rgba(126, 214, 176, 0) 66%),
    radial-gradient(1000px 720px at 50% 122%, rgba(140, 224, 196, .30) 0%, rgba(140, 224, 196, 0) 66%),
    linear-gradient(180deg, #e9f3ee 0%, #e6f0ea 100%);
}
.layout { position: relative; z-index: 1; }

/* —— 2. 全局胶片颗粒（登录页已有自己的一层，这里排除掉） —— */
body:not(.login-page)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* —— 3. 侧栏：牛奶玻璃 —— */
#sidebar.sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, .64) 0%, rgba(226, 244, 236, .46) 46%, rgba(255, 255, 255, .60) 100%) !important;
  backdrop-filter: blur(26px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%) !important;
  border-right: 1px solid rgba(255, 255, 255, .72) !important;
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, .92),
    inset 0 1px 0 rgba(255, 255, 255, .96),
    20px 0 48px -36px rgba(12, 60, 45, .45) !important;
}
/* 选中胶囊：高光玻璃 + 左侧一道品牌绿 */
#sidebar .sidebar-menu .menu-glider {
  background: linear-gradient(180deg, #ffffff 0%, #f5fbf8 100%) !important;
  border: 1px solid rgba(255, 255, 255, .95) !important;
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 3px 0 0 rgba(31, 157, 111, .55),
    0 2px 5px -2px rgba(15, 23, 42, .12),
    0 14px 26px -16px rgba(15, 23, 42, .34) !important;
}
#sidebar .sidebar-menu li a:hover { background: rgba(255, 255, 255, .58); }

/* —— 4. 顶栏：更透的玻璃 —— */
.header {
  background: rgba(255, 255, 255, .70);
  backdrop-filter: blur(22px) saturate(175%);
  -webkit-backdrop-filter: blur(22px) saturate(175%);
  border-bottom: 1px solid rgba(255, 255, 255, .72);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9),
    0 18px 40px -38px rgba(12, 60, 45, .55);
}

/* —— 5. 卡片：统一的玻璃块（带内高光 + 内底阴影） —— */
.card,
.chart-container,
.stat-card,
.detail-card,
.ov-card,
.table-card,
.search-bar,
.recent-orders {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(162deg, rgba(255, 255, 255, .70) 0%, rgba(255, 255, 255, .44) 54%, rgba(240, 250, 246, .58) 100%);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(15, 23, 42, .045),
    0 1px 2px rgba(16, 24, 40, .04),
    0 22px 44px -30px rgba(12, 60, 45, .34);
}
/* 大表格外层不做实时模糊（面积太大，长表格会拖），用更实的乳白玻璃顶上 */
.table-wrapper {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius-lg);
  background: linear-gradient(162deg, rgba(255, 255, 255, .88) 0%, rgba(251, 254, 252, .76) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .98),
    inset 0 -1px 0 rgba(15, 23, 42, .04),
    0 1px 2px rgba(16, 24, 40, .04),
    0 22px 44px -32px rgba(12, 60, 45, .32);
}

/* —— 6. 表格：淡色表头 + 轻分隔 + 悬停一层白雾 —— */
.data-table th {
  background: rgba(240, 248, 244, .78);
  color: #6b7a84;
  font-size: 12.5px;
  letter-spacing: .04em;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}
.data-table td {
  border-bottom: 1px solid rgba(15, 23, 42, .045);
  color: #37424e;
}
.data-table tbody tr:hover { background: rgba(255, 255, 255, .62); }

/* —— 7. 表单控件：内凹玻璃 —— */
.search-item input,
.search-item select,
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, .05),
    inset 0 -1px 0 rgba(255, 255, 255, .9);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.search-item input:focus,
.search-item select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: #fff;
  border-color: rgba(31, 157, 111, .5);
  box-shadow:
    0 0 0 4px rgba(31, 157, 111, .11),
    inset 0 1px 2px rgba(15, 23, 42, .04);
}

/* —— 8. 按钮 / 徽章 / 分页 —— */
.btn-primary {
  background: linear-gradient(180deg, #37c393 0%, #1a9b6d 58%, #12805a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -2px 6px rgba(4, 45, 33, .2),
    0 14px 26px -16px rgba(14, 120, 86, .65);
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #37c393 0%, #1a9b6d 58%, #12805a 100%);
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: inset 0 2px 7px rgba(4, 45, 33, .28); }
.btn-secondary {
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 10px 20px -16px rgba(12, 60, 45, .45);
}
.btn-secondary:hover { background: rgba(255, 255, 255, .92); }
.badge {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .72),
    0 1px 2px rgba(15, 23, 42, .045);
}
.page-btn {
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(255, 255, 255, .92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

/* 窄屏：颗粒层淡一点，省一点合成开销 */
@media (max-width: 960px) {
  body:not(.login-page)::after { opacity: .035; }
}

/* ==========================================================
   侧栏菜单 · 液态玻璃选中胶囊（v7）
   1) 选中项 = 一块会透背景的磨砂玻璃：顶部镜面高光 + 边缘亮环 + 柔和投影
   2) 切页时胶囊中途收缩成一颗小圆球滑过去，到站再摊开（见 common.js）
   ========================================================== */
#sidebar .sidebar-menu .menu-glider {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, .26) 0%,
      rgba(232, 246, 240, .09) 46%,
      rgba(214, 238, 228, .17) 100%) !important;
  backdrop-filter: blur(6px) saturate(210%) contrast(1.04) brightness(.995) !important;
  -webkit-backdrop-filter: blur(6px) saturate(210%) contrast(1.04) brightness(.995) !important;
  border: 1px solid rgba(255, 255, 255, .95) !important;
  border-radius: 14px; /* 不加 !important：要留给 WAAPI 做「胶囊→圆球」的圆角形变 */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 0 0 1px rgba(20, 90, 70, .045),
    0 0 0 1px rgba(14, 68, 50, .045),
    0 12px 24px -16px rgba(12, 60, 45, .26),
    inset 0 -12px 18px -14px rgba(12, 70, 50, .12) !important;
  transform-origin: 50% 50%;
  will-change: transform, height;
}
/* 形变过程中：更透（能看见底下内容）、收起镜面高光、影子收一点 */
#sidebar .sidebar-menu .menu-glider.morphing::before,
#sidebar .sidebar-menu .menu-glider.morphing::after { opacity: 0; }
#sidebar .sidebar-menu .menu-glider.morphing {
  /* 形变期间彻底关掉 CSS 过渡，免得 WAAPI 结束那一瞬间过渡又接手，出现"回弹一下" */
  transition: none !important;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, .24) 0%,
    rgba(255, 255, 255, .08) 50%,
    rgba(255, 255, 255, .16) 100%) !important;
  backdrop-filter: blur(10px) saturate(170%) brightness(1.01) !important;
  -webkit-backdrop-filter: blur(10px) saturate(170%) brightness(1.01) !important;
  border-color: rgba(255, 255, 255, .8) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 1px 2px rgba(31, 45, 61, .05),
    0 8px 16px -12px rgba(31, 45, 61, .26) !important;
}
/* 切深色大屏用的黑纱：慢慢压暗，避免"啪"一下全黑 */
.dark-veil {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #06090e;
  opacity: 0;
  transition: opacity .42s ease;
  pointer-events: none;
}
.dark-veil.on { opacity: 1; }

/* 玻璃的"厚度"交给渐变和描边表现，不再画反光条（之前那两道白杠很像残留物） */
#sidebar .sidebar-menu .menu-glider::before,
#sidebar .sidebar-menu .menu-glider::after { display: none !important; }







/* ===== 登录页玻璃卡：WebGL 实时折射（液态玻璃） ===== */
.login-container { position: relative; }
.login-container.liquid-ready {
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.login-container > .liquid-canvas {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  border-radius: 27px;
  display: block;
  z-index: 0;
  pointer-events: none;
}
.login-container > *:not(.liquid-canvas) { position: relative; z-index: 1; }

/* ===== 管理后台：全站 WebGL 液态玻璃 =====
   一张 fixed 全屏画布（在 body 底色之上、.layout 之下）同时给所有卡片
   画玻璃；卡片自己只留描边和投影，背景交给 shader。 */
#liquid-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

.liquid-card {
  background: none !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 表格底部的分页条原来是一块实心白，放进玻璃里像贴了张白纸 */
.liquid-card .pagination {
  background: transparent;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ==========================================================================
   弹窗 & 详情内容（用户 / 农机 / 订单 / 申诉…共用）
   原来弹窗是一块纯白 #fff + 12px 圆角，跟外面的玻璃卡不是一套；
   详情里的只读字段是白底 + 8% 黑描边，在白弹窗上几乎看不见边界。
   ========================================================================== */
.modal-overlay {
  background: rgba(10, 26, 21, .42);
  backdrop-filter: blur(8px) saturate(115%);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
}

.modal {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .94) 0%, rgba(250, 254, 252, .90) 58%, rgba(243, 251, 247, .93) 100%);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .96),
    inset 0 -1px 0 rgba(15, 23, 42, .04),
    0 2px 6px rgba(8, 40, 30, .10),
    0 44px 80px -42px rgba(6, 36, 26, .62);
}

.modal-header {
  border-bottom: 1px solid rgba(15, 23, 42, .07);
  background: linear-gradient(180deg, rgba(255, 255, 255, .60), rgba(255, 255, 255, 0));
}
.modal-footer {
  border-top: 1px solid rgba(15, 23, 42, .06);
  background: linear-gradient(0deg, rgba(255, 255, 255, .60), rgba(255, 255, 255, 0));
}
.modal-title { color: #16202b; }

/* 详情字段：只读的做成"数据块"，边界清楚，别像能输入的框 */
.modal-body .form-group label {
  color: #6b7a74;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 6px;
}
.modal-body .form-group input[readonly],
.modal-body .form-group textarea[readonly] {
  background: rgba(233, 243, 238, .92);
  border: 1px solid rgba(15, 23, 42, .095);
  border-radius: 12px;
  padding: 11px 14px;
  color: #1f2a37;
  font-weight: 500;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, .05),
    inset 0 -1px 0 rgba(255, 255, 255, .85);
}
.modal-body .form-group input[readonly]:focus,
.modal-body .form-group textarea[readonly]:focus {
  background: rgba(233, 243, 238, .92);
  border-color: rgba(15, 23, 42, .095);
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, .05),
    inset 0 -1px 0 rgba(255, 255, 255, .85);
}

/* 顶部的数据小块 */
.modal-body .detail-metric {
  background: linear-gradient(160deg, rgba(240, 248, 244, .94), rgba(228, 240, 234, .88));
  border: 1px solid rgba(15, 23, 42, .075);
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
