/* ── 基础 ───────────────────────────────────────── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #f2f1ef;
  --card: #ffffff;
  --ink: #16161a;
  --ink2: #6c6c73;
  --ink3: #a3a3a9;
  --line: rgba(20, 20, 22, .09);
  --gold: #a9814a;
  --gold-2: #c9a06a;
  --gold-soft: #f4ebdd;
  --danger: #c0392b;
  --r: 18px;
  --shadow: 0 1px 2px rgba(20,20,22,.04), 0 12px 32px -16px rgba(20,20,22,.28);
}

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px; line-height: 1.5;
}
body { min-height: 100vh; min-height: 100dvh; }
body.reader-open { overflow: hidden; }
img { -webkit-user-select: none; user-select: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea { font-family: inherit; font-size: 15px; }

.shell { max-width: 720px; margin: 0 auto; padding: 0 16px 64px; }

/* ── 顶栏 ───────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 16px;
  background: rgba(242,241,239,.84);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand {
  font-size: 13.5px; font-weight: 600; letter-spacing: .3px;
  display: flex; align-items: center; gap: 7px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar .brand::before {
  content: ""; flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
.topbar .spacer { flex: 1; }
.topbar .back {
  width: 34px; height: 34px; margin-left: -8px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 21px; line-height: 1;
}
.topbar .back:active { background: rgba(0,0,0,.05); }

.chip-btn {
  height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink2);
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
}
.chip-btn:active { transform: scale(.97); }

/* ── 名片（竖版 · 青蓝几何） ─────────────────────── */
.card-stage {
  min-height: calc(100dvh - 52px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 22px 20px calc(30px + env(safe-area-inset-bottom));
  max-width: 430px; margin: 0 auto;
}

.biz-card {
  position: relative; background: var(--card); border-radius: 20px;
  padding: 30px 26px 22px; box-shadow: var(--shadow);
  overflow: hidden; animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
  min-height: 480px;
  display: flex; flex-direction: column;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

/* 右侧几何箭头装饰 */
.bc-deco { position: absolute; inset: 0; pointer-events: none; }
.bc-deco i { position: absolute; top: -30px; bottom: -30px; transform: skewX(-16deg); }
.bc-deco .tip   { right: -110px; width: 62px;  background: #124f79; }
.bc-deco .blue  { right: -76px;  width: 190px; background: linear-gradient(200deg, #1e7cb2 0%, #155a8a 100%); }
.bc-deco .teal  { right: 76px;   width: 92px;  background: linear-gradient(200deg, #33c3de 0%, #1e8fb8 100%); }
.bc-deco .shine { right: 60px;   width: 5px;   background: rgba(255,255,255,.9); }

/* 公司名 */
.bc-co { position: relative; z-index: 1; }
.bc-logo-img {
  width: 38px; height: 38px; border-radius: 9px; object-fit: contain;
  display: block; margin-bottom: 10px;
}
.bc-co .cn {
  font-size: 16px; font-weight: 700; letter-spacing: .2px; line-height: 1.4;
  color: #1b6fa6; max-width: 68%;
}
.bc-co .en {
  font-size: 9px; letter-spacing: 1.9px; color: #7fb3ce;
  text-transform: uppercase; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 68%;
}

.bc-person { position: relative; z-index: 1; margin-top: 32px; }
.bc-person .pname {
  font-size: 32px; font-weight: 700; letter-spacing: -.8px; line-height: 1.15;
  color: #14293b;
}
.bc-person .ptitle {
  margin-top: 7px; font-size: 12.5px; color: #2299bc; font-weight: 600;
  letter-spacing: .4px;
}
.bc-intro {
  position: relative; z-index: 1;
  margin-top: 11px; font-size: 12px; line-height: 1.65; color: #5e7181;
  max-width: 58%;
}

.bc-rule {
  position: relative; z-index: 1;
  height: 1px; margin: 22px 0 15px; max-width: 70%;
  background: linear-gradient(90deg, rgba(18,48,66,.16), transparent);
}

.bc-lines { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; max-width: 74%; }
.bc-line { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #1c3040; }
.bc-line .ico {
  width: 25px; height: 25px; border-radius: 7px; flex: 0 0 auto;
  background: #eaf6fa; color: #2299bc;
  display: flex; align-items: center; justify-content: center;
}
.bc-line .ico svg { width: 13px; height: 13px; }
.bc-line .val {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bc-line .val small { color: var(--ink3); font-size: 11px; margin-right: 5px; }

.cta {
  position: relative; z-index: 1;
  margin-top: auto; width: 100%; height: 50px; border-radius: 13px;
  background: linear-gradient(135deg, #1e7cb2, #14567f); color: #fff;
  font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 12px 24px -12px rgba(20,87,128,.75);
  letter-spacing: .4px;
}
.cta:active { transform: scale(.985); }
.cta em { font-style: normal; font-size: 11px; opacity: .62; font-weight: 500; }
.cta .arw { transition: transform .2s; }
.cta:hover .arw { transform: translateX(3px); }

.bc-brand-foot {
  position: relative; z-index: 1;
  margin-top: 15px; text-align: center; font-size: 9.5px;
  color: rgba(255,255,255,.78); letter-spacing: 1.6px; text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,.18);
}

/* ── 画册列表 ───────────────────────────────────── */
.page-head { padding: 24px 2px 18px; }
.page-head h1 { margin: 0 0 5px; font-size: 22px; font-weight: 680; letter-spacing: -.5px; }
.page-head p { margin: 0; font-size: 12.5px; color: var(--ink2); }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 620px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }

.cat-card {
  display: block; width: 100%; text-align: left; padding: 0;
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .18s ease;
}
.cat-card:active { transform: scale(.975); }
.cat-cover {
  position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden;
  background: repeating-linear-gradient(135deg, #eae7e1, #eae7e1 9px, #e4e0d9 9px, #e4e0d9 18px);
}
.cat-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-cover .none {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #b5aea3; letter-spacing: 2px;
}
.cat-cover .pg {
  position: absolute; right: 7px; bottom: 7px; padding: 2px 7px; border-radius: 999px;
  background: rgba(0,0,0,.52); color: #fff; font-size: 10.5px;
  backdrop-filter: blur(4px); font-variant-numeric: tabular-nums;
}
.cat-meta { padding: 9px 11px 11px; }
.cat-meta h3 {
  margin: 0; font-size: 13px; font-weight: 600; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-meta span { font-size: 10.5px; color: var(--ink3); }

.empty-state {
  padding: 44px 18px; text-align: center; color: var(--ink3); font-size: 13px;
  border: 1px dashed var(--line); border-radius: var(--r); background: var(--card);
}
.empty-state strong { display: block; color: var(--ink2); font-size: 14px; margin-bottom: 4px; }

/* ── 阅读器（翻页） ─────────────────────────────── */
.reader {
  position: fixed; inset: 0; z-index: 100; background: #0a0a0b;
  display: flex; flex-direction: column;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.r-top {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  color: #fff;
}
.r-top .t {
  font-size: 14px; font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.r-top .x {
  margin-left: auto; font-size: 26px; line-height: 1; padding: 2px 4px; flex: 0 0 auto;
  color: rgba(255,255,255,.75);
}
.r-stage {
  flex: 1; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  touch-action: pan-y;
}
.r-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  animation: pgIn .22s ease;
  -webkit-user-drag: none;
}
@keyframes pgIn { from { opacity: .35 } to { opacity: 1 } }
.r-zone {
  position: absolute; top: 0; bottom: 0; width: 38%;
  display: flex; align-items: center; padding: 0 12px;
  color: rgba(255,255,255,.28); font-size: 30px; user-select: none;
  transition: color .15s;
}
.r-zone.l { left: 0; justify-content: flex-start; }
.r-zone.r { right: 0; justify-content: flex-end; }
.r-zone:active { color: rgba(255,255,255,.85); }
.r-zone.off { opacity: 0; pointer-events: none; }

.r-bar {
  flex: 0 0 auto; padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  color: #fff;
}
.r-bar .num {
  display: flex; align-items: baseline; gap: 4px; justify-content: center;
  font-variant-numeric: tabular-nums; font-size: 12px; color: rgba(255,255,255,.55);
}
.r-bar .num b { color: #fff; font-size: 14px; font-weight: 600; }
.r-track {
  margin-top: 9px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.14);
  overflow: hidden;
}
.r-fill { height: 100%; background: linear-gradient(90deg, var(--gold-2), #fff); transition: width .25s ease; }

.r-tip {
  position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 12px;
  backdrop-filter: blur(6px); pointer-events: none;
  animation: tipOut .4s ease 2.2s forwards;
}
@keyframes tipOut { to { opacity: 0; transform: translate(-50%, 8px) } }

/* ── 表单 / 后台 ────────────────────────────────── */
.panel {
  background: var(--card); border-radius: var(--r); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.panel h3 { margin: 0 0 12px; font-size: 14px; font-weight: 650; }
.panel h3 small { font-weight: 400; color: var(--ink3); font-size: 11.5px; margin-left: 6px; }

.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block; font-size: 12px; color: var(--ink2); margin-bottom: 6px; font-weight: 500;
}
.field input[type=text], .field textarea, .field input[type=password], .field input[type=tel] {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #fafafa; color: var(--ink);
  outline: none; transition: border-color .15s, background .15s;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); background: #fff; }
.field textarea { resize: vertical; min-height: 68px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn {
  height: 42px; padding: 0 18px; border-radius: 11px;
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn.primary { background: #17171b; color: #fff; width: 100%; }
.btn.primary:active { opacity: .86; }
.btn.line { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.btn.danger { color: var(--danger); border: 1px solid rgba(192,57,43,.22); background: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; font-weight: 500; }

.admin-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.admin-row:last-child { border-bottom: 0; }
.admin-row .thumb {
  width: 44px; height: 58px; border-radius: 7px; overflow: hidden;
  background: #e8e5e0; flex: 0 0 auto;
}
.admin-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-row .txt { flex: 1; min-width: 0; }
.admin-row .txt b {
  display: block; font-size: 13.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-row .txt span { font-size: 11.5px; color: var(--ink3); }
.admin-row .acts { display: flex; gap: 6px; flex: 0 0 auto; }

.page-list { display: flex; flex-direction: column; gap: 8px; }
.page-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; background: #faf9f7; border: 1px solid var(--line);
}
.page-item .idx {
  width: 20px; text-align: center; font-size: 11.5px; color: var(--ink3);
  font-variant-numeric: tabular-nums; flex: 0 0 auto;
}
.page-item .pv {
  width: 40px; height: 52px; border-radius: 6px; overflow: hidden; background: #e8e5e0; flex: 0 0 auto;
}
.page-item .pv img { width: 100%; height: 100%; object-fit: cover; }
.page-item .ops { margin-left: auto; display: flex; gap: 4px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; background: #fff;
  border: 1px solid var(--line); font-size: 13px; color: var(--ink2);
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:disabled { opacity: .35; }
.icon-btn.del { color: var(--danger); }

.note {
  font-size: 12px; color: var(--ink3); line-height: 1.65;
  padding: 10px 12px; background: #faf9f7; border-radius: 10px; border: 1px solid var(--line);
}

/* ── toast / 进度 ───────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translate(-50%, 12px);
  background: rgba(22,22,26,.93); color: #fff; font-size: 13px;
  padding: 10px 16px; border-radius: 999px; z-index: 200;
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
  max-width: 84vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.progress {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  z-index: 150; background: rgba(22,22,26,.93); color: #fff;
  padding: 15px 20px; border-radius: 13px; font-size: 13px;
  display: none; align-items: center; gap: 10px;
}
.progress.on { display: flex; }
.spin {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: sp .7s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg) } }

/* 后台登录 */
.lock { padding: 56px 0 0; text-align: center; }
.lock .ico {
  width: 52px; height: 52px; margin: 0 auto 15px; border-radius: 15px;
  background: var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.lock h2 { margin: 0 0 5px; font-size: 17px; font-weight: 650; }
.lock p { margin: 0 0 20px; font-size: 12.5px; color: var(--ink3); }
.lock form { max-width: 280px; margin: 0 auto; }

/* ── 深色 ───────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10; --card: #17171a; --ink: #f2f2f3; --ink2: #a2a2a9;
    --ink3: #6d6d75; --line: rgba(255,255,255,.09); --gold: #c9a06a;
    --gold-2: #d9b689; --gold-soft: rgba(201,160,106,.14);
  }
  .topbar { background: rgba(14,14,16,.84); }
  .field input[type=text], .field textarea, .field input[type=password], .field input[type=tel] { background: #1e1e22; }
  .field input:focus, .field textarea:focus { background: #232328; }
  .bc-line .ico { background: rgba(34,153,188,.16); }
  .cta { background: linear-gradient(135deg, #1e7cb2, #14567f); color: #fff; }
  .btn.primary { background: #f2f2f3; color: #16161a; }
  .btn.line, .btn.danger, .icon-btn { background: #1e1e22; }
  .page-item, .note { background: #1b1b1f; }
  .cat-cover { background: repeating-linear-gradient(135deg,#22222a,#22222a 9px,#1d1d23 9px,#1d1d23 18px); }
  .cat-cover .none { color: #55555e; }
  .biz-card { background: #17171a; }
  .bc-person .pname { color: #eef4f8; }
  .bc-line { color: #d4dce2; }
}

/* ══ 后台框架（侧边栏 + 主区） ═════════════════════════ */
:root {
  --accent: #1e7cb2;
  --accent-2: #33c3de;
  --accent-soft: #eaf6fa;
}

.admin-app {
  display: flex;
  min-height: 100dvh;
  background: #eef2f5;
  align-items: stretch;
}

/* ── 侧边栏 ─────────────────────────────── */
.admin-side {
  width: 228px;
  flex: 0 0 228px;
  position: sticky;
  top: 0;
  height: 100dvh;
  background: #ffffff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 12px 14px;
  z-index: 20;
}

.as-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.as-logo {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, #1e7cb2, #33c3de);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.as-logo img { width: 100%; height: 100%; object-fit: cover; }
.as-name { min-width: 0; }
.as-name b {
  display: block; font-size: 13.5px; font-weight: 650; letter-spacing: -.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.as-name span { display: block; font-size: 10.5px; color: var(--ink3); letter-spacing: .6px; margin-top: 1px; }

.as-nav { flex: 1; overflow-y: auto; }
.as-group {
  font-size: 10.5px; color: var(--ink3); letter-spacing: 1px;
  padding: 12px 10px 7px;
}
.as-item {
  display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 10px; margin-bottom: 2px;
  border-radius: 9px; font-size: 13.5px; color: var(--ink2);
  width: 100%; text-align: left; transition: background .15s, color .15s;
}
.as-item svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .62; }
.as-item:hover { background: #f5f7f9; color: var(--ink); }
.as-item.on {
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.as-item.on svg { opacity: 1; }
.as-item .soon {
  margin-left: auto; font-size: 9.5px; color: var(--ink3);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px;
  letter-spacing: .3px;
}
.as-item.disabled { opacity: .5; cursor: not-allowed; }
.as-item.disabled:hover { background: none; }

.as-foot { border-top: 1px solid var(--line); padding-top: 10px; }

/* ── 主区 ───────────────────────────────── */
.admin-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.am-head {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 28px;
  background: rgba(238,242,245,.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.am-head h1 {
  margin: 0; font-size: 18px; font-weight: 680; letter-spacing: -.3px;
}
.am-head p {
  margin: 3px 0 0; font-size: 12px; color: var(--ink2);
}
.am-head .am-spacer { flex: 1; }
.am-burger {
  display: none; width: 36px; height: 36px; border-radius: 9px;
  align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); font-size: 17px;
}
.am-body {
  padding: 22px 28px 72px;
  width: 100%; max-width: 900px;
}

/* 后台里的面板稍微收紧 */
.admin-main .panel { margin-bottom: 16px; background: #fff; }
.admin-main .panel h3 { font-size: 14px; }

/* 画册卡片网格 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.cat-tile {
  display: flex; flex-direction: column; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; transition: transform .16s, box-shadow .16s;
}
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-tile .cover {
  position: relative; width: 100%; padding-top: 133.33%;
  background: repeating-linear-gradient(135deg, #f4f6f8, #f4f6f8 9px, #eef2f5 9px, #eef2f5 18px);
}
.cat-tile .cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.cat-tile .cover .cnt {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0,0,0,.5); color: #fff; font-size: 10.5px;
  padding: 2px 7px; border-radius: 999px;
}
.cat-tile .meta { padding: 10px 12px 12px; }
.cat-tile .meta b {
  display: block; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat-tile .meta span {
  display: block; margin-top: 3px; font-size: 11px; color: var(--ink3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 设置页信息行 */
.info-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--ink2); flex: 0 0 92px; }
.info-row .v { min-width: 0; word-break: break-all; }
.info-row .v code {
  background: #f4f6f8; padding: 2px 6px; border-radius: 5px; font-size: 12px;
}

/* 移动端抽屉 */
.as-mask {
  display: none; position: fixed; inset: 0; z-index: 18;
  background: rgba(10,20,28,.38);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.as-mask.on { display: block; }

@media (max-width: 860px) {
  .admin-side {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 250px; flex-basis: 250px;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 0 40px rgba(0,0,0,.18);
    z-index: 60;
  }
  .admin-side.open { transform: none; }
  .am-burger { display: flex; }
  .am-head { padding: 12px 16px; }
  .am-body { padding: 16px 16px 80px; }
  .am-head h1 { font-size: 16.5px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #4aa8d8;
    --accent-2: #5fd0e6;
    --accent-soft: rgba(51,195,222,.14);
  }
  .admin-app { background: #121215; }
  .admin-side { background: #17171a; }
  .am-head { background: rgba(18,18,21,.9); }
  .as-item:hover { background: #1f1f24; }
  .cat-tile { background: #17171a; }
  .cat-tile .cover { background: repeating-linear-gradient(135deg,#1e1e24,#1e1e24 9px,#191920 9px,#191920 18px); }
  .info-row .v code { background: #22222a; }
  .am-burger { background: #1e1e22; }
  .admin-main .panel { background: #17171a; }
}

/* ══ 四大业务模块 ═══════════════════════════════ */
/* 搜索行 */
.search-line { margin-bottom: 12px; }
.search-line input {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 12px; font-size: 13px; background: #fafbfc; outline: none;
}
.search-line input:focus { border-color: var(--accent); background: #fff; }

/* 客户头像 */
.admin-row .thumb.ava {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff; font-weight: 700; font-size: 15px;
}
.admin-row .txt b .sub {
  font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--ink3); margin-left: 8px;
}
.btn.danger-t { color: #c0392b; }
.admin-row .acts .btn { height: 30px; padding: 0 10px; font-size: 12px; }

/* 产品库 */
.grid2.g3 { grid-template-columns: 1.2fr .8fr 1fr; }
.img-preview {
  width: 64px; height: 64px; border-radius: 10px; background: #f4f6f8;
  overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.prod-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
}
.prod-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .16s, box-shadow .16s;
}
.prod-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.prod-tile .cover { position: relative; padding-top: 75%; background: #f4f6f8; }
.prod-tile .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prod-tile .cover .none {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #b9c2ca; font-size: 12px;
}
.prod-tile .cat-chip {
  position: absolute; left: 8px; top: 8px;
  background: rgba(30,124,178,.9); color: #fff; font-size: 10px;
  padding: 2px 7px; border-radius: 999px;
}
.prod-tile .meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.prod-tile .meta b { font-size: 13px; font-weight: 600; line-height: 1.35; }
.prod-tile .meta .model { font-size: 11px; color: var(--ink3); }
.prod-tile .prow { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.prod-tile .prow em { font-style: normal; font-weight: 700; color: var(--accent); font-size: 13px; }
.prod-tile .prow .ops { display: flex; gap: 5px; }
.prod-tile .prow .btn { height: 26px; padding: 0 8px; font-size: 11px; }

/* 报价单列表 */
.quote-list { display: flex; flex-direction: column; }
.quote-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 13px 4px; border-bottom: 1px solid var(--line); background: none;
}
.quote-row:last-child { border-bottom: 0; }
.quote-row:hover { background: #f8fafc; }
.q-main { flex: 1; min-width: 0; }
.q-main b { display: block; font-size: 13.5px; font-weight: 650; }
.q-main b .qtitle { font-style: normal; font-weight: 500; color: var(--ink2); margin-left: 6px; }
.q-main span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--ink3); }
.q-side { text-align: right; flex: 0 0 auto; }
.q-side em { display: block; font-style: normal; font-weight: 700; font-size: 14px; color: var(--ink); }
.q-side .st-chip { margin-top: 4px; }

/* 状态徽章 */
.st-chip {
  display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; letter-spacing: .3px;
}
.st-chip.gray { background: #eef1f4; color: #6b7682; }
.st-chip.blue { background: var(--accent-soft); color: var(--accent); }
.st-chip.green { background: #e8f6ec; color: #1e8e4e; }

/* 报价单编辑器 */
.qi-head, .qi-row {
  display: grid; grid-template-columns: 2fr 1.1fr .9fr .6fr .6fr 26px;
  gap: 6px; align-items: center;
}
.qi-head { font-size: 10.5px; color: var(--ink3); padding: 0 2px 6px; }
.qi-row { margin-bottom: 6px; }
.qi-row input {
  height: 34px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 8px; font-size: 12.5px; min-width: 0; background: #fafbfc; outline: none;
}
.qi-row input:focus { border-color: var(--accent); background: #fff; }
.qi-row .qi-title { font-weight: 600; }
.qi-del {
  width: 26px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: #98a2ac; font-size: 15px;
}
.qi-del:hover { color: #c0392b; border-color: #e5b4ad; }
.qi-total {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
  text-align: right; font-size: 13px; color: var(--ink2);
}
.qi-total b { font-size: 19px; font-weight: 750; color: var(--accent); margin-left: 6px; }

/* 选择器浮层 */
.ov {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,20,28,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ov-box {
  width: 100%; max-width: 440px; max-height: 76vh; background: #fff;
  border-radius: 16px; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.ov-head { display: flex; align-items: center; padding: 14px 16px 8px; }
.ov-head b { font-size: 14.5px; }
.ov-x { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; font-size: 17px; color: var(--ink3); }
.ov-head .search-line { margin: 0; }
.ov .search-line { padding: 6px 16px 10px; margin: 0; }
.ov-list { overflow-y: auto; padding: 0 8px 12px; }
.pk-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 8px; border-radius: 10px; background: none;
}
.pk-item:hover { background: #f4f7f9; }
.pk-img {
  width: 42px; height: 42px; border-radius: 9px; background: #f0f3f5;
  overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
}
.pk-img img { width: 100%; height: 100%; object-fit: cover; }
.pk-t { flex: 1; min-width: 0; }
.pk-t b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-t i { display: block; font-style: normal; font-size: 11px; color: var(--ink3); margin-top: 1px; }
.pk-item em { font-style: normal; font-weight: 700; color: var(--accent); font-size: 12.5px; flex: 0 0 auto; }

/* 统计 */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-cards.sub { grid-template-columns: repeat(4, 1fr); margin-bottom: 4px; }
.stat-cards.sub .stat-card:nth-child(n+3) { display: none; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px;
}
.stat-card em { display: block; font-style: normal; font-size: 24px; font-weight: 750; letter-spacing: -.5px; color: var(--ink); }
.stat-card span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink3); }
.chart {
  display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 6px;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; justify-content: flex-end; }
.bar-col .bar { width: 100%; max-width: 26px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.bar-col .bar-n { font-style: normal; font-size: 10px; color: var(--ink3); height: 14px; }
.bar-col .bar-l { font-style: normal; font-size: 9.5px; color: var(--ink3); height: 14px; white-space: nowrap; }
.top-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.top-row:last-child { border-bottom: 0; }
.top-row .k { flex: 0 0 92px; font-size: 12.5px; color: var(--ink2); }
.top-row .track { flex: 1; height: 8px; border-radius: 99px; background: #eef2f5; overflow: hidden; }
.top-row .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.top-row .n { flex: 0 0 40px; text-align: right; font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.recent-row { padding: 9px 0; }
.src-chip {
  display: inline-block; font-style: normal; font-size: 9.5px; font-weight: 600;
  padding: 1px 6px; border-radius: 4px; margin-left: 7px; vertical-align: 1px;
}
.src-chip.h5 { background: var(--accent-soft); color: var(--accent); }
.src-chip.mp { background: #e8f6ec; color: #1e8e4e; }
.src-chip.wx { background: #eef1f4; color: #6b7682; }

/* 客户查看的报价单页 */
.qview { min-height: 100dvh; background: #eef2f5; padding: 18px 14px calc(40px + env(safe-area-inset-bottom)); }
.qv-card {
  max-width: 720px; margin: 0 auto; background: #fff; border-radius: 18px;
  box-shadow: var(--shadow); padding: 26px 24px 22px; overflow: hidden; position: relative;
}
.qv-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.qv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.qv-brand { display: flex; align-items: center; gap: 10px; }
.qv-brand img { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; }
.qv-logo {
  width: 44px; height: 44px; border-radius: 11px; background: linear-gradient(135deg, #1e7cb2, #33c3de);
  color: #fff; font-weight: 700; font-size: 19px; display: flex; align-items: center; justify-content: center;
}
.qv-brand b { display: block; font-size: 15.5px; font-weight: 700; }
.qv-brand span { display: block; font-size: 10px; color: var(--ink3); letter-spacing: 1.2px; text-transform: uppercase; margin-top: 2px; }
.qv-doc { text-align: right; }
.qv-doc h1 { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.3px; }
.qv-doc span { font-size: 11.5px; color: var(--ink3); }
.qv-cust { margin-top: 20px; padding: 12px 14px; background: #f6f9fb; border-radius: 10px; }
.qv-cust b { font-size: 13.5px; }
.qv-cust span { display: block; margin-top: 3px; font-size: 12px; color: var(--ink2); }
.qv-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13px; }
.qv-table th {
  text-align: left; font-size: 11px; color: var(--ink3); font-weight: 600;
  padding: 6px 6px; border-bottom: 1.5px solid var(--line); white-space: nowrap;
}
.qv-table th.c-num, .qv-table td.c-num { text-align: right; }
.qv-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.qv-table td.c-title { font-weight: 600; }
.qv-table td.c-title i { display: block; font-style: normal; font-size: 11px; color: var(--ink3); font-weight: 400; margin-top: 2px; }
.qv-table td small { color: var(--ink3); margin-left: 2px; font-size: 11px; }
.qv-table td.c-amt { font-variant-numeric: tabular-nums; }
.qv-table tfoot td { border-bottom: 0; padding-top: 12px; font-size: 13px; color: var(--ink2); }
.qv-table .c-total { font-size: 19px; font-weight: 750; color: var(--accent); }
.qv-table .c-idx { color: var(--ink3); font-size: 11.5px; width: 22px; }
.qv-note { margin-top: 14px; padding: 12px 14px; background: #fbf7ef; border-radius: 10px; font-size: 12.5px; color: #7a6a4f; }
.qv-note b { display: block; font-size: 12px; margin-bottom: 4px; }
.qv-foot { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line); }
.qv-contact { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--ink2); }
.qv-contact a, .qv-contact span { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.qv-contact svg { width: 15px; height: 15px; color: var(--accent); }
.qv-tip { margin-top: 12px; text-align: center; font-size: 10.5px; color: var(--ink3); letter-spacing: .4px; }
.qv-print {
  display: block; margin: 18px auto 0; padding: 10px 26px;
  background: #17171b; color: #fff; border-radius: 12px; font-size: 13px; font-weight: 600;
}
@media print {
  body { background: #fff; }
  .qview { padding: 0; background: #fff; }
  .qv-card { box-shadow: none; border-radius: 0; max-width: none; }
  .no-print { display: none !important; }
}

@media (max-width: 640px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .stat-cards.sub .stat-card:nth-child(n+3) { display: flex; }
  .stat-cards.sub { grid-template-columns: repeat(2, 1fr); }
  .grid2.g3 { grid-template-columns: 1fr 1fr; }
  .qi-head { display: none; }
  .qi-row { grid-template-columns: 1fr 70px 64px; grid-auto-rows: auto; }
  .qi-row .qi-title { grid-column: 1 / 3; }
  .qi-row .qi-model { grid-column: 3; }
  .qi-row .qi-price { grid-column: 1; }
  .qi-row .qi-qty { grid-column: 2; }
  .qi-row .qi-unit { grid-column: 3; }
  .quote-row { flex-wrap: wrap; }
  .q-side { width: 100%; display: flex; align-items: center; justify-content: space-between; }
  .q-side em { font-size: 15px; }
  .qv-head { flex-direction: column; }
  .qv-doc { text-align: left; }
}

/* 下拉框与输入框统一 */
.field select {
  width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 10px; font-size: 14px; background: #fff; outline: none;
}
.field select:focus { border-color: var(--accent); }

/* 产品卡价格行防挤压 */
.prod-tile .prow { gap: 6px; }
.prod-tile .prow em { white-space: nowrap; flex-shrink: 0; }
.prod-tile .prow .ops { flex-shrink: 0; }
.prod-tile .prow .ops .btn { padding: 0 6px; }
