/* ========== 乐班供销平台 - 设计系统 (源自 leban) ========== */

/* === CSS Variables === */
:root {
  --lb-gold: #D4A843;
  --lb-gold-dark: #C9973A;
  --lb-gold-light: rgba(212, 168, 67, 0.1);
  --lb-orange: #FF914D;
  --lb-orange-dark: #E67A3D;
  --lb-dark: #1A1A2E;
  --lb-dark-light: #2C2C3A;
  --lb-bg: #F5F6FA;
  --lb-text: #333333;
  --lb-text-sec: #6B7280;
  --lb-text-muted: #9CA3AF;
  --lb-border: #e2e8f0;
  --lb-border-light: #f0f0f0;
  --lb-radius-sm: 8px;
  --lb-radius: 12px;
  --lb-radius-lg: 16px;
  --lb-radius-full: 9999px;
  --lb-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --lb-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --lb-shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --lb-transition: 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* === Reset === */
[v-cloak] { display: none !important; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--lb-bg);
  color: var(--lb-text);
  -webkit-font-smoothing: antialiased;
}

/* === Layout === */
.platform-container { max-width: 1440px; margin: 0 auto; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-title { font-size: 24px; font-weight: 700; color: var(--lb-dark); }
.page-desc { font-size: 14px; color: var(--lb-text-sec); margin-top: 4px; }
.section-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section-title-bar::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--lb-gold);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--lb-dark);
}

