/* ==========================================================================
   微火互娱 · 资产管理系统 PC 端 — 布局 + 组件 v2
   ========================================================================== */

/* ═══════════════ 应用骨架 ═══════════════ */
.app { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 16px; position: relative;
}
.sidebar-brand::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.sidebar-brand .logo-wrap {
  width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
}
.sidebar-brand .logo-wrap img { width: 40px; height: 40px; object-fit: contain; }
.sidebar-brand .t { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sidebar-brand .t b { font-size: 15px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.sidebar-brand .t span {
  font-family: var(--font-en); font-size: 9px; color: var(--tx-low);
  letter-spacing: .16em; text-transform: uppercase; margin-top: 3px; white-space: nowrap;
}

.sidebar-nav { flex: 1; padding: 14px 12px; }
.nav-group { margin-bottom: 8px; }
.nav-group-title {
  font-size: 11px; color: var(--tx-low); letter-spacing: .08em;
  padding: 10px 12px 6px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--tx-mid); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .16s; margin-bottom: 2px;
  position: relative;
}
.nav-item .ico { width: 19px; height: 19px; flex-shrink: 0; display: grid; place-items: center; color: currentColor; opacity: .9; }
.nav-item .ico svg { width: 19px; height: 19px; }
.nav-item:hover { background: var(--bg-subtle); color: var(--tx-hi); }
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 600;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad-primary);
}
.nav-item.active .ico { color: var(--primary); opacity: 1; }
.nav-item.sub { padding-left: 30px; font-size: 13px; font-weight: 400; }
.nav-item .count-badge {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: var(--primary); color: #fff; border-radius: 99px;
  padding: 0 7px; line-height: 18px; min-width: 18px; text-align: center;
}

.sidebar-foot {
  padding: 14px 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-foot .avatar {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--grad-flame); color: #fff;
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
  box-shadow: 0 3px 8px rgba(150,30,34,.24);
}
.sidebar-foot .info { line-height: 1.3; min-width: 0; flex: 1; }
.sidebar-foot .info b { font-size: 13px; font-weight: 600; display: block; }
.sidebar-foot .info span { font-size: 11px; color: var(--tx-low); }

/* ── 主区 ── */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ── 顶栏 ── */
.topbar {
  height: var(--topbar-h); flex-shrink: 0;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.topbar .page-title { font-size: 16px; font-weight: 700; }
.topbar .crumb { font-size: 12px; color: var(--tx-low); }
.topbar .spacer { flex: 1; }
.topbar .search {
  width: 300px; height: 36px; border: 1px solid var(--line);
  border-radius: var(--r-input); padding: 0 12px;
  display: flex; align-items: center; gap: 8px; color: var(--tx-low); font-size: 13px;
  background: var(--bg-subtle); transition: all .16s;
}
.topbar .search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(200,22,29,.10); background: #fff; }
.topbar .search input { border: none; outline: none; background: transparent; flex: 1; font-size: 13px; color: var(--tx-hi); }
.topbar .icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: none;
  background: transparent; color: var(--tx-mid);
  display: grid; place-items: center; transition: all .15s; position: relative;
}
.topbar .icon-btn svg { width: 19px; height: 19px; }
.topbar .icon-btn:hover { background: var(--bg-subtle); color: var(--tx-hi); }
.topbar .icon-btn .dot {
  position: absolute; top: 8px; right: 8px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--primary); border: 2px solid #fff;
}
.topbar .user { display: flex; align-items: center; gap: 9px; }
.topbar .user .avatar {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--grad-flame); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.topbar .user b { font-size: 13px; font-weight: 600; }

/* ── 内容区 ── */
.content { flex: 1; padding: 26px 28px 40px; max-width: var(--content-max); width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 14px; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: .01em; }
.page-head .desc { font-size: 13px; color: var(--tx-mid); margin-top: 5px; }

