/* 拔俗智能巡店管理系统 - 现代化UI设计 (默认深色模式) */
:root{
  /* 主色调 - 深色模式优化的蓝色系 */
  --primary: #60a5fa;
  --primary-50: #0c1426;
  --primary-100: #1e293b;
  --primary-200: #334155;
  --primary-500: #60a5fa;
  --primary-600: #3b82f6;
  --primary-700: #2563eb;
  --primary-900: #1e40af;
  
  /* 中性色系 - 深色背景 */
  --gray-50: #0a0f1c;
  --gray-100: #0f172a;
  --gray-200: #1e293b;
  --gray-300: #334155;
  --gray-400: #475569;
  --gray-500: #64748b;
  --gray-600: #94a3b8;
  --gray-700: #cbd5e1;
  --gray-800: #e2e8f0;
  --gray-900: #f1f5f9;
  
  /* 语义色彩 - 深色模式优化 */
  --success: #34d399;
  --success-light: rgba(52, 211, 153, 0.15);
  --warning: #fbbf24;
  --warning-light: rgba(251, 191, 36, 0.15);
  --danger: #f87171;
  --danger-light: rgba(248, 113, 113, 0.15);
  --info: #22d3ee;
  --info-light: rgba(34, 211, 238, 0.15);
  
  /* 背景和表面 */
  --bg: #0a0f1c;
  --bg-secondary: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --overlay: rgba(10, 15, 28, 0.9);
  
  /* 文字颜色 */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-inverse: #0f172a;
  
  /* 边框和分割线 */
  --border: #334155;
  --border-light: #475569;
  --divider: #334155;
  
  /* 阴影 - 深色模式下更强的阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  
  /* 圆角 */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* 间距系统 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  
  /* 字体大小 */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  
  /* 字重 */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
}

/* 浅色模式 (可选切换) */
:root[data-theme="light"] {
  /* 主色调 - 现代蓝色系 */
  --primary: #2563eb;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-900: #1e3a8a;
  
  /* 中性色系 */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* 语义色彩 */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #06b6d4;
  --info-light: #cffafe;
  
  /* 背景和表面 */
  --bg: #f8fafc;
  --bg-secondary: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --overlay: rgba(15, 23, 42, 0.1);
  
  /* 文字颜色 */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;
  
  /* 边框和分割线 */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --divider: #e2e8f0;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

*{
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--text-base);
  line-height: 1.5;
  font-weight: var(--font-normal);
}

/* 容器布局 */
.container {
  width: min(100%, 428px);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 状态栏 */
.status-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  z-index: 10;
}

.status-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* 头部导航 */
.header {
  padding: var(--space-4) var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 9;
  min-height: 72px;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 1px;
  background: var(--border);
}

.header .title {
  font-weight: var(--font-bold);
  font-size: var(--text-xl);
  color: var(--text-primary);
  line-height: 1.2;
}

.header .subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
  font-weight: var(--font-medium);
}

.header .actions {
  margin-left: auto;
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* 图标按钮 */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.icon-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary-100);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.icon-btn:hover::before {
  opacity: 1;
}

.icon-btn:hover {
  color: var(--primary-600);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: translateY(0);
}

/* 内容区域 */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-4);
  background: var(--bg);
  position: relative;
}

.content::-webkit-scrollbar {
  width: 2px;
}

.content::-webkit-scrollbar-track {
  background: transparent;
}

.content::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
}

/* 卡片组件 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

/* 网格布局 */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 瓦片组件 */
.tile {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: block;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}

.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}

.tile .t-title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.tile .t-sub {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
  font-weight: var(--font-medium);
}

.tile .t-num {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin-top: var(--space-2);
  color: var(--text-primary);
  line-height: 1.1;
}

/* 特殊瓦片样式 */
.tile.success .t-num { color: var(--success); }
.tile.warning .t-num { color: var(--warning); }
.tile.danger .t-num { color: var(--danger); }
.tile.info .t-num { color: var(--info); }

