/* ============================================================
   石锅王商家助手 - 完整样式系统
   ============================================================ */

/* ============ Reset & Variables ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #FF6B35;
  --primary-hover: #e55a28;
  --primary-light: rgba(255,107,53,.12);
  --primary-dark: #c4501f;
  --success: #00B894;
  --success-light: #d4edda;
  --warning: #FDCB6E;
  --warning-light: #fff3cd;
  --danger: #E17055;
  --danger-light: #f8d7da;
  --info: #74b9ff;
  --info-light: #d1ecf1;
  --sidebar-bg: #1a1a2e;
  --sidebar-hover: #16213e;
  --sidebar-active: #0f3460;
  --sidebar-text: #a2a8d3;
  --sidebar-text-active: #fff;
  --content-bg: #f0f2f5;
  --card-bg: #fff;
  --text: #2d3436;
  --text-light: #4a5568;
  --text-lighter: #b2bec3;
  --border: #dfe6e9;
  --border-light: #f1f3f5;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --font-size: 17px;
  --font-size-sm: 13px;
  --font-size-lg: 20px;
  --font-size-xl: 24px;
  --font-size-title: 32px;
  --topbar-height: 56px;
  --sidebar-width: 240px;
}

html {
  font-size: var(--font-size);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--content-bg);
  color: var(--text);
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea {
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  outline: none;
  width: 100%;
  font-size: 17px;
  min-height: 50px;
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
textarea { resize: vertical; min-height: 80px; }
table { width: 100%; border-collapse: collapse; }
img { max-width: 100%; display: block; }

/* ============ SVG图标系统 ============ */
.sgw-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
}

.sgw-icon svg {
  width: 100%;
  height: 100%;
}

/* 导航图标 - SVG样式 */
.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: currentColor;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
}

/* 页面标题图标 */
.title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--primary);
  vertical-align: middle;
  margin-right: 4px;
}

.title-icon svg {
  width: 28px;
  height: 28px;
}

/* 卡片标题图标 */
.card-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--primary);
  vertical-align: middle;
  margin-right: 4px;
}

.card-title-icon svg {
  width: 20px;
  height: 20px;
}

/* 快捷操作SVG图标 */
.quick-svg-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.quick-svg-icon svg {
  width: 28px;
  height: 28px;
}

/* 顶栏图标 */
.topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: currentColor;
  vertical-align: middle;
}

.topbar-icon svg {
  width: 20px;
  height: 20px;
}

/* 登录页品牌图标 */
.brand-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(255,107,53,.3);
}

.brand-icon svg {
  width: 36px;
  height: 36px;
}

/* 登录特性标签图标 */
.ft-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--primary);
  vertical-align: middle;
}

.ft-icon svg {
  width: 16px;
  height: 16px;
}

/* 升级按钮图标 */
.upgrade-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #ffd700;
  vertical-align: middle;
}

.upgrade-icon svg {
  width: 16px;
  height: 16px;
}

/* 引导页SVG图标 */
.ob-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.ob-icon-svg svg {
  width: 36px;
  height: 36px;
}

/* stat-card图标容器内SVG */
.stat-card .icon-wrap .sgw-icon svg {
  width: 22px;
  height: 22px;
}

/* 空状态图标 */
.empty-state .icon .sgw-icon,
.empty-state-pro .empty-icon .sgw-icon {
  color: var(--text-lighter);
}

.empty-state .icon .sgw-icon svg,
.empty-state-pro .empty-icon .sgw-icon svg {
  width: 48px;
  height: 48px;
}

/* 客服按钮SVG */
.service-fab .sgw-icon svg {
  width: 24px;
  height: 24px;
}

/* ============ 登录页 ============ */
.login-page {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.login-page.hidden { display: none; }

.login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 40px 36px;
  width: 400px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: fadeInUp .5s ease;
}

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

.login-logo .brand {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
}

.login-logo .subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

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

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

.login-form .code-row {
  display: flex;
  gap: 8px;
}

.login-form .code-row input { flex: 1; }

.login-form .code-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.login-tip {
  background: var(--warning-light);
  color: #856404;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.login-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-lighter);
  margin-top: 28px;
}

/* 注册/登录切换 */
.login-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-light);
}
.login-switch a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.login-switch a:hover { text-decoration: underline; }

/* 必填标记 */
.required { color: var(--danger); font-weight: 700; }