/* ═══════════════ 按钮 ═══════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 18px; border-radius: var(--r-btn);
  font-size: 14px; font-weight: 600; border: 1px solid transparent;
  transition: all .16s; white-space: nowrap; letter-spacing: .01em;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad-primary); color: #fff; box-shadow: 0 3px 8px rgba(150,30,34,.26); }
.btn-primary:hover { box-shadow: 0 5px 14px rgba(150,30,34,.34); transform: translateY(-1px); }
.btn-secondary { background: #fff; border-color: var(--line-2); color: var(--tx-hi); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--bad); color: #fff; box-shadow: 0 3px 8px rgba(214,69,69,.26); }
.btn-danger:hover { background: #C23A3A; }
.btn-text { background: transparent; border: none; color: var(--primary); height: auto; padding: 2px 6px; font-weight: 500; }
.btn-text:hover { color: var(--primary-deep); text-decoration: underline; }
.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--tx-mid); }
.btn-sm { height: 30px; padding: 0 13px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 26px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ═══════════════ 表单 ═══════════════ */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 22px; }
.form-item { display: flex; flex-direction: column; gap: 7px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 13px; color: var(--tx-mid); font-weight: 600; }
.form-item label .req { color: var(--primary); margin-left: 2px; }
.form-item .hint { font-size: 12px; color: var(--tx-low); }
.input, .select, .textarea {
  height: 40px; padding: 0 13px; border: 1px solid var(--line-2);
  border-radius: var(--r-input); font-size: 14px; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s; color: var(--tx-hi); width: 100%;
}
.textarea { height: auto; padding: 11px 13px; resize: vertical; min-height: 88px; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200,22,29,.11);
}
.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 24 24' fill='none' stroke='%23A79A8F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: var(--r-chip); font-size: 13px;
  background: #fff; border: 1px solid var(--line-2); color: var(--tx-mid);
  cursor: pointer; transition: all .15s; user-select: none; font-weight: 500;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 6px rgba(150,30,34,.22); }

.switch { position: relative; width: 42px; height: 23px; display: inline-block; }
.switch input { display: none; }
.switch .slider { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: .2s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; width: 19px; height: 19px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(19px); }

.upload-box { border: 1.5px dashed var(--line-2); border-radius: var(--r-card); padding: 30px; text-align: center; color: var(--tx-low); font-size: 13px; transition: all .15s; cursor: pointer; }
.upload-box:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.upload-box .plus { font-size: 28px; display: block; margin-bottom: 6px; }

/* ═══════════════ 卡片 ═══════════════ */
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head .t { font-size: 15px; font-weight: 700; }
.card-head .sub { font-size: 12px; color: var(--tx-low); }
.card-body { padding: 20px; }

/* 统计大卡（候选3 亮卡，做焦点） */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.stat-card {
  position: relative; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-stat); box-shadow: var(--shadow-card);
  padding: 22px 22px; transition: transform .18s, box-shadow .18s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(120,45,36,.10); }
.stat-card::after {
  content: ""; position: absolute; top: -34px; right: -34px; width: 120px; height: 120px;
  border-radius: 50%; background: radial-gradient(circle, var(--accent-soft, var(--primary-soft)), transparent 74%);
  opacity: .8; pointer-events: none;
}
.stat-card .s-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.stat-card .s-label { font-size: 13px; color: var(--tx-mid); font-weight: 600; }
.stat-card .s-ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
}
.stat-card .s-ico svg { width: 20px; height: 20px; }
.stat-card .s-num {
  font-family: var(--font-num); font-size: 44px; font-weight: 700; line-height: 1;
  margin: 14px 0 8px; color: var(--tx-hi); letter-spacing: -.01em; position: relative; z-index: 1;
  font-variant-numeric: tabular-nums;
}
.stat-card .s-num .unit { font-size: 15px; font-weight: 600; color: var(--tx-low); margin-left: 4px; }
.stat-card .s-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tx-low); position: relative; z-index: 1; }
.stat-card .s-foot .up { color: var(--ok); font-weight: 600; }
.stat-card .s-foot .down { color: var(--bad); font-weight: 600; }

/* 渐变 banner（候选5 → 白为主 + 柔和红金光晕 + 火焰点缀） */
.hero-banner {
  position: relative; overflow: hidden;
  border-radius: var(--r-banner); padding: 30px 34px 32px;
  background:
    linear-gradient(125deg, #FDF6F4 0%, #FBEDEA 44%, #FFFFFF 100%);
  border: 1px solid rgba(200, 22, 29, .10);
  box-shadow: var(--shadow-card); margin-bottom: 24px;
}
.hero-banner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(460px 240px at 90% 4%, rgba(200,22,29,.10), transparent 70%),
    radial-gradient(380px 210px at 68% 104%, rgba(201,162,75,.14), transparent 70%);
}
.hero-banner::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; pointer-events: none;
  background: linear-gradient(180deg, #C8161D 0%, rgba(200,22,29,.45) 100%);
}
.hero-banner .flame {
  position: absolute; right: 7%; bottom: -12px; width: 150px; height: 190px; opacity: .5;
}
.hero-banner h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; position: relative; z-index: 1; letter-spacing: .01em; color: var(--tx-hi); }
.hero-banner p { font-size: 13.5px; color: var(--tx-mid); position: relative; z-index: 1; max-width: 60%; }
.hero-banner p b { color: var(--primary); font-weight: 700; }
.hero-banner .en {
  position: absolute; top: 20px; right: 24px; font-family: var(--font-en);
  font-size: 11px; letter-spacing: .22em; color: var(--gold); text-transform: uppercase; z-index: 1; font-weight: 600;
}
.hero-banner .banner-cta {
  position: relative; z-index: 1; margin-top: 18px; display: inline-flex; align-items: center; gap: 7px;
  background: var(--grad-primary); color: #fff;
  padding: 9px 18px; border-radius: 9px; font-size: 13px; font-weight: 600;
  box-shadow: 0 3px 8px rgba(150,30,34,.24); transition: all .16s; cursor: pointer; border: none;
}
.hero-banner .banner-cta:hover { box-shadow: 0 5px 14px rgba(150,30,34,.32); transform: translateY(-1px); }

