/* ============================================================
   多行业资产拍卖流转平台 — 共享设计系统
   视觉方向: Tech/utility · 金融拍卖风格
   深蓝底色 × 琥珀金点缀 × 青色次要色
   ============================================================ */

:root {
  /* 品牌色板 */
  --bg:         oklch(12% 0.025 255);
  --surface:    oklch(16% 0.03 255);
  --surface-2:  oklch(20% 0.035 255);
  --surface-3:  oklch(25% 0.04 255);
  --fg:         oklch(93% 0.01 255);
  --fg-secondary: oklch(65% 0.015 255);
  --muted:      oklch(45% 0.02 255);
  --border:     oklch(28% 0.03 255);
  --accent:     oklch(72% 0.15 85);   /* 琥珀金 */
  --accent-dim: oklch(55% 0.12 85);
  --green:      oklch(65% 0.18 150);  /* 成交/成功 */
  --red:        oklch(58% 0.2 30);    /* 失败/警告 */
  --blue:       oklch(62% 0.14 250);  /* 信息 */
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* 字体 */
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ========== 全局重置 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ========== 排版 ========== */
h1 { font: 600 28px/1.3 var(--font-display); letter-spacing: -0.03em; }
h2 { font: 600 22px/1.3 var(--font-display); letter-spacing: -0.02em; }
h3 { font: 600 18px/1.4 var(--font-display); }
h4 { font: 500 16px/1.4 var(--font-display); }
.caption { font-size: 12px; color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.price { font-family: var(--font-mono); font-weight: 600; letter-spacing: -0.02em; }

/* ========== 状态标签 ========== */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 22px;
  white-space: nowrap;
}
.tag-live { background: color-mix(in oklch, var(--red) 20%, transparent); color: var(--red); }
.tag-upcoming { background: color-mix(in oklch, var(--blue) 20%, transparent); color: var(--blue); }
.tag-done { background: color-mix(in oklch, var(--green) 20%, transparent); color: var(--green); }
.tag-deal { background: color-mix(in oklch, var(--accent) 20%, transparent); color: var(--accent); }
.tag-warn { background: color-mix(in oklch, var(--red) 15%, transparent); color: var(--red); }
.tag-pending { background: color-mix(in oklch, var(--accent) 15%, transparent); color: var(--accent); }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 24px; border-radius: var(--radius-md);
  font: 500 15px/1 var(--font-body);
  border: none; cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: 0.4; cursor: default; }
.btn-secondary { background: var(--surface-2); color: var(--fg); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

/* ========== 表单 ========== */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 13px; font-weight: 500; color: var(--fg-secondary); }
.input, .textarea, .select {
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--fg); font: 15px/1.5 var(--font-body);
  outline: none; transition: border-color 0.15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { min-height: 100px; resize: vertical; }

/* ========== 卡片 ========== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.card-hover { transition: border-color 0.2s, background 0.2s; cursor: pointer; }
.card-hover:hover { border-color: var(--accent-dim); background: var(--surface-2); }

/* ========== Badge/数字 ========== */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; font-size: 11px; font-weight: 600;
  background: var(--accent); color: var(--bg);
}

/* ========== App 布局 ========== */
.app-shell {
  display: flex; flex-direction: column;
  min-height: 100vh; max-width: 430px; margin: 0 auto;
  position: relative;
}
.app-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: color-mix(in oklch, var(--bg) 95%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.app-header h1 { flex: 1; font-size: 18px; }
.app-main { flex: 1; padding: 16px; padding-bottom: calc(80px + var(--safe-bottom)); }
.app-tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: 50;
  display: flex; align-items: center; justify-content: space-around;
  padding: 6px 0 calc(6px + var(--safe-bottom));
  background: color-mix(in oklch, var(--surface) 98%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; border: none; background: none;
  color: var(--muted); font-size: 10px; cursor: pointer;
  transition: color 0.15s;
}
.tab-item.active { color: var(--accent); }
.tab-item .tab-icon { font-size: 22px; line-height: 1; }

/* ========== PC 后台布局 ========== */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.admin-logo {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  font: 700 18px/1 var(--font-display);
  color: var(--accent);
  display: flex; align-items: center; gap: 10px;
}
.admin-nav { flex: 1; padding: 12px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--fg-secondary); font-size: 14px;
  cursor: pointer; transition: all 0.15s;
  border: none; background: none; text-align: left; width: 100%;
}
.admin-nav-item:hover { background: var(--surface-2); color: var(--fg); }
.admin-nav-item.active { background: color-mix(in oklch, var(--accent) 15%, transparent); color: var(--accent); }
.admin-nav-item .nav-icon { font-size: 18px; width: 24px; text-align: center; }
.admin-nav-divider { height: 1px; background: var(--border); margin: 8px 12px; }
.admin-main { display: flex; flex-direction: column; overflow-x: hidden; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--bg) 95%, transparent);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 40;
}
.admin-content { flex: 1; padding: 24px; overflow-y: auto; }

/* ========== 数据表格 ========== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 12px 16px;
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  color: var(--muted); letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.data-table tr:hover td { background: var(--surface-2); }

/* ========== 统计卡片 ========== */
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px;
}
.stat-card .stat-label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; font-family: var(--font-mono); letter-spacing: -0.03em; }
.stat-card .stat-change { font-size: 12px; margin-top: 4px; }

/* ========== 分割线 ========== */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ========== 弹窗/Modal ========== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  max-width: 440px; width: 90%; max-height: 80vh; overflow-y: auto;
}
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* ========== 进度条 ========== */
.progress-bar {
  height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden;
}
.progress-bar .progress-fill {
  height: 100%; border-radius: 2px; background: var(--accent);
  transition: width 0.3s;
}

/* ========== 工具 ========== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-16 { padding: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.py-8 { padding-top: 8px; padding-bottom: 8px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none; }