/* ============================================================
   小满 · 囤货清单 — 印刷票据手帐风
   设计语言：浅蓝灰纸底 + 墨蓝印刷字 + 黄蓝强调（票据/邮票/
   杂志剪贴），复古印刷质感 + 手帐贴纸墙，非 AI 风。
   ============================================================ */

:root {
  --bg: #F3EDE2;
  --bg-deep: #EAE2D1;
  --surface: #FDFBF5;
  --surface-2: #F6F0E4;
  --surface-3: #EEE6D6;
  --border: #D6CAB2;
  --border-soft: #E1D8C3;
  --text: #232A38;
  --text-soft: #545E6E;
  --text-muted: #9A917C;
  --accent: #F2C14E;
  --accent-press: #DCA93A;
  --accent-ink: #3A2B08;
  --accent-soft: #FAECC6;
  --blue: #2E5BB7;
  --blue-ink: #FFFFFF;
  --blue-soft: #E3EBFA;
  --danger: #C0523B;
  --danger-soft: #F6E3DC;
  --warn: #E0A62E;
  --warn-soft: #F9EDCE;
  --ok: #3C7A4F;
  --ok-soft: #E1F0E4;
  --fs: 16px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --shadow: 0 8px 24px rgba(90, 70, 40, .16);
  --shadow-soft: 0 3px 12px rgba(90, 70, 40, .1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--fs);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景：暖白纸底 + 印刷网点 + 横线纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(46, 91, 183, .1), transparent 60%),
    radial-gradient(1000px 500px at 110% 20%, rgba(242, 193, 78, .16), transparent 55%),
    radial-gradient(rgba(35, 42, 56, .045) 0.75px, transparent 1px) 0 0 / 6px 6px,
    repeating-linear-gradient(0deg, rgba(35, 42, 56, .014) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* ---------- 拼贴背景装饰 ---------- */
.bg-collage {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.bg-tape {
  position: absolute;
  top: 118px;
  right: -46px;
  width: 260px;
  height: 26px;
  transform: rotate(-7deg);
  background: linear-gradient(90deg, rgba(242, 193, 78, .42), rgba(242, 193, 78, .16));
  clip-path: polygon(2% 12%, 98% 0, 100% 86%, 0 100%);
}
.bg-stamp {
  position: absolute;
  bottom: 80px;
  left: -42px;
  width: 160px;
  height: 160px;
  border: 3px solid rgba(46, 91, 183, .16);
  border-radius: 50%;
  transform: rotate(-12deg);
}
.bg-stamp::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 2px dashed rgba(46, 91, 183, .12);
  border-radius: 50%;
}
/* 装订孔列（收据本被装订起来） */
.bg-holes {
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 0;
  width: 8px;
  background-image: radial-gradient(circle, rgba(90, 70, 40, .22) 2.5px, transparent 3px);
  background-size: 8px 38px;
  background-repeat: repeat-y;
}
/* 相机线稿 */
.bg-camera {
  position: absolute;
  top: 300px;
  left: -86px;
  color: rgba(46, 91, 183, .1);
  transform: rotate(-10deg);
}
/* 侧视小相机（右上） */
.bg-cam2 {
  position: absolute;
  top: 168px;
  right: -66px;
  color: rgba(46, 91, 183, .09);
  transform: rotate(7deg);
}
/* 镜头特写（右下） */
.bg-lens {
  position: absolute;
  right: 96px;
  bottom: 52px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1.5px solid rgba(46, 91, 183, .08);
  box-shadow:
    inset 0 0 0 22px rgba(46, 91, 183, .032),
    inset 0 0 0 48px rgba(46, 91, 183, .02),
    inset 0 0 0 72px rgba(46, 91, 183, .014);
  opacity: .9;
}
.bg-lens::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: rgba(46, 91, 183, .1);
}
/* 胶卷齿孔条 */
.bg-filmstrip {
  position: absolute;
  right: -74px;
  top: 240px;
  width: 300px;
  height: 76px;
  transform: rotate(7deg);
  background: #232A38;
  border-radius: 4px;
  opacity: .05;
}
.bg-filmstrip::before,
.bg-filmstrip::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 9px;
  background-image: radial-gradient(circle, #fff 3px, transparent 3.6px);
  background-size: 20px 9px;
  background-repeat: repeat-x;
}
.bg-filmstrip::before { top: 8px; }
.bg-filmstrip::after { bottom: 8px; }
/* 胶卷圆盒 */
.bg-filmroll {
  position: absolute;
  left: 190px;
  bottom: 118px;
  color: rgba(35, 42, 56, .09);
  transform: rotate(-12deg);
}
/* 撕口小票根 */
.bg-ticket {
  position: absolute;
  left: -34px;
  top: 620px;
  width: 124px;
  height: 168px;
  transform: rotate(-5deg);
  background: rgba(253, 251, 245, .55);
  border: 1px solid rgba(46, 91, 183, .14);
  border-bottom: none;
}
.bg-ticket::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  background-image: radial-gradient(circle at 6px 4.5px, transparent 4px, rgba(253, 251, 245, .55) 4.7px);
  background-size: 18px 100%;
  background-repeat: repeat-x;
}
.bg-ticket::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 16px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(46, 91, 183, .18);
}
/* 横版电影票（右侧） */
.bg-ticket2 {
  position: absolute;
  right: -30px;
  top: 452px;
  width: 200px;
  height: 92px;
  transform: rotate(4deg);
  background: rgba(253, 251, 245, .5);
  border: 1px solid rgba(46, 91, 183, .12);
  border-radius: 5px;
  padding: 12px 14px;
}
.bg-ticket2::before {
  content: "";
  position: absolute;
  left: 128px;
  top: 0;
  bottom: 0;
  border-left: 1.5px dashed rgba(46, 91, 183, .18);
}
.bg-ticket2::after {
  content: "";
  position: absolute;
  left: 122px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(46, 91, 183, .16);
}
.bg-ticket2 .bt2-t {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(46, 91, 183, .34);
}
.bg-ticket2 .bt2-line {
  display: block;
  width: 64px;
  height: 1px;
  background: rgba(35, 42, 56, .12);
  margin: 8px 0 6px;
}
.bg-ticket2 .bt2-sub {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .18em;
  color: rgba(90, 70, 40, .4);
}
.bg-ticket2 .bt2-no {
  position: absolute;
  right: 16px;
  bottom: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: .1em;
  color: rgba(35, 42, 56, .26);
}
/* 杂志剪贴页 */
.bg-mag {
  position: absolute;
  left: -44px;
  top: 478px;
  width: 152px;
  height: 196px;
  transform: rotate(-6deg);
  background: rgba(253, 251, 245, .62);
  box-shadow: 0 10px 26px rgba(90, 70, 40, .1);
  padding: 13px 12px;
}
.bg-mag::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 36px;
  width: 68px;
  height: 18px;
  transform: rotate(-3deg);
  background: rgba(242, 193, 78, .5);
  clip-path: polygon(2% 14%, 98% 0, 100% 84%, 0 100%);
}
.bg-mag::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(35, 42, 56, .08);
  pointer-events: none;
}
.bg-mag .bm-bar {
  display: block;
  width: 100%;
  height: 22px;
  background: rgba(242, 193, 78, .42);
}
.bg-mag .bm-head {
  display: block;
  margin: 11px 0 9px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  color: rgba(35, 42, 56, .4);
}
.bg-mag .bm-line {
  display: block;
  height: 4px;
  background: rgba(35, 42, 56, .08);
  margin: 7px 0;
}
.bg-mag .bm-line.short { width: 62%; }
/* 杂志大字标题（撕下的标题字） */
.bg-word {
  position: absolute;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 96px;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
  color: rgba(46, 91, 183, .05);
  user-select: none;
}
.bg-word-a { left: 44px; top: 96px; transform: rotate(-4deg); }
.bg-word-b { right: 30px; bottom: 210px; font-size: 72px; color: rgba(242, 193, 78, .08); transform: rotate(3deg); }
/* 手绘箭头 */
.bg-arrow {
  position: absolute;
  right: 226px;
  top: 330px;
  color: rgba(46, 91, 183, .09);
  transform: rotate(5deg);
}
/* 曲别针 */
.bg-paperclip {
  position: absolute;
  right: 218px;
  top: 196px;
  color: rgba(35, 42, 56, .1);
  transform: rotate(16deg);
}
/* 圆形贴纸 */
.bg-sticker {
  position: absolute;
  left: 190px;
  top: 470px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(46, 91, 183, .1);
}
.bg-sticker-2 {
  left: auto;
  right: 320px;
  top: auto;
  bottom: 132px;
  width: 20px;
  height: 20px;
  background: rgba(242, 193, 78, .18);
}
/* 星形贴纸 */
.bg-star {
  position: absolute;
  right: 96px;
  bottom: 170px;
  width: 34px;
  height: 34px;
  background: var(--accent);
  opacity: .22;
  transform: rotate(12deg);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
@media (max-width: 759px) {
  /* 手机上全部拼贴元素都保留，收进视口并放大透明度，避免太素 */
  .bg-holes { display: none; }
  .bg-tape { top: 96px; right: -34px; width: 190px; }
  .bg-stamp { bottom: 24px; left: -46px; width: 124px; height: 124px; }
  .bg-camera { top: 252px; left: -58px; }
  .bg-camera svg { width: 158px; height: 158px; }
  .bg-cam2 { display: block; top: 322px; right: 6px; }
  .bg-cam2 svg { width: 118px; height: 71px; }
  .bg-lens { right: 20px; bottom: 148px; width: 92px; height: 92px; }
  .bg-lens::before { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }
  .bg-filmstrip { right: -42px; top: 212px; width: 216px; height: 56px; }
  .bg-filmroll { display: block; left: 16px; bottom: 92px; }
  .bg-filmroll svg { width: 62px; height: 62px; }
  .bg-ticket { left: -28px; top: 660px; width: 108px; height: 142px; }
  .bg-ticket2 { display: block; right: -16px; top: 560px; width: 168px; height: 80px; transform: rotate(3deg); }
  .bg-ticket2::before { left: 106px; }
  .bg-ticket2::after { left: 100px; }
  .bg-ticket2 .bt2-t { font-size: 10px; }
  .bg-ticket2 .bt2-line { width: 52px; margin: 7px 0 5px; }
  .bg-mag { display: block; left: -38px; top: 480px; width: 130px; height: 164px; }
  .bg-mag .bm-head { margin: 9px 0 7px; font-size: 11px; }
  .bg-mag .bm-line { height: 3px; margin: 6px 0; }
  .bg-arrow { display: block; right: 52px; top: 452px; }
  .bg-arrow svg { width: 108px; height: 36px; }
  .bg-paperclip { display: block; right: 18px; top: 396px; }
  .bg-sticker { display: block; left: 34px; top: 416px; width: 21px; height: 21px; }
  .bg-sticker-2 { display: block; left: auto; right: 108px; top: auto; bottom: 300px; width: 16px; height: 16px; }
  .bg-star { right: 64px; bottom: 208px; width: 23px; height: 23px; }
  /* 大字标题缩小并提高辨识度 */
  .bg-word-a { left: 16px; top: 160px; font-size: 54px; color: rgba(46, 91, 183, .09); }
  .bg-word-b { right: 14px; bottom: 52px; font-size: 38px; color: rgba(242, 193, 78, .14); }
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- 顶栏 ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 237, 226, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
/* 印刷双线 */
.app-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue) 0%, rgba(46, 91, 183, .3) 55%, transparent);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark {
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 12px rgba(242, 193, 78, .18));
  transition: transform .3s ease;
}
.brand-mark svg { display: block; width: 42px; height: 42px; }
.brand-mark:hover { transform: rotate(-4deg) scale(1.04); }
.brand-text { display: flex; flex-direction: column; }
.brand-text h1 {
  font-family: "ZCOOL XiaoWei", "Noto Sans SC", sans-serif;
  font-size: 27px;
  font-weight: 400;
  letter-spacing: .14em;
  line-height: 1.1;
  color: #1B2A44;
}
.brand-sub {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: .16em;
  white-space: nowrap;
  margin-top: 6px;
}
.header-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .16s ease;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--surface-2); transform: translateY(-1px); }