/* ═══════════════ 表格 ═══════════════ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  background: var(--bg-subtle); color: var(--tx-mid); font-weight: 600;
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line);
  white-space: nowrap; font-size: 12.5px; letter-spacing: .02em;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--tx-hi); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--primary-soft); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { font-family: var(--font-num); font-size: 12.5px; color: var(--tx-mid); letter-spacing: .01em; }
.table .name { font-weight: 600; }
.table .actions { text-align: right; white-space: nowrap; }

/* ═══════════════ 徽章 / 标签 ═══════════════ */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-badge); font-size: 12px; line-height: 1.4; white-space: nowrap; font-weight: 500; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok     { background: var(--ok-soft); color: var(--ok); }
.badge.idle   { background: var(--idle-soft); color: var(--idle); }
.badge.bad    { background: var(--bad-soft); color: var(--bad); }
.badge.warn   { background: var(--warn-soft); color: var(--warn); }
.badge.scrap  { background: var(--scrap-soft); color: var(--scrap); }
.badge.info   { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.gold   { background: var(--gold-soft); color: var(--gold-deep); }

.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 11.5px; margin-right: 5px; font-weight: 500; }

/* ═══════════════ 抽屉 / 弹窗 ═══════════════ */
.overlay { position: fixed; inset: 0; background: rgba(40,24,18,.45); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .22s; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: -520px; z-index: 51; width: 480px; height: 100vh; background: #fff; box-shadow: var(--shadow-drawer); display: flex; flex-direction: column; transition: right .28s cubic-bezier(.22,.9,.24,1); }
.drawer.open { right: 0; }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.drawer-head .t { font-size: 16px; font-weight: 700; }
.drawer-close { border: none; background: none; font-size: 20px; color: var(--tx-low); cursor: pointer; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; transition: all .15s; }
.drawer-close:hover { background: var(--bg-subtle); color: var(--tx-hi); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }
.drawer-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }

.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.96); background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-modal); width: 470px; max-width: 92vw; z-index: 52; opacity: 0; pointer-events: none; transition: all .22s; }
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-head { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head .t { font-size: 16px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ═══════════════ 时间线 ═══════════════ */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .dot { position: absolute; left: -24px; top: 4px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; background: var(--tx-low); box-shadow: 0 0 0 2px var(--line-2); }
.tl-item .dot.t-领用, .tl-item .dot.t-归还 { background: var(--primary); }
.tl-item .dot.t-调拨 { background: var(--info); }
.tl-item .dot.t-送修, .tl-item .dot.t-返修 { background: var(--warn); }
.tl-item .dot.t-报废 { background: var(--bad); }
.tl-item .tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-item .tl-title { font-weight: 700; font-size: 13.5px; }
.tl-item .tl-time { font-size: 12px; color: var(--tx-low); }
.tl-item .tl-body { font-size: 13px; color: var(--tx-mid); margin-top: 4px; line-height: 1.6; }

/* ═══════════════ 其他 ═══════════════ */
.empty { text-align: center; color: var(--tx-low); font-size: 13px; padding: 64px 0; }
.empty .e-ico { font-size: 42px; margin-bottom: 12px; opacity: .5; }
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 150px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 16px; font-size: 13px; color: var(--tx-mid); }
.pagination .pg-btn { width: 31px; height: 31px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--tx-mid); display: grid; place-items: center; transition: all .13s; }
.pagination .pg-btn:hover { border-color: var(--primary); color: var(--primary); }
.pagination .pg-btn.on { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 6px rgba(150,30,34,.24); }
.pagination .pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.section-title { font-size: 16px; font-weight: 700; margin: 26px 0 14px; display: flex; align-items: center; gap: 9px; }
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--grad-primary); }
.section-title .en { font-family: var(--font-en); font-size: 10px; color: var(--tx-low); letter-spacing: .16em; text-transform: uppercase; font-weight: 400; }

