/* ============================================================
   AmazoHub — 多店铺管理后台全局样式
   主色: 亚马逊橙 (#FF9900) + 深蓝 + 深灰
   ============================================================ */

:root {
  --primary: #FF9900;
  --primary-dark: #E88B00;
  --primary-light: #FFB84D;
  --primary-50: #FFF8E6;
  --primary-100: #FFEFD1;

  --accent: #232F3E;
  --accent-light: #37475A;
  --success: #00A650;
  --danger: #D13212;
  --warning: #FFB500;
  --info: #0077C5;

  --gray-50: #FAFAFA;
  --gray-100: #F1F3F5;
  --gray-200: #E4E7EC;
  --gray-300: #D0D5DD;
  --gray-400: #98A2B3;
  --gray-500: #667085;
  --gray-600: #475467;
  --gray-700: #344054;
  --gray-800: #1D2939;
  --gray-900: #101828;

  --bg: #F4F5F7;
  --card-bg: #ffffff;
  --text: #101828;
  --text-light: #667085;
  --border: #E4E7EC;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(16,24,40,0.05);
  --shadow: 0 4px 12px rgba(16,24,40,0.06);
  --shadow-lg: 0 10px 30px rgba(16,24,40,0.08);

  --sidebar-w: 240px;
  --topbar-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ---------------- 登录/注册 ---------------- */
.auth-bg {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(135deg, #232F3E 0%, #37475A 40%, #FF9900 200%);
  position: relative; overflow: hidden;
}
.auth-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,153,0,0.15) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,153,0,0.1) 0, transparent 40%);
}
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px; padding: 40px 36px;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand .logo {
  width: 56px; height: 56px; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary), #FF7A00);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
  box-shadow: 0 8px 20px rgba(255,153,0,0.35);
}
.auth-brand h1 { font-size: 20px; font-weight: 700; color: var(--gray-900); }
.auth-brand .sub { color: var(--gray-500); font-size: 13px; margin-top: 2px; }
.auth-h { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.auth-sub { color: var(--gray-500); font-size: 13px; margin-bottom: 20px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--gray-700); }
.input, .select, .textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--gray-900); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-size: 14px;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,153,0,0.12);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.input-error { color: var(--danger); font-size: 13px; margin-top: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
  transition: all 0.15s ease; cursor: pointer;
  white-space: nowrap; user-select: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #F38300);
  color: #232F3E; border-color: transparent;
  box-shadow: 0 2px 8px rgba(255,153,0,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,153,0,0.4); }
