/* pages-p2.css —— P2 四个扩展模块的共享样式（早餐券 / 失物招领 / 会议预订 / 生日提醒）
 *
 * 命名空间：**全部规则以 .pages-p2- 开头**（根容器 `.pages-p2-shell` + 各模块 `.pages-p2-breakfast` /
 * `.pages-p2-lostfound` / `.pages-p2-meetings` / `.pages-p2-birthdays`），不触碰 styles.css、pages.css、
 * pages-catalog.css、pages-room-ops.css 的任何既有类名，可随模块挂载/卸载。
 *
 * 依赖：必须排在 css/pages.css 之后（.pages 定义 --pg-* 品牌变量；本文件同时给 fallback）。
 * 直接复用 pages.css 的基础控件：.panel / .btn / .table / .table-wrap / .pages-field / .pages-num /
 * .pages-flash / .pages-pill / .pages-nowrap / .pages-hint / .empty-state / .callout；本文件只补
 * P2 页面自己的结构（页头、统计卡、工具条、表格、会议网格、抽屉、骨架）。
 *
 * 断点：**桌面优先**（宿主 pages-host 只在 ≥900px 挂载模块）；`@media (max-width: 899px)` 给单列兜底，
 * 保证窄窗口 / 预览页不横向溢出（会议网格本身保留横向滚动，这是时段网格的合理降级）。
 *
 * 视觉基准与 S2–S7 一致：13px 正文、#087c61 主色、#dbe7f2 描边、14px 圆角、等宽数字。
 */