/* 注册品类选择 */
.reg-dish-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.reg-dish-tag {
  display: inline-block;
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
.reg-dish-tag:hover { border-color: var(--primary); color: var(--primary); }
.reg-dish-tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 注册页滚动适配 */
#register-page .login-card {
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============ 主框架布局 ============ */
.app {
  display: flex;
  height: 100vh;
  width: 100%;
}

.app.hidden { display: none; }

/* ============ 顶栏 ============ */
.topbar {
  height: var(--topbar-height);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 400;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-left .menu-toggle {
  display: none;
  font-size: 22px;
  padding: 4px;
  color: var(--text);
  align-items: center;
  justify-content: center;
}

.topbar-left .app-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.topbar-left .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  animation: pulse 2s infinite;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-right .notification-bell {
  position: relative;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-right .notification-bell .badge-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.topbar-right .merchant-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.topbar-right .btn-logout {
  font-size: 13px;
  color: var(--text-light);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.topbar-right .btn-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* ============ 侧边栏 ============ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: left .3s ease;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-info .shop-name {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.sidebar-info .version-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin-top: 2px;
}

.version-tag.free { background: rgba(255,255,255,.12); color: var(--sidebar-text); }
.version-tag.pro { background: var(--primary-light); color: var(--primary); }
.version-tag.flagship { background: rgba(255,215,0,.15); color: #ffd700; }

.sidebar-nav {
  flex: 1;
  padding: 8px 0;
}

.nav-group {
  margin-bottom: 4px;
}

.nav-group-title {
  padding: 12px 20px 4px;
  font-size: 11px;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  color: var(--sidebar-text);
  font-size: 15px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  border-left: 3px solid transparent;
  min-height: 48px;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  border-left-color: var(--primary);
}

.nav-item .nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item .nav-text {
  flex: 1;
}

.nav-item .nav-badge {
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 499;
}

/* ============ 内容区 ============ */
.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  margin-top: var(--topbar-height);
  background: var(--content-bg);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.page { display: none; animation: fadeIn .3s ease; max-width: 100%; overflow-x: hidden; }
.page.active { display: block; }

/* ============ 卡片 ============ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text);
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  margin-top: 2px;
}

/* ============ 统计卡片 ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform .2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-card .label {
  font-size: 14px;
  color: var(--text-light);
}

.stat-card .value {
  font-size: 32px;
  font-weight: 800;
  margin: 4px 0;
  color: var(--text);
}

.stat-card .trend {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stat-card .trend.up { color: var(--success); }
.stat-card .trend.down { color: var(--danger); }

.stat-card .icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 8px;
}

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }

th {
  background: #f8f9fa;
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-light);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

tr:hover { background: #fafafa; }

/* ============ 表单 ============ */
.form-group { margin-bottom: 16px; }

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

.form-required::after {
  content: " *";
  color: var(--danger);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 17px;
  min-height: 50px;
  transition: border-color .2s;
  background: #fff;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-textarea { min-height: 100px; resize: vertical; }

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

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group { flex: 1; }

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .2s;
  gap: 6px;
  line-height: 1.4;
  min-height: 48px;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { opacity: .9; transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-warning { background: var(--warning); color: #333; }
.btn-info { background: var(--info); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-light); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 18px; min-height: 56px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============ 标签/徽章 ============ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: #155724; }
.badge-warning { background: var(--warning-light); color: #856404; }
.badge-danger { background: var(--danger-light); color: #721c24; }
.badge-info { background: var(--info-light); color: #0c5460; }
.badge-gray { background: #f1f3f5; color: var(--text-light); }

/* ============ Tab栏 ============ */
.tabs {
  display: flex;
  gap: 4px;
  background: #f1f3f5;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.tab {
  flex: 1;
  padding: 12px 20px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-light);
  transition: all .2s;
  white-space: nowrap;
  min-width: fit-content;
  min-height: 44px;
}

.tab.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.tab:hover:not(.active) { color: var(--text); }

.tabs.mini { margin-bottom: 0; }
.tabs.mini .tab { padding: 4px 12px; font-size: 13px; }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn .2s ease; }

/* tab-bar / tab-item (JS动态渲染模块使用) */
.tab-bar {
  display: flex;
  gap: 4px;
  background: #f1f3f5;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.tab-item {
  flex: 1;
  padding: 12px 20px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-light);
  transition: all .2s;
  white-space: nowrap;
  min-width: fit-content;
  min-height: 44px;
}
.tab-item.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.tab-item:hover:not(.active) { color: var(--text); }

/* ============ 内容工厂专用 ============ */
.result-block {
  background: var(--bg-secondary, #f8f9fa);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 16px;
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 15px;
  word-break: break-word;
}
.cnt-option-card {
  transition: all .15s;
}
.cnt-option-card:hover {
  border-color: var(--primary) !important;
  transform: translateY(-1px);
}
.cnt-option-card.selected {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
}
.cnt-tab-panel {
  padding: 16px 0;
}
.cnt-tag {
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.cnt-tag:hover {
  transform: scale(1.05);
}
.cnt-star {
  cursor: pointer;
  transition: color .15s, transform .15s;
  user-select: none;
}
.cnt-star:hover {
  transform: scale(1.2);
}
.cal-day-card {
  transition: all .2s;
}
.cal-day-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* ============ 搜索框 ============ */
.search-box {
  position: relative;
  margin-bottom: 16px;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}

.search-box::before {
  content: "\1F50D";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}

/* ============ 空状态 ============ */
.empty-state, .empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

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

.empty-state .text, .empty .text {
  font-size: 15px;
}

.empty-state .btn, .empty .btn {
  margin-top: 16px;
}

/* ============ 进度条 ============ */
.progress {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress.thin { height: 4px; }
.progress.thick { height: 12px; }

.progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .5s ease;
  background: var(--primary);
}

.progress-bar.green { background: var(--success); }
.progress-bar.yellow { background: var(--warning); }
.progress-bar.red { background: var(--danger); }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 4px;
}

/* ============ FAB ============ */
.fab {
  position: fixed;
  right: 32px;
  bottom: 32px;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255,107,53,.4);
  cursor: pointer;
  z-index: 100;
  transition: transform .2s;
}

.fab:hover { transform: scale(1.1); }

/* ============ 弹窗 ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .2s ease;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  animation: fadeInUp .3s ease;
}

.modal.wide { max-width: 700px; }
.modal.narrow { max-width: 400px; }

.modal-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-body { margin-bottom: 20px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ============ Toast ============ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  margin-bottom: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  animation: slideIn .3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  max-width: 400px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: #333; }
.toast.info { background: var(--info); }

/* ============ Loading ============ */
.loading-mask {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.8);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.loading-mask.show { display: flex; }

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e9ecef;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 14px;
  color: var(--text-light);
}

/* ============ 柱状图 ============ */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
  padding: 0 4px;
}

.bar-chart .bar {
  flex: 1;
  min-width: 20px;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: height .5s ease;
  cursor: pointer;
}

.bar-chart .bar:hover { opacity: .8; }

.bar-chart .bar .tooltip {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  white-space: nowrap;
  display: none;
  background: var(--text);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
}

.bar-chart .bar:hover .tooltip { display: block; }

.bar-chart .bar-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
}

/* ============ 饼图 ============ */
.pie-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pie-legend .item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.pie-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============ 聊天气泡 ============ */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.chat-bubble {
  max-width: 80%;
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble.ai {
  background: #f1f3f5;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-bubble .typing {
  display: inline-flex;
  gap: 4px;
}

.chat-bubble .typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-light);
  animation: pulse 1.4s infinite;
}

.chat-bubble .typing span:nth-child(2) { animation-delay: .2s; }
.chat-bubble .typing span:nth-child(3) { animation-delay: .4s; }

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.chat-input-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 15px;
}

.chat-input-bar .btn { border-radius: 20px; }

.chat-quick-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 16px;
  border-top: 1px solid var(--border-light);
}

.chat-quick-tags .tag {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  background: #f1f3f5;
  color: var(--text-light);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.chat-quick-tags .tag:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ============ 快捷操作网格 ============ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.quick-grid.mini {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 0;
}

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all .2s;
}

.quick-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

.quick-item .icon {
  font-size: 32px;
  margin-bottom: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 12px;
}

.quick-item .text {
  font-size: 14px;
  color: var(--text);
  text-align: center;
}

/* ============ 欢迎横幅 ============ */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary), #ff8c42);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.welcome-banner h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.welcome-banner p {
  font-size: 14px;
  opacity: .9;
}

/* ============ 双列布局 ============ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
}

.two-col .col-main { min-width: 0; }
.two-col .col-side { min-width: 0; }

/* ============ 待办 ============ */
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.todo-item .todo-icon { font-size: 18px; }
.todo-item .todo-text { flex: 1; font-size: 14px; }
.todo-item .todo-tag { font-size: 12px; }

/* ============ 排行列表 ============ */
.rank-list { list-style: none; }

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.rank-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  background: #f1f3f5;
}