/* === Utility Colors === */
.text-gold { color: var(--lb-gold); }
.bg-gold { background-color: var(--lb-gold); }
.border-gold { border-color: var(--lb-gold); }
.text-green { color: #52C41A; }
.text-orange { color: #FF6B35; }
.text-blue { color: #1890FF; }
.text-red { color: #E74C3C; }

/* === Hero / Banner === */
.mall-hero-gradient {
  background: linear-gradient(135deg, #fef9ed, #fdf2d8 30%, #f5e6c8 70%, #eee0c0);
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: 400px;
  display: flex;
  align-items: center;
  padding: 0 48px;
}
.hero-title { font-size: 40px; font-weight: 800; color: var(--lb-dark); line-height: 1.2; }
.hero-subtitle { font-size: 16px; color: #4B5563; font-weight: 500; margin-top: 16px; }
.hero-actions { margin-top: 32px; display: flex; gap: 12px; }

/* === Cards === */
.card {
  background: #fff;
  border-radius: var(--lb-radius);
  border: 1px solid var(--lb-border);
  box-shadow: var(--lb-shadow);
  transition: all var(--lb-transition);
}
.card-hover:hover {
  box-shadow: var(--lb-shadow-md);
  border-color: var(--lb-gold);
  transform: translateY(-2px);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--lb-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 16px; font-weight: 600; color: var(--lb-dark); }
.card-body { padding: 20px; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--lb-transition);
  outline: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-md { height: 40px; padding: 0 16px; }
.btn-lg { height: 48px; padding: 0 32px; font-size: 16px; }
.btn-gold { background: var(--lb-gold); color: #fff; border-color: var(--lb-gold); }
.btn-gold:hover { background: var(--lb-gold-dark); border-color: var(--lb-gold-dark); }
.btn-orange { background: var(--lb-orange); color: #fff; border-color: var(--lb-orange); }
.btn-orange:hover { background: var(--lb-orange-dark); border-color: var(--lb-orange-dark); }
.btn-outline { background: rgba(255,255,255,0.8); color: var(--lb-text); border-color: #e5e7eb; }
.btn-outline:hover { background: #fff; border-color: var(--lb-border); }
.btn-ghost { background: transparent; color: var(--lb-text-sec); border-color: transparent; }
.btn-ghost:hover { background: #f3f4f6; color: var(--lb-dark); }
.btn-gold-ghost { background: var(--lb-gold-light); color: var(--lb-gold); border-color: transparent; }
.btn-gold-ghost:hover { background: rgba(212,168,67,0.2); }
.btn-rounded { border-radius: var(--lb-radius-full); }
.btn-icon { width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; }
.btn-link {
  background: none;
  border: none;
  color: var(--lb-gold);
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }

/* === Table === */
.table-wrap {
  background: #fff;
  border-radius: var(--lb-radius);
  border: 1px solid var(--lb-border);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }
table.lb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lb-table th {
  background: #F8F9FB;
  color: var(--lb-text-sec);
  font-weight: 500;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--lb-border-light);
  white-space: nowrap;
}
.lb-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--lb-border-light);
  vertical-align: middle;
}
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tbody tr { transition: background var(--lb-transition); }
.lb-table tbody tr:hover { background: #FAFAFA; }

/* === Tags / Badges === */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--lb-radius-full);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.tag-success { background: #ecfdf5; color: #059669; }
.tag-warning { background: #fffbeb; color: #d97706; }
.tag-info { background: #eff6ff; color: #2563eb; }
.tag-error { background: #fef2f2; color: #dc2626; }
.tag-gold { background: var(--lb-gold-light); color: var(--lb-gold); }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--lb-radius-full);
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid transparent;
}
.badge-success { background: #52C41A; color: #fff; }
.badge-warning { background: #FF6B35; color: #fff; }
.badge-error { background: #E74C3C; color: #fff; }
.badge-info { background: #1890FF; color: #fff; }
.badge-gold { background: var(--lb-gold); color: #fff; }
.badge-outline { background: transparent; border-color: var(--lb-border); color: var(--lb-text-sec); }

/* === Form Elements === */
.form-input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--lb-border);
  border-radius: var(--lb-radius-sm);
  font-size: 13px;
  color: var(--lb-text);
  background: #fff;
  outline: none;
  transition: border-color var(--lb-transition);
}
.form-input:focus { border-color: var(--lb-gold); box-shadow: 0 0 0 2px rgba(212,168,67,0.15); }
.form-input::placeholder { color: var(--lb-text-muted); }
.form-select {
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--lb-border);
  border-radius: var(--lb-radius-sm);
  font-size: 13px;
  color: var(--lb-text);
  background: #fff;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--lb-transition);
}
.form-select:focus { border-color: var(--lb-gold); border-color: var(--lb-gold); box-shadow: 0 0 0 2px rgba(212,168,67,0.15); }

/* === Stats Card === */
.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: var(--lb-radius);
  border: 1px solid var(--lb-border-light);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--lb-transition);
}
.stat-card:hover {
  box-shadow: 0 4px 12px rgba(212,168,67,0.12);
  border-color: var(--lb-gold);
  transform: translateY(-2px);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-value { font-size: 24px; font-weight: 700; color: var(--lb-gold); }
.stat-label { font-size: 14px; color: var(--lb-text-sec); margin-top: 2px; }

/* === Grid Stats (leban style) === */
.stat-grid-item {
  background: #fff;
  padding: 20px;
  border-radius: var(--lb-radius);
  border: 1px solid var(--lb-border-light);
}
.stat-grid-value { font-size: 24px; font-weight: 700; }
.stat-grid-label { font-size: 13px; color: var(--lb-text-sec); margin-top: 2px; }

/* === Category Card (leban style) === */
.cat-card {
  background: #fff;
  border: 1px solid var(--lb-border-light);
  border-radius: var(--lb-radius);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--lb-transition);
}
.cat-card:hover {
  border-color: var(--lb-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212,168,67,0.15);
}
.cat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 22px;
}
.cat-name { font-size: 14px; font-weight: 500; color: var(--lb-text); }
.cat-count { font-size: 12px; color: #999; margin-top: 4px; }

/* === Product Card (leban style) === */
.prod-card {
  background: #fff;
  border-radius: var(--lb-radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--lb-border-light);
  transition: all var(--lb-transition);
}
.prod-card:hover {
  box-shadow: var(--lb-shadow-md);
  transform: translateY(-2px);
}
.prod-img-wrap { aspect-ratio: 1; background: #f8f8f8; overflow: hidden; }
.prod-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.prod-card:hover .prod-img { transform: scale(1.08); }
.prod-info { padding: 12px; }
.prod-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--lb-dark);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.prod-price { font-size: 18px; font-weight: 700; color: #ef4445; }
.prod-sales { font-size: 12px; color: var(--lb-text-sec); }

/* === Pagination (simple style) === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 16px 20px;
}
.page-btn {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--lb-border);
  border-radius: 6px;
  background: #fff;
  color: var(--lb-text);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--lb-transition);
}
.page-btn:hover { border-color: var(--lb-gold); color: var(--lb-gold); }
.page-btn.active { background: var(--lb-gold); color: #fff; border-color: var(--lb-gold); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* === Chart Container === */
.chart-box {
  background: #fff;
  border-radius: var(--lb-radius);
  border: 1px solid var(--lb-border);
  overflow: hidden;
}
.chart-box-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--lb-border-light);
}
.chart-box-header .chart-title { font-size: 16px; font-weight: 600; color: var(--lb-dark); }
.chart-body { padding: 16px; }

/* === Seller Profile === */
.seller-profile {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 32px;
  background: #fff;
  border-radius: var(--lb-radius);
  border: 1px solid var(--lb-border);
  margin-bottom: 24px;
}
.seller-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--lb-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.seller-info { flex: 1; }
.seller-name { font-size: 24px; font-weight: 700; margin: 0; }
.seller-company { color: #666; margin-top: 4px; }
.seller-metrics { display: flex; gap: 24px; margin-top: 12px; }
.seller-metric-value { font-size: 20px; font-weight: 700; color: var(--lb-gold); }
.seller-metric-label { font-size: 12px; color: #999; margin-left: 4px; }

/* === Breadcrumb === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--lb-gold); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: #999; }
.breadcrumb .current { color: var(--lb-text); font-weight: 500; }

/* === Message / Chat === */
.chat-layout {
  display: flex;
  background: #fff;
  border-radius: var(--lb-radius);
  border: 1px solid var(--lb-border);
  overflow: hidden;
  height: calc(100vh - 220px);
}
.chat-sidebar {
  width: 320px;
  border-right: 1px solid var(--lb-border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.chat-main { flex: 1; display: flex; flex-direction: column; }
.contact-item {
  padding: 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--lb-border-light);
  transition: background var(--lb-transition);
}
.contact-item:hover { background: #fef7ec; }
.contact-item.active { background: #fef7ec; border-left: 3px solid var(--lb-gold); }
.msg-bubble-in {
  padding: 10px 14px;
  border-radius: 12px 12px 12px 4px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 70%;
  background: #f5f5f7;
  color: var(--lb-text);
}
.msg-bubble-out {
  padding: 10px 14px;
  border-radius: 12px 12px 4px 12px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 70%;
  background: var(--lb-gold);
  color: #fff;
  margin-left: auto;
}
.msg-time { font-size: 11px; color: #999; margin-top: 4px; }

/* === Rules === */
.rule-card {
  background: #fff;
  border: 1px solid var(--lb-border);
  border-radius: var(--lb-radius);
  padding: 20px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all var(--lb-transition);
}
.rule-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.rule-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--lb-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rule-desc { font-size: 13px; color: var(--lb-text-sec); line-height: 1.6; }
.rule-content {
  display: none;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--lb-border-light);
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: #4B5563;
}
.rule-content.open { display: block; }

/* === Filter Bar === */
.filter-bar {
  background: #fff;
  border-radius: var(--lb-radius);
  border: 1px solid var(--lb-border);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--lb-text-muted);
}

/* ============================================================
   工具类 Utilities — 减少内联样式
   ============================================================ */

/* --- Body + App Shell --- */
body { margin:0; padding:0; }
.app-shell { display:flex; flex-direction:column; min-height:100vh; }
.app-header {
  background:var(--lb-dark); color:#fff; height:64px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 24px; flex-shrink:0; position:sticky; top:0; z-index:50;
}
.app-footer { background:var(--lb-dark); color:#fff; padding:48px 24px; flex-shrink:0; }

/* --- Flex / Layout --- */
.flex-center  { display:flex; align-items:center; }
.flex-center-all { display:flex; align-items:center; justify-content:center; }
.flex-between { display:flex; align-items:center; justify-content:space-between; }
.flex-col     { display:flex; flex-direction:column; }
.flex-1       { flex:1; }
.shrink-0     { flex-shrink:0; }
.gap-4  { gap:4px; }  .gap-6  { gap:6px; }  .gap-8  { gap:8px; }
.gap-10 { gap:10px; } .gap-12 { gap:12px; } .gap-16 { gap:16px; }
.gap-20 { gap:20px; } .gap-24 { gap:24px; } .gap-32 { gap:32px; }

/* --- Spacing --- */
.p-12 { padding:12px; }  .p-16 { padding:16px; }  .p-20 { padding:20px; }
.p-24 { padding:24px; }  .p-32 { padding:32px; }  .p-48 { padding:48px; }
.px-24 { padding-left:24px; padding-right:24px; }
.py-16 { padding-top:16px; padding-bottom:16px; }
.py-48 { padding-top:48px; padding-bottom:48px; }
.m-0   { margin:0; }
.mb-16 { margin-bottom:16px; }
.mb-20 { margin-bottom:20px; }
.mb-24 { margin-bottom:24px; }

/* --- Colors / Typography --- */
.text-dark  { color:var(--lb-dark); }
.text-sec   { color:var(--lb-text-sec); }
.text-muted { color:var(--lb-text-muted); }
.text-gold  { color:var(--lb-gold); }
.text-red   { color:#ef4445; }
.text-white { color:#fff; }
.bg-dark    { background:var(--lb-dark); }
.bg-white   { background:#fff; }
.bg-page    { background:var(--lb-bg); }
.fs-11 { font-size:11px; }  .fs-12 { font-size:12px; }
.fs-13 { font-size:13px; }  .fs-14 { font-size:14px; }
.fs-16 { font-size:16px; }  .fs-20 { font-size:20px; }
.fs-24 { font-size:24px; }
.fw-5  { font-weight:500; }
.fw-6  { font-weight:600; }
.fw-7  { font-weight:700; }

/* --- Borders / Radius --- */
.br-6  { border-radius:6px; }
.br-8  { border-radius:8px; }
.br-12 { border-radius:12px; }
.br-16 { border-radius:16px; }
.br-50 { border-radius:50%; }
.br-full { border-radius:9999px; }
.bdr    { border:1px solid var(--lb-border); }
.bdr-l  { border:1px solid var(--lb-border-light); }

/* --- Size --- */
.w-full    { width:100%; }
.h-full    { height:100%; }
.obj-cover { object-fit:cover; }
.aspect-1  { aspect-ratio:1; }

/* --- Grids (从 inline <style> 移入) --- */
.stats-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:24px; }
.cat-grid   { display:grid; grid-template-columns:repeat(8,1fr); gap:16px; }
.prod-grid  { display:grid; grid-template-columns:repeat(6,1fr); gap:16px; }
.chart-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:24px; }
@media(max-width:1023px){ .stats-grid { grid-template-columns:repeat(3,1fr); } }
@media(max-width:767px) { .stats-grid { grid-template-columns:1fr; } }
@media(max-width:1023px){ .cat-grid   { grid-template-columns:repeat(4,1fr); } }
@media(max-width:767px) { .cat-grid   { grid-template-columns:repeat(2,1fr); } }
@media(max-width:1023px){ .prod-grid  { grid-template-columns:repeat(3,1fr); } }
@media(max-width:767px) { .prod-grid  { grid-template-columns:repeat(2,1fr); } }
@media(max-width:1023px){ .chart-grid { grid-template-columns:1fr; } }