/* ---------- Tab 导航 ---------- */
.tabbar {
  position: sticky;
  top: 73px;
  z-index: 25;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.tabbar-inner {
  display: flex;
  gap: 6px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px 0;
}
.tab {
  flex: 1;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: all .18s ease;
}
.tab .tab-ico { display: inline-flex; flex: 0 0 auto; }
.tab.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 3px 3px 0 rgba(90, 70, 40, .2);
}
.tab:not(.active):hover { background: var(--surface-3); color: var(--blue); }
.tab:not(.active):hover .tab-ico svg { stroke: var(--blue); }

/* ---------- 主区域 ---------- */
.app-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px 40px;
}
.tab-pane { display: none; animation: fadeUp .28s ease; }
.tab-pane.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 提醒栏 */
.alerts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid;
  animation: slideIn .3s ease;
}
.alert-danger { background: var(--danger-soft); border-color: rgba(229, 115, 107, .4); }
.alert-warn { background: var(--warn-soft); border-color: rgba(232, 184, 75, .4); }
.alert-ok { background: var(--ok-soft); border-color: rgba(143, 191, 110, .4); }
.alert .alert-ico {
  flex: 0 0 auto; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 14px; font-weight: 600;
}
.alert-danger .alert-ico { background: var(--danger); color: #2A0E0C; }
.alert-warn .alert-ico { background: var(--warn); color: var(--accent-ink); }
.alert-ok .alert-ico { background: var(--ok); color: #16220F; }
.alert .alert-body b { display: block; font-size: 15px; line-height: 1.4; }
.alert .alert-body span { font-size: 13.5px; color: var(--text-soft); }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* 面板头：装饰条 + 操作按钮（页内不再放重复大标题） */
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.pane-deco {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}
.pane-deco .pd-line {
  width: 72px;
  height: 2px;
  flex: 1;
  background: repeating-linear-gradient(90deg, var(--border) 0 7px, transparent 7px 13px);
}
.pane-deco .pd-star {
  color: var(--accent-press);
  font-size: 16px;
  line-height: 1;
  transform: rotate(12deg);
  flex: 0 0 auto;
}
.add-btn {
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 3px 3px 0 rgba(90, 70, 40, .4), 0 6px 18px rgba(242, 193, 78, .22);
  transition: all .16s ease;
}
.add-btn:hover { background: var(--accent-press); border-color: var(--accent-press); transform: translateY(1px); box-shadow: 1px 1px 0 rgba(90, 70, 40, .32); }

/* ---------- 胶卷统计条（票根） ---------- */
.film-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.film-stat {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-bottom: none;
  border-radius: var(--radius-sm);
  padding: 24px 14px 0;
  text-align: center;
}
/* 票据打孔 */
.film-stat::before,
.film-stat::after {
  content: '';
  position: absolute;
  top: 42%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--bg);
  border: 1px solid var(--border-soft);
}
.film-stat::before { left: -7px; }
.film-stat::after { right: -7px; }
/* 票号 */
.film-stat .tick-no {
  position: absolute;
  top: 7px;
  right: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.film-stat .num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 30px;
  font-weight: 600;
  color: var(--blue);
  line-height: 1.2;
  margin-top: 4px;
}
.film-stat .lbl { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
/* 底部齿孔撕线 + 日期 + 撕口齿边 */
.film-stat .tick-date {
  position: relative;
  display: block;
  margin: 12px -14px 0;
  padding: 7px 14px 12px;
  border-top: 1.5px dashed var(--border);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--text-muted);
}
.film-stat .tick-date::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background-image: radial-gradient(circle at 5px 4px, transparent 4px, var(--bg) 4.7px);
  background-size: 16px 100%;
  background-repeat: repeat-x;
  pointer-events: none;
}

