/* ============================================================
   素悦库存系统 · 设计系统
   浅色工作界面 + 素悦金点缀 + 深 navy 侧栏
   ============================================================ */

:root {
  /* 品牌色：素悦金 */
  --gold:        #c9a84c;
  --gold-deep:   #a07828;
  --gold-soft:   #e8c96a;
  --gold-tint:   #f6efda;   /* 极浅金，用于高亮底 */

  /* 中性 */
  --ink:         #1f2433;   /* 主文字 */
  --ink-2:       #5b6172;   /* 次文字 */
  --ink-3:       #9098a8;   /* 弱文字/占位 */
  --line:        #e7e8ee;   /* 分隔线 */
  --line-2:      #f0f1f5;
  --bg:          #f6f6f4;   /* 页面底（暖灰） */
  --card:        #ffffff;
  --navy:        #161b2e;   /* 侧栏深底 */
  --navy-2:      #1f2540;
  --navy-line:   #2c3350;

  /* 语义色 */
  --ok:          #2fa36b;
  --ok-bg:       #e6f5ee;
  --warn:        #d98a1f;
  --warn-bg:     #fbf0dc;
  --danger:      #d9534f;
  --danger-bg:   #fbe9e8;
  --info:        #3a7bd5;

  /* 形状 / 阴影 */
  --r-sm: 7px;
  --r:    11px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20,24,40,.05), 0 1px 3px rgba(20,24,40,.04);
  --shadow:    0 4px 14px rgba(20,24,40,.07);
  --shadow-lg: 0 12px 40px rgba(20,24,40,.16);

  --sidebar-w: 232px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
[v-cloak] { display: none; }

/* ---------- 通用排版 ---------- */
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.mono  { font-variant-numeric: tabular-nums; }
.nowrap{ white-space: nowrap; }

