/* 驿讯 · 顾客端 /m/ 专用样式（移动优先）
 *
 * 2026-09-17 主管反馈：「顾客端的标题栏会不会太素？」
 *  → 标题栏升级为**品牌渐变 + 圆角标识 + 未读药丸**（下面 .m-top 一段）；
 *    logo 与药丸由 /m/m.js 的 M.decorateTop() 统一下发，六个页面一套样式，不用改各页 HTML。
 */

.m-body { background: #f2f3f5; padding-bottom: 72px; }

/* ============================ 顶部标题栏（顾客端） ============================ */

.m-top {
  background: linear-gradient(135deg, #14335c 0%, #1e4e8c 55%, #2a63ad 100%);
  color: #fff;
  border-bottom: 0;
  padding: 16px 16px 18px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 6px 18px rgba(20, 51, 92, 0.18);
}
.m-top a { color: #fff; }
.m-top h1 { font-size: 18px; margin: 0; color: #fff; letter-spacing: 0.3px; }
.m-top .sub { color: rgba(255, 255, 255, 0.8); font-size: 12px; margin-top: 6px; }
.m-top .yx-banner { /* 标题栏内若嵌了提示条，保证对比度 */
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

/* 标题栏一行：标识 + 文案 + 未读药丸 */
.m-topbar { display: flex; align-items: center; gap: 10px; }
.m-logo {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
}
.m-titles { min-width: 0; }
.m-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  font-size: 11.5px;
  letter-spacing: 0.8px;
  margin: 0 0 2px;
}
.m-pill {
  margin-left: auto;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11.5px;
  line-height: 18px;
  white-space: nowrap;
}
.m-pill.m-pill-warn { background: #e5484d; border-color: #e5484d; font-weight: 700; }

/* ============================ 底部导航 ============================ */

.h5-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 20;
}
.h5-nav a {
  flex: 1;
  text-align: center;
  padding: 10px 4px 12px;
  font-size: 12px;
  color: var(--ink-3);
  position: relative;
}
.h5-nav a.active { color: var(--pri); font-weight: 700; }
.h5-nav a:hover { text-decoration: none; }
.h5-nav .badge {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(20px);
  background: #e5484d;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  line-height: 14px;
  padding: 0 5px;
}

/* ============================ 卡片 ============================ */

.h5-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
}
.h5-card.unread { border-left: 4px solid var(--pri); } /* 旧写法：会撑偏内容，仅保留兼容旧页面 */
/* 未读强调：用内阴影竖条，**不占布局**，读/未读卡片宽度与内容起点完全一致 */
.unread-card { box-shadow: inset 4px 0 0 0 var(--pri); }
.h5-card .h5-code {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
}
.h5-card .h5-meta { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.h5-section-title { font-size: 13px; color: var(--ink-3); margin: 16px 0 8px; }
.h5-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.h5-actions .btn { flex: 1; text-align: center; }
.btn-lg { font-size: 16px; padding: 12px 16px; }
.h5-big-code {
  font-family: var(--mono);
  font-size: 52px;
  font-weight: 800;
  letter-spacing: 3px;
  text-align: center;
  margin: 6px 0 2px;
}
.h5-hint { font-size: 12px; color: var(--ink-3); text-align: center; }
.h5-step { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 13.5px; }
.h5-step .n {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pri-soft);
  color: var(--pri);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 22px;
}

/* ==================== 通知卡片（结构化：取件码优先）====================
 * 2026-09-17 主管反馈：「通知那里的排版是错误的」
 *  原实现把整段模板文案（pre-wrap）直接铺在卡片主体，取件码/货架号埋在文字里，
 *  还和标题重复，卡片又高又乱。改为**结构化取件卡**：头部状态行 → 取件码/货架号两格 → 驿站与时间 → 操作；
 *  平台原始文案收进「查看详情」，不占卡片主体。
 */

.n-card { position: relative; }
.n-head { display: flex; align-items: center; gap: 8px; }
.n-head b { font-size: 15px; }
.n-head .n-ago { margin-left: auto; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.n-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.n-card.unread-card .n-dot { background: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.14); }

.n-grid { display: flex; gap: 10px; margin-top: 12px; }
.n-cell {
  flex: 1;
  min-width: 0;
  background: var(--panel-2, #f7f8fa);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.n-cell span { display: block; color: var(--ink-3); font-size: 11.5px; }
.n-cell b { display: block; margin-top: 2px; font-size: 15px; word-break: break-all; }
.n-cell-main { flex: 1.4; background: var(--pri-soft, #eef3fb); border-color: #cfe0f5; }
.n-cell-main b { font-family: var(--mono); font-size: 20px; color: var(--pri-d, #14335c); letter-spacing: 0.5px; }
/* 合并通知的取件码是多个，字号降一档，避免撑破格子 */
.n-cell-main.n-cell-merged { flex: 2.2; }
.n-cell-main.n-cell-merged b { font-size: 14px; line-height: 1.5; letter-spacing: 0; }

.n-meta { margin-top: 10px; color: var(--ink-3); font-size: 12px; line-height: 1.6; }
.n-raw { margin-top: 8px; }
.n-raw .n-raw-label { color: var(--ink-3); font-size: 11.5px; margin-bottom: 4px; }
.n-raw-body {
  background: var(--panel-2, #f7f8fa);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* 新通知实时插入：滑入 + 高亮，播完自动摘掉 class（不残留动效） */
@keyframes n-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes n-flash {
  0% { box-shadow: 0 0 0 0 rgba(30, 78, 140, 0.35); }
  100% { box-shadow: 0 0 0 12px rgba(30, 78, 140, 0); }
}
.n-card.n-new { animation: n-slide-in 320ms ease-out, n-flash 1200ms ease-out 1; border-color: var(--pri); }
.n-live-inline { display: inline-flex; align-items: center; gap: 4px; color: rgba(255, 255, 255, 0.92); }
.n-live-inline::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ee7a8;
  box-shadow: 0 0 0 3px rgba(110, 231, 168, 0.22);
}
.n-live { display: inline-flex; align-items: center; gap: 5px; color: rgba(255, 255, 255, 0.86); font-size: 11.5px; margin-top: 6px; }
.n-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ee7a8;
  box-shadow: 0 0 0 3px rgba(110, 231, 168, 0.22);
}

/* ==================== 小工具类（顾客端页面用，避免行内 style 堆叠） ==================== */

.m-w100 { width: 100%; }
.m-hint-left { margin-top: 8px; text-align: left; }
.m-sub-tight { margin: 0 0 10px; }
.m-card-tight { margin-bottom: 8px; }
.m-hint-bottom { margin-bottom: 8px; }
.m-hint-left.is-error { color: var(--bad); }
.m-hint-left.is-ok { color: var(--ok); }

/* 分页与列表小工具（避免行内 style；ui-lint 会盯这个） */
.m-mt-3 { margin-top: 10px; }
.m-row-baseline { justify-content: space-between; align-items: baseline; }
.m-note-center { text-align: center; margin: 12px 0 4px; }
.m-note-center.is-end { margin: 8px 0; }
.m-btn-block { width: 100%; }

/* 告知类通知（绑定成功 / 已解除绑定）的正文：这类通知没有取件码，正文就是消息本身 */
.n-body {
  white-space: pre-wrap;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.75;
  margin: var(--sp-2) 0;
}