/* 列表组件 */
.list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.list-item {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.list-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary-500);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.list-item:hover {
  background: var(--surface-hover);
  border-color: var(--primary-200);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.list-item:hover::before {
  transform: scaleY(1);
}

.list-item .meta {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  margin-top: var(--space-1);
}

.list-item .r {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: var(--text-lg);
  transition: all 0.2s ease;
}

.list-item:hover .r {
  color: var(--primary-500);
  transform: translateX(4px);
}

/* 徽章组件 */
.badge {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: none;
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: var(--font-semibold);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
  line-height: 1.2;
}

.badge.success {
  background: var(--success-light);
  color: var(--success);
}

.badge.warning, .badge.warn {
  background: var(--warning-light);
  color: var(--warning);
}

.badge.danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge.info {
  background: var(--info-light);
  color: var(--info);
}

.badge.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.search{
  display:flex;gap:8px;align-items:center;background:var(--card);border-radius:10px;padding:10px 12px;border:1px solid var(--border);
}
.search input{flex:1;border:none;outline:none;background:transparent;color:var(--text); font-size:15px}
.search .icon{color:var(--text-muted)}

/* 底部导航栏 */
.navbar {
  height: 84px;
  padding: var(--space-2) var(--space-3) calc(var(--space-3) + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-1);
  position: relative;
  z-index: 10;
}

.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  color: var(--text-tertiary);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: var(--space-2);
  position: relative;
  overflow: hidden;
}

.tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary-50);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tab:hover::before {
  opacity: 0.5;
}

.tab.active {
  color: var(--primary-600);
  font-weight: var(--font-semibold);
}

.tab.active::before {
  opacity: 1;
}

.tab .ico {
  font-size: 22px;
  transition: transform 0.2s ease;
}

.tab.active .ico {
  transform: scale(1.1);
}

.tab .txt {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  line-height: 1;
}

/* 按钮组件 */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  border: none;
  background: var(--primary-600);
  color: var(--text-inverse);
  text-decoration: none;
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 44px;
}

.button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.button:hover::before {
  opacity: 1;
}

.button:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.button:active {
  transform: translateY(0);
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.button.ghost:hover {
  background: var(--primary-50);
  border-color: var(--primary-200);
  color: var(--primary-700);
}

.button.full {
  width: 100%;
}

.button.sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  min-height: 36px;
}

.button.lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  min-height: 52px;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* 表单组件 */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
  display: block;
}

.input, select.input, textarea.input {
  width: 100%;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: inherit;
  line-height: 1.5;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 48px;
}

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

.input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
  background: var(--surface);
}

.input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-light);
}

textarea.input {
  resize: vertical;
  min-height: 96px;
}

/* 搜索框 */
.search {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.search:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: inherit;
}

.search input::placeholder {
  color: var(--text-tertiary);
}

.search .icon {
  color: var(--text-tertiary);
  font-size: 18px;
}

/* KPI 指标卡片 */
.kpi {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.kpi .k-item {
  flex: 1;
  min-width: 120px;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi .k-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.kpi .k-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-300));
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.kpi .k-num {
  font-weight: var(--font-bold);
  font-size: var(--text-3xl);
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

.kpi .k-cap {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 表格组件 */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th,
.table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}

.table th {
  background: var(--gray-50);
  color: var(--text-secondary);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: var(--text-xs);
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background: var(--surface-hover);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* 空状态 */
.empty {
  padding: var(--space-12) var(--space-8);
  text-align: center;
  color: var(--text-tertiary);
}

.empty::before {
  content: '📋';
  display: block;
  font-size: 64px;
  margin-bottom: var(--space-4);
  opacity: 0.6;
}

.empty.no-data::before { content: '📊'; }
.empty.no-messages::before { content: '💬'; }
.empty.no-stores::before { content: '🏪'; }
.empty.no-tasks::before { content: '✅'; }

.empty h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  margin: 0 0 var(--space-2);
}

.empty p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.5;
}

/* 分割线 */
hr.sep {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: var(--space-6) 0;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-bold);
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { 
  font-size: var(--text-xl); 
  margin: var(--space-6) 0 var(--space-3);
  color: var(--text-secondary);
  font-weight: var(--font-semibold);
}
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

