/* xuanpin 基础样式 - 蓝青配色，简洁 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; background: #F4F7FA; color: #263238; font-size: 14px; line-height: 1.6; }

/* ---------- 布局 ---------- */
.app-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 200px; background: #0F2B3C; color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; }
.brand { padding: 20px 18px; font-size: 17px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar nav { flex: 1; padding: 12px 0; }
.sidebar nav a { display: block; padding: 10px 18px; color: #B0C4CE; text-decoration: none; border-left: 3px solid transparent; }
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar nav a.active { color: #fff; background: rgba(64,158,255,.18); border-left-color: #409EFF; }
.sidebar-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot a { color: #90A4AE; text-decoration: none; font-size: 13px; }
.sidebar-foot a:hover { color: #fff; }
.main { flex: 1; margin-left: 200px; padding: 22px 28px; max-width: 1200px; }

/* ---------- 页面头 ---------- */
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.page-head h2 { font-size: 22px; }

/* ---------- 卡片 ---------- */
.card { background: #fff; border-radius: 8px; padding: 18px; margin-bottom: 18px; box-shadow: 0 1px 4px rgba(15,43,60,.06); }
.card h3 { font-size: 15px; margin-bottom: 12px; color: #0F2B3C; }
.empty { color: #90A4AE; padding: 10px 0; }

/* ---------- 统计 ---------- */
.stat-grid { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.stat-card { flex: 1; min-width: 160px; background: #fff; border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(15,43,60,.06); }
.stat-num { font-size: 28px; font-weight: 700; color: #0F2B3C; }
.stat-label { color: #78909C; font-size: 13px; margin-top: 4px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #ECEFF1; }
.table th { color: #607D8B; font-weight: 600; font-size: 13px; }
.table a { color: #1565C0; text-decoration: none; }
.table a:hover { text-decoration: underline; }

/* ---------- 徽标 ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; background: #ECEFF1; color: #546E7A; }
.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-running, .badge-pending { background: #FFF8E1; color: #F57F17; }
.badge-failed { background: #FFEBEE; color: #C62828; }

/* ---------- 按钮 ---------- */
.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; border: 1px solid #B0BEC5; background: #fff; color: #37474F; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #F5F7FA; }
.btn-primary { background: #1565C0; border-color: #1565C0; color: #fff; }
.btn-primary:hover { background: #0D47A1; }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-danger { background: #C62828; border-color: #C62828; color: #fff; }
.btn-danger:hover { background: #B71C1C; }

/* ---------- 表单 ---------- */
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; padding: 8px 12px; border: 1px solid #CFD8DC; border-radius: 6px; font-size: 14px; background: #fff; color: #263238;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #1565C0; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 5px; color: #455A64; font-weight: 600; }

/* ---------- 登录页 ---------- */
.login-body { background: linear-gradient(135deg, #0F2B3C, #164A66); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; border-radius: 10px; padding: 36px 34px; width: 340px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.login-card h1 { font-size: 22px; text-align: center; color: #0F2B3C; }
.login-sub { text-align: center; color: #90A4AE; font-size: 13px; margin: 6px 0 20px; }
.login-card form input { margin-bottom: 14px; padding: 10px 12px; }
.alert { padding: 10px 12px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.alert-error { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .sidebar { width: 64px; }
  .brand, .sidebar nav a, .sidebar-foot a { padding-left: 10px; padding-right: 10px; font-size: 13px; }
  .sidebar .brand { writing-mode: vertical-lr; font-size: 14px; text-align: center; }
  .main { margin-left: 64px; padding: 16px; }
}

/* ---------- 筛选表单 ---------- */
.filter-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-form select, .filter-form input { width: auto; min-width: 100px; padding: 6px 10px; }
.filter-form .chk { display: flex; align-items: center; gap: 4px; color: #546E7A; }
.filter-form .chk input { width: auto; }
.crawl-form { max-width: 460px; }
.inline-msg { margin-left: 10px; color: #2E7D32; font-size: 13px; }
.weight-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.weight-row label { display: flex; align-items: center; gap: 6px; color: #455A64; }
.weight-row input { width: 70px; }
.platform-switch { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.switch-item { display: flex; align-items: center; gap: 6px; color: #455A64; }
.seed-input { max-width: 500px; }
.cookie-input { width: 100%; max-width: 640px; font-family: Consolas, Monaco, monospace; font-size: 12px; }
.token-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.token-row code { background: #ECEFF1; padding: 6px 10px; border-radius: 4px; font-size: 13px; word-break: break-all; }

/* ---------- 方案页 ---------- */
.tag { display: inline-block; background: #E3F2FD; color: #0D47A1; border-radius: 12px; padding: 2px 10px; margin: 2px 4px 2px 0; font-size: 13px; }
.tag-core { background: #E8EAF6; color: #283593; }
.tag-attr { background: #E0F7FA; color: #006064; }
.tag-scene { background: #FFF8E1; color: #F57F17; }
.tag-selling { background: #FCE4EC; color: #AD1457; }
.tag-pain { background: #FFF3E0; color: #E65100; }
.tag-label { display: inline-block; min-width: 70px; color: #78909C; font-size: 13px; }
.tag-cloud { display: flex; flex-wrap: wrap; }
.scheme-rows { display: flex; flex-direction: column; gap: 6px; }
.scheme-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.price-band { display: flex; gap: 28px; font-size: 14px; color: #455A64; }
.price-band b { color: #0D47A1; font-size: 16px; }

/* ---------- 资料包页 ---------- */
.pack-title { font-size: 16px; color: #0D47A1; margin: 0 0 6px; }
.pack-title-copy { float: right; }
.copy-btn { font-size: 12px; }
.pack-section { margin-bottom: 14px; }
.pack-section h4 { margin: 10px 0 4px; color: #37474F; }
.pack-advice { background: #F5F5F5; border-left: 3px solid #1565C0; padding: 10px 14px; font-size: 13px; color: #455A64; line-height: 1.9; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.design-card { border: 1px solid #CFD8DC; border-radius: 8px; padding: 10px; text-align: center; }
.design-card .dc-badge { display: block; background: #1565C0; color: #fff; border-radius: 4px; padding: 4px 6px; margin: 3px 0; font-size: 12px; }
.design-card .dc-title { display: block; color: #37474F; font-size: 12px; line-height: 1.5; }

/* ---------- 商品表 ---------- */
.product-table .td-title { max-width: 380px; }
.score-cell { color: #0D47A1; font-size: 15px; }
.td-status { white-space: nowrap; }
.pager { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.pager-link { padding: 4px 10px; border: 1px solid #CFD8DC; border-radius: 4px; text-decoration: none; color: #37474F; }
.pager-link.active { background: #1565C0; color: #fff; border-color: #1565C0; }

/* ---------- 详情页 ---------- */
.back-link { color: #607D8B; text-decoration: none; font-size: 14px; }
.back-link:hover { color: #1565C0; }
.detail-grid { display: flex; flex-wrap: wrap; gap: 18px; }
.detail-grid .card { flex: 1; min-width: 320px; }
.detail-table th { width: 90px; color: #607D8B; }
.score-big { color: #0D47A1; font-size: 20px; }
.wholesale-row { display: flex; gap: 8px; align-items: center; }
.wholesale-row input { width: 160px; }

/* ---------- 手动导入 ---------- */
.help-list { margin: 0 0 12px 18px; padding: 0; color: #455A64; line-height: 1.9; }
#import-text { width: 100%; box-sizing: border-box; min-height: 180px; font-size: 13px; }
.import-table .td-title { max-width: 420px; }
