/* ==========================================================
   同室饲养牌颜色登记 · 视觉系统（方案 A：清爽列表，参照 Vant）
   基调：浅灰底 + 白色分组卡片 / 单元格列表 / Vant 蓝 / 克制动效
   只改外观：类名与结构保持不变，app.js 无需改动
   ========================================================== */

:root {
  /* 色彩（Vant 体系） */
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #323233;      /* 主文字 */
  --ink-2: #646566;    /* 次要文字 */
  --ink-3: #969799;    /* 辅助文字 */
  --ink-4: #C8C9CC;    /* 占位 / 箭头 */
  --line: #EBEDF0;     /* 分割线 */
  --line-2: #F2F3F5;   /* 浅填充 */
  --blue: #1989FA;
  --blue-700: #0570DB;
  --blue-tint: #ECF5FF;
  --danger: #EE0A24;
  --danger-tint: #FFECE8;
  --warn: #ED6A0C;
  --warn-tint: #FFF7E8;
  --ok: #07C160;
  --ok-text: #0A8F4A;

  --radius: 8px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --num: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", Arial, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

[hidden] { display: none !important; }

/* ---------------- 页头（白色顶栏） ---------------- */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  margin: 0 -16px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.mast-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 12px;
}
.brand-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { display: block; width: auto; height: auto; }
.brand-sino { height: 40px; }
.brand-inno { height: 26px; }
.brand-div { flex: none; width: 1px; height: 28px; background: var(--line); }

.mast-status {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
}
.live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  animation: live 2.8s var(--ease) infinite;
}
@keyframes live {
  0%   { box-shadow: 0 0 0 0 rgba(7,193,96,.45); }
  60%  { box-shadow: 0 0 0 5px rgba(7,193,96,0); }
  100% { box-shadow: 0 0 0 0 rgba(7,193,96,0); }
}

.mast-main { grid-column: 1; padding: 6px 0 16px; }
.mast-main h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.mast-main h1 span { color: var(--blue); }

.mast-metrics {
  grid-column: 2;
  display: flex;
  align-items: flex-end;
  gap: 28px;
  padding-bottom: 16px;
}
.metric { display: flex; flex-direction: column; align-items: center; }
.metric b {
  font-family: var(--num);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.metric span { margin-top: 2px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* ---------------- 区域导航栏（NavBar） ---------------- */
.zone-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  margin: 0 -16px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.zone-bar .btn {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
}
.zone-bar .btn:hover { background: transparent; color: var(--blue-700); }
.zone-bar .btn:active { transform: translateY(-50%); opacity: .7; }
.zone-name { font-size: 16px; font-weight: 600; color: var(--ink); }

/* ---------------- 标签页（Tabs） ---------------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 44px;
  margin: 0 -16px;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
}
.tab {
  position: relative;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  transition: color .2s var(--ease);
}
.tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 40px;
  height: 3px;
  margin-left: -20px;
  border-radius: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); font-weight: 600; }
.tab.active::after { transform: scaleX(1); }

/* ---------------- 内容容器 ---------------- */
main { padding-top: 12px; }
.view { display: none; }
.view.active { display: block; animation: fade .25s var(--ease) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.panel, .card-panel {
  background: var(--surface);
  border: 0;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }

/* 布局网格 */
.reg-grid, .reg-side, .two-col, .col-stack { display: grid; gap: 12px; align-items: start; align-content: start; }
.rooms-grid { display: grid; gap: 0 16px; align-items: start; }
.reg-grid .panel, .reg-side .panel, .two-col .panel, .col-stack .panel { margin-bottom: 0; }

/* 贴牌规则 */
.rule-list { margin: 0; padding: 0; list-style: none; }
.rule-list li {
  padding: 10px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
}
.rule-list li:first-child { border-top: 0; padding-top: 0; }
.rule-list li b { display: block; margin-bottom: 2px; font-size: 14px; font-weight: 500; color: var(--ink); }

/* ---------------- 表单（单元格式 Field） ---------------- */
.reg-grid > .panel { padding: 0 0 16px; background: transparent; }
.group {
  margin-bottom: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0 16px 12px;
}
.group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 -16px;
  padding: 12px 16px 8px;
}
.gnum {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--num);
}
.gtit { font-size: 14px; font-weight: 600; color: var(--ink); }

.field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.field .label {
  flex: none;
  width: 6.4em;
  font-size: 14px;
  color: var(--ink-2);
}
.field .label em { color: var(--danger); font-style: normal; margin-left: 2px; }
.field > input, .field > select { flex: 1; min-width: 0; }
.field-row { display: flex; flex-direction: column; }
.field-row .field { flex: none; }

input[type="text"], input[type="number"], input[type="search"], input[type="date"], select, textarea {
  width: 100%;
  height: 46px;
  padding: 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
}
textarea {
  height: auto;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
  background: var(--line-2);
  border-radius: var(--radius);
}
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:focus, select:focus { outline: none; }
.field:focus-within { border-bottom-color: var(--blue); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='12' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1l5 5-5 5' fill='none' stroke='%23C8C9CC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 22px;
  cursor: pointer;
}
input[type="date"] { cursor: pointer; }

/* 纸张颜色输入：同样是单元格 */
.color-input-wrap { position: relative; border-bottom: 1px solid var(--line); }
.color-input-wrap:focus-within { border-bottom-color: var(--blue); }
.color-input-wrap input { padding-right: 40px; }
.color-preview {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14);
  opacity: 0;
  transform: translateY(-50%) scale(.6);
  transition: opacity .2s var(--ease), transform .25s var(--ease), background .2s var(--ease);
  pointer-events: none;
}
.color-preview.on { opacity: 1; transform: translateY(-50%) scale(1); }

.hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3);
}
.hint.warn { color: var(--warn); }
.hint.good { color: var(--ok-text); }
#cross-hint:not([hidden]) {
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--line-2);
}
#cross-hint.warn { background: var(--warn-tint); }
#cross-hint.good { background: #E8F8EF; }

/* ---------------- 按钮（Button） ---------------- */
.btn {
  height: 36px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: opacity .15s, background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: #FAFAFB; }
.btn:active { opacity: .7; }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.btn.primary:hover { background: var(--blue-700); border-color: var(--blue-700); }
.btn.ghost { color: var(--ink); background: var(--surface); }
.btn.danger { color: var(--danger); background: var(--surface); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-tint); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 4px; }
.btn.block {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 12px;
  font-size: 16px;
  border-radius: 22px;
}
.btn-row { display: flex; gap: 8px; margin-top: 12px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

/* 记录行里的小按钮：Vant plain 小号 */
.rec .ops .btn.small { color: var(--blue); border-color: var(--blue); background: var(--surface); }
.rec .ops .btn.small:hover { background: var(--blue-tint); }

/* ---------------- 入口页 ---------------- */
.entry-head { padding: 16px 0 10px; }
.entry-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.entry-head p { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); }

.entry-grid { display: grid; gap: 12px; }
.entry-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 150px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border-radius: var(--radius);
  transition: background .2s var(--ease);
}
.entry-card:active { background: #F2F3F5; }
.ec-art {
  position: absolute;
  right: 8px;
  bottom: 0;
  width: 96px;
  height: auto;
  pointer-events: none;
}
.ec-tag { font-size: 11px; letter-spacing: .1em; color: var(--blue); font-weight: 500; }
.entry-card b { font-size: 18px; font-weight: 600; color: var(--ink); }
.ec-stat { margin-top: auto; padding-top: 10px; font-size: 13px; color: var(--ink-2); }
.ec-go { display: inline-flex; align-items: center; font-size: 13px; color: var(--blue); }

/* ---------------- 看板 ---------------- */
.board-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
.bn { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bn b {
  font-family: var(--num);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.bn span { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.board-nums.sub { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.board-nums.sub .bn b { font-size: 18px; }
.board-zones { display: grid; gap: 12px; }
#board-body { padding-top: 12px; }

/* ---------------- 总览工具条 ---------------- */
.overview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.overview-actions {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
/* 搜索框 / 组筛选：圆角胶囊 */
.overview-actions .search {
  height: 34px;
  padding: 0 14px;
  font-size: 14px;
  background: var(--surface);
  border-radius: 17px;
}
.overview-actions input.search {
  flex: 1 1 220px;
  max-width: 360px;
  padding-left: 34px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23969799' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.overview-actions select.search { width: auto; padding-right: 30px; background-position: right 12px center; }
.overview-actions .btn { height: 34px; border-radius: 17px; }

/* 在用 / 历史：Vant 分段 */
.seg-toggle {
  flex: none;
  display: inline-flex;
  padding: 2px;
  background: var(--line);
  border-radius: 17px;
}
.seg {
  height: 30px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  border-radius: 15px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.seg.on { background: var(--surface); color: var(--ink); font-weight: 600; }

/* ---------------- 统计宫格（Grid） ---------------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
  padding: 14px 0;
  background: var(--surface);
  border-radius: var(--radius);
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat b {
  font-family: var(--num);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat:last-child b { color: var(--danger); }
.stat span { font-size: 12px; color: var(--ink-2); white-space: nowrap; }

/* ---------------- 动物构成 ---------------- */
.compose-row { display: flex; gap: 32px; }
.compose-item { display: flex; flex-direction: column; gap: 2px; }
.compose-item b {
  font-family: var(--num);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.compose-item span { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

.species-dist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.species-dist:empty { display: none; }
.species-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--line-2);
  border-radius: 4px;
}
.species-chip b { font-family: var(--num); font-size: 12px; font-weight: 600; color: var(--ink); }
.species-chip.warn { background: var(--warn-tint); color: var(--warn); }
.species-chip.train { box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); }
.species-chip.phase-chip { background: var(--blue-tint); color: var(--blue); }
.species-chip.phase-chip b { color: var(--blue); }
.species-dist.phase-dist { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.dist-glabel { font-size: 12px; color: var(--ink-3); align-self: center; margin: 0 2px 0 8px; }
.dist-glabel:first-child { margin-left: 0; }
.updated { font-size: 12px; color: var(--ink-3); }

/* 到期提醒：NoticeBar 风格 */
#expiring-panel { padding: 0; overflow: hidden; }
#expiring-panel .panel-head {
  margin: 0;
  padding: 10px 16px;
  background: var(--warn-tint);
}
#expiring-panel .panel-head h2 { font-size: 13px; font-weight: 500; color: var(--warn); }
#expiring-panel .rec-list { padding: 0 16px; }

/* ---------------- 记录行（Cell） ---------------- */
.rec-list { display: block; }
.rec {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.rec:last-child { border-bottom: 0; }
/* 色条 → 色点：白色纸也能看清 */
.rec .bar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14);
}
.rec .info { min-width: 0; }
.rec-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rec-top .study { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.rec .study { font-size: 15px; font-weight: 500; color: var(--ink); }
.rec-room {
  flex: none;
  padding: 0 4px;
  font-size: 11px;
  line-height: 16px;
  color: var(--ink-2);
  background: var(--line-2);
  border-radius: 2px;
}
.rec .meta2 { margin-top: 2px; font-size: 12px; color: var(--ink-3); }
.rec .meta3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-3);
}
.rec-time { margin-left: auto; }
.rec-arch { opacity: .55; }

/* 标签（Tag） */
.st {
  padding: 0 4px;
  border-radius: 2px;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}
.st-ok { background: var(--line-2); color: var(--ink-2); }
.st-warn { background: var(--danger-tint); color: var(--danger); }
.st-arch { background: var(--line-2); color: var(--ink-3); }
.st.st-phase { background: var(--blue-tint); color: var(--blue); }
.st-stale { background: var(--warn-tint); color: var(--warn); }

.rec .ops { display: flex; gap: 6px; }

/* ---------------- 房间分组（CellGroup） ---------------- */
.room-block { margin-bottom: 4px; }
.rtitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 8px;
}
.rname { display: flex; align-items: baseline; gap: 6px; flex: none; }
.rlab { display: none; }
.rname b { font-size: 15px; font-weight: 600; color: var(--ink); }
.rright { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; justify-content: flex-end; }
.rswatches { display: flex; gap: 3px; flex: none; }
.rswatches i { display: block; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.rswatches .rmore { font-size: 11px; color: var(--ink-3); align-self: center; padding-left: 2px; }
.rstat { display: flex; flex-direction: column; align-items: flex-end; gap: 0; min-width: 0; }
.rsum { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.rspecies {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--ink-3);
}
.room-block > .rec-list {
  padding: 0 16px;
  background: var(--surface);
  border-radius: var(--radius);
}
.rcount { font-size: 12px; color: var(--ink-3); }

/* ---------------- 打印勾选列表 ---------------- */
.check-list { display: flex; flex-direction: column; max-height: 460px; overflow: auto; margin: 0 -16px; }
.print-group { padding: 0 16px 4px; border-bottom: 8px solid var(--bg); }
.print-group:last-child { border-bottom: 0; }
.print-room { display: flex; align-items: center; gap: 8px; padding: 12px 0 6px; }
.print-room .rlab { display: none; }
.print-room b { font-size: 15px; font-weight: 600; color: var(--ink); }
.print-room .btn { margin-left: auto; }
.check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-size: 14px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.check-item:last-child { border-bottom: 0; }
.check-item:active { background: var(--line-2); }

/* Vant Checkbox：圆形 */
.check-item input[type="checkbox"] {
  appearance: none;
  flex: none;
  position: relative;
  width: 20px; height: 20px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--ink-4);
  border-radius: 50%;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.check-item input[type="checkbox"]:checked { background: var(--blue); border-color: var(--blue); }
.check-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6.5px; top: 3px;
  width: 4px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-item input[type="checkbox"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.check-item .cname {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  color: var(--ink);
}
.check-item:has(input:checked) .cname { font-weight: 500; }
.check-item .csw { display: flex; flex: none; }
.check-item .csw i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.check-item .ccount { font-size: 12px; color: var(--ink-3); }

/* ---------------- 打印预览 ---------------- */
.pp-actions { display: flex; gap: 8px; }
.pp-body { display: flex; flex-wrap: wrap; gap: 12px; }
.pp-page {
  position: relative;
  width: 300px;
  height: 212px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.pp-page .sheet { position: absolute; top: 0; left: 0; transform: scale(.2674); transform-origin: top left; }
.pp-note {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 1;
  font-size: 11px;
  padding: 0 8px;
  line-height: 20px;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue);
  pointer-events: none;
}

/* ---------------- 空状态（Empty） ---------------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
}
.empty svg { width: 56px; height: 56px; margin-bottom: 12px; color: #DCDEE0; }
.empty p { margin: 0; font-size: 14px; color: var(--ink-2); }
.empty span { margin-top: 4px; font-size: 12px; color: var(--ink-3); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  max-width: 86vw;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, .78);
  border-radius: 8px;
  z-index: 9999;
  animation: toastIn .25s var(--ease) both;
}
.toast.bad { background: rgba(200, 20, 40, .92); }
.toast.good { background: rgba(7, 150, 80, .92); }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------- 颜色池 ---------------- */
.pool-row {
  display: grid;
  grid-template-columns: 36px 1fr auto 44px;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
}
.pool-row:last-child { border-bottom: 0; }
.pool-row input[type="color"] {
  width: 32px; height: 32px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.pool-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.pool-row input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.pool-row input[type="text"] { height: 40px; }
.pool-row .used { font-size: 12px; text-align: right; color: var(--ink-3); white-space: nowrap; }

/* ---------------- 页脚 ---------------- */
.app-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 28px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}
.app-foot .foot-sub { color: var(--ink-4); }

/* ================= 打印（不受界面改动影响） ================= */
.print-area { display: none; }

@page { size: A4 landscape; margin: 0; }

@media print {
  html, body { background: #fff; }
  #app { display: none !important; }
  .toast { display: none !important; }
  .print-area { display: block; }
  .sheet { page-break-after: always; break-after: page; }
  .sheet:last-child { page-break-after: auto; break-after: auto; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

.sheet {
  position: relative;
  width: 297mm; height: 210mm; box-sizing: border-box;
  padding: 31.75mm 25.4mm;          /* 模板页边距：上下 90pt / 左右 72pt */
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.pcard {
  width: 100%;
  text-align: center;
  font-family: "等线", DengXian, "Microsoft YaHei", "SimSun", sans-serif;
  font-weight: 400;
  color: #000;
}
.pcard .pline { line-height: 1.16; white-space: nowrap; }

/* ---------------- 宽屏 ---------------- */
@media (min-width: 1000px) {
  #app { padding: 0 24px 56px; }
  .masthead, .zone-bar, .tabs { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
  .tabs { grid-template-columns: repeat(4, 120px); justify-content: center; }
  main { padding-top: 16px; }
  .entry-grid { grid-template-columns: repeat(3, 1fr); }
  .board-zones { grid-template-columns: 1fr 1fr; }
  .reg-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; }
  .reg-side { position: sticky; top: 60px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 16px; }
  .rooms-grid { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
}

/* ---------------- 手机 ---------------- */
@media (max-width: 660px) {
  .masthead { grid-template-columns: 1fr; }
  .mast-top { padding: 10px 0 8px; }
  .brand-sino { height: 32px; }
  .brand-inno { height: 21px; }
  .brand-div { height: 22px; }
  .mast-main { padding: 2px 0 10px; }
  .mast-main h1 { font-size: 18px; }
  .mast-metrics {
    grid-column: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0 0 12px;
  }
  .overview-bar { flex-direction: column; align-items: stretch; }
  .overview-actions { justify-content: flex-start; }
  .overview-actions input.search { max-width: none; flex-basis: 100%; }
  .stats-row { padding: 12px 0; }
  .stat b { font-size: 20px; }
  .board-nums.sub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg-toggle { display: grid; grid-template-columns: 1fr 1fr; }
  /* 改 / 归档 竖排在右侧，不再单独占一行 */
  .rec { gap: 10px; }
  .rec .ops { flex-direction: column; gap: 6px; }
}

/* ---------------- 动效偏好 ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