/* ========================================================================== */
/* 1. 变量 / 根容器                                                            */
/* ========================================================================== */
.pages-p2-shell {
  --p2-brand: var(--pg-brand, #087c61);
  --p2-brand-deep: var(--pg-brand-deep, #0b3d66);
  --p2-ink: var(--pg-ink, #193b34);
  --p2-ink-soft: var(--pg-ink-soft, #31546e);
  --p2-muted: var(--pg-muted, #7c9188);
  --p2-line: var(--pg-line, #dbe7f2);
  --p2-line-soft: var(--pg-line-soft, #edf3f9);
  --p2-surface: var(--pg-surface, #ffffff);
  --p2-ok: var(--pg-ok, #087c61);
  --p2-ok-bg: var(--pg-ok-bg, #e4f5ec);
  --p2-warn: var(--pg-warn, #b5762a);
  --p2-warn-bg: var(--pg-warn-bg, #fdf2e2);
  --p2-bad: var(--pg-bad, #c84d45);
  --p2-bad-bg: var(--pg-bad-bg, #fbeae7);
  --p2-info: var(--pg-info, #2f7fc4);
  --p2-info-bg: var(--pg-info-bg, #e8f2fd);
  --p2-neutral: var(--pg-neutral, #6f8298);
  --p2-neutral-bg: var(--pg-neutral-bg, #eef2f7);
  --p2-slot-w: 34px;
  --p2-room-w: 150px;
  position: relative;
}

.pages-p2-shell *,
.pages-p2-shell *::before,
.pages-p2-shell *::after {
  box-sizing: border-box;
}

/* ========================================================================== */
/* 2. 页头                                                                     */
/* ========================================================================== */
.pages-p2-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
  padding: 18px 20px;
  background: var(--p2-surface);
  border: 1px solid var(--p2-line);
  border-radius: 14px;
  box-shadow: 0 5px 20px #37648a10;
}

.pages-p2-head-main {
  flex: 1 1 480px;
  min-width: 0;
}

.pages-p2-kicker {
  margin: 0 0 4px;
  color: var(--p2-muted);
  font-size: 11px;
  letter-spacing: .2px;
}

.pages-p2-title {
  margin: 0 0 7px;
  font-size: 20px;
  line-height: 1.25;
  color: var(--p2-ink);
}

.pages-p2-desc {
  margin: 0;
  max-width: 96ch;
  color: var(--p2-ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.pages-p2-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.pages-p2-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 9px;
  border: 1px solid #cfd9e6;
  border-radius: 999px;
  background: #f4f7fb;
  color: #4c6884;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
}

/* 运行时「后端未就绪」提示：仅 404/405/501 出现；成功后只显示中性 P2 标签 */
.pages-p2-chip-warn {
  border-color: #f0c9a6;
  background: #fdf2e2;
  color: #94611d;
}

/* ========================================================================== */
/* 3. 面板 / 工具条 / 状态条                                                   */
/* ========================================================================== */
.pages-p2-panel {
  padding: 0 0 4px;
  background: var(--p2-surface);
  border: 1px solid var(--p2-line);
  border-radius: 14px;
  box-shadow: 0 5px 20px #37648a10;
  overflow: hidden;
}

.pages-p2-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--p2-line-soft);
  background: #fbfdfe;
}

.pages-p2-field-sm {
  flex: 0 0 148px;
}

.pages-p2-field-grow {
  flex: 1 1 240px;
}

.pages-p2-field-full {
  flex: 1 1 100%;
}

.pages-p2-toolbar-actions,
.pages-p2-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-left: auto;
}

.pages-p2-status {
  padding: 0 18px;
}

.pages-p2-status:empty {
  display: none;
}

.pages-p2-status .pages-flash {
  margin: 12px 0 0;
}

.pages-p2-results {
  padding: 0;
  min-width: 0;
}

/* ========================================================================== */
/* 4. 统计卡                                                                   */
/* ========================================================================== */
.pages-p2-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 6px;
}

.pages-p2-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--p2-line-soft);
  border-radius: 10px;
  background: #fafdfc;
}

.pages-p2-stat[data-tone="bad"] {
  border-color: #f3d6d2;
  background: #fdf5f4;
}

.pages-p2-stat-label {
  color: var(--p2-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}

.pages-p2-stat-value {
  color: var(--p2-ink);
  font-size: 22px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.pages-p2-stat-note {
  color: var(--p2-muted);
  font-size: 10px;
}

/* ========================================================================== */
/* 5. 表格（列表页共用）                                                       */
/* ========================================================================== */
.pages-p2-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 18px 8px;
  color: var(--p2-ink-soft);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pages-p2-batch {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.pages-p2-table-wrap {
  padding: 0 18px;
  overflow-x: auto;
}

.pages-p2-table {
  width: 100%;
  min-width: 720px;
}

.pages-p2-table th,
.pages-p2-table td {
  vertical-align: middle;
}

.pages-p2-table tbody tr:hover td {
  background: #f7fbf9;
}

.pages-p2-col-check {
  width: 34px;
  text-align: center;
}

.pages-p2-col-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--p2-brand);
}

.pages-p2-col-ops {
  white-space: nowrap;
}

.pages-p2-col-ops .btn {
  margin-right: 5px;
}

.pages-p2-col-ops .btn:last-child {
  margin-right: 0;
}

.pages-p2-strong {
  display: block;
  color: var(--p2-ink);
  font-weight: 800;
}

.pages-p2-sub {
  display: block;
  margin-top: 1px;
  color: var(--p2-muted);
  font-size: 10px;
  font-weight: 400;
  white-space: nowrap;
}

.pages-p2-clip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pages-p2-muted {
  color: var(--p2-muted);
  font-weight: 400;
}

.pages-p2-time {
  color: var(--p2-ink-soft);
  font-size: 11px;
  white-space: nowrap;
}

.pages-p2-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pages-p2-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--p2-warn-bg);
  color: #96601f;
  font-size: 9px;
  font-weight: 800;
  vertical-align: middle;
}

/* 状态 pill（复用 .pages-pill 的形状，只补 P2 的色板） */
.pages-p2-pill {
  border: 0;
}

.pages-p2-pill[data-tone="ok"] {
  background: var(--p2-ok-bg);
  color: #0a6b51;
}

.pages-p2-pill[data-tone="info"] {
  background: var(--p2-info-bg);
  color: #1f6ca6;
}

.pages-p2-pill[data-tone="warn"] {
  background: var(--p2-warn-bg);
  color: #94611d;
}

.pages-p2-pill[data-tone="bad"] {
  background: var(--p2-bad-bg);
  color: #a43f33;
}

.pages-p2-pill[data-tone="neutral"] {
  background: var(--p2-neutral-bg);
  color: var(--p2-neutral);
}

.pages-p2-pill[data-tone="member"] {
  background: #f1ecfb;
  color: #6a51a8;
}

/* ========================================================================== */
/* 6. 表单 / 子面板 / 抽屉                                                     */
/* ========================================================================== */
.pages-p2-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
}

.pages-p2-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pages-p2-form-error {
  margin: 8px 0 0;
  padding: 7px 10px;
  border: 1px solid #f2d3cf;
  border-radius: 8px;
  background: #fdf3f2;
  color: #a43f33;
  font-size: 11px;
  font-weight: 700;
}

.pages-p2-label {
  display: block;
}

.pages-p2-req {
  margin-left: 2px;
  color: var(--p2-bad);
  font-style: normal;
}

.pages-p2-subpanel {
  margin: 8px 18px 4px;
  padding: 13px 14px;
  border: 1px solid #d9eae0;
  border-left: 3px solid var(--p2-brand);
  border-radius: 10px;
  background: #fbfefc;
}

.pages-p2-subpanel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pages-p2-subpanel-head strong {
  color: var(--p2-ink);
  font-size: 13px;
}

.pages-p2-subpanel-danger {
  border-color: #f0cfc9;
  border-left-color: var(--p2-bad);
  background: #fdf7f6;
}

.pages-p2-subpanel-head span {
  color: var(--p2-muted);
  font-size: 10px;
}

.pages-p2-subpanel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 11px;
}

.pages-p2-subpanel-foot-tight {
  margin-top: 9px;
}

.pages-p2-subpanel-foot .pages-hint {
  margin: 0;
  max-width: 60ch;
}

/* —— 照片占位 —— */
.pages-p2-photo {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed #cfdde8;
  border-radius: 10px;
  background: #fbfdff;
  text-align: center;
}

.pages-p2-photo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 6px;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, #f2f7fb 0 8px, #f8fbfd 8px 16px);
  color: #9db0c0;
}

.pages-p2-photo-box span {
  font-size: 20px;
}

.pages-p2-photo-box p {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.pages-p2-photo .pages-p2-muted {
  margin: 7px 0;
  font-size: 10px;
  line-height: 1.6;
}

/* —— 抽屉（失物认领/归还/处置、会议预订） —— */
.pages-p2-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #0b2b4324;
  backdrop-filter: blur(1px);
}

.pages-p2-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 91;
  display: flex;
  flex-direction: column;
  width: 430px;
  max-width: 100vw;
  background: var(--p2-surface);
  border-left: 1px solid var(--p2-line);
  box-shadow: -14px 0 40px #12304726;
}

.pages-p2-drawer-meeting {
  width: 520px;
}

/* 表单撑满抽屉：header 固定、body 滚动、footer 贴底（否则底部按钮会停在内容末尾） */
.pages-p2-drawer > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.pages-p2-drawer .pages-p2-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pages-p2-drawer .pages-p2-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pages-p2-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--p2-line-soft);
  background: #fbfdfe;
}

.pages-p2-drawer-head strong {
  display: block;
  color: var(--p2-ink);
  font-size: 14px;
}

.pages-p2-drawer-head .pages-p2-muted {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 400;
}

.pages-p2-drawer-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pages-p2-drawer-body .pages-field-full {
  flex: 1 1 100%;
}

.pages-p2-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--p2-line-soft);
  background: #fbfdfe;
}

/* —— 冲突提示（会议 409） —— */
.pages-p2-conflict {
  padding: 10px 12px;
  border: 1px solid #f0cfc9;
  border-left: 3px solid var(--p2-bad);
  border-radius: 9px;
  background: #fdf4f2;
  color: #8f3a30;
  font-size: 11px;
  line-height: 1.65;
}

.pages-p2-conflict strong {
  display: block;
  margin-bottom: 2px;
  color: #a43f33;
  font-size: 12px;
}

.pages-p2-conflict p {
  margin: 3px 0;
}

.pages-p2-conflict-list {
  margin: 5px 0 3px;
  padding-left: 18px;
}

.pages-p2-conflict-list li {
  margin: 1px 0;
}

/* ========================================================================== */
/* 7. 失物招领：左登记 + 右列表                                                */
/* ========================================================================== */
.pages-p2-split {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.pages-p2-side {
  min-width: 0;
  padding: 14px 15px;
  background: var(--p2-surface);
  border: 1px solid var(--p2-line);
  border-radius: 14px;
  box-shadow: 0 5px 20px #37648a10;
}

.pages-p2-side-form {
  position: sticky;
  top: 10px;
}

.pages-p2-side-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--p2-line-soft);
}

.pages-p2-side-head strong {
  color: var(--p2-ink);
  font-size: 13px;
}

.pages-p2-side-head span {
  font-size: 9px;
}

.pages-p2-main {
  min-width: 0;
}

/* ========================================================================== */
/* 8. 会议预订：会议室卡 / 时段网格 / 图例                                      */
/* ========================================================================== */
.pages-p2-datenav {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.pages-p2-datestrip {
  margin: 0;
  padding: 8px 18px;
  color: var(--p2-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--p2-line-soft);
  background: #fcfdfe;
}

.pages-p2-roomlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 9px;
  padding: 13px 18px 4px;
}

.pages-p2-room {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--p2-line);
  border-radius: 10px;
  background: #fbfdfe;
  text-align: left;
  cursor: pointer;
  color: var(--p2-ink-soft);
}

.pages-p2-room:hover {
  border-color: #bcd9cb;
  background: #f6fbf8;
}

.pages-p2-room.is-active {
  border-color: var(--p2-brand);
  background: #f1faf5;
  box-shadow: inset 0 0 0 1px var(--p2-brand);
}

.pages-p2-room strong {
  color: var(--p2-ink);
  font-size: 13px;
}

.pages-p2-room-meta {
  color: var(--p2-muted);
  font-size: 10px;
}

.pages-p2-room-price {
  color: var(--p2-brand);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* —— 网格 —— */
.pages-p2-grid-wrap {
  padding: 10px 18px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pages-p2-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 10px;
}

.pages-p2-grid th,
.pages-p2-grid td {
  border-bottom: 1px solid var(--p2-line-soft);
  border-right: 1px solid #f1f6fa;
  padding: 0;
  height: 30px;
}

.pages-p2-grid thead th {
  height: 26px;
  background: #f7fafc;
  color: var(--p2-muted);
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

.pages-p2-grid thead th.pages-p2-roomcell {
  text-align: left;
  padding-left: 8px;
}

.pages-p2-grid .pages-p2-roomcell {
  width: var(--p2-room-w);
  min-width: var(--p2-room-w);
  padding: 3px 8px;
  text-align: left;
  background: #fcfdfe;
  color: var(--p2-ink);
}

.pages-p2-grid .pages-p2-roomcell strong {
  display: block;
  font-size: 11px;
  font-weight: 800;
}

.pages-p2-grid .pages-p2-roomcell .pages-p2-sub {
  font-size: 9px;
}

.pages-p2-grid th.pages-p2-slot-head,
.pages-p2-grid td.pages-p2-slot {
  width: var(--p2-slot-w);
  min-width: var(--p2-slot-w);
}

.pages-p2-grid th.pages-p2-slot-head.is-hour,
.pages-p2-grid td.pages-p2-slot.is-hour {
  border-left: 1px solid #d9e7f0;
}

.pages-p2-slot {
  position: relative;
  cursor: pointer;
  text-align: center;
}

.pages-p2-slot.is-free:hover {
  background: #eaf7f0;
}

.pages-p2-slot.is-booked {
  background: #dcefe4;
  cursor: default;
}

.pages-p2-slot-dot {
  color: #4f8a6e;
}

.pages-p2-slot-plus {
  visibility: hidden;
  color: #7fb79b;
  font-size: 11px;
}

.pages-p2-slot.is-free:hover .pages-p2-slot-plus {
  visibility: visible;
}

.pages-p2-slot-label {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 2;
  max-width: 240px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #cbe8d7;
  color: #235a43;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.pages-p2-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 18px 12px;
  color: var(--p2-muted);
  font-size: 10px;
  border-bottom: 1px solid var(--p2-line-soft);
}

.pages-p2-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pages-p2-legend-item i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  border: 1px solid #cfe0d8;
}

.pages-p2-dot-free {
  background: #ffffff;
}

.pages-p2-dot-booked {
  background: #cbe8d7;
  border-color: #a9d3bd !important;
}

/* —— 当日预订 / 通用子区块 —— */
.pages-p2-subsection {
  padding: 4px 0 0;
}

.pages-p2-subsection-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 18px 4px;
  color: var(--p2-ink);
  font-size: 12px;
}

.pages-p2-subsection-head strong {
  font-size: 13px;
}

.pages-p2-subsection .pages-p2-empty {
  margin: 4px 18px 14px;
}

/* —— 收费预估 —— */
.pages-p2-charge {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border: 1px solid #dbeee2;
  border-radius: 9px;
  background: #f6fcf9;
}

.pages-p2-charge-label {
  color: var(--p2-muted);
  font-size: 10px;
  font-weight: 800;
}

.pages-p2-charge strong {
  color: var(--p2-brand);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.pages-p2-charge .pages-p2-muted {
  font-size: 10px;
}

.pages-p2-warn {
  color: #a4601f;
}

/* ========================================================================== */
/* 9. 生日提醒：区间页签 / 区间条                                              */
/* ========================================================================== */
.pages-p2-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 13px 18px 0;
}

.pages-p2-tab {
  border: 1px solid var(--p2-line);
  border-radius: 999px;
  background: #fbfdfe;
  color: var(--p2-ink-soft);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  cursor: pointer;
}

.pages-p2-tab:hover {
  border-color: #bcd9cb;
  background: #f4faf7;
}

.pages-p2-tab.is-active {
  border-color: var(--p2-brand);
  background: var(--p2-brand);
  color: #ffffff;
}

.pages-p2-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  margin: 11px 18px 4px;
  padding: 9px 12px;
  border: 1px solid var(--p2-line-soft);
  border-radius: 9px;
  background: #fafdfc;
}