.btn-dark {
  background: #232F3E; color: #fff;
}
.btn-dark:hover { background: #37475A; }
.btn-outline {
  background: #fff; border: 1px solid var(--border); color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B4230D; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--gray-500); }
.auth-switch a { color: var(--primary); font-weight: 600; }

.lang-switcher {
  position: absolute; top: 20px; right: 20px; z-index: 10;
  background: rgba(35,47,62,0.6); backdrop-filter: blur(8px);
  border-radius: 999px; padding: 4px; display: flex; gap: 2px;
}
.lang-switcher button {
  padding: 6px 14px; border-radius: 999px; color: rgba(255,255,255,0.75);
  font-size: 13px; font-weight: 600;
}
.lang-switcher button.active { background: #fff; color: #232F3E; }

/* ---------------- 布局：侧边栏 + 主内容 ---------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #101828 0%, #1D2939 100%);
  color: #D0D5DD;
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column; z-index: 100;
  transition: transform 0.25s ease;
}
.sidebar-brand {
  padding: 16px 20px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand .logo {
  width: 38px; height: 38px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), #F38300);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: #232F3E; font-size: 18px; font-weight: 800;
}
.sidebar-brand .txt { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }

.nav { padding: 16px 10px; flex: 1; overflow-y: auto; }
.nav .nav-section { margin-bottom: 20px; }
.nav .nav-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
  padding: 0 10px 6px;
}
.nav a, .nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; margin: 2px 0;
  border-radius: 8px;
  color: #D0D5DD; font-size: 14px; font-weight: 500;
  transition: all 0.15s; cursor: pointer;
}
.nav a:hover, .nav .nav-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav a.active, .nav .nav-link.active {
  background: linear-gradient(90deg, rgba(255,153,0,0.22), rgba(255,153,0,0.05));
  color: #fff; border-left: 3px solid var(--primary);
  padding-left: 7px;
}
.nav .nav-link .icon, .nav a .icon {
  width: 20px; text-align: center; font-size: 17px; opacity: 0.95;
}
.nav .sub-stats {
  margin-left: auto; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.1); color: #FFD9A5;
}

.sidebar-footer {
  padding: 12px 14px; border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-footer .av {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(255,153,0,0.15); color: var(--primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.sidebar-footer .me { flex: 1; min-width: 0; }
.sidebar-footer .me .n { font-size: 13px; font-weight: 600; color: #fff; }
.sidebar-footer .me .e { font-size: 11px; color: rgba(255,255,255,0.4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 主区域 ---------------- */
.main {
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; flex: 1;
  min-height: 100vh; min-width: 0;
}
.topbar {
  height: var(--topbar-h);
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar .menu-btn {
  display: none; font-size: 22px;
  padding: 4px 8px; border-radius: 6px;
}
.topbar .page-path { font-size: 14px; color: var(--gray-500); flex: 1; }
.topbar .page-path strong { color: var(--gray-900); }
.topbar .tb-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--gray-600); font-size: 17px;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--gray-100); color: var(--gray-900); }

.lang-btn {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 4px 10px; height: 28px; font-size: 12px; font-weight: 600;
  border-radius: 14px; color: var(--gray-600);
  border: 1px solid var(--border); background: #fff;
  transition: all 0.15s;
}
.lang-btn:hover { background: var(--gray-100); color: var(--gray-900); border-color: var(--gray-300); }

.page { padding: 24px 28px; flex: 1; max-width: 1600px; width: 100%; margin: 0 auto; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.page-header h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.page-header .ph-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-body { padding: 20px; }

/* ---------------- 统计卡片 ---------------- */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  transition: all 0.15s;
}
.stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat .ic {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat .ic.sales { background: #FFF3E0; color: #E65100; }
.stat .ic.orders { background: #E3F2FD; color: #1565C0; }
.stat .ic.stores { background: #F3E5F5; color: #7B1FA2; }
.stat .ic.revenue { background: #E8F5E9; color: #2E7D32; }
.stat .txt { min-width: 0; flex: 1; }
.stat .txt .v {
  font-size: 24px; font-weight: 700; letter-spacing: -0.3px; color: var(--gray-900);
  line-height: 1.1;
}
.stat .txt .l { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.stat .delta {
  font-size: 12px; font-weight: 600;
  color: var(--success);
}
.stat .delta.down { color: var(--danger); }

/* ---------------- 表格 ---------------- */
.table-wrap {
  overflow-x: auto; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--border);
}
table.data {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 14px;
}
table.data th {
  background: var(--gray-50); color: var(--gray-600);
  font-weight: 600; text-align: left; font-size: 12px;
  padding: 10px 16px; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
table.data td {
  padding: 14px 16px; border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
table.data tbody tr:hover { background: #FAFBFC; }
table.data tbody tr:last-child td { border-bottom: none; }
.muted { color: var(--gray-500); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
.b-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.badge.active, .b-ok { background: #E8F5E9; color: #2E7D32; }
.badge.inactive, .b-warn { background: #FFF3E0; color: #E65100; }
.badge.closed, .b-err { background: #FFEBEE; color: #C62828; }
.badge.info, .b-info { background: #E3F2FD; color: #1565C0; }
.badge.neutral, .b-neu { background: #F5F5F5; color: #424242; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  background: var(--primary-50); color: var(--primary-dark);
  border: 1px solid rgba(255,153,0,0.2);
}

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-link {
  color: var(--primary); font-size: 13px; font-weight: 600;
  padding: 4px 8px; border-radius: 4px;
}
.btn-link:hover { background: var(--primary-50); }
.btn-link.danger { color: var(--danger); }
.btn-link.danger:hover { background: #FFEBEE; }

/* ---------------- 搜索 / 筛选 ---------------- */
.toolbar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}
.search {
  flex: 1; min-width: 220px; position: relative;
}
.search .input { padding-left: 36px; }
.search::before {
  content: '🔍'; position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); font-size: 14px; opacity: 0.6;
}
.filter-box {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}

/* ---------------- 图表 ---------------- */
.chart-box { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); }
.chart-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.bar-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 200px; padding: 0 4px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: end; }
.bar {
  width: 100%; max-width: 40px; background: linear-gradient(180deg, var(--primary), #FF7A00);
  border-radius: 6px 6px 2px 2px;
  transition: all 0.2s; min-height: 4px;
  position: relative;
}
.bar:hover { background: linear-gradient(180deg, var(--primary-light), #F38300); }
.bar .tip {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity 0.15s;
}
.bar:hover .tip { opacity: 1; }
.bar-label { font-size: 11px; color: var(--gray-500); font-weight: 600; }

.pie-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; }
.pie-svg { width: 100%; height: 220px; }
.pie-legend { display: flex; flex-direction: column; gap: 10px; }
.pie-legend .row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.pie-legend .dot { width: 10px; height: 10px; border-radius: 2px; }
.pie-legend .nm { flex: 1; color: var(--gray-700); }
.pie-legend .val { font-weight: 600; color: var(--gray-900); }
.pie-legend .pct { color: var(--gray-500); font-size: 12px; margin-left: 6px; }

/* ---------------- 店铺卡片 ---------------- */
.store-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px;
}
.store-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  transition: all 0.15s;
}
.store-card:hover { box-shadow: var(--shadow); border-color: var(--primary-light); }
.store-card .head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.store-card .flag {
  width: 46px; height: 46px;
  background: var(--primary-50);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.store-card .meta { flex: 1; min-width: 0; }
.store-card .meta .n { font-size: 15px; font-weight: 700; }
.store-card .meta .m { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.store-card .stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 12px 0; border-top: 1px dashed var(--border);
}
.store-card .stat-row .s { text-align: center; }
.store-card .stat-row .s .v { font-size: 16px; font-weight: 700; }
.store-card .stat-row .s .l { font-size: 11px; color: var(--gray-500); }
.store-card .act-row {
  display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border);
}
.store-card .act-row .btn { flex: 1; }

/* ---------------- 订阅 / 套餐卡片 ---------------- */
.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.plan-card {
  background: #fff; border: 2px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: all 0.15s; position: relative;
}
.plan-card.hot { border-color: var(--primary); }
.plan-card.hot::before {
  content: '推荐'; position: absolute; top: -12px; right: 16px;
  background: linear-gradient(135deg, var(--primary), #F38300);
  color: #232F3E; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.plan-card.active { border-color: var(--primary); background: var(--primary-50); }
.plan-card .nm { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.plan-card .price { font-size: 26px; font-weight: 800; color: var(--primary-dark); margin: 10px 0; }
.plan-card .price .unit { font-size: 13px; color: var(--gray-500); font-weight: 500; margin-left: 4px; }
.plan-card .features { list-style: none; margin: 14px 0; }
.plan-card .features li {
  font-size: 13px; color: var(--gray-600); padding: 4px 0;
  display: flex; align-items: center; gap: 6px;
}
.plan-card .features li::before { content: '✓'; color: var(--success); font-weight: 700; }
.plan-card .btn { width: 100%; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16,24,40,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: var(--radius-lg); max-width: 560px; width: 100%;
  max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 80px rgba(16,24,40,0.3);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.modal-head {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}
.close-x {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 18px; color: var(--gray-500);
}
.close-x:hover { background: var(--gray-100); color: var(--gray-900); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ---------------- 支付渠道 ---------------- */
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-method {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: all 0.15s; position: relative;
}
.pay-method:hover { border-color: var(--primary-light); background: var(--primary-50); }
.pay-method .pm-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex-shrink: 0;
}
.pay-method .pm-info { flex: 1; min-width: 0; }
.pay-method .pm-name { font-size: 14px; font-weight: 600; }
.pay-method .pm-desc { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.pay-method .pm-check {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border);
  flex-shrink: 0; transition: all 0.15s;
}
.pay-method.checked { border-color: var(--primary); background: var(--primary-50); }
.pay-method.checked .pm-check { border-color: var(--primary); background: var(--primary); }
.pay-method.checked .pm-check::after {
  content: '✓'; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; height: 100%;
}
.pay-detail {
  margin-top: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--gray-50);
}
.pay-qr {
  width: 160px; height: 160px; margin: 0 auto 12px; border-radius: 10px;
  background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.pay-qr-grid {
  width: 140px; height: 140px;
  background-image:
    linear-gradient(45deg, #232F3E 25%, transparent 25%),
    linear-gradient(-45deg, #232F3E 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #232F3E 75%),
    linear-gradient(-45deg, transparent 75%, #232F3E 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  opacity: 0.85;
}
.pay-qr-corner {
  position: absolute; width: 32px; height: 32px; border: 4px solid #232F3E; background: #fff;
}
.pay-qr-corner.tl { top: 8px; left: 8px; }
.pay-qr-corner.tr { top: 8px; right: 8px; }
.pay-qr-corner.bl { bottom: 8px; left: 8px; }
.pay-qr-logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 28px; height: 28px; border-radius: 6px; background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}

/* ---------------- 列表选择 ---------------- */
.chk-list { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.chk-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: all 0.1s;
}
.chk-item:hover { border-color: var(--primary-light); background: var(--primary-50); }
.chk-item input { transform: scale(1.15); accent-color: var(--primary); }
.chk-item .ch-txt { flex: 1; font-size: 14px; }
.chk-item.checked { border-color: var(--primary); background: var(--primary-50); }

/* ---------------- 商品卡 ---------------- */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
}
.product-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all 0.15s; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow); border-color: var(--primary-light); }
.product-card .img {
  height: 140px; background: linear-gradient(135deg, var(--primary-50), #FFEDD5);
  display: flex; align-items: center; justify-content: center; font-size: 56px;
  position: relative;
}
.product-card .status-tag {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(4px);
  border-radius: 999px; padding: 3px 10px;
  font-size: 11px; font-weight: 700;
}
.product-card .info { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.product-card .info .n { font-weight: 600; font-size: 14px; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .info .sku { font-size: 11px; color: var(--gray-500); }
.product-card .info .price-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--gray-100);
}
.product-card .info .price { color: var(--primary-dark); font-weight: 700; }
.product-card .info .stock { font-size: 12px; color: var(--gray-500); }
.product-card .info .on-store {
  margin-top: 10px; display: flex; gap: 4px; flex-wrap: wrap;
}
.product-card .act {
  display: flex; border-top: 1px solid var(--border);
}
.product-card .act button {
  flex: 1; padding: 10px; font-size: 13px; font-weight: 600;
  color: var(--gray-700); transition: all 0.1s;
}
.product-card .act button:hover { background: var(--gray-50); color: var(--primary); }
.product-card .act button + button { border-left: 1px solid var(--border); }

/* 复选框选择 */
.selectable { cursor: pointer; }
.product-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255,153,0,0.15); }
.product-card.selected .img { background: linear-gradient(135deg, rgba(255,153,0,0.2), rgba(255,153,0,0.05)); }
.bulk-bar {
  background: var(--accent); color: #fff;
  padding: 12px 18px; border-radius: var(--radius); margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.bulk-bar .l { font-size: 14px; font-weight: 600; }
.bulk-bar .r { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-bar .btn-outline { border-color: rgba(255,255,255,0.3); color: #fff; background: transparent; }
.bulk-bar .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ---------------- Toast ---------------- */
#toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.toast {
  background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,0.15);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  border-left: 4px solid var(--info);
  animation: toastIn 0.2s ease;
  font-size: 13px;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast .ic { font-size: 18px; flex-shrink: 0; }
.toast .msg { color: var(--gray-700); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }

/* ---------------- 日志条目 ---------------- */
.log-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.log-item:last-child { border-bottom: none; }
.log-item .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
  margin-top: 6px; flex-shrink: 0;
}
.log-item .content { flex: 1; min-width: 0; }
.log-item .content .top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 2px; }
.log-item .content .t { font-size: 13px; color: var(--gray-900); }
.log-item .content .t b { font-weight: 600; }
.log-item .content .time { font-size: 12px; color: var(--gray-500); }
.log-item .content .d { font-size: 13px; color: var(--gray-500); }

/* ---------------- 空状态 ---------------- */
.empty {
  padding: 50px 20px; text-align: center; color: var(--gray-400);
}
.empty .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }
.empty .tip { font-size: 13px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .pie-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: inline-flex; }
  .page { padding: 18px 16px; }
  .topbar { padding: 0 16px; }
  .page-header h2 { font-size: 18px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .pay-methods { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .store-grid { grid-template-columns: 1fr; }
}

/* 富文本编辑器 + 商品详情 */
.rich-editor { min-height:120px; max-height:300px; overflow-y:auto; border-radius:0 0 6px 6px; padding:10px; line-height:1.6; }
.rich-editor:focus { outline:2px solid var(--primary-light); }
.rich-editor img { max-width:100%; height:auto; border-radius:8px; margin:6px 0; }
.upload-area { width:100%; height:160px; border:2px dashed var(--border); border-radius:10px; display:flex; align-items:center; justify-content:center; overflow:hidden; background:var(--gray-50); cursor:pointer; transition:all .15s; position:relative; }
.upload-area:hover { border-color:var(--primary); background:var(--primary-50); }
.product-desc { font-size:14px; line-height:1.7; color:var(--gray-700); }
.product-desc img { max-width:100%; height:auto; border-radius:8px; margin:8px 0; }
.product-desc p { margin:8px 0; }
.product-desc ul, .product-desc ol { margin:8px 0; padding-left:22px; }
.product-desc li { margin:4px 0; }
.product-desc h1, .product-desc h2, .product-desc h3 { margin:12px 0 6px; }
.product-desc b, .product-desc strong { font-weight:700; }

/* ---------------- 用户协议 ---------------- */
.agreement-field { margin-top: 4px; }
.agreement { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--gray-600); cursor: pointer; line-height: 1.5; user-select: none; }
.agreement input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; accent-color: var(--primary); }
.agreement-link { color: var(--primary-dark); text-decoration: underline; cursor: pointer; }
.agreement-link:hover { color: var(--primary); }
#auth-submit:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.agreement-overlay { position: fixed; inset: 0; background: rgba(16,24,40,0.55); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.agreement-dialog { background: #fff; border-radius: 12px; max-width: 560px; width: 100%; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: pop .2s ease; }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.agreement-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.agreement-header h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.agreement-close { font-size: 24px; line-height: 1; color: var(--gray-500); padding: 0 4px; }
.agreement-close:hover { color: var(--gray-900); }
.agreement-body { padding: 20px; overflow-y: auto; line-height: 1.7; -webkit-overflow-scrolling: touch; }
.agreement-body h4 { font-size: 14px; font-weight: 700; margin: 14px 0 6px; color: var(--gray-900); }
.agreement-body p { font-size: 13px; color: var(--gray-700); margin-bottom: 8px; }
.agreement-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-weight: 600; color: var(--gray-900); }
.agreement-actions { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
