/* 贵金属订货 · 移动客户端 —— 蓝白玻璃质感设计系统 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --blue: #2b7aff; --purple: #7c3aed; --ink: #1a2433; --sub: #7a8aa0; --line: #e8eef7;
  --bg: #eef3fc; --up: #e5484d; --down: #1e9e6a;
  --grad: linear-gradient(135deg, #2b7aff 0%, #7c3aed 100%);
}
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #dfe7f5; color: var(--ink); font-size: 14px;
}
#phone { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; box-shadow: 0 0 40px rgba(30, 60, 120, .15); }
#app { min-height: 100vh; padding-bottom: 76px; }

/* ---------- 通用 ---------- */
.page { padding: 14px 14px 0; animation: pageIn .28s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card {
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 16px; box-shadow: 0 6px 20px rgba(30, 60, 120, .08); padding: 16px; margin-bottom: 12px;
}
.sec-title { font-size: 15px; font-weight: 700; margin: 18px 2px 10px; display: flex; align-items: center; gap: 8px; }
.sec-title::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: var(--grad); }
.muted { color: var(--sub); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.up { color: var(--up); } .down { color: var(--down); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11px; background: #eef4ff; color: var(--blue); }
.tag.warn { background: #fdf3e6; color: #e8710a; } .tag.ok { background: #e7f8f0; color: var(--down); } .tag.bad { background: #fdecea; color: var(--up); }
.btn {
  display: block; width: 100%; border: none; border-radius: 14px; padding: 13px; font-size: 15px; font-weight: 600;
  background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(43, 122, 255, .35); cursor: pointer;
}
.btn:disabled { opacity: .5; box-shadow: none; }
.btn.ghost { background: #eef4ff; color: var(--blue); box-shadow: none; }
.btn-row { display: flex; gap: 10px; } .btn-row .btn { flex: 1; }
input, select, textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px;
  background: #fff; outline: none; font-family: inherit; color: var(--ink);
}
input:focus, select:focus { border-color: var(--blue); }
.field { margin-bottom: 12px; } .field label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.toast {
  position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 99; max-width: 80%;
  background: rgba(26, 36, 51, .88); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 13px;
  animation: pageIn .2s ease; text-align: center;
}

/* ---------- 登录/注册 ---------- */
.auth-wrap { min-height: 100vh; background: var(--grad); padding: 60px 26px 30px; position: relative; overflow: hidden; }
.auth-wrap::before { content: ''; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: rgba(255, 255, 255, .12); top: -120px; right: -100px; }
.auth-wrap::after { content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .08); bottom: 120px; left: -80px; }
.auth-logo { color: #fff; font-size: 26px; font-weight: 800; letter-spacing: 1px; position: relative; z-index: 1; }
.auth-sub { color: rgba(255, 255, 255, .75); font-size: 13px; margin: 8px 0 30px; position: relative; z-index: 1; }
.auth-card { background: rgba(255, 255, 255, .92); backdrop-filter: blur(16px); border-radius: 20px; padding: 24px 20px; position: relative; z-index: 1; box-shadow: 0 20px 50px rgba(20, 40, 90, .25); }
.auth-tabs { display: flex; background: #eef3fb; border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.auth-tabs div { flex: 1; text-align: center; padding: 9px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--sub); cursor: pointer; }
.auth-tabs div.on { background: #fff; color: var(--blue); box-shadow: 0 2px 8px rgba(30, 60, 120, .1); }

/* ---------- 首页头部 ---------- */
.home-head { background: var(--grad); border-radius: 0 0 26px 26px; padding: 20px 18px 64px; color: #fff; margin: -14px -14px 0; }
.home-head .hi { font-size: 13px; opacity: .8; }
.home-head .nm { font-size: 20px; font-weight: 800; margin-top: 2px; }
.asset-card { margin-top: -52px; position: relative; z-index: 2; }
.asset-card .bal-label { font-size: 12px; color: var(--sub); }
.asset-card .bal { font-size: 32px; font-weight: 800; letter-spacing: .5px; margin: 4px 0 2px; }
.asset-card .pts { font-size: 12px; color: var(--sub); }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-item { text-align: center; padding: 10px 0 6px; cursor: pointer; border-radius: 12px; }
.quick-item:active { background: #f2f6ff; }
.quick-item .ic { width: 42px; height: 42px; margin: 0 auto 6px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 19px; background: linear-gradient(160deg, #e8f1ff, #f3ecff); }
.quick-item .t { font-size: 12px; color: #44536b; }

/* ---------- 轮播/公告 ---------- */
.banner-box { overflow: hidden; border-radius: 14px; margin-bottom: 12px; position: relative; }
.banner-track { display: flex; transition: transform .45s ease; }
.banner-item {
  min-width: 100%; padding: 26px 20px; color: #fff; font-weight: 700; font-size: 16px; border-radius: 14px;
  background: linear-gradient(120deg, #4a90ff, #7c3aed); display: flex; align-items: center; min-height: 86px;
}
.banner-item:nth-child(2n) { background: linear-gradient(120deg, #7c3aed, #2b7aff); }
.notice-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b7a90; overflow: hidden; white-space: nowrap; }
.notice-bar b { color: var(--blue); flex-shrink: 0; }

/* ---------- 行情 ---------- */
.price-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.price-scroll::-webkit-scrollbar { display: none; }
.price-chip { min-width: 118px; background: rgba(255, 255, 255, .85); border-radius: 14px; padding: 12px; box-shadow: 0 4px 14px rgba(30, 60, 120, .07); }
.price-chip .m { font-size: 13px; font-weight: 700; }
.price-chip .p { font-size: 17px; font-weight: 800; margin-top: 4px; color: var(--blue); }
.price-chip .s { font-size: 11px; color: var(--sub); margin-top: 2px; }
.price-row { display: flex; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.price-row:last-child { border-bottom: none; }
.price-row .m { width: 76px; font-weight: 700; font-size: 15px; }
.price-row .col { flex: 1; text-align: right; }
.price-row .col .v { font-weight: 700; font-size: 15px; }
.price-row .col .k { font-size: 11px; color: var(--sub); }

/* ---------- 交易 ---------- */
.seg { display: flex; background: #e9eff9; border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.seg div { flex: 1; text-align: center; padding: 9px; border-radius: 9px; font-weight: 600; color: var(--sub); cursor: pointer; font-size: 14px; }
.seg div.on { background: #fff; color: var(--blue); box-shadow: 0 2px 8px rgba(30, 60, 120, .1); }
.metal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.metal-item { text-align: center; padding: 12px 4px; border-radius: 12px; background: #f4f7fd; cursor: pointer; border: 1.5px solid transparent; }
.metal-item .m { font-weight: 700; font-size: 14px; }
.metal-item .p { font-size: 12px; color: var(--blue); margin-top: 3px; font-weight: 600; }
.metal-item.on { border-color: var(--blue); background: #eef4ff; }
.estimate { background: #f6f9ff; border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 14px; }
.estimate .row { display: flex; justify-content: space-between; padding: 3px 0; }
.estimate .row b { font-weight: 700; }

/* ---------- 列表 ---------- */
.list-item { display: flex; align-items: center; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .t1 { font-weight: 600; font-size: 14px; }
.list-item .t2 { font-size: 11px; color: var(--sub); margin-top: 3px; }
.list-item .right { text-align: right; flex-shrink: 0; margin-left: 10px; }
.list-item .amt { font-weight: 800; font-size: 15px; }
.empty { text-align: center; color: #a3b1c6; padding: 36px 0; font-size: 13px; }
.stock-pill { display: flex; justify-content: space-between; align-items: center; background: #f6f9ff; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.stock-pill .m { font-weight: 700; } .stock-pill .w { font-weight: 800; color: var(--blue); font-size: 16px; }

/* ---------- 弹层 ---------- */
.mask { position: fixed; inset: 0; background: rgba(20, 30, 50, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 480px; padding: 20px 18px 26px; animation: sheetUp .25s ease; max-height: 82vh; overflow-y: auto; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { font-size: 16px; margin-bottom: 14px; }
.sheet .x { float: right; color: var(--sub); cursor: pointer; font-size: 18px; padding: 0 4px; }

/* ---------- 我的 ---------- */
.me-head { display: flex; align-items: center; gap: 14px; }
.me-avatar { width: 56px; height: 56px; border-radius: 18px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; }
.me-name { font-size: 18px; font-weight: 800; }
.me-cell { display: flex; align-items: center; padding: 15px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.me-cell:last-child { border-bottom: none; }
.me-cell .ic { width: 30px; } .me-cell .t { flex: 1; font-size: 14px; } .me-cell .arrow { color: #b6c2d4; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 40;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); display: flex; border-top: 1px solid var(--line);
  padding: 6px 0 calc(8px + env(safe-area-inset-bottom));
}
.tab-item { flex: 1; text-align: center; color: #93a2b8; cursor: pointer; }
.tab-item .ic { font-size: 20px; }
.tab-item .t { font-size: 11px; margin-top: 2px; }
.tab-item.on { color: var(--blue); font-weight: 700; }