.count-num { font-variant-numeric: tabular-nums; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.content > * { animation: fadeIn .3s ease; }

/* 全局柔和光晕背景（大魔王 DNA：轻盈通透） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(720px 380px at 6% -8%, rgba(200,22,29,.05), transparent 60%),
    radial-gradient(640px 360px at 100% 0%, rgba(201,162,75,.07), transparent 60%),
    radial-gradient(560px 340px at 50% 112%, rgba(200,22,29,.04), transparent 60%);
}
.app { position: relative; z-index: 1; }

/* 移动端搜索框：PC 默认隐藏，移动端 media 内显示 */
.m-search { display: none; }

/* ═══════════════ 双端导航（PC 侧边栏 vs 移动端底部导航） ═══════════════ */
/* PC 宽屏（≥900px）：隐藏 nav.js 注入的底部导航，显示侧边栏 */
@media (min-width: 900px) {
  .bottombar { display: none !important; }
  body { padding-bottom: 0 !important; }
}
/* ═══════════════ 移动端（<900px）：底部导航 + 卡片化 + 抽屉化 ═══════════════ */
@media (max-width: 899px) {
  /* ── 骨架 ── */
  .sidebar { display: none; }
  .main { width: 100%; }
  .topbar { height: 52px; padding: 0 14px; gap: 10px; }
  .topbar .page-title { font-size: 15px; }
  .topbar .search { display: none; }
  .topbar .user { gap: 6px; }
  .topbar .user b { display: none; }
  .topbar .user .avatar { width: 30px; height: 30px; }
  .content { max-width: 100%; padding: 14px 14px 24px; }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 20px; }
  .page-head .desc { font-size: 12px; }

  /* ── 触控尺寸（≥44px / 字号≥16px 防 iOS 缩放） ── */
  .btn { height: 44px; padding: 0 18px; font-size: 15px; }
  .btn-sm { height: 38px; padding: 0 14px; font-size: 14px; }
  .btn-lg { height: 48px; }
  .input, .select { height: 44px; font-size: 16px; }
  .textarea { font-size: 16px; }
  .switch { width: 46px; height: 26px; }
  .switch .slider::before { width: 22px; height: 22px; }
  .switch input:checked + .slider::before { transform: translateX(20px); }

  /* ── 表单单列 ── */
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-item.full { grid-column: auto; }

  /* ── 统计卡 2×2 ── */
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .stat-card { padding: 15px 15px; border-radius: 14px; }
  .stat-card .s-num { font-size: 32px; margin: 10px 0 6px; }
  .stat-card .s-ico { width: 34px; height: 34px; border-radius: 10px; }
  .stat-card .s-ico svg { width: 17px; height: 17px; }
  .stat-card .s-label { font-size: 12px; }

  /* ── 筛选 chips：横向滚动 ── */
  .filter-bar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 8px; padding-bottom: 2px; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-bar .select, .filter-bar .input { min-width: auto; flex-shrink: 0; height: 38px; font-size: 14px; }

  /* ── 表格 → 卡片（纯 CSS + data-label） ── */
  .table-wrap { overflow: visible; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { display: none; }
  .table { border-collapse: separate; border-spacing: 0; }
  .table tbody tr {
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: 14px; margin-bottom: 12px; padding: 12px 16px;
    box-shadow: var(--shadow-card);
  }
  .table tbody tr:hover { background: var(--bg-card); }
  .table td {
    border: none; padding: 6px 0; border-bottom: none;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    text-align: right;
  }
  .table td[data-label]::before {
    content: attr(data-label); color: var(--tx-low); font-size: 12px;
    flex-shrink: 0; white-space: nowrap; text-align: left;
  }
  .table td .name { font-size: 16px; font-weight: 700; }
  .table td .num { font-size: 13px; }
  .table .actions { text-align: left; }

  /* ── 居中 modal → 底部抽屉 ── */
  .modal {
    top: auto; bottom: 0; left: 0; right: 0; transform: translateY(100%);
    width: 100%; max-width: 100%; max-height: 88vh;
    border-radius: 18px 18px 0 0; box-shadow: 0 -8px 36px rgba(40,24,18,.20);
    display: flex; flex-direction: column; padding-top: 10px;
  }
  .modal.open { transform: translateY(0); }
  .modal::before {
    content: ""; position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px; border-radius: 2px; background: var(--line-2);
  }
  .modal-head { padding: 14px 18px 14px; }
  .modal-head .t { font-size: 16px; }
  .modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
  .modal-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .modal-foot .btn { flex: 1; }

  /* ── 右侧抽屉 → 底部抽屉 ── */
  .drawer {
    top: auto; bottom: 0; right: 0; left: 0; width: 100%; height: auto;
    max-height: 88vh; transform: translateY(100%);
    border-radius: 18px 18px 0 0; padding-top: 10px;
    transition: transform .28s cubic-bezier(.22,.9,.24,1);
  }
  .drawer.open { transform: translateY(0); }
  .drawer::before {
    content: ""; position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px; border-radius: 2px; background: var(--line-2);
  }
  .drawer-head { padding: 14px 18px; }
  .drawer-body { padding: 16px 18px; }
  .drawer-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .drawer-foot .btn { flex: 1; }

  /* ── 时间线 / 卡片微调 ── */
  .section-title { margin: 20px 0 12px; }
  .card-body { padding: 16px; }
  .card-head { padding: 14px 16px; }
  .hero-banner { padding: 20px 18px; }
  .hero-banner h2 { font-size: 19px; }
  .hero-banner p { max-width: 100%; font-size: 12.5px; }
  .hero-banner .flame { opacity: .28; width: 110px; height: 140px; }

  /* ── 移动端搜索框（吸顶，PC 隐藏） ── */
  .m-search {
    display: flex; align-items: center; gap: 8px; height: 44px;
    position: sticky; top: 52px; z-index: 20;
    background: #fff; border: 1px solid var(--line); border-radius: 11px;
    padding: 0 13px; margin-bottom: 12px; color: var(--tx-low);
    box-shadow: 0 2px 10px rgba(74,45,32,.06);
  }
  .m-search svg { flex-shrink: 0; }
  .m-search input { border: none; outline: none; flex: 1; font-size: 16px; background: transparent; color: var(--tx-hi); min-width: 0; }

  /* ── 快捷位置 chips ── */
  .loc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .loc-chips .chip { padding: 5px 12px; font-size: 12.5px; }

  /* ── 双列网格（移动端：PC 4 列 → 2 列） ── */
  .grid-2col { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-2col > a.card { padding: 14px 14px !important; flex-direction: column; align-items: flex-start; gap: 10px; }
  .grid-2col > a.card .s-ico { width: 36px; height: 36px; }
  .grid-2col > a.card b { font-size: 13px !important; }
  .grid-2col > a.card br + span { font-size: 11px !important; }

  /* ── import 预览表：保持横向滚动，不卡片化 ── */
  .keep-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .keep-table { display: table; width: max-content; min-width: 100%; }
  .keep-table thead { display: table-header-group; }
  .keep-table tbody { display: table-row-group; }
  .keep-table tr { display: table-row; background: transparent; border: none; border-radius: 0; margin: 0; padding: 0; box-shadow: none; }
  .keep-table td, .keep-table th { display: table-cell; border-bottom: 1px solid var(--line); padding: 10px 12px; white-space: nowrap; text-align: left; }
  .keep-table td::before, .keep-table td[data-label]::before { content: none; }

  /* ── 发起领用：双栏 → 单栏，资产网格 → 单列 ── */
  .bn-layout { grid-template-columns: 1fr !important; }
  .bn-layout .card[style*="sticky"] { position: static !important; }
  .bn-grid { grid-template-columns: 1fr !important; }

  /* ── 资产详情：双栏 → 单栏，字段 3 列 → 2 列 ── */
  .detail-layout { grid-template-columns: 1fr !important; }
  .detail-fields { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ═══════════════ 移动端专项组件（全端可用，主要移动端用） ═══════════════ */
/* 易耗品数量步进器 */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; }
.stepper button { width: 46px; height: 46px; border: none; background: var(--bg-subtle); font-size: 22px; line-height: 1; color: var(--tx-hi); display: grid; place-items: center; cursor: pointer; transition: background .15s; }
.stepper button:active { background: var(--primary-soft); color: var(--primary); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper input { width: 58px; height: 46px; border: none; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); text-align: center; font-size: 17px; font-weight: 700; color: var(--tx-hi); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* 盘点核对三态大按钮 */
.ck-btn-group { display: flex; gap: 8px; margin-top: 8px; }
.ck-btn { flex: 1; height: 46px; border-radius: 11px; border: 1.5px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 600; color: var(--tx-mid); display: grid; place-items: center; transition: all .15s; cursor: pointer; }
.ck-btn:active { transform: scale(.97); }
.ck-btn.on-ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.ck-btn.on-bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.ck-btn.on-warn { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
/* topbar 动态日期 */ .tb-date { font-size: 12px; color: var(--tx-low); font-variant-numeric: tabular-nums; white-space: nowrap; }