.rank-item:nth-child(1) .rank-num { background: #ffd700; color: #fff; }
.rank-item:nth-child(2) .rank-num { background: #c0c0c0; color: #fff; }
.rank-item:nth-child(3) .rank-num { background: #cd7f32; color: #fff; }

.rank-info { flex: 1; }
.rank-info .name { font-size: 14px; font-weight: 500; }
.rank-info .sub { font-size: 12px; color: var(--text-light); }
.rank-value { font-size: 15px; font-weight: 600; color: var(--primary); }

/* ============ 时段分布 ============ */
.time-bar-list .time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.time-row .time-label {
  width: 60px;
  text-align: right;
  color: var(--text-light);
  flex-shrink: 0;
}

.time-row .time-bar {
  flex: 1;
  height: 20px;
  background: #f1f3f5;
  border-radius: 4px;
  overflow: hidden;
}

.time-row .time-bar .fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary);
  transition: width .5s;
}

.time-row .time-value {
  width: 60px;
  font-weight: 500;
}

/* ============ AI提醒卡片 ============ */
.ai-tips-card {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 4px solid var(--primary);
}

.ai-tips-card .tip-item {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.5;
}

.ai-tips-card .tip-item .tip-icon { flex-shrink: 0; }

/* ============ 功能卡片选择 ============ */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.feature-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}