/* ---------- 分区块 ---------- */
.block { margin-bottom: 24px; }
.block-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px 14px;
  background: #2E5BB7;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: 20px;
}
/* 票根撕口 */
.block-head::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 8px;
  background-image: radial-gradient(circle at 5px 4px, transparent 4px, var(--bg) 4.6px);
  background-size: 16px 100%;
  background-repeat: repeat-x;
  pointer-events: none;
}
/* 票根打孔（右侧两个装订孔） */
.block-head::before {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: var(--bg);
  box-shadow: -38px 0 0 -1px var(--bg), inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.block-head h3 {
  font-size: 17px;
  font-weight: 500;
  color: #FFF7E6;
  letter-spacing: .04em;
}
.block-sub { font-size: 13px; color: rgba(255, 247, 230, .85); font-family: "IBM Plex Mono", monospace; }

/* ---------- 卡片列表 ---------- */
.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  counter-reset: cardno;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-bottom: 1.5px dashed rgba(46, 91, 183, .35);
  border-radius: var(--radius-lg);
  padding: 20px 18px 16px;
  position: relative;
  counter-increment: cardno;
  transition: all .18s ease;
  animation: fadeUp .3s ease backwards;
}
.card:nth-child(2n) { transform: rotate(.5deg); }
.card:nth-child(3n) { transform: rotate(-.4deg); }
/* 顶部胶带 */
.card::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 108px;
  height: 24px;
  transform: translateX(-50%) rotate(-3deg);
  background: linear-gradient(90deg, rgba(242, 193, 78, .96) 0%, rgba(242, 193, 78, .78) 100%);
  clip-path: polygon(3% 12%, 97% 0, 100% 88%, 0 100%);
  box-shadow: 0 3px 6px rgba(90, 70, 40, .35);
  pointer-events: none;
}
/* 票据小票号 */
.card::after {
  content: '№ ' counter(cardno, decimal-leading-zero);
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--text-muted);
  pointer-events: none;
}
.card:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.card:nth-child(2n):hover { transform: rotate(.5deg) translateY(-2px); }
.card:nth-child(3n):hover { transform: rotate(-.4deg) translateY(-2px); }
.card.done {
  opacity: .55;
  filter: saturate(.6);
}
.card-top { display: flex; align-items: flex-start; gap: 14px; }
.card-img {
  flex: 0 0 auto;
  width: 58px; height: 58px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .ph { font-size: 24px; font-weight: 500; color: var(--text-muted); }
.card-info { flex: 1; min-width: 0; }
.card-name {
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-soft);
  white-space: nowrap;
  line-height: 1.5;
}
.chip-blue { background: #2E5BB7; color: #EAF1FF; }
.chip-gold { background: var(--accent); color: var(--accent-ink); }
/* 红色印章 */
.chip-red {
  display: inline-block;
  background: transparent;
  border: 1.5px solid var(--danger);
  border-radius: 3px;
  color: var(--danger);
  font-weight: 700;
  letter-spacing: .1em;
  transform: rotate(-3deg);
}
.chip-warn { background: var(--accent); color: var(--accent-ink); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip svg { width: 13px; height: 13px; vertical-align: -2px; }

.card-qty {
  margin: 12px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.card-qty .qty-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 30px;
  font-weight: 600;
  color: var(--blue);
  line-height: 1;
}
.card-qty .qty-unit { font-size: 14px; color: var(--text-soft); }
.card-qty .qty-empty {
  font-size: 14px; color: var(--danger); font-weight: 500;
}
.card-ops .btn-ghost,
.card-ops .btn-ghost-danger {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 13px;
}
.card-ops .btn-ghost:hover { color: var(--text); border-color: var(--border-soft); }
.card-ops .btn-ghost-danger:hover { color: var(--danger); border-color: var(--danger); }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.card-meta .price { color: var(--blue); font-family: "IBM Plex Mono", monospace; }
.card-ops { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 药箱：处方贴风格 ---------- */
.med-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-md);
  padding: 18px 18px 14px;
  position: relative;
  animation: fadeUp .3s ease backwards;
}
.med-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 12px);
  opacity: .7;
}
.med-card:hover { border-color: var(--border); box-shadow: var(--shadow-soft); }
.med-card.used { opacity: .6; }
.med-card .mc-head { display: flex; align-items: flex-start; gap: 12px; }
.med-card .mc-info { flex: 1; min-width: 0; }
.med-card .mc-name { font-size: 17px; font-weight: 500; line-height: 1.4; }
.med-card .mc-meta { font-size: 13px; color: var(--text-muted); margin-top: 5px; line-height: 1.55; }
.med-card .mc-img {
  flex: 0 0 auto;
  width: 54px; height: 54px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.med-card .mc-img img { width: 100%; height: 100%; object-fit: cover; }
.med-card .mc-img .ph { font-size: 22px; font-weight: 500; color: var(--text-muted); }
.med-card .mc-qty {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 4px;
}
.med-card .mc-qty .qty-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 24px;
  font-weight: 600;
  color: var(--blue);
  line-height: 1;
  white-space: nowrap;
}
.med-card .mc-qty .qty-unit { font-size: 14px; color: var(--text-soft); }
.med-card .mc-qty .qty-empty { font-size: 14px; color: var(--danger); font-weight: 500; }
.med-card .mc-qty .mc-label {
  margin-left: auto;
  font-size: 12.5px;
  letter-spacing: .1em;
  color: var(--text-muted);
}
.med-card .mc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.btn {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(90, 70, 40, .16);
  transition: all .16s ease;
}
.btn:hover { border-color: var(--blue); color: var(--blue); transform: translateY(1px); box-shadow: 1px 1px 0 rgba(90, 70, 40, .12); }
.btn-gold { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-gold:hover { background: var(--accent-press); color: var(--accent-ink); }
.btn-blue { background: var(--blue); color: var(--blue-ink); border-color: var(--blue); }
.btn-blue:hover { background: #93B8F0; color: var(--blue-ink); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #D46852; color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { height: 34px; font-size: 13px; padding: 0 8px; }
.btn-icon {
  width: 42px; height: 42px; flex: 0 0 42px; padding: 0;
}

/* 拍完分组 */
.film-done-groups { display: flex; flex-direction: column; gap: 12px; }
.done-group { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-soft); }
.done-group-head {
  padding: 10px 16px;
  background: var(--surface-3);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px dashed rgba(127, 168, 232, .3);
}
.done-group-head .cnt { font-family: "IBM Plex Mono", monospace; color: var(--text-muted); font-size: 13px; }
.done-items { background: var(--surface); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; counter-reset: dno; }
.done-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  counter-increment: dno;
}
.done-item .di-main { flex: 1; min-width: 0; }
.done-item .di-name { font-weight: 500; font-size: 14.5px; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 铅字目录编号 */
.done-item .di-name::before {
  content: counter(dno, decimal-leading-zero);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 4px;
}
.done-item .di-ico { display: inline-flex; color: var(--blue); flex: 0 0 auto; }
.done-item .di-sub { font-size: 12.5px; color: var(--text-muted); }

/* ---------- 手帐 ---------- */
.hand-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin-bottom: 14px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.hand-tabs::-webkit-scrollbar { display: none; }
/* ---------- 手帐全景概览 ---------- */
.hand-overview {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.ov-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 12px 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-bottom: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: all .16s ease;
}
.ov-card::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 11px);
}
.ov-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.ov-card.on { border-color: var(--accent); background: var(--accent-soft); }
.ov-card .ov-ico { color: var(--blue); display: inline-flex; line-height: 1; }
.ov-card.on .ov-ico { color: var(--accent-press); }
.ov-card .ov-num { font-family: "IBM Plex Mono", monospace; font-size: 22px; font-weight: 600; color: var(--blue); line-height: 1.15; }
.ov-card.on .ov-num { color: var(--accent-press); }
.ov-card .ov-lbl { font-size: 11.5px; color: var(--text-muted); letter-spacing: .06em; white-space: nowrap; }
@media (max-width: 759px) {
  .hand-overview { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

.hand-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 2px 2px 0 rgba(90, 70, 40, .35);
  transition: all .16s ease;
}
.hand-tab .ht-ico { display: inline-flex; color: var(--blue); flex: 0 0 auto; }
.hand-tab:hover { border-color: var(--accent); color: var(--accent); }
.hand-tab.on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 3px 3px 0 rgba(90, 70, 40, .42);
}
.hand-tab.on .ht-ico { color: var(--accent-ink); }

