/* ============================================================
   垣鑫谷业务管理系统 v2 - 全站样式
   主题：多巴胺紫粉（2026-09-30 换肤）
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #7c5cff;
  --primary-dark: #5b3be8;
  --primary-light: #f1ecff;
  --grad: linear-gradient(135deg, #7c5cff 0%, #ff6b9d 100%);
  --grad-soft: linear-gradient(135deg, #a78bfa 0%, #ffa1c8 100%);
  --bg: #f7f5fb;
  --card: #fff;
  --text: #1f1b2e;
  --text-light: #8b87a8;
  --border: #ece6f8;
  --success: #10b981;
  --warning: #ff9f43;
  --danger: #ff4d6d;
  --purple: #7c5cff;
  --pink: #ff6b9d;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(124, 92, 255, .09);
  --shadow-hover: 0 10px 26px rgba(124, 92, 255, .17);
}
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
a { text-decoration: none; color: var(--primary); }
button { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d9d0f0; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c3b6ea; }

/* ==================== 登录页 ==================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, #ff6b9d 0%, transparent 45%),
    radial-gradient(circle at 88% 12%, #7c5cff 0%, transparent 48%),
    radial-gradient(circle at 60% 100%, #ff9ec4 0%, transparent 55%),
    linear-gradient(140deg, #2b1a4f 0%, #3b1c53 45%, #1d1030 100%);
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,107,157,.42) 0%, transparent 42%),
    radial-gradient(circle at 82% 18%, rgba(124,92,255,.46) 0%, transparent 40%),
    radial-gradient(circle at 50% 105%, rgba(255,158,196,.28) 0%, transparent 50%);
  animation: auroraShift 14s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  from { transform: scale(1) translate(0, 0); opacity: .9; }
  to   { transform: scale(1.15) translate(-2%, 2%); opacity: 1; }
}
.login-wrap::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 15%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 42%, #000 15%, transparent 72%);
}
.particle-wrap { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.particle {
  position: absolute; bottom: -10px; border-radius: 50%;
  background: rgba(255,255,255,.7);
  box-shadow: 0 0 8px rgba(255,158,196,.9);
  animation: floatUp linear infinite; opacity: 0;
}
@keyframes floatUp {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  8% { opacity: .8; }
  85% { opacity: .5; }
  100% { transform: translateY(-110vh) translateX(20px); opacity: 0; }
}
.login-card {
  position: relative; z-index: 2;
  width: 400px; max-width: 92vw;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 24px; padding: 40px 40px 30px;
  box-shadow: 0 24px 70px rgba(60,20,80,.45), 0 0 0 1px rgba(255,255,255,.5);
  animation: cardIn .6s ease-out;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card .logo-img {
  display: block; width: 72px; height: 72px; margin: 0 auto;
  border-radius: 16px; object-fit: cover; border: 0; outline: 0;
}
.login-card .logo { text-align: center; font-size: 23px; font-weight: 700; color: #2b1a4f; letter-spacing: 2px; margin: 16px 0 8px; }
.login-card .sub { text-align: center; font-size: 12px; letter-spacing: 2px; color: rgba(31,27,46,.45); text-transform: uppercase; margin-bottom: 30px; }
.login-card .field { margin-bottom: 18px; }
.login-card label { display: block; margin-bottom: 7px; color: #5b5470; font-size: 13px; font-weight: 600; }
.login-card input {
  width: 100%; height: 44px; border: 1.5px solid #ece6f8; border-radius: 12px;
  padding: 0 14px; font-size: 14px; outline: none; background: #faf8ff; transition: all .2s;
}
.login-card input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(124,92,255,.16); }
.login-card .btn {
  width: 100%; height: 46px; border: none; border-radius: 12px;
  background: var(--grad); color: #fff; font-size: 16px; letter-spacing: 8px;
  cursor: pointer; margin-top: 10px; box-shadow: 0 10px 24px rgba(124,92,255,.35); transition: all .2s;
}
.login-card .btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255,107,157,.45); }
.login-card .btn:disabled { opacity: .6; cursor: not-allowed; }
.login-tip {
  margin-top: 16px; text-align: center; font-size: 12px; color: #8b87a8;
  background: #f6f1ff; padding: 8px 10px; border-radius: 10px;
}
.login-copy { position: relative; z-index: 2; margin-top: 22px; font-size: 12px; color: rgba(255,255,255,.55); letter-spacing: 1px; }

/* ==================== 主框架 ==================== */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px; background: linear-gradient(180deg, #2f1c58 0%, #241444 55%, #1b1032 100%);
  color: #b9aedb; display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
  transition: transform .25s;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .brand .b-logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none; overflow: hidden;
}
.sidebar .brand .b-logo img {
  display: block; width: 34px; height: 34px; object-fit: cover;
  border-radius: 9px; border: 0; outline: 0;
}
.sidebar .brand .b-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.sidebar .brand small { display: block; font-size: 10px; color: #8f83b8; font-weight: 400; margin-top: 2px; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 8px 0 20px; }
.sidebar .nav-group { padding: 12px 16px 4px; font-size: 11px; color: #7e72a8; letter-spacing: 1px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 18px; color: #b9aedb; font-size: 13.5px; cursor: pointer;
  border-left: 3px solid transparent; transition: all .18s;
}
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(2px); }
.sidebar nav a.active {
  background: linear-gradient(90deg, rgba(124,92,255,.38) 0%, rgba(255,107,157,.16) 60%, transparent 100%);
  color: #fff; border-left-color: #ff6b9d; font-weight: 600;
  box-shadow: inset 0 0 22px rgba(124,92,255,.18);
}
.sidebar nav a .ic { width: 17px; text-align: center; flex: none; font-size: 14px; }
/* 手机端侧边栏关闭按钮（桌面宽屏不显示） */
.sidebar-close {
  display: none; position: absolute; top: 14px; right: 12px; z-index: 5;
  width: 34px; height: 34px; line-height: 32px; text-align: center;
  border-radius: 9px; background: rgba(255,255,255,.14); color: #fff;
  font-size: 22px; font-weight: 400; cursor: pointer; user-select: none;
}
.sidebar-close:active { background: rgba(255,255,255,.24); }
/* 两列卡片区：手机下单列 */
.two-col { grid-template-columns: 1fr 1fr; }
.sidebar .userbox {
  padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px;
}
.sidebar .userbox .uname { color: #fff; font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.sidebar .userbox a { color: #a496cf; cursor: pointer; margin-right: 10px; }
.sidebar .userbox a:hover { color: #fff; }

.main { flex: 1; margin-left: 216px; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  height: 56px; background: linear-gradient(90deg, #ffffff 0%, #fdfaff 55%, #fbf6ff 100%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(124,92,255,.06);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--grad); opacity: .75;
}
.topbar .menu-btn { display: none; font-size: 22px; cursor: pointer; margin-right: 10px; }
.topbar .page-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.topbar .page-title .crumb { color: var(--text-light); font-weight: 400; font-size: 13px; }
.topbar .right { display: flex; align-items: center; gap: 12px; }
.topbar .role-tag {
  background: var(--grad); color: #fff;
  padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(124,92,255,.28);
}
.topbar .btn-exit { color: var(--text-light); cursor: pointer; font-size: 13px; }
.topbar .btn-exit:hover { color: var(--danger); }
.content { flex: 1; padding: 18px; }
.content iframe {
  width: 100%; height: calc(100vh - 56px - 36px); border: none;
  border-radius: 16px; background: #fff; box-shadow: var(--shadow);
}

/* ==================== 通用组件 ==================== */
.page-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.page-toolbar h2 { font-size: 18px; }
.page-toolbar .spacer { flex: 1; }
.month-pick { display: flex; align-items: center; gap: 8px; }
.month-pick input[type=month], .month-pick input[type=date], .month-pick input[type=number] {
  height: 34px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; font-size: 13px; outline: none;
}
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi-card {
  background: #fff; border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  border: 1px solid rgba(124,92,255,.07);
  transition: transform .18s ease, box-shadow .18s ease;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.kpi-card::after {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--grad); opacity: 0; transition: opacity .18s ease;
}
.kpi-card:hover::after { opacity: 1; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.kpi-card, .card { animation: popIn .28s ease-out both; }
.kpi-card .k-label { font-size: 12.5px; color: var(--text-light); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.kpi-card .k-value { font-size: 26px; font-weight: 800; line-height: 1.1; }
.kpi-card .k-sub { font-size: 11.5px; color: var(--text-light); margin-top: 7px; }
.kpi-card .k-icon {
  position: absolute; right: 14px; top: 16px; width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.kpi-card.blue .k-value, .kpi-card.blue .k-icon { color: var(--primary); }
.kpi-card.blue .k-icon { background: var(--primary-light); }
.kpi-card.green .k-value, .kpi-card.green .k-icon { color: var(--success); }
.kpi-card.green .k-icon { background: #e3faf0; }
.kpi-card.orange .k-value, .kpi-card.orange .k-icon { color: var(--warning); }
.kpi-card.orange .k-icon { background: #fff0e0; }
.kpi-card.red .k-value, .kpi-card.red .k-icon { color: var(--danger); }
.kpi-card.red .k-icon { background: #ffe8ee; }
.kpi-card.purple .k-value, .kpi-card.purple .k-icon { color: var(--purple); }
.kpi-card.purple .k-icon { background: #f1ecff; }
.kpi-card.mini { grid-column: span 1; padding: 12px 14px; }
.kpi-card.mini .k-value { font-size: 19px; }

.card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); margin-bottom: 16px;
  border: 1px solid rgba(124,92,255,.06);
  transition: box-shadow .18s ease;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card .card-title {
  font-size: 15px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.card .card-title .t { display: flex; align-items: center; gap: 8px; }
.card .card-title .t::before {
  content: ""; width: 4px; height: 15px; border-radius: 3px; background: var(--grad);
}
.seg {
  display: inline-flex; background: #f2edfb; border-radius: 11px; padding: 3px; gap: 2px;
}
.seg button {
  border: none; background: transparent; padding: 6px 14px; border-radius: 9px;
  font-size: 13px; color: var(--text-light); cursor: pointer; font-weight: 500;
  transition: all .15s;
}
.seg button.on {
  background: var(--grad); color: #fff; font-weight: 700;
  box-shadow: 0 2px 8px rgba(124,92,255,.3);
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
th { background: #f9f6ff; color: #6b6488; font-weight: 600; white-space: nowrap; font-size: 12px; }
tr:hover td { background: #fbf9ff; }
.table-wrap { overflow-x: auto; }

.btn {
  display: inline-block; border: none; border-radius: 10px; padding: 8px 18px;
  font-size: 13px; font-weight: 600; cursor: pointer; background: var(--grad); color: #fff;
  transition: all .15s; box-shadow: 0 3px 10px rgba(124,92,255,.22);
}
.btn:hover { opacity: 1; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,107,157,.32); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.btn-green { background: var(--success); box-shadow: 0 3px 10px rgba(16,185,129,.24); }
.btn-orange { background: var(--warning); box-shadow: 0 3px 10px rgba(255,159,67,.24); }
.btn-red { background: var(--danger); box-shadow: 0 3px 10px rgba(255,77,109,.24); }
.btn-gray { background: #a79fc0; box-shadow: none; }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; }
.btn-outline:hover { background: var(--primary-light); }
.btn-outline-gray { background: #fff; color: #6b6488; border: 1px solid var(--border); box-shadow: none; }
.btn-outline-gray:hover { border-color: var(--primary); color: var(--primary); }
.btn-grad { background: var(--grad); }

.tag { display: inline-block; padding: 2.5px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-green { background: #e3faf0; color: #0a9f6e; }
.tag-orange { background: #fff0e0; color: #d97b14; }
.tag-red { background: #ffe8ee; color: #e63a58; }
.tag-purple { background: #f1ecff; color: var(--purple); }
.tag-gray { background: #f4f0fa; color: #8b87a8; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.filter-bar input, .filter-bar select {
  height: 34px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px;
  font-size: 13px; outline: none; background: #fff; min-width: 110px;
  transition: border-color .15s, box-shadow .15s;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,.13); }
.filter-bar .kw { min-width: 200px; flex: 1; }

/* 进度条 */
.prog { background: #f0eafb; border-radius: 20px; height: 8px; overflow: hidden; min-width: 80px; }
.prog i { display: block; height: 100%; border-radius: 20px; background: var(--grad); transition: width .5s ease; }
.prog.green i { background: linear-gradient(90deg, #10b981, #4ade9f); }
.prog.red i { background: linear-gradient(90deg, #ff4d6d, #ff8fa6); }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 16px; }
.form-item { margin-bottom: 13px; }
.form-item label { display: block; margin-bottom: 6px; color: #554d70; font-size: 13px; font-weight: 600; }
.form-item label .req { color: var(--danger); }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
  font-size: 13px; outline: none; font-family: inherit; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-item textarea { min-height: 90px; resize: vertical; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,92,255,.13); }
.form-item .hint { font-size: 11.5px; color: var(--text-light); margin-top: 4px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(52, 26, 78, .45);
  display: none; align-items: center; justify-content: center; z-index: 999;
  backdrop-filter: blur(2px);
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 18px; width: 620px; max-width: 94vw;
  max-height: 90vh; overflow-y: auto; padding: 22px 24px;
  animation: cardIn .2s ease-out;
}
.modal.wide { width: 860px; }
.modal.slim { width: 480px; }
.modal .m-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.modal .m-sub { font-size: 12px; color: var(--text-light); margin-bottom: 14px; }
.modal .m-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-close { position: absolute; right: 16px; top: 16px; cursor: pointer; color: var(--text-light); }

/* Toast */
.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; padding: 10px 22px;
  border-radius: 12px; font-size: 13px; z-index: 9999; display: none;
  box-shadow: 0 10px 26px rgba(124,92,255,.4);
}

/* 文章阅读 */
.article-content { line-height: 1.85; font-size: 14px; color: #2f2842; }
.article-content h1, .article-content h2, .article-content h3 { color: #2b1a4f; }
.article-content h1, .article-content h2, .article-content h3 { margin: 14px 0 8px; }
.article-content p { margin: 8px 0; }
.article-content li { margin: 4px 0; }

/* 空状态 */
.empty { text-align: center; color: #a79fc0; padding: 46px 0; }
.empty .e-ic { font-size: 40px; margin-bottom: 8px; opacity: .5; }

/* 加载 */
.loading { text-align: center; padding: 60px 0; color: #a79fc0; }

/* 可响应式布局（替代弹窗内写死的双列 inline 样式） */
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.detail-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ==================== 响应式 ==================== */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: block; }
  .content { padding: 10px; }
  .content iframe { height: calc(100vh - 56px - 20px); }
  .cards-row { grid-template-columns: repeat(2, 1fr); }
  .filter-bar .kw { flex: 1 1 100%; }
  /* 表格不挤压，改为横向滚动 */
  .table-wrap table { min-width: 640px; }
  .sidebar-close { display: block; }
}

/* 手机端（375px 级别）专项：一屏看清、按钮够大、弹窗不超屏 */
@media (max-width: 480px) {
  .cards-row { grid-template-columns: 1fr; gap: 10px; }
  .kpi-card { padding: 13px 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar { gap: 8px; }
  .filter-bar input, .filter-bar select { min-width: 0; flex: 1 1 100%; }
  /* 按钮点击区放大到 ≥32px */
  .btn { padding: 9px 16px; }
  .btn-sm { padding: 7px 12px; min-height: 32px; font-size: 12.5px; }
  /* 弹窗：占满屏宽、内边距收紧、可滚动 */
  .modal { width: 100%; max-width: 96vw; max-height: 92vh; padding: 16px 14px; border-radius: 12px; }
  .modal.wide, .modal.slim { width: 100%; }
  .detail-grid, .detail-grid-2 { grid-template-columns: 1fr; }
  .table-wrap table { min-width: 560px; }
  .page-toolbar h2 { font-size: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .sidebar-close { display: block; }
}

/* ==================== 手机端体验优化 · 第一批（2026-10-01） ==================== */
@media (max-width: 600px) {

  /* 1. 表格 → 卡片：一行数据一张卡，字段名由 JS 写入 data-label */
  .table-wrap, .table-responsive { overflow-x: visible; }
  .table-wrap table, table.m-table { display: block; width: 100%; min-width: 0 !important; }
  .table-wrap thead, table.m-table thead { display: none; }
  .table-wrap tbody, table.m-table tbody { display: block; }
  .table-wrap tr, table.m-table tr {
    display: block; background: #fff; border: 1px solid var(--border);
    border-radius: 14px; padding: 2px 14px; margin-bottom: 10px;
    box-shadow: var(--shadow); min-height: 48px;
  }
  .table-wrap td, table.m-table td {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px 0; border-bottom: 1px dashed var(--border);
    font-size: 14px; text-align: right; word-break: break-all; min-height: 44px;
  }
  .table-wrap td:last-child, table.m-table td:last-child { border-bottom: none; }
  .table-wrap td::before, table.m-table td::before {
    content: attr(data-label); flex: none; color: var(--text-light);
    font-size: 12px; text-align: left; max-width: 42%; line-height: 1.4;
  }
  .table-wrap td:not([data-label])::before, table.m-table td:not([data-label])::before { content: ""; }
  .table-wrap tr:hover td, table.m-table tr:hover td { background: transparent; }

  /* 2. 按钮 / 输入框 / 可点区域 ≥44px，间距加大 */
  .btn, button, .filter-bar button {
    min-height: 44px; padding: 11px 18px; font-size: 14px; border-radius: 12px;
  }
  .btn-sm { min-height: 44px; padding: 10px 15px; font-size: 13.5px; }
  .filter-bar input, .filter-bar select,
  .form-item input, .form-item select, .form-item textarea {
    min-height: 44px; font-size: 14px;
  }
  .topbar .right > span { display: inline-flex; align-items: center; min-height: 44px; }
  .topbar .right { gap: 16px; }
  .topbar > div:first-child > span { display: inline-flex; align-items: center; min-height: 44px; }
  .btn + .btn, .btn-sm + .btn-sm, .btn + .btn-sm, .btn-sm + .btn { margin-left: 8px; }
  .row, .list-item, .item-row { min-height: 48px; }

  /* 3. 字号：正文 ≥14，关键数字 ≥16 加粗，说明 ≥12 */
  body { font-size: 14px; }
  td, .card, .kpi-card, .form-item label, .filter-bar label { font-size: 14px; }
  .m-num { font-size: 16px !important; font-weight: 700; }
  th, .m-sub, .hint, .nav-group { font-size: 12px; }

  /* 4. 顶栏精简：只留 菜单 + 标题 + 通知 */
  .topbar .top-hide-m, .topbar .role-tag { display: none !important; }
  .topbar { height: 56px; padding: 0 12px; }
  .topbar .page-title { font-size: 15px; }

  /* 5. 侧栏：行高 ≥48、宽度 ≤82% */
  .sidebar { width: 82vw; max-width: 300px; }
  .sidebar nav a { min-height: 48px; font-size: 15px; padding: 0 18px; }
  .sidebar .nav-group { padding: 14px 18px 6px; }
  .sidebar .userbox a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }

  /* 6. 长表单：保存按钮吸底，不遮输入框 */
  .modal { padding-bottom: 0; }
  .modal .m-footer {
    position: sticky; bottom: 0; z-index: 20;
    margin: 14px -14px 0; padding: 12px 14px 16px;
    background: #fff; border-top: 1px solid var(--border); gap: 12px;
  }
  .modal .m-footer .btn { flex: 1; min-height: 48px; }
  .modal .form-item:last-of-type { padding-bottom: 6px; }
}

/* ==================== 手机端体验优化 · 第二批（2026-10-01） ==================== */
.tabbar { display: none; }
.page-loading { display: none; }
.pull-tip, .to-top { display: none; }

@media (max-width: 600px) {
  /* 1. 底部固定导航 */
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 58px;
    background: #fff; border-top: 1px solid var(--border); z-index: 800;
    box-shadow: 0 -2px 12px rgba(124, 92, 255, .08);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .tabbar .tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 56px; font-size: 11px; color: var(--text-light); cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar .tab-item .tab-ic { font-size: 18px; line-height: 1; }
  .tabbar .tab-item.active { color: var(--primary); font-weight: 700; }
  .content { padding-bottom: 0; }
  .content iframe { height: calc(100vh - 56px - 58px - 20px); }

  /* 4. 页面切换加载提示 */
  .page-loading {
    position: fixed; inset: 0; z-index: 900; background: rgba(255, 255, 255, .88);
    display: none; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; color: var(--primary); font-size: 14px;
  }
  .pl-spin {
    width: 34px; height: 34px; border: 3px solid var(--primary-light);
    border-top-color: var(--primary); border-radius: 50%; animation: plspin .8s linear infinite;
  }
  @keyframes plspin { to { transform: rotate(360deg); } }

  /* 3. 下拉刷新提示 */
  .pull-tip {
    display: block; position: fixed; top: 64px; left: 50%;
    transform: translateX(-50%); background: rgba(124, 92, 255, .93); color: #fff;
    font-size: 12px; padding: 6px 14px; border-radius: 14px; z-index: 999;
    opacity: 0; transition: opacity .18s; pointer-events: none;
  }
  .pull-tip.show { opacity: 1; }

  /* 3. 回到顶部 */
  .to-top {
    display: flex; position: fixed; right: 14px; bottom: 72px; width: 44px; height: 44px;
    border-radius: 50%; background: var(--grad); color: #fff; font-size: 20px;
    align-items: center; justify-content: center; z-index: 700;
    box-shadow: 0 6px 16px rgba(124, 92, 255, .35);
    opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .to-top.show { opacity: 1; pointer-events: auto; }
}

/* 手机顶栏 LOGO（2026-10-01） */
.top-logo-m { display: none; }
@media (max-width: 600px) {
  .top-logo-m {
    display: block; width: 24px; height: 24px; border-radius: 6px;
    flex: none; object-fit: cover;
  }
}