.pages-p2-strip-main {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  min-width: 0;
}

.pages-p2-strip-label {
  color: var(--p2-ink);
  font-size: 12px;
  font-weight: 800;
}

.pages-p2-strip-range {
  color: var(--p2-ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pages-p2-strip-main .pages-p2-muted {
  font-size: 9px;
}

.pages-p2-strip-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--p2-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pages-p2-strip-stats strong {
  color: var(--p2-ink);
  font-size: 14px;
}

.pages-p2-bday {
  color: var(--p2-ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ========================================================================== */
/* 10. 加载骨架 / 空态 / 页脚                                                  */
/* ========================================================================== */
.pages-p2-skeleton {
  padding: 14px 18px 18px;
}

.pages-p2-sk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--p2-line-soft);
}

.pages-p2-sk-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f2f6f4;
}

.pages-p2-sk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 0;
}

.pages-p2-sk-grid .pages-p2-sk-line {
  height: 26px;
}

.pages-p2-sk-line {
  display: inline-block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef4f0 25%, #f7fbf9 37%, #eef4f0 63%);
  background-size: 400% 100%;
  animation: pages-p2-shimmer 1.3s ease infinite;
}

.pages-p2-sk-line.w10 { width: 10%; }
.pages-p2-sk-line.w12 { width: 12%; }
.pages-p2-sk-line.w14 { width: 14%; }
.pages-p2-sk-line.w16 { width: 16%; }
.pages-p2-sk-line.w20 { width: 20%; }
.pages-p2-sk-line.w30 { width: 30%; }