.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.feature-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.feature-card .fc-icon { font-size: 36px; margin-bottom: 8px; }
.feature-card .fc-title { font-size: 15px; font-weight: 600; }
.feature-card .fc-desc { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ============ 周视图排班 ============ */
.schedule-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.schedule-grid .cell {
  background: #fff;
  padding: 8px;
  min-height: 60px;
  font-size: 13px;
}

.schedule-grid .cell.header {
  background: #f8f9fa;
  font-weight: 600;
  text-align: center;
  padding: 10px 8px;
}

.schedule-grid .cell .shift-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin: 1px;
  background: var(--primary-light);
  color: var(--primary);
}

/* ============ 竞品对比 ============ */
.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th {
  background: #f8f9fa;
  font-weight: 600;
  padding: 12px;
  text-align: center;
}

.compare-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.compare-table .metric-name {
  text-align: left;
  font-weight: 500;
}

/* ============ 门店卡片 ============ */
.store-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.store-card .store-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.store-card .store-status.online { background: var(--success); }
.store-card .store-status.offline { background: var(--danger); }

.store-card .store-info { flex: 1; }
.store-card .store-name { font-weight: 600; font-size: 15px; }
.store-card .store-metrics { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--text-light); }

/* ============ 设置列表 ============ */
.settings-section {
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.settings-section .section-title {
  font-size: 16px;
  font-weight: 600;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
}

.settings-item:last-child { border-bottom: none; }
.settings-item .si-label { font-size: 14px; }
.settings-item .si-value { font-size: 14px; color: var(--text-light); }

/* Toggle switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s;
}

.toggle.on { background: var(--success); }

.toggle::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle.on::after { transform: translateX(20px); }

/* ============ Alert / Notice ============ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.alert-warning { background: var(--warning-light); color: #856404; border: 1px solid #ffc107; }
.alert-danger { background: var(--danger-light); color: #721c24; border: 1px solid var(--danger); }
.alert-success { background: var(--success-light); color: #155724; border: 1px solid var(--success); }
.alert-info { background: var(--info-light); color: #0c5460; border: 1px solid var(--info); }

/* ============ 工具栏 ============ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============ Filter chips ============ */
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  transition: all .2s;
}

.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.chip:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

/* ============ 配方卡片网格 ============ */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.recipe-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all .2s;
}

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

