/* == css/app/mvc.css · 由 css/mvc/responsive.css 原样迁移 + Toast 新组件 == */

/* ---- 主体间距（顶栏/底栏避让） ---- */
.mvc-main { min-height: 60vh; padding-bottom: 24px; }

/* ---- PC sticky footer：内容不足一屏时页脚仍贴住视口底部（修复工单页等短内容页页脚悬空） ---- */
body:not(.mobile-body) { display: flex; flex-direction: column; min-height: 100vh; }
body:not(.mobile-body) .mvc-main { flex: 1; }
.mvc-narrow { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }
.msg-tip { margin-top: 12px; font-size: 14px; color: #15803d; }
.msg-tip.msg-err { color: #dc2626; }
.mvc-file { font-size: 13px; color: #52525b; padding: 4px 0; }
/* 附件列表容器：submit.php 提交时已选文件区（此前模板在用但全站无定义，属样式缺失） */
.mvc-filelist { margin-top: 8px; }
.mvc-filelist .mvc-file { display: flex; align-items: center; gap: 8px; }
.muted { color: #71717a; }

/* ---- 表单字段说明文案（跨端共享）----
   历史：定义在 page-auth.css，但移动端提交页（submit.php:69）同样使用，
   而 page-auth.css 仅认证页加载 → 移动端提交页缺失此样式。已上移到共享核心层。 */
.form-hint { font-size: 12px; color: var(--gray-3); margin-top: 6px; line-height: 1.6; }

/* ---- 进度条（mvc.css:174 与 admin/login.css:47 均引用）----
   历史：定义在 page-home.css（首页营销页专用文件），但 .m-d-card 与
   .lg-deco 两处非首页场景都在引用它。已上移到共享核心层，
   随后 page-home.css 整体删除（其 45 个类中 40 个全站未使用）。 */
.progress-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 3px;
  background: #f1f1f4;
  overflow: hidden;
}
.progress-bar span { display: block; width: 62%; height: 100%; background: var(--blue); border-radius: 3px; }

/* ---- 沟通时间线容器 + 行内附件按钮（此前模板在用但全站无定义，属样式缺失）---- */
.mvc-timeline { display: flex; flex-direction: column; gap: 14px; }
.att-list-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.att-list-inline button {
  font: inherit; font-size: 12px; line-height: 1.5;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid #e4e4e7; background: #fafafa; color: #52525b;
  cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-list-inline button:hover { border-color: var(--blue); color: var(--blue); background: #f8faff; }

/* ---- 移动端 tab-bar（唯一真相） ---- */
.mvc-tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #fff; border-top: 1px solid #e4e4e7;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.mvc-tabbar .mvc-tab {
  flex: 1; text-align: center; font-size: 12px; color: #71717a;
  text-decoration: none; padding: 6px 0; border-radius: 8px;
}
.mvc-tabbar .mvc-tab.active { color: #2563eb; font-weight: 600; }

/* ---- 详情/表单复用（收敛三套详情样式命名） ---- */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.detail-card { background: #fff; border: 1px solid #e4e4e7; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.detail-col-side { min-width: 0; }
.crumbs { font-size: 14px; margin-bottom: 16px; color: #71717a; }
.crumbs a { color: #2563eb; text-decoration: none; }
.crumbs .sep { margin: 0 8px; }
.sec-title { font-weight: 600; margin: 16px 0 8px; }
.reply-item { border-top: 1px solid #f4f4f5; padding: 12px 0; }
.reply-item .reply-who { font-size: 13px; color: #52525b; margin-bottom: 4px; }
.reply-item .reply-who .time { color: #a1a1aa; margin-left: 8px; }
.reply-item.is-admin .reply-who { color: #2563eb; }
.att-item { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 14px; }
.att-item button { background: none; border: none; color: #2563eb; cursor: pointer; padding: 0; font-size: 14px; }
.att-item .att-dl { color: #71717a; }
.att-item .att-dl:hover { color: #2563eb; }

/* ---- 工单卡（合并 PC row 与移动 card）----
   注：原 .t-card-list 容器样式全站未使用（模板已改用 .ws-table / .tk-list），
   已删除；卡片本体 .t-card* 仍在移动端工单与大厅列表中使用，保留。 */
.t-card {
  display: block; background: #fff; border: 1px solid #e4e4e7; border-radius: 12px;
  padding: 14px 16px; text-decoration: none; color: inherit;
}
.t-card-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.t-card-top .tno { margin-left: auto; font-size: 12px; color: #a1a1aa; }
.t-card-title { font-weight: 600; margin-bottom: 8px; display: block; }
.t-card-foot { display: flex; justify-content: space-between; font-size: 13px; color: #71717a; }
/* 注：原 .filter-row 及其 3 条子规则全站未使用（筛选区已改用 .ws-tabs / .m-filter），
   故「二级分类子级 chip 缩进」效果改由 mobile-pages.css 的 .chip.chip-sub 承担。 */
.ticket-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ticket-page-head .m-page-title,
.ticket-page-head .page-title { margin: 0; }

/* ---- Toast 轻提示（替代阻塞式 alert；默认不渲染，不影响现有视觉） ---- */
.mvc-toasts {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.mvc-toast {
  background: #18181b;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: 0 12px 28px -8px rgba(23, 23, 28, 0.25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 100%;
}
.mvc-toast.show { opacity: 1; transform: none; }
.mvc-toast-success { background: #16a34a; }

/* ---- 响应式断点 ----
   注：原此处含 .page-grid / .hero-grid / .nav-links / .site-footer / .form-foot
   五条规则，均指向全站未使用的选择器（服务于已废弃的营销页与旧提交页布局），
   其中两条还带 !important。已随 page-home.css 一并移除。
   .detail-grid / .detail-col-side / .mvc-narrow / .select-row / .mvc-tabbar 仍在生效，保留。 */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-col-side { display: block; }
}
@media (max-width: 768px) {
  /* 移动端显示底栏，PC 顶栏链接收起为横滑 */
  .mvc-tabbar { display: flex; }
  .mvc-narrow { padding-bottom: 84px; }
  .mvc-toasts { bottom: 96px; }
}
@media (min-width: 769px) {
  .mvc-tabbar { display: none !important; }
}

/* ---- 前台分页 / 空态 / 描述列表 / 详情标题区（审计补齐：此前仅后台 bundle 存在，前台裸奔导致错位） ---- */
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; padding: 20px 0 4px; }
.pager a, .pager span.pager-gap {
  min-width: 32px; height: 32px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 13px; color: var(--gray-1); background: #fff;
  font-variant-numeric: tabular-nums; text-decoration: none;
}
.pager a:hover:not(.cur) { border-color: var(--blue); color: var(--blue); }
.pager a.cur { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 500; }
.pager .muted { border: none; background: none; }
.empty { text-align: center; padding: 44px 16px; color: var(--gray-2); font-size: 13px; }
.meta-list { font-size: 13px; color: var(--gray-2); line-height: 2.1; }
.meta-list b { color: var(--gray-1); font-weight: 500; }
.t-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-head .tno { font-size: 12px; color: var(--gray-3); font-variant-numeric: tabular-nums; }
.t-title { font-size: 18px; font-weight: 700; color: var(--black); line-height: 1.5; margin-top: 12px; }
.t-desc { font-size: 14px; color: var(--gray-1); white-space: pre-wrap; line-height: 1.75; margin-top: 10px; }
/* 沟通时间线回复正文（前台此前缺样式，仅后台 bundle 有；现前台补齐） */
.reply-body { font-size: 13px; color: var(--gray-1); white-space: pre-wrap; line-height: 1.7; margin-top: 4px; }

/* ---- 移动端详情页共用卡（反馈大厅详情 / 我的工单详情，.phone 框内纵向卡片流） ---- */
.m-d .m-d-back {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 13px; color: var(--gray-2); text-decoration: none;
  margin-bottom: 14px;
}
.m-d .m-d-back:hover { color: var(--blue); }
.m-d-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 16px;
}
.m-d-card + .m-d-card { margin-top: 14px; }
.m-d-card .t-head { margin-bottom: 4px; }
.m-d-card .t-title { font-size: 17px; margin-top: 10px; }
.m-d-card .t-desc { font-size: 13px; }
.m-d-card .tk-progress { display: block; margin-top: 14px; }
.m-d-card .progress-bar { margin-top: 14px; }
.m-d-card .att-item { font-size: 13px; padding: 8px 0; }
.m-d-card .att-item button { font-size: 13px; text-align: left; }
.m-d-card .meta-list { font-size: 13px; line-height: 2; }
.m-d-card .form-textarea { font-size: 13px; min-height: 88px; }
.m-d-meta { font-size: 11px; margin-top: 8px; }
.m-d-sec { margin: 0 0 10px; }
.m-d-sec + .m-d-sec { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border-light); }
.m-d-form { margin-top: 12px; }
.m-d-card .empty { padding: 22px 0; }
.m-d-card .btn-submit { width: 100%; margin-top: 10px; }
.m-d-card .reply-item:first-of-type { border-top: none; padding-top: 4px; }
.m-d-actions { display: flex; gap: 10px; margin-top: 16px; }
.m-d-actions .btn { flex: 1; }

/* ---- 移动框内间距：避免 .mobile-wrap 与内容容器双重内边距叠加 ---- */
.mobile-wrap > .mvc-narrow { padding: 4px 0 0; }
.mobile-wrap > .container { padding-left: 0; padding-right: 0; }