.hand-sub {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.hand-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 18px;
  background: var(--accent);
  border-bottom: 1px dashed rgba(43, 32, 6, .35);
}
.hand-sub-head h3 { display: flex; align-items: center; gap: 7px; font-size: 17px; font-weight: 500; color: var(--accent-ink); }
.hand-sub-head h3 svg { color: var(--accent-ink); flex: 0 0 auto; }
.hand-sub-head .cnt { font-size: 13px; color: rgba(43, 32, 6, .7); font-family: "IBM Plex Mono", monospace; }
.hand-sub-body { padding: 16px 20px 20px; counter-reset: itemno; }
.hand-sub-body .hand-item {
  border-left: 3px dashed rgba(127, 168, 232, .45);
  border-radius: 8px 12px 12px 8px;
}
.hand-empty {
  text-align: center;
  padding: 26px 0 10px;
  color: var(--text-muted);
  font-size: 14px;
}
.hand-item {
  padding: 15px 0;
  border-bottom: 1px dashed var(--border-soft);
  counter-increment: itemno;
}
.hand-item:last-child { border-bottom: none; }
.hand-item .hi-top { display: flex; align-items: center; gap: 14px; }
.hand-item .hi-info { flex: 1; min-width: 0; }
.hand-item .hi-name { font-weight: 500; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
/* 铅字目录编号 */
.hand-item .hi-name::before {
  content: counter(itemno, decimal-leading-zero);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--blue);
  letter-spacing: .04em;
  margin-right: 8px;
}
/* 用完印章 */
.hand-item .hi-stamp {
  display: inline-block;
  margin-left: 8px;
  border: 1.5px solid var(--danger);
  border-radius: 3px;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  padding: 1px 7px;
  transform: rotate(-3deg);
  vertical-align: 1px;
}
.hand-item .hi-sub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--text-muted); }
.hand-item .hi-qty {
  font-family: "IBM Plex Mono", monospace;
  font-size: 28px;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
  line-height: 1;
  flex: 0 0 auto;
}
.hand-item .hi-qty em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--text-soft); margin-left: 2px; }
.hand-item .hi-qty.zero { color: var(--danger); }
.hand-item .hi-ops { display: flex; gap: 8px; margin-top: 12px; }
.hand-item .hi-ops .btn { flex: 1; }
.hand-item .hi-ops .btn-ghost,
.hand-item .hi-ops .btn-ghost-danger {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 12.5px;
}
.hand-item .hi-ops .btn-ghost:hover { color: var(--text); border-color: var(--border-soft); }
.hand-item .hi-ops .btn-ghost-danger:hover { color: var(--danger); border-color: var(--danger); }
/* 已用完区 */
.hand-item.used { opacity: .72; }
.hand-item.used .hi-name { color: var(--text-soft); }
.hand-item.used .hi-name::before { color: var(--text-muted); }
.hand-used-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1.5px dashed var(--border);
}
.hand-used-head::before {
  content: "✂";
  color: var(--danger);
  font-size: 13px;
  line-height: 1;
  transform: rotate(-6deg);
}
.hand-used-head span:first-of-type {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--text-muted);
}
.hand-used-head .cnt { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--text-muted); }
/* 打印机/标签机「设备」区 */
.hand-equip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1.5px dashed var(--border-soft);
}
.hand-equip-head::before {
  content: "⚙";
  color: var(--blue);
  font-size: 13px;
  line-height: 1;
  transform: rotate(-10deg);
}
.hand-equip-head span:first-of-type {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--text-soft);
}
.hand-equip-head .cnt { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--text-muted); }
/* 表单：耗材/设备 类型切换 */
.seg { display: flex; gap: 8px; }
.seg-btn {
  flex: 1;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 400;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all .16s ease;
}
.seg-btn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
  box-shadow: 2px 2px 0 rgba(90, 70, 40, .3);
}
.add-mini {
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  margin-top: 12px;
  transition: all .16s ease;
  width: 100%;
}
.add-mini:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 表单 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(90, 70, 40, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-mask[hidden] { display: none; }
.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: popIn .22s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  flex: 0 0 auto;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head h3 { font-size: 18px; font-weight: 500; }
.modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 20px;
}
.modal-foot {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border-soft);
}
.modal-foot .btn { flex: 1; }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { color: var(--danger); border-color: var(--danger); }