.recipe-card .recipe-img {
  height: 140px;
  background: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.recipe-card .recipe-body { padding: 14px; }
.recipe-card .recipe-name { font-size: 16px; font-weight: 600; }
.recipe-card .recipe-meta { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* ============ AI 结果区 ============ */
.ai-result {
  background: #f8f9fa;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 100px;
  margin-top: 16px;
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 15px;
}

.ai-result.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.ai-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ============ 页面标题 ============ */
.page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* title-icon 样式已在SVG图标系统中定义 */

/* ============ 分页 ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}

.pagination .page-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  transition: all .2s;
}

.pagination .page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination .page-btn:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    left: calc(var(--sidebar-width) * -1);
    transition: left .3s cubic-bezier(.4, 0, .2, 1);
    will-change: left;
  }

  .sidebar.open { left: 0; }

  .sidebar.open ~ .sidebar-overlay { display: block; }

  .main-wrap {
    margin-left: 0;
    overflow-x: hidden;
    max-width: 100vw;
  }

  .topbar {
    left: 0;
    padding: 0 12px;
  }

  .topbar-left .menu-toggle {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

  .topbar-left .app-title {
    font-size: 15px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-left .status-dot { display: none; }

  .topbar-right {
    gap: 8px;
  }

  .topbar-right .btn-logout {
    padding: 4px 8px;
    font-size: 12px;
  }

  .topbar-right .btn-logout .topbar-icon + span {
    display: none;
  }

  .content-area { padding: 14px; }

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

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

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

  .welcome-banner { flex-direction: column; }

  .chat-container { height: calc(100vh - 180px); }

  .modal { padding: 20px; }

  .form-row { flex-direction: column; gap: 0; }

  .schedule-grid { font-size: 12px; }

  .topbar-right .merchant-name { display: none; }

  .login-card { padding: 32px 24px 28px; }

  /* 表格适配 */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding: 0 14px;
  }

  /* 按钮自适应 */
  .btn-group {
    flex-wrap: wrap;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  /* 防止各种内容撑破 */
  .ai-result {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .chat-bubble {
    max-width: 85%;
  }

  /* 侧边栏overlay动画 */
  .sidebar-overlay {
    transition: opacity .3s;
    opacity: 0;
  }

  .sidebar.open ~ .sidebar-overlay {
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .feature-cards { grid-template-columns: repeat(2, 1fr); }

  .onboarding-container { padding: 24px 16px 20px; }
  .ob-title { font-size: 20px; }
  .ob-subtitle { font-size: 14px; margin-bottom: 20px; }
  .ob-options { grid-template-columns: 1fr; gap: 10px; }
  .ob-option {
    flex-direction: row;
    min-height: auto;
    padding: 16px;
    gap: 12px;
    text-align: left;
  }
  .ob-option .ob-icon { font-size: 28px; margin-bottom: 0; flex-shrink: 0; }
  .ob-option .ob-label { font-size: 15px; }
  .ob-step-line { width: 28px; }
}

/* ============ 打印样式 ============ */
@media print {
  .sidebar,
  .topbar,
  .fab,
  .toast-container,
  .modal-overlay,
  .loading-mask,
  .chat-input-bar,
  .btn,
  .nav-item { display: none !important; }

  .main-wrap { margin-left: 0 !important; }
  .content-area { padding: 0 !important; margin-top: 0 !important; overflow: visible !important; }
  .page { display: block !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd; break-inside: avoid; }

  body { background: #fff; overflow: visible; height: auto; }

  @page { margin: 1cm; }
}

/* ============ 空状态专业样式 ============ */
.empty-state-pro {
  text-align: center;
  padding: 80px 20px;
  max-width: 400px;
  margin: 0 auto;
}
.empty-state-pro .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  line-height: 1;
}
.empty-state-pro .empty-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.empty-state-pro .empty-desc {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 24px;
  line-height: 1.6;
}
.empty-state-pro .empty-action {
  font-size: 18px;
  padding: 14px 36px;
}

/* ============ 引导页样式 ============ */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .3s ease;
}
.onboarding-container {
  max-width: 560px;
  width: 92%;
  padding: 40px 32px 32px;
  max-height: 90vh;
  overflow-y: auto;
}
.onboarding-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 36px;
}
.ob-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  color: var(--text-light);
  font-weight: 600;
  font-size: 15px;
  transition: all .3s;
}
.ob-step-dot.active {
  background: var(--primary);
  color: #fff;
}
.ob-step-dot.done {
  background: var(--success);
  color: #fff;
}
.ob-step-line {
  width: 48px;
  height: 3px;
  background: #e9ecef;
  margin: 0 4px;
  border-radius: 2px;
}
.ob-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.ob-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 28px;
}
.ob-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.ob-option {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px 12px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.ob-option:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.ob-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.ob-option .ob-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
  line-height: 1;
}
.ob-option .ob-label {
  font-size: 16px;
  font-weight: 600;
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}
.ob-option .ob-desc {
  font-size: 13px;
  color: var(--text-light);
  display: block;
  line-height: 1.4;
}
.ob-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.ob-inputs .form-input {
  padding: 12px 16px;
  font-size: 15px;
}
.ob-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}
.ob-footer .btn-lg {
  min-width: 140px;
}
/* 引导完成结果页 */
.ob-result {
  text-align: center;
  padding: 20px 0;
}
.ob-result .ob-result-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.ob-result .ob-result-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.ob-result .ob-result-tip {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 24px;
  line-height: 1.6;
}
.ob-result .ob-features {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.ob-result .ob-feature-tag {
  padding: 8px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

/* ============ 增强型空状态 ============ */
.empty-state-pro {
  text-align: center;
  padding: 60px 24px;
  max-width: 400px;
  margin: 0 auto;
}
.empty-state-pro .empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  line-height: 1;
}
.empty-state-pro .empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state-pro .empty-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 24px;
}
.empty-state-pro .empty-action {
  min-width: 160px;
}

/* ============ 操作确认弹窗样式 ============ */
.confirm-dialog {
  text-align: center;
}
.confirm-dialog .confirm-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.confirm-dialog .confirm-msg {
  font-size: 18px;
  margin-bottom: 24px;
  line-height: 1.6;
}
.confirm-dialog .confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.confirm-dialog .confirm-actions .btn {
  min-width: 120px;
}

/* ============ 底部固定操作栏 ============ */
.bottom-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  z-index: 50;
}