/* Icons - Feather SVG */
.ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.ico.home { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3e%3c/path%3e%3cpolyline points='9 22 9 12 15 12 15 22'%3e%3c/polyline%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'%3e%3c/path%3e%3cpolyline points='9 22 9 12 15 12 15 22'%3e%3c/polyline%3e%3c/svg%3e"); }
.ico.store { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='2' y='7' width='20' height='14' rx='2' ry='2'%3e%3c/rect%3e%3cpath d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'%3e%3c/path%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='2' y='7' width='20' height='14' rx='2' ry='2'%3e%3c/rect%3e%3cpath d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'%3e%3c/path%3e%3c/svg%3e"); }
.ico.task { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='9 11 12 14 22 4'%3e%3c/polyline%3e%3cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'%3e%3c/path%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='9 11 12 14 22 4'%3e%3c/polyline%3e%3cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'%3e%3c/path%3e%3c/svg%3e"); }
.ico.scan { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='3' width='7' height='7'%3e%3c/rect%3e%3crect x='14' y='3' width='7' height='7'%3e%3c/rect%3e%3crect x='14' y='14' width='7' height='7'%3e%3c/rect%3e%3crect x='3' y='14' width='7' height='7'%3e%3c/rect%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3crect x='3' y='3' width='7' height='7'%3e%3c/rect%3e%3crect x='14' y='3' width='7' height='7'%3e%3c/rect%3e%3crect x='14' y='14' width='7' height='7'%3e%3c/rect%3e%3crect x='3' y='14' width='7' height='7'%3e%3c/rect%3e%3c/svg%3e"); }
.ico.chart { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='18' y1='20' x2='18' y2='10'%3e%3c/line%3e%3cline x1='12' y1='20' x2='12' y2='4'%3e%3c/line%3e%3cline x1='6' y1='20' x2='6' y2='14'%3e%3c/line%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='18' y1='20' x2='18' y2='10'%3e%3c/line%3e%3cline x1='12' y1='20' x2='12' y2='4'%3e%3c/line%3e%3cline x1='6' y1='20' x2='6' y2='14'%3e%3c/line%3e%3c/svg%3e"); }
.ico.msg { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'%3e%3c/path%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'%3e%3c/path%3e%3c/svg%3e"); }
.ico.user { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3e%3c/path%3e%3ccircle cx='12' cy='7' r='4'%3e%3c/circle%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3e%3c/path%3e%3ccircle cx='12' cy='7' r='4'%3e%3c/circle%3e%3c/svg%3e"); }
.ico.setting { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='3'%3e%3c/circle%3e%3cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1.51 1.51.33.33 0 0 0 1.82 1.65l.06.06a2 2 0 0 1 2.83 2.83 2 2 0 0 1 0-2.83l-.06-.06a1.65 1.65 0 0 0-.33-1.82 1.65 1.65 0 0 0-1.51-1.51.33.33 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1.51z'%3e%3c/path%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='3'%3e%3c/circle%3e%3cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1.51 1.51.33.33 0 0 0 1.82 1.65l.06.06a2 2 0 0 1 2.83 2.83 2 2 0 0 1 0-2.83l-.06-.06a1.65 1.65 0 0 0-.33-1.82 1.65 1.65 0 0 0-1.51-1.51.33.33 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1.51z'%3e%3c/path%3e%3c/svg%3e"); }
.ico.back { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='19' y1='12' x2='5' y2='12'%3e%3c/line%3e%3cpolyline points='12 19 5 12 12 5'%3e%3c/polyline%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cline x1='19' y1='12' x2='5' y2='12'%3e%3c/line%3e%3cpolyline points='12 19 5 12 12 5'%3e%3c/polyline%3e%3c/svg%3e"); }
.ico.more { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='1'%3e%3c/circle%3e%3ccircle cx='19' cy='12' r='1'%3e%3c/circle%3e%3ccircle cx='5' cy='12' r='1'%3e%3c/circle%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='1'%3e%3c/circle%3e%3ccircle cx='19' cy='12' r='1'%3e%3c/circle%3e%3ccircle cx='5' cy='12' r='1'%3e%3c/circle%3e%3c/svg%3e"); }
.ico.search { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='11' cy='11' r='8'%3e%3c/circle%3e%3cline x1='21' y1='21' x2='16.65' y2='16.65'%3e%3c/line%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='11' cy='11' r='8'%3e%3c/circle%3e%3cline x1='21' y1='21' x2='16.65' y2='16.65'%3e%3c/line%3e%3c/svg%3e"); }
.ico.photo { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'%3e%3c/path%3e%3ccircle cx='12' cy='13' r='4'%3e%3c/circle%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'%3e%3c/path%3e%3ccircle cx='12' cy='13' r='4'%3e%3c/circle%3e%3c/svg%3e"); }
.ico.alert { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3e%3c/path%3e%3cline x1='12' y1='9' x2='12' y2='13'%3e%3c/line%3e%3cline x1='12' y1='17' x2='12.01' y2='17'%3e%3c/line%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3e%3c/path%3e%3cline x1='12' y1='9' x2='12' y2='13'%3e%3c/line%3e%3cline x1='12' y1='17' x2='12.01' y2='17'%3e%3c/line%3e%3c/svg%3e"); }
.ico.map { -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolygon points='1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6'%3e%3c/polygon%3e%3cline x1='8' y1='2' x2='8' y2='18'%3e%3c/line%3e%3cline x1='16' y1='6' x2='16' y2='22'%3e%3c/line%3e%3c/svg%3e"); mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolygon points='1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6'%3e%3c/polygon%3e%3cline x1='8' y1='2' x2='8' y2='18'%3e%3c/line%3e%3cline x1='16' y1='6' x2='16' y2='22'%3e%3c/line%3e%3c/svg%3e"); }

/* 链接列表 */
.link-list {
  display: grid;
  gap: var(--space-2);
}

.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: var(--font-medium);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.link-list a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary-500);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.link-list a:hover {
  background: var(--surface-hover);
  border-color: var(--primary-200);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.link-list a:hover::before {
  transform: scaleY(1);
}

.link-list a .r {
  color: var(--text-tertiary);
  font-size: var(--text-lg);
  transition: all 0.2s ease;
}

.link-list a:hover .r {
  color: var(--primary-500);
  transform: translateX(4px);
}

/* 扫码高亮覆盖层与扫描线动画 */
.scan-overlay{
  position:absolute; inset:0; pointer-events:none;
  --box-w: 70%; --box-h: 60%;
  --box-l: 50%; --box-t: 50%;
}
.scan-overlay::before{
  content:""; position:absolute;
  width:var(--box-w); height:var(--box-h);
  left:calc(var(--box-l) - var(--box-w)/2);
  top:calc(var(--box-t) - var(--box-h)/2);
  border:2px solid #fff;
  border-radius:12px;
  box-shadow:0 0 0 9999px rgba(0,0,0,0.5) inset, 0 0 20px rgba(0,0,0,0.3);
}
.scan-overlay::after{
  content:""; position:absolute;
  width:calc(var(--box-w) - 10px); height:2px;
  left:calc(var(--box-l) - var(--box-w)/2 + 5px);
  top:calc(var(--box-t) - var(--box-h)/2 + 10px);
  background:var(--primary);
  border-radius:2px;
  animation: scanline 2.2s linear infinite;
}
@keyframes scanline{
  0%{ transform: translateY(0) }
  100%{ transform: translateY(calc(var(--box-h) - 20px)) }
}

/* 深色主题 */
:root[data-theme="dark"] {
  /* 主色调 - 深色模式下更亮的蓝色 */
  --primary: #60a5fa;
  --primary-50: #0c1426;
  --primary-100: #1e293b;
  --primary-200: #334155;
  --primary-500: #60a5fa;
  --primary-600: #3b82f6;
  --primary-700: #2563eb;
  --primary-900: #1e40af;
  
  /* 中性色系 - 深色背景 */
  --gray-50: #0a0f1c;
  --gray-100: #0f172a;
  --gray-200: #1e293b;
  --gray-300: #334155;
  --gray-400: #475569;
  --gray-500: #64748b;
  --gray-600: #94a3b8;
  --gray-700: #cbd5e1;
  --gray-800: #e2e8f0;
  --gray-900: #f1f5f9;
  
  /* 语义色彩 - 深色模式优化 */
  --success: #34d399;
  --success-light: rgba(52, 211, 153, 0.15);
  --warning: #fbbf24;
  --warning-light: rgba(251, 191, 36, 0.15);
  --danger: #f87171;
  --danger-light: rgba(248, 113, 113, 0.15);
  --info: #22d3ee;
  --info-light: rgba(34, 211, 238, 0.15);
  
  /* 背景和表面 */
  --bg: #0a0f1c;
  --bg-secondary: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --overlay: rgba(10, 15, 28, 0.9);
  
  /* 文字颜色 */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-inverse: #0f172a;
  
  /* 边框和分割线 */
  --border: #334155;
  --border-light: #475569;
  --divider: #334155;
  
  /* 阴影 - 深色模式下更强的阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* 深色模式特殊样式 */
:root[data-theme="dark"] .card {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(51, 65, 85, 0.8) 100%);
  border-color: var(--border);
}

:root[data-theme="dark"] .card:hover {
  background: linear-gradient(135deg, var(--surface-hover) 0%, rgba(71, 85, 105, 0.8) 100%);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(96, 165, 250, 0.1);
}

:root[data-theme="dark"] .button {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

:root[data-theme="dark"] .button:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4);
}

:root[data-theme="dark"] .navbar {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(30, 41, 59, 0.95) 100%);
  backdrop-filter: blur(10px);
  border-top-color: var(--border);
}

:root[data-theme="dark"] .header {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(30, 41, 59, 0.98) 100%);
  backdrop-filter: blur(10px);
}

:root[data-theme="dark"] .status-bar {
  background: var(--bg);
  color: var(--text-secondary);
}

:root[data-theme="dark"] .input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
  background: var(--surface-hover);
}

:root[data-theme="dark"] .search:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
  background: var(--surface-hover);
}

:root[data-theme="dark"] .tile:hover {
  background: linear-gradient(135deg, var(--surface-hover) 0%, rgba(71, 85, 105, 0.8) 100%);
  box-shadow: var(--shadow-lg), 0 0 15px rgba(96, 165, 250, 0.1);
}

:root[data-theme="dark"] .list-item:hover {
  background: linear-gradient(90deg, var(--surface-hover) 0%, rgba(71, 85, 105, 0.8) 100%);
  box-shadow: var(--shadow-md), 0 0 10px rgba(96, 165, 250, 0.05);
}

:root[data-theme="dark"] .kpi .k-item::before {
  background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
}

:root[data-theme="dark"] .progress-bar {
  background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

:root[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%);
}

/* 主题切换按钮 */
.theme-toggle {
  position: relative;
  width: 48px;
  height: 24px;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--surface);
  border-radius: var(--radius-full);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  background: var(--gray-400);
  transform: scale(1.05);
}

:root[data-theme="dark"] .theme-toggle {
  background: var(--primary-600);
}

:root[data-theme="dark"] .theme-toggle::before {
  transform: translateX(24px);
  background: var(--text-inverse);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  transition: all 0.3s ease;
  pointer-events: none;
}

.theme-toggle .sun-icon {
  left: 4px;
  opacity: 1;
}

.theme-toggle .moon-icon {
  right: 4px;
  opacity: 0.5;
}

:root[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0.5;
}

:root[data-theme="dark"] .theme-toggle .moon-icon {
  opacity: 1;
}

/* 主题切换动画 */
.theme-transition {
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 深色模式图标优化 */
:root[data-theme="dark"] .ico {
  filter: brightness(1.1);
}

/* 深色模式下的特殊效果 */
:root[data-theme="dark"] .container {
  background: radial-gradient(ellipse at top, rgba(96, 165, 250, 0.05) 0%, transparent 50%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 100%);
}

:root[data-theme="dark"] .scan-overlay::before {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 9999px rgba(10, 15, 28, 0.8) inset, 
              0 0 30px rgba(96, 165, 250, 0.2);
}

:root[data-theme="dark"] .scan-overlay::after {
  background: linear-gradient(90deg, transparent, var(--primary-400), transparent);
  box-shadow: 0 0 10px var(--primary-400);
}

/* 深色模式下的通知样式 */
:root[data-theme="dark"] .notification {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-xl), 0 0 20px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .notification.success {
  border-left-color: var(--success);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(52, 211, 153, 0.05) 100%);
}

:root[data-theme="dark"] .notification.error {
  border-left-color: var(--danger);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(248, 113, 113, 0.05) 100%);
}

:root[data-theme="dark"] .notification.warning {
  border-left-color: var(--warning);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(251, 191, 36, 0.05) 100%);
}

/* 深色模式下的模态框 */
:root[data-theme="dark"] .modal {
  background: rgba(10, 15, 28, 0.8);
  backdrop-filter: blur(8px);
}

:root[data-theme="dark"] .modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl), 0 0 40px rgba(0, 0, 0, 0.5);
}

/* 跟随系统主题 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    /* 主色调 */
    --primary-50: #1e293b;
    --primary-100: #334155;
    --primary-200: #475569;
    --primary-500: #60a5fa;
    --primary-600: #3b82f6;
    --primary-700: #2563eb;
    --primary-900: #1e40af;
    
    /* 中性色系 */
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #f8fafc;
    
    /* 语义色彩 */
    --success: #22c55e;
    --success-light: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --info: #06b6d4;
    --info-light: rgba(6, 182, 212, 0.1);
    
    /* 背景和表面 */
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --surface: #1e293b;
    --surface-hover: #334155;
    --overlay: rgba(15, 23, 42, 0.8);
    
    /* 文字颜色 */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-inverse: #0f172a;
    
    /* 边框和分割线 */
    --border: #334155;
    --border-light: #475569;
    --divider: #334155;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  }
}

/* 响应式设计 */
@media (max-width: 375px) {
  .container { width: 100%; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .kpi { flex-direction: column; }
  .header .title { font-size: 16px; }
}

@media (min-width: 768px) {
  .container { 
    max-width: 420px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 12px;
    margin-top: 20px;
    margin-bottom: 20px;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.card {
  animation: fadeIn 0.3s ease-out;
}

.list-item {
  animation: fadeIn 0.3s ease-out;
  animation-fill-mode: both;
}

.list-item:nth-child(1) { animation-delay: 0.1s; }
.list-item:nth-child(2) { animation-delay: 0.2s; }
.list-item:nth-child(3) { animation-delay: 0.3s; }
.list-item:nth-child(4) { animation-delay: 0.4s; }
.list-item:nth-child(5) { animation-delay: 0.5s; }

.button:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

.tab.active {
  animation: pulse 0.3s ease-out;
}

/* 加载状态 */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* 进度条动画 */
.progress-bar {
  background: var(--border);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  background: var(--primary);
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 状态指示器 */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-indicator.online {
  background: var(--success);
  animation: pulse-green 2s infinite;
}

.status-indicator.offline {
  background: var(--danger);
}

.status-indicator.warning {
  background: var(--warning);
  animation: pulse-yellow 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulse-yellow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 消息通知样式 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 10000;
  max-width: 300px;
  animation: slideIn 0.3s ease-out;
}

.notification.success {
  border-left: 4px solid var(--success);
}

.notification.error {
  border-left: 4px solid var(--danger);
}

.notification.warning {
  border-left: 4px solid var(--warning);
}

/* 模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  margin: 20px;
  max-width: 400px;
  width: 100%;
  animation: fadeIn 0.3s ease-out 0.1s both;
}

/* 下拉刷新样式 */
.pull-refresh {
  position: relative;
  overflow: hidden;
}

.pull-refresh-indicator {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: top 0.3s ease;
}

.pull-refresh.pulling .pull-refresh-indicator {
  top: 20px;
}

/* 空状态优化 */
.empty {
  padding: 48px 32px;
  text-align: center;
  color: var(--text-muted);
}

.empty::before {
  content: '📋';
  display: block;
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty.no-data::before { content: '📊'; }
.empty.no-messages::before { content: '💬'; }
.empty.no-stores::before { content: '🏪'; }
.empty.no-tasks::before { content: '✅'; }

/* 表格响应式 */
@media (max-width: 480px) {
  .table {
    font-size: 12px;
  }
  
  .table th,
  .table td {
    padding: 8px 4px;
  }
}

/* 优化滚动条 */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* 焦点状态优化 */
.button:focus,
.input:focus,
.tab:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 触摸反馈 */
@media (hover: none) {
  .button:hover {
    background: var(--primary);
  }
  
  .button.ghost:hover {
    background: transparent;
    border-color: var(--border);
  }
  
  .list-item:hover {
    background: var(--card);
  }
}
