/* == 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; }
.mvc-center { text-align: center; padding-top: 80px; }
.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; }
.muted { color: #71717a; }

/* ---- 移动端 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 { display: grid; gap: 12px; margin-top: 16px; }
.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 { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.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; }
.ticket-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--gray-1);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.ticket-export-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }
.ticket-export-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- 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; }

/* ---- 响应式断点 ---- */
@media (max-width: 900px) {
  .page-grid { grid-template-columns: 1fr !important; }
  .detail-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr !important; }
  .detail-col-side { display: block; }
}
@media (max-width: 768px) {
  /* 移动端显示底栏，PC 顶栏链接收起为横滑 */
  .mvc-tabbar { display: flex; }
  .mvc-narrow { padding-bottom: 84px; }
  .nav-links { overflow-x: auto; white-space: nowrap; }
  .site-footer { padding-bottom: 76px; }
  .select-row { display: grid; gap: 12px; }
  .form-foot { display: grid; gap: 12px; }
  .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; }