/* ============ 功能气泡引导提示 ============ */
.guide-tip {
  position: relative;
  display: inline-block;
}
.guide-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(255,107,53,.3);
  animation: guidePulse 2s ease infinite;
}
.guide-tip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--primary);
}

/* ============ 客服悬浮按钮 ============ */
.service-fab {
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 52px;
  height: 52px;
  border-radius: 26px;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255,107,53,.4);
  cursor: pointer;
  z-index: 100;
  transition: transform .2s;
}
.service-fab:hover { transform: scale(1.1); }

/* ============ 动画 ============ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

@keyframes guidePulse {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}

/* ============ Utility ============ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-light { color: var(--text-light); }
.text-primary { color: var(--primary); }
.font-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ============ 登录页增强 ============ */
.login-logo .brand-icon {
  animation: fadeInUp .6s ease;
}

.login-logo .brand {
  animation: fadeInUp .6s ease .1s both;
}

.login-logo .subtitle {
  animation: fadeInUp .6s ease .2s both;
}

.login-features {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0 0;
}

.login-feature-tag {
  padding: 6px 14px;
  background: rgba(255,107,53,.08);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  animation: fadeIn .8s ease .3s both;
}

/* ============ 侧边栏底部 ============ */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.sidebar-upgrade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  margin-bottom: 8px;
}

.sidebar-upgrade:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,158,11,.4);
}

.sidebar-version {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.25);
}

/* ============ 刷新按钮 ============ */
.btn-refresh {
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s;
  opacity: .6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-refresh:hover {
  opacity: 1;
  background: var(--primary-light);
}

.btn-refresh.spinning {
  animation: spin .8s linear;
}

/* ============ 优惠券卡片 ============ */
.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.coupon-card {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card-bg);
  transition: transform .2s, box-shadow .2s;
}

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

.coupon-left {
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 16px 8px;
  position: relative;
  flex-shrink: 0;
}

.coupon-left::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--content-bg);
  border-radius: 50%;
}

.coupon-amount {
  text-align: center;
}

.coupon-currency {
  font-size: 16px;
  font-weight: 500;
}

.coupon-value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.coupon-unit {
  font-size: 14px;
}

.coupon-condition {
  font-size: 11px;
  opacity: .85;
  margin-top: 6px;
}

.coupon-right {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.coupon-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.coupon-meta {
  display: flex;
  gap: 6px;
}

.coupon-date {
  font-size: 12px;
  color: var(--text-light);
}

.coupon-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coupon-progress .progress {
  flex: 1;
}

.coupon-qty {
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
}

.coupon-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

/* ============ Loading品牌化 ============ */
.loading-mask .spinner {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.loading-mask::before {
  content: '🫕';
  font-size: 32px;
  position: absolute;
  animation: pulse 1.5s ease infinite;
}

/* ============ 环形进度条 ============ */
.score-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  background: conic-gradient(
    var(--ring-color, var(--success)) calc(var(--ring-pct, 0) * 1%),
    #e9ecef calc(var(--ring-pct, 0) * 1%)
  );
}

.score-ring::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}

.score-ring .ring-value {
  position: relative;
  z-index: 1;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.score-ring .ring-label {
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ============ 筛选chips ============ */
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  background: #f1f3f5;
  color: var(--text-light);
  transition: all .2s;
  border: 1px solid transparent;
}

.chip.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 500;
}

.chip:hover:not(.active) {
  background: #e9ecef;
}