.form-section {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.form-section .sec-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.field label .req { color: var(--accent); }
.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field input[type="month"],
.field select,
.field textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}
.field textarea { height: auto; min-height: 70px; padding: 10px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 193, 78, .15);
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23F2C14E' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.preset-sel {
  height: 40px;
  margin-top: 8px;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 14px;
}
.preset-sel:hover { border-color: var(--accent); color: var(--text-soft); }
.field-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  padding: 8px 0;
}
.chk input { width: 20px; height: 20px; accent-color: var(--accent); }

/* 图片上传 */
.img-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}
.img-preview {
  width: 72px; height: 72px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background: var(--surface);
  overflow: hidden;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview.has { border-style: solid; border-color: var(--accent); }

/* 历史记录 */
.hist-list { display: flex; flex-direction: column; gap: 8px; }
.hist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font-size: 13.5px;
}
.hist-item .hi-tag {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-soft);
}
.hist-item .hi-tag.in { background: var(--ok-soft); color: var(--ok); }
.hist-item .hi-tag.out { background: var(--danger-soft); color: var(--danger); }
.hist-item .hi-tag.stock { background: var(--blue-soft); color: var(--blue); }
.hist-item .hi-text { flex: 1; min-width: 0; color: var(--text-soft); }
.hist-item .hi-time { font-size: 12px; color: var(--text-muted); font-family: "IBM Plex Mono", monospace; white-space: nowrap; }

