
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #e8f0fe;
  --primary-subtle: #f0f5ff;
  --bg: #ffffff;
  --bg-hover: #f0f2f5;
  --surface: #ffffff;
  --border: #909399;
  --border-light: #eef0f4;
  --text: #2c2e33;
  --text-secondary: #5c6069;
  --text-muted: #9095a0;
  --radius: 10px;
  --space-xs: 4px;
  --space-sm: 6px;
  --space-md: 8px;
  --space-lg: 12px;
  --space-xl: 16px;
  --space-2xl: 24px;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-2xl: 22px;
  --duration: 0.2s;
  --ease: ease;
  --sidebar-bg: #ffffff;
  --sidebar-text: #8b95a8;
  --sidebar-hover: #f0f2f5;
  --sidebar-active: #ecedee;
  --sidebar-divider: #e5e7eb;
  --success: #22c55e;
  --success-bg: #f0fdf4;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Source Han Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #ffffff;
  color: #000000;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== Card Base ===== */
.card {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  padding: 16px 20px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  border-color: #e0e2e6;
}

/* ===== Layout ===== */
html { scrollbar-gutter: stable; }
.app { display: flex; min-height: 100vh; }
.app-layout { display: flex; flex-direction: column; min-height: 100vh; background: #FFF; }
.main-content { flex: 1; padding: 32px 28px; min-height: 100vh; padding-top: 96px; background: #FFF; overflow-y: auto; contain: layout style; }

/* ===== Top Navigation Bar (Figma: 首页导航栏) ===== */
.topnav-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 64px; background: #fff;
  display: flex; align-items: center; padding: 0 28px; gap: 0;
}
.topnav-bar::after {
  content: ''; position: absolute; bottom: 0; left: 28px; right: 28px;
  height: 0.5px; background: #E1E1E1;
}
.topnav-left {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.topnav-logo-text { font-size: 20px; font-weight: 600; color: #000; font-family: 'MiSans', 'Noto Sans SC', sans-serif; }
.topnav-logo-badge {
  font-size: 16px; font-weight: 400; color: #fff; background: #1244EE;
  border-radius: 6px; padding: 2px 8px; font-family: 'MiSans', 'Noto Sans SC', sans-serif;
}
.topnav-tagline { font-size: 12px; color: #7A7A7A; margin-left: 4px; font-family: 'MiSans', 'Noto Sans SC', sans-serif; }

/* Nav Tabs */
.topnav-tabs {
  display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1;
}
.topnav-tab {
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: 6px; border: none; background: none; color: #000; font-size: 14px;
  font-weight: 400;
  cursor: pointer; font-family: 'MiSans', 'Noto Sans SC', sans-serif;
  transition: background-color 0.15s; white-space: nowrap;
}
.topnav-tab:hover { background: #F6F6F6; }
.topnav-tab:focus-visible { outline: 2px solid #121F43; outline-offset: -1px; }
.topnav-tab.active { background: #000000; color: #fff; font-weight: 400; }
.topnav-tab img { filter: none; opacity: 1; }
.topnav-tab.active img { filter: brightness(0) invert(1); opacity: 1; }

/* Top Nav Right */
.topnav-right {
  display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0;
}
.quota-pill {
  display: flex; align-items: center; gap: 6px; height: 28px;
  padding: 0 8px; border-radius: 6px; background: #F9FAFB;
  border: 0.5px solid #E1E1E1; font-size: 12px; color: #93A2B5;
}
.quota-sep { width: 0.5px; height: 12px; background: #E1E1E1; }
.user-menu { position: relative; }
.user-menu-trigger {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px; cursor: pointer;
  width: 140px; padding: 2px 8px; font-size: 12px; color: #93A2B5;
}
.user-menu-trigger:hover { color: #5C6069; }
.user-name { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { transition: transform 0.15s; }
.user-menu.open .caret { transform: rotate(180deg); }
.user-menu-dropdown {
  display: none; position: absolute; left: 0; top: 100%; margin-top: 4px;
  width: 140px; background: #fff; border-radius: 8px;
  border: 0.5px solid #E1E1E1; box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 4px; z-index: 300;
}
.user-menu.open .user-menu-dropdown { display: block; }
.menu-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 6px; font-size: 13px; color: #000; cursor: pointer;
  transition: background-color 0.1s;
}
.menu-item:hover { background: #F5F5F5; }
.menu-item.danger { color: #CC3333; }
.menu-item.danger:hover { background: #FFE6ED; }
.menu-item.danger:hover .logout-icon-default { display: none !important; }
.menu-item.danger:hover .logout-icon-hover { display: block !important; }
.menu-divider { height: 0.5px; background: #E1E1E1; margin: 4px 0; }

/* ===== Legacy Sidebar (hidden, kept for reference) ===== */
.sidebar {
  width: 240px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: width 0.2s ease;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 13px 28px;
  height: 52px;
  border-bottom: 0.5px solid #E1E1E1;
  box-sizing: border-box;
}
.sidebar-logo .logo-text {
  font-size: 20px;
  font-weight: 520;
  color: #000;
  font-family: 'MiSans', 'Noto Sans SC', sans-serif;
}
.sidebar-logo .logo-net {
  background: #1244EE;
  color: #fff;
  font-size: 14px;
  font-weight: 450;
  width: 46px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  font-family: 'MiSans Latin', 'Inter', sans-serif;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
}
.sidebar-logo .logo-ozon {
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  display: none;
}
.sidebar-divider {
  margin: 0 12px;
  border: none;
  border-top: 1px solid #ECEDEE;
}
.sidebar-nav { flex: 1; padding: 8px 0; }
.nav-item { font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px 14px 16px;
  margin: 0 12px;
  border-radius: 8px;
  font-weight: 400;
  color: #000;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.nav-item:not(.active):hover { background: #f0f2f5; }
.nav-item.active { background: #ECEDEE; }
.nav-item img { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item.feedback-item { margin-top: auto; }
.sidebar-footer {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-footer {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-footer .footer-icp {
  font-size: 10px;
  color: #93A2B5;
  padding: 0 16px;
}
.sidebar-footer .logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 8px;
  background: #ECEDEE;
  font-size: 12px;
  color: #000;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 2px;
}
.sidebar-footer .logout-btn:hover {
  background: #d8dadd;
}

/* ===== Sidebar collapsed ===== */
.sidebar.collapsed { width: 60px; }
.sidebar.collapsed .sidebar-logo .logo-net,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-footer .logout-btn span,
.sidebar.collapsed .sidebar-logo .logo-ozon { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 14px 0; margin: 0 8px; }
.sidebar.collapsed .sidebar-logo { justify-content: center; padding: 13px 0; }
.sidebar.collapsed .sidebar-logo .logo-text { font-size: 18px; }
.sidebar.collapsed .sidebar-footer { padding: 10px 8px; }
.sidebar.collapsed .sidebar-footer .logout-btn { padding: 0; }
.sidebar.collapsed .sidebar-footer .footer-icp { display: none; }
.main-content.sidebar-collapsed { margin-left: 60px; }

/* sidebar toggle (回收按钮) */
.sidebar-toggle {
  position: absolute;
  top: 14px;
  right: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ECEDEE;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 101;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: all .15s ease;
  color: #93A2B5;
}
.sidebar-toggle:hover { background: #f5f5f5; color: #000; }
.sidebar-toggle svg { width: 12px; height: 12px; transition: transform .2s ease; }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }

/* ===== Main ===== */
.main { margin-left: 240px; flex: 1; padding: 32px 72px; min-height: 100vh; display: flex; flex-direction: column; align-items: center; }
.main-inner { width: 100%; max-width: 1000px; }

/* ===== Global Top Bar (顶部栏) ===== */
.global-topbar {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  height: 52px;
  background: #fff;
  border-bottom: 0.5px solid #E1E1E1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 90;
  transition: left .2s ease;
  box-sizing: border-box;
}
.global-topbar.sidebar-collapsed { left: 60px; }
.global-topbar .topbar-left { display: flex; align-items: center; gap: 10px; }
.global-topbar .topbar-title { font-size: 16px; font-weight: 600; color: #000; }
.global-topbar .topbar-right { display: flex; align-items: center; gap: 16px; }
.global-topbar .quota-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  color: #93A2B5;
  background: #fff;
  border: 0.5px solid #E1E1E1;
  border-radius: 6px;
  box-sizing: border-box;
  white-space: nowrap;
}
.global-topbar .quota-pill .quota-sep { width: 1px; height: 10px; background: #E1E1E1; flex-shrink: 0; }

/* user menu (右上角下拉) */
.user-menu { position: relative; }
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 124px;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
  color: #93A2B5;
  background: #F9FAFB;
  border: 0.5px solid #E1E1E1;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s ease;
  box-sizing: border-box;
  overflow: hidden;
}
.user-menu-trigger:hover { background: #f0f2f5; }
.user-menu-trigger .user-avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1244EE;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-menu-trigger .user-name { font-size: 12px; color: #93A2B5; font-weight: 400; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-trigger .caret { width: 10px; height: 10px; color: #93A2B5; transition: transform .2s ease; flex-shrink: 0; }
.user-menu.open .user-menu-trigger { background: #f0f2f5; }
.user-menu.open .user-menu-trigger .caret { transform: rotate(180deg); }

.user-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  width: 124px;
  background: #fff;
  border: 0.5px solid #E1E1E1;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .18s ease;
  z-index: 95;
}
.user-menu.open .user-menu-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-menu-dropdown .menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px 8px 22px;
  font-size: 12px;
  color: #93A2B5;
  cursor: pointer;
  transition: background .12s ease;
}
.user-menu-dropdown .menu-item:hover { background: #F9FAFB; }
.user-menu-dropdown .menu-item img { width: 14px; height: 14px; flex-shrink: 0; }
.user-menu-dropdown .menu-item svg { width: 14px; height: 14px; color: #93A2B5; flex-shrink: 0; }
.user-menu-dropdown .menu-item.danger { color: #DC2626; }
.user-menu-dropdown .menu-item.danger:hover { background: #FEF2F2; }
.user-menu-dropdown .menu-item.danger svg { color: #DC2626; }
/* 退出登录 hover 切换红色图标 */
.user-menu-dropdown .menu-item.danger .logout-icon-hover { display: none !important; }
.user-menu-dropdown .menu-item.danger .logout-icon-default { display: block !important; }
.user-menu-dropdown .menu-item.danger:hover .logout-icon-default { display: none !important; }
.user-menu-dropdown .menu-item.danger:hover .logout-icon-hover { display: block !important; }
.user-menu-dropdown .menu-divider { height: 1px; background: #E1E1E1; margin: 4px 0; }

/* main-content 顶部需让出 topbar 高度 */
.main-content { padding-top: 84px; }

/* ===== Top Bar ===== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-title { font-size: 20px; font-weight: 600; color: #000; margin: 0; }
.top-bar .page-title { font-size: 20px; font-weight: 600; color: #000; }
.top-bar .quota-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  color: #93A2B5;
  background: #F9FAFB;
  border: 1px solid #e1e1e1;
  border-radius: 20px;
}

/* ===== Store Info ===== */
.store-info {
  background: #F9FAFB;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.store-info .store-name { font-size: 18px; font-weight: 700; }
.store-info-name { font-size: 18px; font-weight: 700; }
.store-info-panel {
  background: #F9FAFB;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.store-info .store-detail { font-size: 12px; color: #93A2B5; display: flex; gap: 16px; margin-top: 2px; }
.store-info .store-detail span { white-space: nowrap; }
.store-info .actions { display: flex; gap: 8px; }
.store-info .store-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  background: #fff;
  border: 1px solid #ECEDEE;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.store-info .store-selector:hover {
  background: #f5f5f7;
  border-color: #d0d3d8;
}
.store-info .store-selector:active {
  transform: scale(0.97);
}

/* ===== Period Selector ===== */
.period-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.period-bar .current-period { font-size: 15px; font-weight: 500; color: #000; }
.period-bar .btn-outline {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  background: #fff;
  border: 1px solid #ECEDEE;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.period-bar .btn-outline:hover {
  background: #f5f5f7;
  border-color: #d0d3d8;
}
.period-bar .btn-outline:active {
  transform: scale(0.97);
}
.period-bar .btn-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.period-bar .btn-primary:hover { background: #333; }
.period-bar .btn-primary:active { transform: scale(0.97); }
.period-bar .spacer { flex: 1; }
.period-bar .btn-text {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  background: #fff;
  border: 1px solid #ECEDEE;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.period-bar .btn-text:hover {
  background: #f5f5f7;
  border-color: #d0d3d8;
}
.period-bar .btn-text:active {
  transform: scale(0.97);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  border-radius: 6px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: #000;
  color: #fff;
  border-color: #000;
}
.btn-primary:hover { background: #333; }
.btn-secondary {
  background: #fff;
  color: #000;
  border-color: #ECEDEE;
}
.btn-secondary:hover { background: #f5f5f7; border-color: #d0d3d8; }

/* ===== Analysis Count ===== */
.analysis-count {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  color: #93A2B5;
  background: #F9FAFB;
  border: 1px solid #e1e1e1;
  border-radius: 20px;
  white-space: nowrap;
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.stat-card {
  background: #fff;
  border: 1px solid #ECEDEE;
  border-radius: 10px;
  padding: 12px 16px;
  text-align: left;
  transition: all 0.2s ease;
  cursor: default;
}
.stat-card:hover {
  border-color: #2764EA;
  box-shadow: 0 2px 12px rgba(37,99,235,0.1);
}
.stat-card .stat-label { font-size: 12px; color: #93A2B5; font-weight: 500; margin-bottom: 12px; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: #000; letter-spacing: -0.02em; }
.stat-card .stat-value.blue { color: #2764EA; }
.stat-card .stat-sub { font-size: 14px; color: #93A2B5; margin-top: 6px; }

/* Integrated stat card */
.integrated-stat {
  background: #fff;
  border: 1px solid #ECEDEE;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  transition: all 0.2s ease;
  cursor: default;
}
.integrated-stat:hover {
  border-color: #2764EA;
  box-shadow: 0 2px 12px rgba(37,99,235,0.1);
}
.integrated-stat .integrated-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
}
.integrated-stat .integrated-row .il { font-size: 12px; color: #93A2B5; font-weight: 500; }
.integrated-stat .integrated-row .iv { font-size: 14px; font-weight: 600; color: #000; }
.integrated-stat .integrated-row .iv.green { color: #1EAD4D; }
.integrated-stat .integrated-row .iv.blue { color: #2764EA; }
.integrated-divider {
  border: none;
  border-top: 1px solid #ECEDEE;
  margin: 6px 0;
}

/* ===== Table Section ===== */
.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #000;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid #ECEDEE;
  border-radius: 10px;
}
.table-wrap::-webkit-scrollbar { height: 4px; }
.table-wrap::-webkit-scrollbar-track { background: #f5f5f5; }
.table-wrap::-webkit-scrollbar-thumb { background: #d0d3d8; border-radius: 4px; }
.table-wrap { position: relative; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-wrap thead th:first-child,
.table-wrap tbody td:first-child {
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 2;
}
.table-wrap thead th:first-child { background: #F9FAFB; z-index: 3; }
.table-wrap tbody td:first-child { background: #fff; }
.table-wrap tbody tr:hover td:first-child { background: #f8f9fa; }
thead th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 500;
  color: #93A2B5;
  font-size: 12px;
  background: #F9FAFB;
  border-bottom: 1px solid #ECEDEE;
  white-space: nowrap;
}
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { background: #f0f2f5; }
thead th .sort-icons {
  display: inline-flex;
  flex-direction: column;
  margin-left: 4px;
  font-size: 8px;
  line-height: 1;
  vertical-align: middle;
  color: #ccc;
}
thead th .sort-icons .active { color: #2764EA; }
thead th .sort-icons .dim { opacity: 0.3; }
tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
  color: #000;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8f9fa; }
td .profit-green { color: #1EAD4D; }
td .profit-yellow { color: #FFC104; }
td .profit-red { color: #FF3232; }
/* ===== Report List ===== */
.report-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.report-list-item:hover {
  border-color: #d0d4df;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  background: #fafbfc;
}
.report-list-item:active {
  transform: scale(0.995);
}
.report-list-item + .report-list-item {
  margin-top: 8px;
}
.report-list-title {
  font-weight: 600;
  font-size: 14px;
  color: #000;
  line-height: 1.4;
}
.report-list-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}
.report-list-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.report-list-amount {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
}
.report-list-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.12s ease;
}
.report-list-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}
.report-list-link::after {
  content: ' →';
}

/* ===== Report Detail ===== */
.report-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.report-detail-tabs {
  display: flex;
  gap: 8px;
}
.report-detail-tabs .btn {
  height: 32px;
  padding: 0 18px;
  font-size: 13px;
  border-radius: 8px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.report-detail-tabs .btn:active {
  transform: scale(0.97);
}


/* ===== Tab Buttons ===== */
.tab-btn {
  height: 32px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #e5e7ec;
  background: #fff;
  color: #5c6069;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.tab-btn:hover {
  background: #f5f5f7;
  border-color: #d0d3d8;
  color: #000;
}
.tab-btn:active {
  transform: scale(0.97);
}
.tab-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}
/* ===== Metric Cards ===== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.metric-card {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  padding: 18px 20px;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.metric-card:hover {
  border-color: #d0d4df;
  box-shadow: 0 3px 12px rgba(0,0,0,0.04);
}
.metric-card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.metric-card-value {
  font-size: 22px;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
  font-feature-settings: 'tnum' 1;
}
.metric-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.metric-card-value.danger {
  color: var(--danger);
}
.metric-card-value.success {
  color: var(--success);
}

/* ===== Empty Cost State ===== */
.empty-cost-state {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
  margin-bottom: 16px;
}
.empty-cost-state .ecs-icon {
  font-size: 40px;
  margin-bottom: 12px;
  color: var(--primary);
}
.empty-cost-state h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #000;
}
.empty-cost-state p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.7;
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 100px;
  white-space: nowrap;
}
.badge-success {
  background: #e6f7e6;
  color: #1a8a3c;
  border: 1px solid #b8e6b8;
}
.badge-pending {
  background: #f5f5f7;
  color: var(--text-muted);
  border: 1px solid #e5e7ec;
}

/* ===== Empty State Enhanced ===== */
.report-empty-state {
  text-align: center;
  padding: 60px 20px;
}
.report-empty-state svg {
  width: 48px;
  height: 48px;
  opacity: 0.35;
  margin-bottom: 16px;
}
.report-empty-state .title {
  font-size: 16px;
  font-weight: 600;
  color: #000;
  margin-bottom: 6px;
}
.report-empty-state p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Missing SKUs Warning ===== */

/* ===== Missing SKUs Warning ===== */
.missing-warning {
  margin-top: 10px;
  font-size: 12px;
  color: #d97706;
  background: #fffbeb;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #fde68a;
}
.missing-warning a { color: #d97706; font-weight: 600; text-decoration: underline; }

/* ===== Progress Bar ===== */
.progress-bar-wrap {
  width: 100px;
  height: 8px;
  background: #ECEDEE;
  border-radius: 50px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}
.progress-bar-fill {
  height: 100%;
  background: #1EAD4D;
  border-radius: 50px;
  min-width: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 1400px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .stat-card:nth-child(4),
  .integrated-stat:nth-child(4) { grid-column: span 1; }
}
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-card, .integrated-stat { min-width: unset; }
}
@media (max-width: 1024px) {
  /* 侧边栏 overlay 模式 */
  .sidebar {
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 200;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 199;
  }
  .sidebar-overlay.show { display: block; }
  /* 汉堡菜单按钮 */
  .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #ECEDEE;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
  }
  .main { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .main { padding: 12px 12px; }
  .main-inner { max-width: 100%; }
  .store-info { flex-direction: column; gap: 12px; align-items: flex-start; }
  .store-info .actions { width: 100%; }
  .store-info .store-selector { flex: 1; justify-content: center; }
  .period-bar .btn-text span:not(.ai-text),
  .period-bar .btn-outline span { display: none; }
  .stats-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat-card, .integrated-stat { min-width: unset; }
  .table-wrap { font-size: 12px; }
  thead th, tbody td { padding: 8px 8px; }
}
/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .main-content {
    padding: var(--space-xl);
  }

  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
  }

  .detail-panel {
    width: 100%;
    max-width: 420px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .main-content {
    margin-left: 0;
    padding: var(--space-lg);
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .store-info-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-info-detail {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .auth-card {
    width: 90%;
    padding: var(--space-xl);
  }

  .modal {
    max-width: 95%;
    padding: var(--space-lg);
  }

  .confirm-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: var(--space-md);
  }

  .card {
    padding: var(--space-lg);
  }

  .table-wrap {
    margin: 0 calc(-1 * var(--space-md));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* ===== Print ===== */
@media print {
  body * { visibility: hidden; }
  #analysis-content, #analysis-content * { visibility: visible; }
  #analysis-content { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ===== Membership Styles ===== */
.btn-disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

.btn-light {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-light:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

/* ===== Membership: Banner ===== */
.membership-banner {
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, #262a33 100%);
  border-radius: var(--radius);
  padding: var(--space-xl) var(--space-2xl);
  margin-bottom: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
}

.membership-banner.free {
  background: linear-gradient(135deg, #1a1d23 0%, #2d323e 100%);
}

.membership-banner.regular {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.membership-banner.pro {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.membership-banner .banner-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.membership-banner .banner-label {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

.membership-banner .banner-tier {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.membership-banner .banner-detail {
  font-size: var(--text-sm);
  opacity: 0.75;
}

.membership-banner .banner-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.membership-banner .banner-count {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.membership-banner .banner-count-label {
  font-size: var(--text-xs);
  opacity: 0.7;
}

/* ===== Membership: Quota Cards ===== */
.quota-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.quota-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: box-shadow var(--duration) var(--ease);
}

.quota-card:hover {
  box-shadow: var(--shadow-sm);
}

.quota-card .qc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quota-card .qc-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quota-card .qc-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}


.qc-divider {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

.quota-card .qc-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: var(--space-xs);
}

.quota-card .qc-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.quota-card .qc-bar {
  height: 4px;
  background: var(--bg-hover);
  border-radius: 4px;
  overflow: hidden;
  margin-top: var(--space-xs);
}

.quota-card .qc-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 300ms var(--ease);
}

.quota-card .qc-bar-fill.report { background: var(--primary); }
.quota-card .qc-bar-fill.ai { background: var(--success); }

/* ===== Membership: Detail Card ===== */
.membership-detail-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
}

.membership-detail-card .md-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.membership-detail-card .md-item .md-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.membership-detail-card .md-item .md-value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}

/* ===== Membership: Section Header ===== */
.mem-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.mem-section-header .mem-section-title {
  font-size: var(--text-lg);
  font-weight: 600;
}

/* ===== Membership: Plan Cards ===== */
.plan-cards-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

@media (max-width: 900px) {
  .plan-cards-row { grid-template-columns: repeat(2, 1fr); }
  .quota-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .plan-cards-row { grid-template-columns: 1fr; }
  .quota-grid { grid-template-columns: 1fr; }
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 200ms var(--ease);
}

.plan-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.plan-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-md);
}

.plan-card.featured:hover {
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg);
  transform: translateY(-2px);
}

.plan-card.featured::before {
  content: '推荐';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 12px;
  border-radius: 100px;
}

.plan-card .plan-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 100px;
  margin-bottom: var(--space-md);
  align-self: flex-start;
}

.plan-card .plan-tier-badge.regular {
  background: var(--primary-light);
  color: var(--primary);
}

.plan-card .plan-tier-badge.pro {
  background: #f3e8ff;
  color: #7c3aed;
}

.plan-card .plan-price {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.plan-card .plan-price .currency {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-muted);
}

.plan-card .plan-type-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.plan-card .plan-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex: 1;
}

.plan-card .plan-feature {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text);
}

.plan-card .plan-feature .pf-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

/* ===== Membership: TopUp Cards ===== */
.topup-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

@media (max-width: 600px) {
  .topup-cards-row { grid-template-columns: 1fr; }
}

.topup-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 200ms var(--ease);
}

.topup-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.topup-card .tc-price {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.topup-card .tc-type {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.topup-card .tc-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex: 1;
}

.topup-card .tc-feature {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
}

/* ===== Membership: Tips ===== */
.mem-tips {
  background: var(--primary-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-xl);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.mem-tips p { margin-bottom: var(--space-xs); }
.mem-tips p:last-child { margin-bottom: 0; }

/* ===== Membership: Usage History ===== */
.usage-list {
  display: flex;
  flex-direction: column;
}

.usage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  font-size: var(--text-sm);
  transition: background var(--duration) var(--ease);
}

.usage-item:last-child { border-bottom: none; }
.usage-item:hover { background: var(--bg); }

.usage-item .ui-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.usage-item .ui-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.usage-item .ui-dot.report { background: var(--primary); }
.usage-item .ui-dot.ai { background: var(--success); }

.usage-item .ui-action {
  font-weight: 500;
}

.usage-item .ui-source {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.usage-item .ui-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ===== Membership: TopUp List ===== */
.topup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.topup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

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

.topup-item .topup-emoji {
  font-size: 20px;
}

.topup-item .topup-name {
  font-weight: 600;
}

.topup-item .topup-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.topup-item-exhausted {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

/* ===== Membership: Actions ===== */
.mem-actions {
  display: flex;
  gap: 12px;
}

.mem-back-wrap {
  margin-top: 4px;
  margin-bottom: 12px;
}

/* ===== Membership: Purchase Message ===== */
.purchase-msg {
  padding: 8px 12px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}

/* ===== Membership: Section Subtitle ===== */
.mem-section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.usage-list-card {
  padding: 0;
  overflow: hidden;
}

.btn-block {
  width: 100%;
}

.mem-icon {
  width: 28px;
  height: 28px;
  display: block;
}

.mem-icon-inline {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 2px;
  display: inline;
}


/* ===== Auth page interaction fixes ===== */
.auth-page input:focus,
.auth-page input:focus-visible {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  background: var(--surface) !important;
  outline: none !important;
}

.auth-page input:hover {
  border-color: var(--text-muted);
}

.auth-page button {
  font-family: inherit;
}

.auth-page button:active {
  transform: scale(0.98) !important;
}

.auth-page .auth-btn-outline:hover {
  background: var(--bg-hover) !important;
  border-color: var(--text-muted) !important;
}

.auth-page .auth-btn-primary:hover {
  background: #2a2a2a !important;
}

.auth-page .auth-btn-block:hover {
  background: var(--bg-hover) !important;
  border-color: var(--text-muted) !important;
}

.auth-page .auth-code-btn:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

.auth-page .auth-eye:hover {
  color: var(--text-secondary) !important;
}

.auth-page .auth-back-link:hover {
  color: var(--text) !important;
}

.auth-page .auth-link:hover {
  color: var(--primary-hover) !important;
  text-decoration: underline !important;
}

/* ===== Buttons (for other pages) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: #000;
  color: #fff;
}
.btn-primary:hover { background: #333; }
.btn-secondary {
  background: #fff;
  color: #000;
  border: 1px solid #ECEDEE;
}
.btn-secondary:hover { background: #f5f5f7; border-color: #d0d3d8; }
.btn-disabled { opacity: 0.5; pointer-events: none; }

/* ===== Form Inputs ===== */
.form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ECEDEE;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #000;
  background: #fff;
  transition: border-color 0.15s ease;
}
.form-input:focus { outline: none; border-color: #2764EA; box-shadow: 0 0 0 3px rgba(39,100,234,0.1); }
select.form-input { appearance: auto; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 560px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title { font-size: 18px; font-weight: 600; }
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* ===== Auth Page Container ===== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  padding: 20px;
  margin-top: -40px;
}

/* ===== Auth pages (欧单Net login/register) ===== */
.auth-wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.auth-brand {
  text-align: center;
  margin-bottom: 36px;
}

.auth-brand > div:first-child {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-back-row {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.auth-back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

.auth-back-link:hover {
  color: var(--text);
}

.auth-fg {
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #F9FAFB;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: var(--surface);
}

.auth-input-pwd {
  padding-right: 46px;
}

.auth-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.auth-eye:hover {
  color: var(--text-secondary);
}

.auth-eye svg {
  width: 20px;
  height: 20px;
}

.auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.auth-cb-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-cb {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  margin: 0;
  cursor: pointer;
}

.auth-cb-label {
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.auth-link {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

.auth-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.auth-btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.auth-btn-outline {
  flex: 1;
  height: 46px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #000000;
  border: 1px solid #e0e0e0;
  font-family: inherit;
  transition: all 0.15s ease;
}

.auth-btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.auth-btn-outline:active {
  transform: scale(0.98);
}

.auth-btn-primary {
  flex: 1.6;
  height: 46px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  color: #ffffff;
  border: none;
  gap: 4px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.auth-btn-primary:hover {
  background: #2a2a2a;
}

.auth-btn-primary:active {
  transform: scale(0.98);
}

.auth-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-btn-block {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F9FAFB;
  color: #000000;
  border: 1px solid #e0e0e0;
  font-family: inherit;
  transition: all 0.15s ease;
}

.auth-btn-block:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.auth-btn-block:active {
  transform: scale(0.98);
}

.auth-btn-full {
  width: 100%;
}

.auth-code-row {
  display: flex;
  gap: 10px;
}

.auth-code-row .auth-input {
  flex: 1;
}

.auth-code-btn {
  flex-shrink: 0;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: var(--surface);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s ease;
}

.auth-code-btn:hover {
  background: var(--primary);
  color: #fff;
}

.auth-code-btn:active {
  transform: scale(0.98);
}

.auth-code-btn:disabled {
  border-color: var(--border);
  color: var(--text-muted);
  background: var(--bg-hover);
  cursor: not-allowed;
}

.auth-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--danger-bg);
  border-radius: 8px;
  border: 1px solid rgba(220, 38, 38, 0.1);
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-agreement {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: left;
  margin-top: 16px;
  margin-bottom: 12px;
}

.auth-agree-label {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}

.auth-agree-label a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-agree-label a:hover {
  text-decoration: underline;
}

/* Dark mode overrides for auth buttons */

/* ===== Auth page interaction fixes ===== */
.auth-page input:focus,
.auth-page input:focus-visible {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  background: var(--surface) !important;
  outline: none !important;
}

.auth-page input:hover {
  border-color: var(--text-muted);
}

.auth-page button {
  font-family: inherit;
}

.auth-page button:active {
  transform: scale(0.98) !important;
}

.auth-page .auth-btn-outline:hover {
  background: var(--bg-hover) !important;
  border-color: var(--text-muted) !important;
}

.auth-page .auth-btn-primary:hover {
  background: #2a2a2a !important;
}

.auth-page .auth-btn-block:hover {
  background: var(--bg-hover) !important;
  border-color: var(--text-muted) !important;
}

.auth-page .auth-code-btn:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

.auth-page .auth-eye:hover {
  color: var(--text-secondary) !important;
}

.auth-page .auth-back-link:hover {
  color: var(--text) !important;
}

.auth-page .auth-link:hover {
  color: var(--primary-hover) !important;
  text-decoration: underline !important;
}

/* ===== Empty State ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #93A2B5;
}
.empty-state .title { font-size: 16px; font-weight: 600; color: #000; margin-top: 12px; }
.empty-state .desc { font-size: 13px; margin-top: 4px; }
.empty-state svg { width: 48px; height: 48px; opacity: 0.4; }

/* ===== Upload ===== */
.upload-step-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #93A2B5;
  margin-bottom: 16px;
}
.upload-step-indicator .step.active { color: #2764EA; font-weight: 600; }
.upload-step-indicator .step.done { color: #1EAD4D; }
.upload-step-indicator .step-divider { color: #ddd; margin: 0 4px; }
.upload-modal-step { padding: 8px 0; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #000; margin-bottom: 4px; }
.upload-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  gap: 16px;
}
.spinner-lg {
  width: 40px;
  height: 40px;
  border: 3px solid #ECEDEE;
  border-top-color: #2764EA;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-text { font-size: 15px; font-weight: 600; color: #000; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Misc ===== */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.page-subtitle { font-size: 12px; color: #93A2B5; margin-top: 2px; margin-bottom: 20px; }

/* ===== Responsive (保留原有) ===== */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .sidebar { width: 56px; }
  .sidebar-logo .logo-brand, .sidebar-logo .logo-ozon,
  .nav-item span, .sidebar-footer .footer-icp, .sidebar-footer .logout-btn span { display: none; }
  .nav-item { font-size: 14px; justify-content: center; padding: 9px 0; margin: 0 4px; }
  .nav-item img { width: 18px; height: 18px; }
  .sidebar-footer { text-align: center; padding: 12px 4px; }
  
  .main { margin-left: 56px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .main { padding: 12px; }
  .stats-grid { grid-template-columns: 1fr; }
  .store-info { flex-direction: column; gap: 12px; align-items: flex-start; }
  .table-wrap { font-size: 12px; }
  thead th, tbody td { padding: 8px 8px; }
}

/* ===== Cost Library Specific Styles ===== */
.cost-page-header {
  margin-bottom: 20px;
}
.cost-page-header .page-title {
  font-size: 20px;
  font-weight: 600;
  color: #000;
  margin: 0;
}
.cost-missing-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  color: #d97706;
}
.cost-missing-notice strong { font-weight: 600; }

.cost-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cost-toolbar .cost-store-select {
  width: 200px;
}

.cost-summary-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cost-summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #F9FAFB;
  border-radius: 8px;
  font-size: 13px;
  color: #000;
}
.cost-summary-item .cost-summary-label {
  color: #93A2B5;
  font-weight: 500;
}
.cost-summary-item .cost-summary-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cost-summary-item.cost-summary-highlight {
  background: #FEF3C7;
  color: #92400E;
}
.cost-summary-item.cost-summary-highlight .cost-summary-label {
  color: #B45309;
}

/* Import section */
.cost-import-section {
  margin-bottom: 16px;
  padding: 16px 20px;
  background: #F9FAFB;
  border: 1px solid #ECEDEE;
  border-radius: 10px;
}
.cost-import-section .cost-import-title {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  margin-bottom: 6px;
}
.cost-import-section .cost-import-hint {
  font-size: 12px;
  color: #93A2B5;
  margin-bottom: 12px;
}
.cost-import-section .cost-import-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cost-import-section .cost-import-actions .cost-import-file {
  flex: 1;
}
.cost-import-result {
  margin-top: 8px;
  font-size: 13px;
  color: #1EAD4D;
}

/* Cost table cell editing */
.cost-cell-editable {
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  transition: background 0.12s ease;
  font-variant-numeric: tabular-nums;
}
.cost-cell-editable:hover {
  background: #EEF2FF;
}
.cost-cell-editable:active {
  background: #DBE1F8;
}
.cost-cell-editing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cost-cell-editing .cost-cell-input {
  width: 80px;
  padding: 4px 8px;
  border: 1px solid #2764EA;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  box-shadow: 0 0 0 2px rgba(39,100,234,0.15);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cost-cell-editing .cost-cell-hint {
  font-size: 11px;
  color: #93A2B5;
  white-space: nowrap;
}

/* Cost table row states */
.cost-row-filled td {
  opacity: 1 !important;
}
.cost-row-empty td {
  opacity: 0.7;
}
.cost-row-empty:hover td {
  opacity: 1;
}
.cost-row-pending td:first-child {
  position: relative;
}
.cost-badge-pending {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: #FEF3C7;
  color: #92400E;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 18px;
}
.cost-badge-filled {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: #DCFCE7;
  color: #166534;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 18px;
}
.cost-row-pending {
  background: #FFFBEB;
}
.cost-row-pending:hover td {
  background: #FEF3C7 !important;
}

/* Cost detail modal */
.cost-detail-modal .modal {
  max-width: 520px;
}
.cost-detail-header {
  margin-bottom: 20px;
}
.cost-detail-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #000;
  margin-bottom: 2px;
}
.cost-detail-header .cost-detail-sub {
  font-size: 13px;
  color: #93A2B5;
}
.cost-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.cost-detail-stat {
  padding: 12px;
  background: #F9FAFB;
  border-radius: 8px;
}
.cost-detail-stat .cost-detail-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: #93A2B5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.cost-detail-stat .cost-detail-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  font-variant-numeric: tabular-nums;
}

.cost-detail-section {
  margin-bottom: 16px;
}
.cost-detail-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #93A2B5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ECEDEE;
}
.cost-detail-sales-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cost-detail-sales-item {
  padding: 10px 12px;
  background: #F9FAFB;
  border-radius: 8px;
}
.cost-detail-sales-item .cost-detail-stat-label {
  font-size: 11px;
  color: #93A2B5;
  margin-bottom: 2px;
}
.cost-detail-sales-item .cost-detail-sales-value {
  font-size: 16px;
  font-weight: 600;
  color: #000;
  font-variant-numeric: tabular-nums;
}

.cost-changelog {
  max-height: 200px;
  overflow-y: auto;
}
.cost-changelog-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}
.cost-changelog-item:last-child {
  border-bottom: none;
}
.cost-changelog-item .cost-changelog-desc {
  color: #000;
}
.cost-changelog-item .cost-changelog-date {
  color: #93A2B5;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 12px;
}

.cost-detail-empty {
  text-align: center;
  padding: 24px;
  color: #93A2B5;
  font-size: 13px;
}

.cost-table-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.cost-table-actions .btn-cost-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #ECEDEE;
  background: #fff;
  color: #000;
  cursor: pointer;
  transition: all 0.12s ease;
}
.cost-table-actions .btn-cost-detail:hover {
  background: #F9FAFB;
  border-color: #d0d3d8;
}
.cost-table-actions .btn-cost-delete {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
  color: #93A2B5;
  cursor: pointer;
  transition: all 0.12s ease;
}
.cost-table-actions .btn-cost-delete:hover {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FECACA;
}

.cost-article-link {
  font-weight: 600;
  color: #2764EA;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.12s ease;
}
.cost-article-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

.cost-product-name {
  font-size: 12px;
  color: #93A2B5;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cost-sku-cell {
  font-size: 12px;
  color: #93A2B5;
}

/* ===== Auth button borders (highest priority) ===== */
.auth-page .auth-btn-primary {
  border: none !important;
  background: #000000 !important;
  color: #ffffff !important;
}
.auth-page .auth-btn-primary:hover {
  background: #333333 !important;
}
.auth-page .auth-btn-outline {
  border: 1px solid #e0e0e0 !important;
  background: #ffffff !important;
  color: #000000 !important;
}
.auth-page .auth-btn-block {
  border: 1px solid #e0e0e0 !important;
  background: #F9FAFB !important;
  color: #000000 !important;
}
.auth-page .auth-code-btn {
  border: 2px solid #2563eb !important;
}
.auth-page .auth-input {
  border: 1px solid #e0e0e0 !important;
  background: #F9FAFB !important;
}


/* ===== Store Settings Taste ===== */
.store-settings-header {
  margin-bottom: 24px;
}
.store-settings-header .page-title {
  margin-bottom: 2px;
}
.store-settings-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #9095a0;
  background: #f5f6f8;
  padding: 3px 10px;
  border-radius: 20px;
}
.store-add-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #eef0f4;
}
.store-add-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  margin-bottom: 16px;
}
.store-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 10px;
  border: 1px solid #eef0f4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.store-card:hover {
  border-color: #d0d4dd;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.store-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f5f6f8;
  color: #5c6069;
  flex-shrink: 0;
}
.store-card-name {
  font-size: 15px;
  font-weight: 600;
  color: #000;
  letter-spacing: -0.01em;
}
.store-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #9095a0;
  margin-top: 2px;
}
.store-card-meta-label {
  color: #c0c4cc;
}
.store-card-meta-value {
  color: #5c6069;
  font-weight: 500;
}
.store-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
}
.store-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background: #fafbfc;
  border-radius: 12px;
  border: 1px dashed #e0e2e6;
}
.store-empty-text {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 500;
  color: #9095a0;
}
.store-empty-sub {
  margin-top: 4px;
  font-size: 13px;
  color: #b0b4be;
}
.store-success-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f0fdf4;
  color: #16a34a;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid #dcfce7;
}
.store-edit-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eef0f4;
}
.store-edit-form-title {
  font-size: 13px;
  font-weight: 500;
  color: #000;
  margin-bottom: 12px;
}
.store-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.store-edit-label {
  font-size: 12px;
  font-weight: 500;
  color: #5c6069;
  display: block;
  margin-bottom: 4px;
}
.store-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.store-add-footer {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.store-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.store-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.store-section-heading {
  font-size: 17px;
  font-weight: 600;
  color: #000;
  margin: 0;
  letter-spacing: -0.01em;
}
.store-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  background: #000;
  color: #fff;
  transition: all 0.15s ease;
}
.store-add-btn:hover {
  background: #333;
}
.store-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #ecedee;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  color: #000;
  transition: all 0.15s ease;
}
.store-edit-btn:hover {
  border-color: #2764EA;
  color: #2764EA;
}
.store-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #c0c4cc;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}
.store-delete-btn:hover {
  color: #e74c3c;
  background: #fef2f2;
}

/* ===== Feedback & Suggestions Page ===== */
.feedback-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
}
.feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.feedback-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-light);
}
.feedback-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.feedback-tab:hover {
  color: var(--text);
}
.feedback-tab.active {
  color: var(--text);
  border-bottom: 2px solid var(--primary);
}
.feedback-sort-bar {
  display: flex;
  gap: 8px;
}
.feedback-sort-btn {
  padding: 6px 14px;
  font-size: 12px;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-sort-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.feedback-sort-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}
.feedback-page-error {
  padding: 10px 14px;
  background: #fef2f2;
  color: var(--danger);
  border-radius: 8px;
  font-size: 13px;
}
.feedback-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.feedback-empty {
  text-align: center;
  padding: 80px 20px;
}
.feedback-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.feedback-empty-text {
  color: var(--text-muted);
  font-size: 14px;
}
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feedback-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 20px;
  transition: box-shadow 0.2s;
}
.feedback-card:hover {
  box-shadow: var(--shadow-sm);
}
.feedback-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.feedback-card-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.feedback-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.feedback-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.feedback-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.feedback-category {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  white-space: nowrap;
}
.feedback-card-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 12px;
  word-break: break-word;
}
.feedback-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.feedback-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.feedback-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-like-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.feedback-like-btn.liked {
  background: #fef2f2;
  border-color: #f87171;
  color: #dc2626;
}
.feedback-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: none;
  border-radius: 16px;
  background: none;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-reply-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.feedback-status {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}
.feedback-status-pending {
  background: #fffbeb;
  color: #d97706;
}
.feedback-status-reviewed {
  background: #eef2ff;
  color: #4f46e5;
}
.feedback-status-resolved {
  background: #f0fdf4;
  color: #16a34a;
}
.feedback-load-more {
  width: 100%;
  padding: 12px;
  border: 1px dashed var(--border-light);
  border-radius: 8px;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-load-more:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-subtle);
}
.feedback-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Replies inside card */
.feedback-replies {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feedback-replies-loading {
  margin-top: 12px;
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.feedback-replies-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.feedback-reply-item {
  padding: 10px;
  background: var(--bg);
  border-radius: 8px;
}
.feedback-reply-item.is-admin {
  background: var(--primary-subtle);
  border-left: 3px solid var(--primary);
}
.feedback-reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.feedback-reply-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.feedback-reply-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
}
.feedback-reply-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}
.feedback-reply-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Modal */
.feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.feedback-modal {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  overflow: hidden;
}
.feedback-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
}
.feedback-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.feedback-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: var(--bg-hover);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.feedback-modal-close:hover {
  background: var(--border);
}
.feedback-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.feedback-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.feedback-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.feedback-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}
.feedback-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
  outline: none;
  color: var(--text);
}
.feedback-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}
.feedback-error {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fef2f2;
  color: var(--danger);
  border-radius: 6px;
  font-size: 12px;
}
.feedback-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
}
/* ===== 版本记录页面 (更新 v2) ===== */
.version-log-page {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 72px;
}
.version-log-page .page-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.version-log-page .page-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #6b7280;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.6;
}

/* Error card */
.version-log-error-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
}
.version-log-error-card .version-log-error-msg {
  flex: 1;
  font-size: 14px;
  color: #dc2626;
  line-height: 1.5;
}
.version-log-error-card .version-log-error-msg strong {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}
.version-log-retry-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 16px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.version-log-retry-btn:hover {
  background: #fef2f2;
  border-color: #f5a0a0;
}

/* Empty state */
.version-log-empty {
  text-align: center;
  padding: 80px 20px;
}
.version-log-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: #d1d5db;
}
.version-log-empty-text {
  font-size: 15px;
  font-weight: 500;
  color: #9ca3af;
  margin-bottom: 4px;
}
.version-log-empty-sub {
  font-size: 13px;
  color: #d1d5db;
}

/* Timeline list */
.version-log-list {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 32px;
}
.version-log-list::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: #e5e7eb;
  border-radius: 1px;
}

/* Card wrapper (holds timeline dot + content) */
.version-log-card {
  position: relative;
  padding: 0 0 32px 0;
}
.version-log-card:last-child {
  padding-bottom: 0;
}

/* Timeline dot */
.version-log-card::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #2563eb;
  box-shadow: 0 0 0 4px #fff;
  z-index: 1;
}

/* Card inner */
.version-log-card-inner {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 1px 4px rgba(0,0,0,0.02);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.version-log-card-inner:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.03);
}

/* Staggered fade-in animation */
.version-log-card-inner {
  opacity: 0;
  transform: translateY(8px);
  animation: versionLogFadeUp 0.35s ease forwards;
}
.version-log-card:nth-child(1) .version-log-card-inner { animation-delay: 0.05s; }
.version-log-card:nth-child(2) .version-log-card-inner { animation-delay: 0.1s; }
.version-log-card:nth-child(3) .version-log-card-inner { animation-delay: 0.15s; }
.version-log-card:nth-child(4) .version-log-card-inner { animation-delay: 0.2s; }
.version-log-card:nth-child(5) .version-log-card-inner { animation-delay: 0.25s; }
.version-log-card:nth-child(6) .version-log-card-inner { animation-delay: 0.3s; }
.version-log-card:nth-child(7) .version-log-card-inner { animation-delay: 0.35s; }
.version-log-card:nth-child(8) .version-log-card-inner { animation-delay: 0.4s; }
.version-log-card:nth-child(9) .version-log-card-inner { animation-delay: 0.45s; }
.version-log-card:nth-child(10) .version-log-card-inner { animation-delay: 0.5s; }

@keyframes versionLogFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .version-log-card-inner {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Header */
.version-log-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

/* Version badge */
.version-log-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* Date with dot separator */
.version-log-date {
  font-size: 13px;
  color: #9ca3af;
  font-weight: 400;
  position: relative;
  padding-left: 12px;
}
.version-log-date::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d1d5db;
}

/* Title */
.version-log-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Description lines */
.version-log-desc {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.8;
}
.version-log-desc-line {
  margin: 0 0 4px 0;
  padding-left: 16px;
  position: relative;
}
.version-log-desc-line::before {
  content: '\00B7';
  position: absolute;
  left: 4px;
  color: #9ca3af;
}
.version-log-desc-line:last-child {
  margin-bottom: 0;
}

/* Skeleton loading */
.version-log-skeleton {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-left: 32px;
  position: relative;
}
.version-log-skeleton::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: #e5e7eb;
  border-radius: 1px;
}
.version-log-skeleton-item {
  position: relative;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 24px 28px;
}
.version-log-skeleton-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e5e7eb;
  z-index: 1;
}
.version-log-skeleton-line {
  height: 14px;
  border-radius: 7px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.version-log-skeleton-line:first-child {
  width: 80px;
  height: 22px;
  border-radius: 11px;
  margin-bottom: 16px;
}
.version-log-skeleton-line:nth-child(2) {
  width: 65%;
}
.version-log-skeleton-line:nth-child(3) {
  width: 85%;
}
.version-log-skeleton-line:nth-child(4) {
  width: 45%;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Nav item */
.nav-item.version-log-item {
  margin-top: 2px;
}
/* ===== 使用教程页面 ===== */
.tutorial-page {
  max-width: 820px;
  margin: 0 auto;
  padding-bottom: 72px;
}

.tutorial-page .page-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.tutorial-page .page-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #6b7280;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  line-height: 1.6;
}

.tutorial-step {
  margin-bottom: 28px;
  padding: 28px 32px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 1px 4px rgba(0,0,0,0.02);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.tutorial-step:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.03);
}

/* sticky header within step */
.tutorial-step .step-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.tutorial-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #1f2937;
  border-radius: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.tutorial-step .step-title {
  font-size: 17px;
  font-weight: 600;
  color: #111827;
  margin: 0;
  line-height: 1.5;
  padding-top: 2px;
}

.tutorial-step .step-content p {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.75;
  margin-bottom: 16px;
}

.tutorial-step .step-content p:last-child {
  margin-bottom: 0;
}

.tutorial-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px 0;
  border-radius: 16px;
}

/* caution note block */
.tutorial-step .step-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 0;
}

.tutorial-step .step-note p {
  font-size: 14px;
  color: #9a3412;
  line-height: 1.7;
  margin-bottom: 10px;
}

.tutorial-step .step-note p:last-child {
  margin-bottom: 0;
}

.tutorial-step .step-note strong {
  color: #c2410c;
  font-weight: 700;
}

.tutorial-step .note-label {
  font-weight: 600;
  font-size: 14px;
  color: #9a3412;
  margin-top: 16px;
  margin-bottom: 4px;
}

/* FAQ section */
.tutorial-step .step-faq {
  width: 100%;
}

.tutorial-step .faq-title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 20px;
  margin-top: 0;
}

.tutorial-step .faq-item {
  margin-bottom: 12px;
  padding: 16px 20px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #f0f0f0;
  transition: border-color 0.2s ease;
}

.tutorial-step .faq-item:hover {
  border-color: #d1d5db;
}

.tutorial-step .faq-q {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
  margin-bottom: 6px;
  line-height: 1.6;
}

.tutorial-step .faq-a {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.7;
  margin: 0;
}

/* ending banner */
.tutorial-ending {
  text-align: center;
  padding: 36px 32px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: 12px;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}

.tutorial-ending::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.ending-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ===== Step entrance animation ===== */
.tutorial-step {
  animation: stepFadeIn 0.5s ease both;
}
.tutorial-step:nth-of-type(1) { animation-delay: 0s; }
.tutorial-step:nth-of-type(2) { animation-delay: 0.06s; }
.tutorial-step:nth-of-type(3) { animation-delay: 0.12s; }
.tutorial-step:nth-of-type(4) { animation-delay: 0.18s; }
.tutorial-step:nth-of-type(5) { animation-delay: 0.24s; }
.tutorial-step:nth-of-type(6) { animation-delay: 0.3s; }
.tutorial-step:nth-of-type(7) { animation-delay: 0.36s; }

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

.tutorial-ending {
  animation: stepFadeIn 0.5s ease 0.5s both;
}

@media (prefers-reduced-motion: reduce) {
  .tutorial-step,
  .tutorial-ending {
    animation: none;
  }
}

/* responsive */
@media (max-width: 640px) {
  .tutorial-step {
    padding: 20px 16px;
  }
  .tutorial-page .page-title {
    font-size: 22px;
  }
}



/* ── Order list styles ── */
.order-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}
.order-tab {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  transition: all 0.15s ease;
}
.order-tab:hover { color: #374151; }
.order-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.order-list { margin-bottom: 20px; }

.order-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.order-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.order-item:hover { border-color: #d1d5db; }

.oi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.oi-id { font-size: 13px; font-weight: 600; color: #111827; }
.oi-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.oi-status.status-pending { background: #fef3c7; color: #d97706; }
.oi-status.status-paid { background: #d1fae5; color: #059669; }
.oi-status.status-expired { background: #fee2e2; color: #dc2626; }
.oi-status.status-refunded { background: #e5e7eb; color: #6b7280; }

.oi-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}
.oi-product { font-weight: 500; color: #374151; }
.oi-time { color: #9ca3af; }

.oi-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.oi-actions .btn-sm {
  font-size: 12px;
  padding: 4px 12px;
  height: auto;
  min-height: 28px;
}

.oi-paid {
  margin-top: 6px;
  font-size: 11px;
  color: #9ca3af;
}

/* Order page back-wrap */
.mem-back-wrap { margin-top: 24px; }

/* ========== Dashboard V2 (Figma 精确还原 V1.0.3.1) ========== */
.dashboard-v2 {
  background: #FFF;
  min-height: calc(100vh - 84px);
  padding: 0;
  font-family: 'MiSans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #000;
  box-sizing: border-box;
  overflow: hidden;
}
.dashboard-v2 * { box-sizing: border-box; }

/* 顶部控制栏 (y=84, h=32) */
.dv2-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  background: #F8FAFC;
  border: 0.5px solid #E5E7EB;
  border-radius: 8px;
  padding: 4px 6px;
}
.dv2-toolbar-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  opacity: 0.45;
}
.dv2-store-select {
  height: 32px; padding: 0 10px;
  border: 0.5px solid #E1E1E1; border-radius: 6px;
  font-size: 13px; background: #fff; color: #000; cursor: pointer;
  margin-right: 4px;
}
.dv2-date-btn {
  height: 28px; padding: 0 10px;
  border-radius: 6px; border: none;
  background: transparent; color: #374151; font-size: 13px;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 4px; white-space: nowrap;
}
.dv2-date-btn:hover { background: #E5E7EB; color: #111827; }
.dv2-date-btn.active {
  background: #fff; color: #111827; font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.dv2-date-btn-custom { gap: 4px; }
.dv2-date-input {
  height: 28px; padding: 0 8px; width: 104px;
  border: 0.5px solid #E1E1E1; border-radius: 6px;
  font-size: 13px; background: #fff; color: #000; font-family: inherit;
}
.dv2-sync-btn {
  height: 32px; padding: 0 16px; border-radius: 8px;
  background: #fff; border: 0.5px solid #E1E1E1;
  color: #000; font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; transition: all 0.15s;
  margin-left: auto;
}
.dv2-sync-btn:hover { background: #F5F5F5; }
.dv2-sync-btn:disabled { cursor: not-allowed; opacity: 0.6; }
.dv2-sync-meta { font-size: 12px; color: #93A2B5; margin-left: 8px; }

/* 消息条 */
.dv2-msg { padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; }
.dv2-msg-info { background: #FFFBEB; color: #92400E; }
.dv2-msg-success { background: #F0FDF4; color: #166534; }
.dv2-msg-error { background: #FEF2F2; color: #991B1B; }

/* 统计卡片 (Figma: 272×139, y=128) */
.dv2-stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.dv2-stat-card {
  height: 139px;
  background: #F5F7FA; border-radius: 10px;
  border: 0.5px solid #E5E5E5;
  padding: 16px; display: flex; flex-direction: column; justify-content: space-between;
}
.dv2-stat-head { display: flex; justify-content: space-between; align-items: center; }
.dv2-stat-title { font-size: 14px; color: #000; font-weight: 500; }
.dv2-stat-value {
  font-size: 26px; font-weight: 600; color: #000;
  font-family: 'MiSans Latin', 'IBM Plex Sans', sans-serif; line-height: 1.2;
}
.dv2-stat-value-unit { font-size: 12px; font-weight: 400; color: #93A2B5; margin-left: 4px; }
.dv2-stat-foot { display: flex; align-items: center; }

/* 标签文本（Figma 中为纯灰色文字，非胶囊） */
.dv2-label { font-size: 12px; color: #93A2B5; }
.dv2-label-sm { font-size: 10px; color: #93A2B5; }

/* 大面板卡片 (Figma: 白底+0.5px边框+圆角10+阴影) */
.dv2-panel {
  background: #fff; border-radius: 10px;
  border: 0.5px solid #E5E5E5; padding: 16px;
  box-shadow: 20px 0 64px 0 rgba(0,0,0,0.03);
}
.dv2-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dv2-panel-title { font-size: 14px; font-weight: 500; color: #000; }
.dv2-panel-sub { font-size: 12px; color: #93A2B5; }

/* 图表区 (4列grid，与统计卡片列对齐) */
.dv2-charts-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.dv2-chart-left { grid-column: span 2; min-width: 0; display: flex; flex-direction: column; }
.dv2-chart-left .dv2-panel { height: 100%; display: flex; flex-direction: column; }
.dv2-chart-left .dv2-chart-container { flex: 1; min-height: 240px; }
.dv2-chart-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.dv2-chart-container { height: 240px; position: relative; }

/* Figma双列主布局 */
.dv2-main-grid { display: flex; gap: 12px; height: calc(100vh - 192px); }
.dv2-left-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.dv2-right-col { width: 716px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.dv2-store-row { display: flex; gap: 12px; align-items: stretch; justify-content: flex-end; }
.dv2-store-row .dv2-panel { width: 282px; flex-shrink: 0; }
.dv2-right-col .dv2-store-card { width: 422px; flex-shrink: 0; }
.dv2-right-col > .dv2-panel { width: 100%; }

/* 小卡片 (与统计卡片一致: 139px) */
.dv2-small-card {
  background: #fff; border-radius: 10px; border: 0.5px solid #E5E5E5;
  padding: 16px; display: flex; flex-direction: column; justify-content: space-between;
  height: 139px;
}
.dv2-small-card-sm { height: 139px; }
.dv2-small-card-md { height: 139px; }
.dv2-small-card-lg { flex: 1; min-height: 139px; }
.dv2-small-card-title { font-size: 14px; color: #000; font-weight: 500; }
.dv2-small-card-value { font-size: 22px; font-weight: 600; color: #000; font-family: 'MiSans Latin', 'IBM Plex Sans', sans-serif; }
.dv2-small-card-value-unit { font-size: 12px; font-weight: 400; color: #93A2B5; }
.dv2-small-card:hover { border-color: #C7D2FE; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.dv2-small-card-active { border-color: #2563EB !important; background: #F8FAFC; box-shadow: 0 0 0 1px rgba(37,99,235,0.15); }

/* 展开订单列表面板 */
.dv2-expanded-orders {
  background: #fff; border-radius: 10px; border: 0.5px solid #E5E5E5; padding: 16px;
}

/* 店铺卡片 MY OZON (Figma: 422×389) */
.dv2-store-card {
  flex-shrink: 0;
  background: #fff; border-radius: 10px; border: 0.5px solid #E5E5E5; padding: 16px;
}
.dv2-store-header {
  display: flex; align-items: center; margin-bottom: 8px;
}
.dv2-store-title { font-size: 20px; font-weight: 500; color: #000; font-family: 'MiSans', 'Noto Sans SC', sans-serif; flex: 1; }
.dv2-store-btn {
  height: 32px; padding: 0 12px; border-radius: 6px; border: 0.5px solid #E1E1E1;
  background: #fff; color: #000; font-size: 12px; cursor: pointer;
  font-family: 'MiSans', 'Noto Sans SC', sans-serif;
  display: inline-flex; align-items: center; gap: 6px; transition: background-color 0.15s;
}
.dv2-store-btn:hover { background: #F5F5F5; }
.dv2-store-btn-icon { width: 14px; height: 14px; flex-shrink: 0; }
.dv2-store-select-sm {
  height: 32px; padding: 0 28px 0 12px; border-radius: 6px; border: 0.5px solid #E1E1E1;
  background: #fff; color: #93A2B5; font-size: 12px; cursor: pointer;
  font-family: 'MiSans', 'Noto Sans SC', sans-serif; outline: none;
  min-width: 100px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 3.5L5 6.5L8 3.5' stroke='%2393A2B5' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.dv2-store-select-sm:focus { border-color: #1244EE; }
.dv2-store-meta { display: flex; gap: 12px; font-size: 12px; color: #93A2B5; margin-bottom: 16px; flex-wrap: wrap; }
.dv2-store-meta b { color: #000; font-weight: 400; }
.dv2-store-meta-edit {
  width: 14px; height: 14px; flex-shrink: 0; cursor: pointer;
  color: #2864EA; margin-left: auto;
}
.dv2-store-divider { height: 0.5px; background: #E1E1E1; margin: 0 0 16px; }
.dv2-store-section-title { font-size: 14px; font-weight: 500; color: #000; margin-bottom: 16px; font-family: 'MiSans', 'Noto Sans SC', sans-serif; }
.dv2-store-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
}
.dv2-store-metric { padding-bottom: 12px; }
.dv2-store-metric-label { font-size: 12px; color: #93A2B5; margin-bottom: 4px; }
.dv2-store-metric-value { font-size: 26px; font-weight: 600; color: #000; font-family: 'MiSans Latin', 'IBM Plex Sans', sans-serif; }
.dv2-store-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 8px; border-radius: 20px;
  font-size: 14px; font-weight: 500; font-family: 'MiSans Latin', 'IBM Plex Sans', sans-serif;
}
.dv2-store-pill-green { background: #C7F4DC; color: #1EAD4D; }
.dv2-store-pill-red { background: #FFE6ED; color: #FF3232; }
.dv2-store-pill-label { font-size: 12px; color: #93A2B5; }

/* 表格 (Figma: 表头#F9FAFB圆角6, 行41×54图片占位) */
.dv2-table-head {
  background: #F9FAFB; border-radius: 6px; height: 32px;
  display: flex; align-items: center; padding: 0 12px;
  font-size: 12px; color: #000; font-weight: 400;
}
.dv2-table-row {
  display: flex; align-items: center; padding: 8px 12px;
  border-bottom: 0.5px solid #E1E1E1; font-size: 12px; color: #000;
}
.dv2-table-row:last-child { border-bottom: none; }
.dv2-img-placeholder { width: 41px; height: 54px; background: #D9D9D9; border-radius: 6px; flex-shrink: 0; }
.dv2-img-zoom { transition: transform 0.2s ease; cursor: pointer; }
.dv2-img-zoom:hover { transform: scale(2.5); z-index: 999; position: relative; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.dv2-empty { padding: 32px; text-align: center; color: #93A2B5; font-size: 13px; }
.dv2-loading { padding: 32px; text-align: center; color: #93A2B5; font-size: 13px; }

/* 实时订单滚动列表 */
.dv2-scroll-list { flex: 1; min-height: 0; overflow-y: auto; }
.dv2-scroll-list::-webkit-scrollbar { width: 4px; }
.dv2-scroll-list::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 2px; }

/* 复制图标悬停效果 */
.dv2-copy-icon:hover { opacity: 1 !important; color: #5B54DE !important; }

/* 取消原因进度条 */
.dv2-progress-track { height: 6px; background: #F9FAFB; border-radius: 3px; overflow: hidden; }
.dv2-progress-fill { height: 100%; background: #EF4444; border-radius: 3px; transition: width 0.3s; }

/* 底部双栏 (已弃用，改用 dv2-main-grid) */
.dv2-bottom-row { display: flex; gap: 12px; margin-bottom: 16px; }
.dv2-bottom-left { flex: 1; }
.dv2-bottom-right { width: 716px; flex-shrink: 0; }

/* 利润颜色 */
.dv2-profit-pos { color: #15803D; font-weight: 600; }
.dv2-profit-neg { color: #B91C1C; font-weight: 600; }
.dv2-mono { font-family: 'IBM Plex Mono', monospace; font-size: 12px; }

/* 响应式 */
@media (max-width: 1600px) {
  .dv2-right-col { width: 600px; }
  .dv2-right-col .dv2-store-card { width: 360px; }
  .dv2-store-row .dv2-panel { width: 228px; }
}
@media (max-width: 1400px) {
  .dv2-charts-row { grid-template-columns: repeat(4, 1fr); }
  .dv2-chart-left { grid-column: span 2; }
  .dv2-chart-col { /* default */ }
  .dv2-right-col { width: 500px; }
  .dv2-right-col .dv2-store-card { width: 320px; }
  .dv2-store-row .dv2-panel { width: 168px; }
}
@media (max-width: 1200px) {
  .dv2-main-grid { flex-direction: column; }
  .dv2-right-col { width: 100%; }
  .dv2-right-col .dv2-store-card { width: 100%; }
  .dv2-store-row { flex-wrap: wrap; }
  .dv2-store-row .dv2-panel { width: 100%; }
  .dv2-stat-row { grid-template-columns: repeat(2, 1fr); }
  .dv2-stat-card { flex: unset; }
  .dv2-charts-row { grid-template-columns: 1fr; }
  .dv2-chart-left { grid-column: span 1; }
  .dv2-chart-col { /* default */ }
}
@media (max-width: 768px) {
  .dv2-stat-row { grid-template-columns: 1fr; }
  .dv2-stat-card { flex: unset; }
  .dashboard-v2 { padding: 0; }
}