/* ============ 工具栏 ============ */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============ 深色模式 ============ */
@media (prefers-color-scheme: dark) {
  :root {
    --content-bg: #0f1117;
    --card-bg: #1a1d29;
    --text: #e4e6ea;
    --text-light: #9ca3af;
    --text-lighter: #6b7280;
    --border: #2d3140;
    --border-light: #232636;
    --shadow: 0 2px 12px rgba(0,0,0,.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.4);
  }

  body { background: var(--content-bg); }

  .topbar {
    background: #1a1d29;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
  }

  .topbar-left .app-title { color: var(--text); }
  .topbar-right .merchant-name { color: var(--text); }
  .topbar-right .btn-logout { color: var(--text-light); border-color: var(--border); }

  .login-card { background: #1a1d29; }
  .login-form .form-label { color: var(--text); }
  .login-tip { background: rgba(253,203,110,.15); color: #fbbf24; }
  .login-footer { color: var(--text-lighter); }

  input, select, textarea,
  .form-input, .form-select, .form-textarea {
    background: #232636;
    border-color: var(--border);
    color: var(--text);
  }

  .stat-card { background: var(--card-bg); }
  .card { background: var(--card-bg); }

  th { background: #232636; color: var(--text-light); border-color: var(--border); }
  td { border-color: var(--border); color: var(--text); }
  tr:hover { background: #232636; }

  .tabs, .tab-bar { background: #232636; }
  .tab.active, .tab-item.active {
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
  }

  .quick-item { background: var(--card-bg); }
  .quick-item .text { color: var(--text); }

  .chat-bubble.ai { background: #232636; color: var(--text); }
  .chat-input-bar { background: var(--card-bg); border-color: var(--border); }

  .modal { background: #1a1d29; }
  .modal-title { border-color: var(--border); color: var(--text); }
  .modal-footer { border-color: var(--border); }

  .loading-mask { background: rgba(15,17,23,.85); }
  .loading-text { color: var(--text-light); }

  .settings-section { background: var(--card-bg); }
  .settings-section .section-title { border-color: var(--border); color: var(--text); }
  .settings-item { border-color: var(--border-light); }

  .ai-tips-card { background: linear-gradient(135deg, #1a1d29, #232636); }
  .time-row .time-bar { background: #232636; }
  .bar-chart .bar .tooltip { background: var(--text); }

  .coupon-card { background: var(--card-bg); }
  .coupon-left::after { background: var(--content-bg); }
  .coupon-title { color: var(--text); }

  .todo-item { border-color: var(--border-light); }
  .rank-item { border-color: var(--border-light); }

  .score-ring::before { background: var(--card-bg); }

  .chip { background: #232636; color: var(--text-light); }
  .chip.active { background: rgba(255,107,53,.15); }

  .login-feature-tag { background: rgba(255,107,53,.15); }

  .btn-outline { border-color: var(--border); color: var(--text); }
  .btn-outline:hover { border-color: var(--primary); color: var(--primary); }

  .search-box input { background: #232636; border-color: var(--border); color: var(--text); }

  .schedule-grid { background: var(--border); }
  .schedule-grid .cell { background: var(--card-bg); }
  .schedule-grid .cell.header { background: #232636; }

  .store-card { background: var(--card-bg); }

  .empty-state, .empty { color: var(--text-light); }

  .progress { background: #232636; }

  .sidebar-upgrade { background: linear-gradient(135deg, #d97706, #b45309); }

  .confirm-dialog .confirm-msg { color: var(--text); }
}

/* ============ 移动端增强 ============ */
@media (max-width: 768px) {
  .coupon-grid {
    grid-template-columns: 1fr;
  }

  .coupon-left {
    width: 90px;
  }

  .coupon-value {
    font-size: 28px;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

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

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

  .quick-item {
    padding: 12px 8px;
  }

  .quick-item .icon {
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .quick-item .icon svg,
  .quick-item .icon .sgw-icon svg {
    width: 22px;
    height: 22px;
  }

  .quick-item .text {
    font-size: 12px;
  }

  body.sidebar-open {
    overflow: hidden;
  }
}

/* ============ 移动端手势与交互增强 ============ */

/* 全局触控优化 */
@media (max-width: 768px) {
  /* 所有可点击元素增加触控反馈 */
  .nav-item,
  .quick-item,
  .feature-card,
  .stat-card,
  .recipe-card,
  .store-card,
  .chip,
  .tab,
  .tab-item,
  .btn,
  .settings-item {
    -webkit-tap-highlight-color: transparent;
  }

  .nav-item:active,
  .quick-item:active,
  .feature-card:active,
  .chip:active,
  .tab:active,
  .tab-item:active {
    opacity: 0.7;
    transition: opacity 0.1s;
  }

  /* 页面切换动画 */
  .page.active {
    animation: pageSlideIn .25s ease-out;
  }

  /* 侧边栏滑动时的遮罩 */
  .sidebar-overlay {
    -webkit-tap-highlight-color: transparent;
  }

  /* 底部安全区适配（iPhone X+） */
  .content-area {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  /* FAB按钮适配安全区 */
  .fab,
  .service-fab {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    width: 48px;
    height: 48px;
  }

  /* 下拉刷新指示器 */
  .pull-to-refresh {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 13px;
    transition: transform .3s;
    z-index: 10;
  }

  .pull-to-refresh .ptr-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin-right: 8px;
  }

  .pull-to-refresh.refreshing .ptr-spinner {
    animation: spin 0.8s linear infinite;
  }

  /* 页面返回手势指示条 */
  .swipe-back-indicator {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: opacity .3s, width .2s;
    z-index: 600;
    pointer-events: none;
  }

  .swipe-back-indicator.visible {
    opacity: 0.6;
    width: 6px;
  }
}

@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

  .stat-card {
    padding: 14px;
  }

  .stat-card .value {
    font-size: 22px;
    word-break: break-all;
  }

  .stat-card .label {
    font-size: 12px;
  }

  .content-area {
    padding: 10px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left, .toolbar-right {
    width: 100%;
  }

  .filter-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .page-title {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .card {
    padding: 14px;
    margin-bottom: 12px;
  }

  .card-header {
    margin-bottom: 12px;
  }

  .card-title {
    font-size: 16px;
  }

  .welcome-banner {
    padding: 16px;
    margin-bottom: 16px;
  }

  .welcome-banner h2 {
    font-size: 18px;
  }

  .welcome-banner p {
    font-size: 12px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 14px;
    min-height: 42px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 16px;
    min-height: 48px;
  }

  .modal {
    width: 94%;
    padding: 16px;
    max-height: 85vh;
  }

  .modal-title {
    font-size: 17px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }

  .chat-container {
    height: calc(100vh - 160px);
  }

  .schedule-grid {
    grid-template-columns: 50px repeat(7, 1fr);
    font-size: 11px;
  }

  .schedule-grid .cell {
    padding: 4px;
    min-height: 40px;
  }

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

  .feature-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .feature-card {
    padding: 16px 10px;
  }

  .feature-card .fc-icon { font-size: 28px; }
  .feature-card .fc-title { font-size: 13px; }

  .store-card {
    padding: 14px;
    gap: 10px;
  }

  .store-card .store-metrics {
    flex-wrap: wrap;
    gap: 8px;
  }

  .empty-state-pro {
    padding: 40px 16px;
  }

  .empty-state-pro .empty-title {
    font-size: 18px;
  }

  .empty-state-pro .empty-desc {
    font-size: 14px;
  }

  .ai-result {
    padding: 14px;
    font-size: 14px;
  }

  .compare-table th,
  .compare-table td {
    padding: 8px 6px;
    font-size: 12px;
  }

  th {
    padding: 10px 8px;
    font-size: 12px;
  }

  td {
    padding: 10px 8px;
    font-size: 13px;
  }

  .toast {
    min-width: auto;
    max-width: 85vw;
    font-size: 13px;
    padding: 10px 14px;
  }

  .toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
  }

  input, select, textarea {
    padding: 10px 12px;
    font-size: 15px;
    min-height: 44px;
  }

  .form-input, .form-select, .form-textarea {
    padding: 10px 12px;
    font-size: 15px;
    min-height: 44px;
  }

  .login-card {
    padding: 24px 16px 20px;
  }

  .coupon-left {
    width: 80px;
  }

  .coupon-value {
    font-size: 24px;
  }

  .settings-item {
    padding: 12px 14px;
  }
}
/* ============ 全局搜索面板 ============ */
.btn-search-global {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  color: var(--text-light);
  transition: background .2s;
}
.btn-search-global:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.btn-search-global .topbar-icon {
  width: 20px;
  height: 20px;
}

.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.search-panel {
  width: 90%;
  max-width: 520px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: slideDown .2s ease;
}
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  gap: 12px;
}
.search-icon-svg {
  width: 20px;
  height: 20px;
  color: var(--text-lighter);
  flex-shrink: 0;
}
.search-icon-svg svg {
  width: 100%;
  height: 100%;
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text);
  background: transparent;
}
.search-input::placeholder {
  color: var(--text-lighter);
}
.search-kbd {
  font-size: 11px;
  padding: 2px 6px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: var(--text-lighter);
  font-family: monospace;
  flex-shrink: 0;
}

.search-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 0;
}
.search-result-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  cursor: pointer;
  gap: 12px;
  transition: background .15s;
}
.search-result-item:hover,
.search-result-item.active {
  background: var(--primary-light);
}
.search-result-item.active {
  border-left: 3px solid var(--primary);
}
.search-result-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.search-result-icon svg {
  width: 18px;
  height: 18px;
}
.search-result-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.search-sub {
  font-size: 12px;
  color: var(--text-lighter);
  margin-left: auto;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
}
.search-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-lighter);
  font-size: 14px;
}

/* ============ 口碑管理样式 ============ */
.review-card { transition: box-shadow .2s; }
.review-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.review-star { display: inline-block; width: 14px; height: 14px; margin-right: 1px; background: #ddd; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.review-star.filled { background: #f5a623; }

.review-tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; margin: 2px 2px; }
.review-tag.positive { background: #e8f5e9; color: #2e7d32; }
.review-tag.negative { background: #ffebee; color: #c62828; }
.review-tag.neutral { background: #fff3e0; color: #e65100; }

.review-platform-tag { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; background: #e3f2fd; color: #1565c0; }

.review-status { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.review-status.unreplied { background: #ffebee; color: #c62828; }
.review-status.drafted { background: #fff3e0; color: #e65100; }
.review-status.replied { background: #e8f5e9; color: #2e7d32; }

.switch-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.switch-label input[type="checkbox"] { width: 18px; height: 18px; }

.hidden { display: none !important; }