/* ============================================================
   登录页
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--navy);
}
.login-brand {
  position: relative;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(1100px 500px at 12% -10%, rgba(201,168,76,.22), transparent 60%),
    radial-gradient(700px 500px at 90% 110%, rgba(201,168,76,.12), transparent 55%),
    linear-gradient(160deg, #171c30, #11152340);
  overflow: hidden;
}
.login-brand .logo-row { display: flex; align-items: center; gap: 13px; }
.login-brand .logo-mark {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold-deep));
  color: #1a1407; font-weight: 800; font-size: 20px;
  box-shadow: 0 6px 18px rgba(201,168,76,.35);
}
.login-brand .brand-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.login-brand .hero { margin: auto 0; }
.login-brand .hero h1 {
  font-size: 34px; line-height: 1.3; margin: 0 0 16px;
  font-weight: 800; letter-spacing: .5px;
}
.login-brand .hero h1 .accent {
  background: linear-gradient(120deg, var(--gold-soft), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-brand .hero p { color: #b9c0d6; font-size: 15px; max-width: 380px; margin: 0; }
.login-brand .hero .points { margin-top: 26px; display: flex; flex-direction: column; gap: 11px; }
.login-brand .hero .points div { display: flex; align-items: center; gap: 10px; color: #cdd3e6; font-size: 14px; }
.login-brand .hero .points .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; }
.login-brand .foot { color: #7e87a3; font-size: 12.5px; }

.login-panel {
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.login-card { width: 100%; max-width: 340px; }
.login-card h2 { font-size: 22px; margin: 0 0 6px; font-weight: 750; }
.login-card .sub { color: var(--ink-2); margin: 0 0 30px; font-size: 13.5px; }

.btn-feishu {
  width: 100%; height: 48px; border: none; border-radius: var(--r);
  background: linear-gradient(135deg, #3a7bd5, #2f6fd0);
  color: #fff; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 8px 20px rgba(47,111,208,.28);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-feishu:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(47,111,208,.34); }
.btn-feishu:active { transform: translateY(0); }
.btn-feishu svg { width: 20px; height: 20px; }

.login-or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12.5px; margin: 22px 0; }
.login-or::before, .login-or::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.pw-toggle { text-align: center; color: var(--ink-2); font-size: 13px; }
.pw-toggle button { background: none; border: none; color: var(--gold-deep); font-weight: 600; padding: 0; }
.pw-form { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }

/* ============================================================
   表单控件
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.check-list { display: flex; flex-wrap: wrap; gap: 8px; }
.check-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
}
.check-item input { width: 15px; height: 15px; accent-color: var(--gold); }
.input, .select, textarea.input {
  height: 42px; padding: 0 13px; width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); font-size: 14px;
  transition: border-color .12s, box-shadow .12s;
  outline: none;
}
textarea.input { height: auto; padding: 10px 13px; resize: vertical; min-height: 72px; }
.input::placeholder { color: var(--ink-3); }
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-tint);
}
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239098a8' d='M6 8L2 4h8z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 32px; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px;
  transition: all .12s ease;
}
.btn:hover { border-color: var(--ink-3); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: transparent; color: #2a2008;
  box-shadow: 0 4px 12px rgba(201,168,76,.3);
}
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 6px 16px rgba(201,168,76,.38); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); border-color: transparent; }
.btn-danger { color: var(--danger); border-color: transparent; background: var(--danger-bg); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ============================================================
   应用骨架
   ============================================================ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--navy); color: #c4cadb;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 18px 14px;
}
.sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.sidebar .brand .logo-mark { width: 34px; height: 34px; border-radius: 9px; font-size: 16px; }
.sidebar .brand .t { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.sidebar .brand .t small { display: block; font-size: 11px; font-weight: 500; color: #8b93ad; letter-spacing: 1px; }

.nav-group { margin-top: 10px; }
.nav-group .g-label { font-size: 11px; color: #6f7795; padding: 0 10px 6px; letter-spacing: 1px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 9px; margin-bottom: 2px;
  color: #c4cadb; font-size: 13.5px; font-weight: 500;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--navy-2); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, rgba(201,168,76,.22), rgba(201,168,76,.1)); color: var(--gold-soft); font-weight: 600; }
.nav-item.active .ic { color: var(--gold); }
.nav-item .ic { width: 18px; height: 18px; flex: none; opacity: .92; }

.sidebar .spacer { flex: 1; }
.side-user {
  border-top: 1px solid var(--navy-line); padding-top: 12px; margin-top: 12px;
  display: flex; align-items: center; gap: 10px;
}
.side-user .av { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(150deg, var(--gold-soft), var(--gold-deep)); color: #1a1407; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.side-user .nm { font-size: 13px; color: #fff; font-weight: 600; line-height: 1.2; }
.side-user .rl { font-size: 11.5px; color: #8b93ad; }
.side-user .logout { margin-left: auto; color: #8b93ad; background: none; border: none; padding: 6px; border-radius: 7px; }
.side-user .logout:hover { color: #fff; background: var(--navy-2); }

/* ---------- 主区 ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 26px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .menu-btn { display: none; background: none; border: none; color: var(--ink-2); padding: 6px; }
.topbar h1 { font-size: 17px; font-weight: 700; margin: 0; }
.topbar .crumb { color: var(--ink-3); font-size: 12.5px; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.content { padding: 24px 26px 60px; flex: 1; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .ph-title { font-size: 20px; font-weight: 750; margin: 0; }
.page-head .ph-sub { color: var(--ink-2); font-size: 13px; margin: 3px 0 0; }
.page-head .ph-actions { margin-left: auto; display: flex; gap: 9px; }

/* ============================================================
   卡片 / 看板
   ============================================================ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px; }

/* 工作台快捷操作 */
.quick-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin-bottom: 22px; }
.quick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); font-size: 13.5px; font-weight: 600; color: var(--ink); position: relative; transition: transform .12s, box-shadow .12s; }
.quick:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.quick .badge-dot { position: absolute; top: 8px; right: 8px; }
.quick .qi { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; }
.quick .qi.g { background: var(--gold-tint); color: var(--gold-deep); }
.quick .qi.b { background: #e8f0fb; color: var(--info); }
.quick .qi.w { background: var(--warn-bg); color: var(--warn); }
.quick .qi.ok { background: var(--ok-bg); color: var(--ok); }
@media (max-width: 860px) { .quick-row { grid-template-columns: repeat(3, 1fr); gap: 10px; } .quick { padding: 13px 6px; font-size: 12.5px; } }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 17px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat .lbl { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.stat .val { font-size: 27px; font-weight: 780; margin-top: 7px; letter-spacing: .3px; }
.stat .val small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 3px; }
.stat .ic-badge { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.stat.g .ic-badge { background: var(--gold-tint); color: var(--gold-deep); }
.stat.b .ic-badge { background: #e8f0fb; color: var(--info); }
.stat.ok .ic-badge { background: var(--ok-bg); color: var(--ok); }
.stat.w .ic-badge { background: var(--warn-bg); color: var(--warn); }
.stat .ic-badge svg { width: 20px; height: 20px; }

/* ============================================================
   表格
   ============================================================ */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12.5px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: #fafafa;
}
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
table.tbl tbody tr:hover { background: #fbfaf6; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 徽标 ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.tag-gold { background: var(--gold-tint); color: var(--gold-deep); }
.tag-ok   { background: var(--ok-bg); color: var(--ok); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-info { background: #e8f0fb; color: var(--info); }
.tag-grey { background: var(--line-2); color: var(--ink-2); }
.tag-in  { background: var(--ok-bg); color: var(--ok); }
.tag-out { background: var(--warn-bg); color: var(--warn); }
.badge-dot { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--danger); color:#fff; font-size:11px; font-weight:700; line-height:1; }
.nav-item .badge-dot { margin-left: auto; }

/* ---------- 工具行 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; }
.seg button { border: none; background: none; padding: 7px 15px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
/* 可横向滚动的分段控件（选项多/长时手机端友好） */
.seg.scroll { display: flex; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.seg.scroll::-webkit-scrollbar { display: none; }
.seg.scroll button { white-space: nowrap; flex: none; }

/* ---------- 空态 ---------- */
.empty { text-align: center; padding: 54px 20px; color: var(--ink-3); }
.empty .em-ic { width: 46px; height: 46px; margin: 0 auto 12px; opacity: .5; }
.empty p { margin: 0; font-size: 14px; }

/* ============================================================
   弹窗
   ============================================================ */
.modal-mask { position: fixed; inset: 0; background: rgba(20,24,40,.42); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; }
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-head .x { margin-left: auto; background: none; border: none; color: var(--ink-3); padding: 4px; border-radius: 7px; }
.modal-head .x:hover { background: var(--line-2); color: var(--ink); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ============================================================
   物品照片：缩略图 / 上传 / 大图
   ============================================================ */
/* 列表缩略图（固定尺寸，裁切填充不变形） */
.thumb {
  width: 40px; height: 40px; border-radius: 8px; object-fit: cover;
  background: var(--line-2); border: 1px solid var(--line); cursor: zoom-in;
  flex: none; display: block;
}
.thumb-ph {
  width: 40px; height: 40px; border-radius: 8px; flex: none;
  background: var(--line-2); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink-3);
}
.thumb-ph svg { width: 18px; height: 18px; }

/* 表单里的照片上传区 */
.photo-up { display: flex; align-items: center; gap: 14px; }
.photo-box {
  width: 88px; height: 88px; border-radius: var(--r); flex: none;
  border: 1px dashed var(--line); background: #fafafa;
  display: grid; place-items: center; color: var(--ink-3);
  cursor: pointer; overflow: hidden; position: relative; transition: border-color .12s;
}
.photo-box:hover { border-color: var(--gold); color: var(--gold-deep); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box .ph-hint { font-size: 11.5px; text-align: center; line-height: 1.3; padding: 0 6px; }
.photo-box .ph-hint svg { width: 22px; height: 22px; display: block; margin: 0 auto 4px; }
.photo-box .uploading { position: absolute; inset: 0; background: rgba(255,255,255,.8); display: grid; place-items: center; }
.photo-meta { font-size: 12.5px; color: var(--ink-2); }
.photo-meta .acts { margin-top: 8px; display: flex; gap: 8px; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.photo-strip .ph-thumb { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.ph-thumb .rm { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; font-size: 12px; line-height: 1; display: grid; place-items: center; cursor: pointer; padding: 0; }
.ph-thumb .cover-tag { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.5); color: #fff; font-size: 10px; text-align: center; border: none; padding: 2px 0; line-height: 1.2; cursor: pointer; }
.ph-thumb div.cover-tag { cursor: default; }
.ph-add { width: 64px; height: 64px; border: 1px dashed var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; background: #fff; font-size: 24px; }
.ph-add:hover { border-color: var(--gold); color: var(--gold-deep); }

/* 盘点录入：紧凑行，手机友好 */
.take-list { display: flex; flex-direction: column; }
.take-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.take-row:last-child { border-bottom: none; }
.take-row .nm { flex: 1; min-width: 0; }
.take-row .nm b { font-size: 15px; display: block; line-height: 1.25; }
.take-row .nm .sys { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.take-row .nm .sys .code { font-variant-numeric: tabular-nums; }
.take-row .diff-badge { min-width: 40px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; flex: none; }

/* 数字步进器 */
.stepper { display: flex; align-items: center; gap: 0; flex: none; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.stepper button { width: 40px; height: 42px; border: none; background: #fafafa; font-size: 22px; line-height: 1; color: var(--ink); display: grid; place-items: center; }
.stepper button:active { background: var(--gold-tint); }
.stepper input { width: 60px; height: 42px; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { background: var(--gold-tint); }
.stepper.done { opacity: .85; }

/* 在/不在 大按钮 */
.seg-big { display: inline-flex; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.seg-big button { height: 42px; padding: 0 16px; border: none; background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg-big button + button { border-left: 1px solid var(--line); }
.seg-big button.on-ok { background: var(--ok-bg); color: var(--ok); }
.seg-big button.on-no { background: var(--danger-bg); color: var(--danger); }
.seg-big button:disabled { opacity: .55; }
.take-actionbar { display: none; }
@media (max-width: 860px) { .hide-mobile { display: none !important; } }
@media (max-width: 860px) {
  .take-actionbar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding: 10px 14px; box-shadow: 0 -4px 14px rgba(20,24,40,.07); }
  .take-actionbar .btn { flex: 1; justify-content: center; height: 44px; }
  .has-actionbar { padding-bottom: 76px; }
}

/* 自动补全（模糊搜索物品） */
.ac { position: relative; flex: 1; min-width: 0; }
.ac-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); max-height: 230px; overflow: auto; z-index: 8; }
.ac-item { padding: 8px 12px; font-size: 13.5px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.ac-item:hover { background: var(--gold-tint); }
.ac-item .u { color: var(--ink-3); font-size: 12px; flex: none; }
.ac-empty { padding: 11px 12px; color: var(--ink-3); font-size: 13px; }

/* 服装图册 */
.gallery-switch { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--card); margin: 0 0 14px; box-shadow: var(--shadow-sm); }
.gallery-switch button { height: 36px; min-width: 92px; border: none; border-right: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 650; cursor: pointer; }
.gallery-switch button:last-child { border-right: none; }
.gallery-switch button.active { background: var(--gold-tint); color: var(--gold-deep); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.gcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .14s, transform .14s; }
.gcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.gcard .ph { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--line-2); cursor: zoom-in; display: block; }
.gcard .ph-empty { width: 100%; aspect-ratio: 3 / 4; display: grid; place-items: center; color: var(--ink-3); background: var(--line-2); }
.gcard .ph-empty svg { width: 30px; height: 30px; }
.gcard .meta { padding: 9px 11px 11px; }
.gcard .meta .nm { font-weight: 650; font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard .meta .code { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-top: 1px; }
.gcard .meta .row2 { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.gcard .meta .holder { font-size: 11.5px; color: var(--ink-2); }
.personal-gallery { display: flex; flex-direction: column; gap: 20px; }
.personal-group { padding-top: 2px; }
.personal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; }
.personal-head h3 { margin: 0; font-size: 17px; letter-spacing: 0; }
.personal-head span { font-size: 12.5px; color: var(--ink-3); flex: none; }
.gallery-personal { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.personal-card .ph-missing { align-content: center; gap: 7px; background: repeating-linear-gradient(135deg, #f6f2eb, #f6f2eb 8px, #faf8f4 8px, #faf8f4 16px); }
.personal-card .ph-missing b { font-size: 12px; color: var(--ink-2); }

/* 大图查看 */
.lightbox { position: fixed; inset: 0; background: rgba(10,12,20,.82); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 90; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: min(92vw, 880px); max-height: 88vh; border-radius: var(--r); box-shadow: var(--shadow-lg); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.26); background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; font-size: 32px; line-height: 1; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.22); }
.lb-prev { left: max(18px, calc((100vw - 980px) / 2)); }
.lb-next { right: max(18px, calc((100vw - 980px) / 2)); }

/* ============================================================
   Toast 提示
   ============================================================ */
.toast-area { position: fixed; top: 18px; right: 18px; z-index: 80; display: flex; flex-direction: column; gap: 9px; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; align-items: center; gap: 9px; animation: toastIn .2s ease; }
.toast.ok { background: #1d7a4e; }
.toast.err { background: #c4423e; }
@keyframes toastIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* ============================================================
   加载
   ============================================================ */
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .7s linear infinite; }
.center-load { display: grid; place-items: center; padding: 60px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   响应式：手机
   ============================================================ */
.backdrop { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60; width: 250px;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(20,24,40,.4); z-index: 55; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 16px 14px 50px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head .ph-actions { margin-left: 0; width: 100%; }

  /* 表格转卡片 */
  table.tbl.responsive thead { display: none; }
  table.tbl.responsive, table.tbl.responsive tbody, table.tbl.responsive tr, table.tbl.responsive td { display: block; width: 100%; }
  table.tbl.responsive tr { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; padding: 6px 4px; box-shadow: var(--shadow-sm); }
  table.tbl.responsive td { border: none; padding: 7px 14px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
  table.tbl.responsive td::before { content: attr(data-label); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
  table.tbl.responsive td.num { text-align: right; }
}