/* ---------- 时间线（胶卷流水单） ---------- */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--border) 0 5px, transparent 5px 10px);
}
.t-item {
  position: relative;
  padding: 9px 0;
}
.t-item .t-dot {
  position: absolute;
  left: -22px;
  top: 15px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--blue);
}
.t-item.in .t-dot { border-color: var(--ok); }
.t-item.out .t-dot { border-color: var(--danger); }
.t-item.stock .t-dot { border-color: var(--accent-press); }
.t-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.t-tag {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-soft);
  white-space: nowrap;
}
.t-tag.in { background: var(--ok-soft); color: var(--ok); }
.t-tag.out { background: var(--danger-soft); color: var(--danger); }
.t-tag.stock { background: var(--blue-soft); color: var(--blue); }
.t-date { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.t-note { margin-top: 3px; font-size: 13px; color: var(--text-soft); }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 200;
  white-space: nowrap;
}
.toast[hidden] { display: none; }

.app-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px 34px;
  text-align: center;
}
.app-footer .footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.app-footer .footer-mark svg { opacity: .85; }
.app-footer .footer-name {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .26em;
  color: var(--text-muted);
}
.app-footer .footer-note {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: .08em;
}
.app-footer::before {
  content: "";
  display: block;
  width: 60px;
  height: 1px;
  margin: 0 auto 20px;
  background: linear-gradient(90deg, transparent, #F2C14E66, transparent);
}

/* ---------- 响应式 ---------- */
@media (min-width: 760px) {
  .card-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .film-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .brand-sub { display: none; }
  .film-stats .num { font-size: 24px; }
  .row-2 { grid-template-columns: 1fr; }
  .hand-item .hi-ops { flex-wrap: wrap; }
  .hand-item .hi-ops .btn { flex: 1; }
  .card-ops .btn-icon { flex: 0 0 42px; }
}