@keyframes pages-p2-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.pages-p2-skeleton .pages-note {
  margin: 11px 0 0;
}

.pages-p2-empty {
  margin: 6px 18px 16px;
  padding: 30px 16px;
  border: 1px dashed #d7e8de;
  border-radius: 10px;
  background: #fbfdfc;
}

.pages-p2-empty .btn {
  margin-top: 6px;
}

.pages-p2-callout {
  position: relative;
  margin: 14px 18px 18px;
  padding: 11px 13px;
  background: #f4faf7;
  border-color: #dbeee2;
  color: #4f7863;
  font-size: 11px;
  line-height: 1.75;
}

.pages-p2-callout strong {
  color: #2f5d4c;
}

/* 统计卡下方「按列表计数」提示，与面板留白对齐 */
.pages-p2-results > .pages-note,
.pages-p2-panel > .pages-note,
.pages-p2-subsection > .pages-note {
  padding: 0 18px;
  margin: 2px 0 8px;
  font-size: 10px;
}

/* ========================================================================== */
/* 10.5 分页（Q8：page / pageSize 20..100，四页共用）                          */
/* ========================================================================== */
.pages-p2-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 10px 18px 14px;
  border-top: 1px solid var(--p2-line-soft);
  color: var(--p2-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pages-p2-pager-info {
  display: flex;
  align-items: center;
  gap: 6px 12px;
  flex-wrap: wrap;
}

.pages-p2-pager-info label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pages-p2-pager select {
  height: 26px;
  padding: 0 4px;
  border: 1px solid var(--p2-line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--p2-ink-soft);
  font-size: 11px;
}

.pages-p2-pager-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pages-p2-pager .btn[disabled] {
  opacity: .45;
}

/* frontdesk 的只读提示（逾期处置仅 admin）：不渲染按钮，只留一句灰字 */
.pages-p2-readonly {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--p2-neutral-bg);
  color: var(--p2-neutral);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* 过期券（status 仍 issued，按 validUntil 灰显；docs/28 §4.1.3 / §5.2①） */
.pages-p2-table tr[data-expired="1"] td {
  color: #8a9aa8;
}

.pages-p2-table tr[data-expired="1"] .pages-p2-pill {
  background: var(--p2-neutral-bg);
  color: var(--p2-neutral);
}

/* 闰日（2-29 → 平年 02-28）行标记 */
.pages-p2-table tr[data-leap-adjusted="1"] .pages-p2-bday {
  color: #94611d;
}

/* ========================================================================== */
/* 11. 窄屏兜底（宿主桌面优先；≤899px 单列，预览/窄窗不塌）                     */
/* ========================================================================== */
@media (max-width: 1180px) {
  .pages-p2-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pages-p2-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 899px) {
  .pages-p2-head {
    flex-direction: column;
    padding: 15px 14px;
  }
  .pages-p2-head-actions {
    width: 100%;
  }
  .pages-p2-stats {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 14px 4px;
  }
  .pages-p2-split {
    grid-template-columns: minmax(0, 1fr);
  }
  .pages-p2-side-form {
    position: static;
  }
  .pages-p2-toolbar {
    padding: 12px 14px;
  }
  .pages-p2-field-sm,
  .pages-p2-field-grow {
    flex: 1 1 100%;
  }
  .pages-p2-toolbar-actions {
    width: 100%;
    margin-left: 0;
  }
  .pages-p2-form-grid,
  .pages-p2-pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .pages-p2-table-head,
  .pages-p2-table-wrap,
  .pages-p2-grid-wrap,
  .pages-p2-datestrip,
  .pages-p2-roomlist,
  .pages-p2-legend,
  .pages-p2-subsection-head {
    padding-left: 14px;
    padding-right: 14px;
  }
  .pages-p2-empty,
  .pages-p2-callout {
    margin-left: 14px;
    margin-right: 14px;
  }
  .pages-p2-subpanel {
    margin-left: 14px;
    margin-right: 14px;
  }
  .pages-p2-drawer,
  .pages-p2-drawer-meeting {
    width: 100vw;
  }
  .pages-p2-sk-row {
    grid-template-columns: 1.4fr repeat(2, 1fr);
  }
}
