/* ==============================================================
   鹿朋商管 · 酒店质检与暗访数字化平台
   设计系统 v4 —— 企业级控制台风格
   --------------------------------------------------------------
   结构：
     1. 设计令牌      2. 基础重置      3. 骨架布局
     4. 侧边导航      5. 顶栏          6. 卡片与面板
     7. 按钮          8. 表单          9. 表格
    10. 徽章与标签   11. 数据概览     12. 步骤条
    13. 质检作答     14. 照片         15. 图表容器
    16. 提示与空态   17. 登录页       18. 移动端适配
    19. 打印
   ============================================================== */

/* ---------------- 1. 设计令牌 ---------------- */
:root {
  /* 品牌色与官网 lupengbiz.com 统一：主蓝 #3b82f6 / 强调橙 #f59e0b */
  --primary:        #3b82f6;
  --primary-hover:  #2563eb;
  --primary-deep:   #1d4ed8;
  --primary-soft:   #eff6ff;
  --primary-ring:   rgba(59, 130, 246, .20);

  --success:        #16a34a;
  --success-soft:   #ecfdf5;
  --warning:        #f59e0b;
  --warning-soft:   #fffbeb;
  --danger:         #dc2626;
  --danger-soft:    #fef2f2;
  --info:           #0891b2;
  --info-soft:      #ecfeff;
  --violet:         #7c3aed;
  --violet-soft:    #f5f3ff;

  --bg:             #f5f7fb;
  --surface:        #ffffff;
  --surface-2:      #f8fafc;
  --border:         #e8edf5;
  --border-soft:    #f1f5f9;
  --border-strong:  #d5dded;

  --text:           #0f172a;
  --text-2:         #475569;
  --text-3:         #8b96a8;

  --nav-bg:         #101a2e;
  --nav-bg-2:       #16233d;
  --nav-text:       #a9b6cc;
  --nav-text-hi:    #ffffff;
  --nav-active:     #2563eb;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow:    0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 16px 48px -12px rgba(15, 23, 42, .22);

  --nav-w: 224px;
  --header-h: 58px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, "Courier New", monospace;
}

/* ---------------- 2. 基础重置 ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4, h5 { margin: 0 0 8px; font-weight: 600; line-height: 1.4; color: var(--text); }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
p  { margin: 0 0 10px; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c7d2e3; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #a9b8ce; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 3. 骨架布局 ---------------- */
.qa-shell { min-height: 100vh; display: flex; }
.qa-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--nav-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .22s ease;
}
.qa-content { flex: 1; padding: 22px 26px 48px; }
.qa-wrap { max-width: 1280px; margin: 0 auto; }
.qa-wrap--narrow { max-width: 880px; margin: 0 auto; }

/* 页头 */
.qa-page-head {
  display: flex; align-items: flex-start; gap: 16px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.qa-page-head .qh-main { flex: 1; min-width: 240px; }
.qa-page-head h1 { display: flex; align-items: center; gap: 9px; margin: 0 0 4px; font-size: 20px; }
.qa-page-head h1 i { color: var(--primary); font-size: 18px; }
.qa-page-head .qh-sub { color: var(--text-3); font-size: 13px; margin: 0; }
.qa-page-head .qh-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 面包屑 */
.qa-crumb { font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; }
.qa-crumb a { color: var(--text-3); }
.qa-crumb a:hover { color: var(--primary); }
.qa-crumb span.sep { margin: 0 6px; opacity: .6; }

/* ---------------- 4. 侧边导航 ---------------- */
.qa-nav {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--nav-w);
  background: linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-2) 100%);
  display: flex; flex-direction: column; z-index: 900;
}
.qa-nav-brand {
  height: var(--header-h); display: flex; align-items: center; gap: 10px;
  padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.07);
  color: #fff; font-weight: 600; font-size: 15px; letter-spacing: .2px;
  flex-shrink: 0;
}
.qa-nav-brand i { color: #60a5fa; font-size: 17px; }
.qa-nav-brand .nb-logo { height: 22px; width: auto; flex-shrink: 0; }
.qa-nav-brand .nb-txt { line-height: 1.2; }
.qa-nav-brand .nb-sub { display: block; font-size: 10.5px; font-weight: 400; color: var(--nav-text); letter-spacing: .3px; }
.qa-nav-body { flex: 1; overflow-y: auto; padding: 12px 0 20px; }
.qa-nav-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }
.qa-nav-group { padding: 14px 20px 6px; font-size: 10.5px; letter-spacing: 1.1px; color: #5c6b87; text-transform: uppercase; }
.qa-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; margin: 1px 8px; border-radius: var(--radius-sm);
  color: var(--nav-text); font-size: 13.5px; position: relative;
  transition: background .16s, color .16s;
}
.qa-nav-item i { width: 17px; text-align: center; font-size: 14px; opacity: .95; }
.qa-nav-item:hover { background: rgba(255,255,255,.07); color: var(--nav-text-hi); }
.qa-nav-item.is-active {
  background: linear-gradient(90deg, rgba(59,130,246,.95), rgba(59,130,246,.60));
  color: #fff; font-weight: 500; box-shadow: 0 4px 14px -6px rgba(59,130,246,.9);
}
.qa-nav-item.is-active i { opacity: 1; }
.qa-nav-item .qa-nav-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: 10.5px; line-height: 1; padding: 3px 6px; border-radius: 9px; font-weight: 600;
}
.qa-nav-foot {
  padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.07);
  font-size: 11.5px; color: #5c6b87; flex-shrink: 0;
}
.qa-nav-foot a { color: #7c8aa5; }
.qa-nav-foot a:hover { color: #cbd5e1; }

/* 移动端遮罩 */
.qa-nav-mask {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5);
  z-index: 890; backdrop-filter: blur(1px);
}
.qa-nav-mask.is-open { display: block; }

/* ---------------- 5. 顶栏 ---------------- */
.qa-header {
  height: var(--header-h); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
  position: sticky; top: 0; z-index: 800;
}
.qa-burger {
  display: none; background: none; border: 0; font-size: 18px; color: var(--text-2);
  cursor: pointer; padding: 6px 8px; border-radius: var(--radius-xs);
}
.qa-burger:hover { background: var(--surface-2); }
.qa-header-title { font-size: 14.5px; font-weight: 600; color: var(--text); margin: 0; }
.qa-header-title .ht-org { color: var(--text-3); font-weight: 400; font-size: 12.5px; }
.qa-header-spacer { flex: 1; }
.qa-header-actions { display: flex; align-items: center; gap: 8px; }
.qa-user {
  display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 6px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; color: var(--text-2); position: relative;
}
.qa-user:hover { border-color: var(--border-strong); background: var(--surface-2); }
.qa-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.qa-user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 950;
}
.qa-user-menu.is-open { display: block; }
.qa-user-menu a, .qa-user-menu .um-head {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: var(--radius-xs); color: var(--text-2); font-size: 13px;
}
.qa-user-menu a:hover { background: var(--surface-2); color: var(--text); }
.qa-user-menu .um-head { flex-direction: column; align-items: flex-start; gap: 2px; border-bottom: 1px solid var(--border); border-radius: 0; margin-bottom: 4px; padding-bottom: 10px; }
.qa-user-menu .um-head strong { color: var(--text); font-size: 13.5px; }
.qa-user-menu .um-head span { color: var(--text-3); font-size: 11.5px; }

/* ---------------- 6. 卡片与面板 ---------------- */
.qa-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
  margin-bottom: 18px; overflow: hidden;
}
.qa-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  background: var(--surface); flex-wrap: wrap;
}
.qa-card-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.qa-card-head h3 i { color: var(--primary); }
.qa-card-head .qh-note { font-size: 12.5px; color: var(--text-3); font-weight: 400; }
.qa-card-head .qa-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.qa-card-body { padding: 18px; }
.qa-card-body--flush { padding: 0; }
.qa-card-foot { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }

.qa-panel {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.qa-panel--primary { background: var(--primary-soft); border-color: #dbeafe; }
.qa-panel--success { background: var(--success-soft); border-color: #d1fae5; }
.qa-panel--warning { background: var(--warning-soft); border-color: #fde68a; }
.qa-panel--danger  { background: var(--danger-soft);  border-color: #fecaca; }

.qa-grid { display: grid; gap: 16px; }
.qa-grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.qa-grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.qa-grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

/* ---------------- 7. 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; font-size: 13.5px; font-family: inherit; font-weight: 500;
  line-height: 1.4; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; transition: all .15s ease;
  text-decoration: none; background: var(--surface); color: var(--text-2);
  border-color: var(--border-strong);
}
.btn:hover { color: var(--text); border-color: #c3cfe2; background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(37,99,235,.3); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; border-color: #15803d; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-link { background: none; border: 0; color: var(--primary); padding: 4px 2px; }
.btn-link:hover { color: var(--primary-hover); text-decoration: underline; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn-lg { padding: 11px 22px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-xs);
  border: 1px solid transparent; background: none; cursor: pointer;
  color: var(--text-3); font-size: 13px; padding: 0;
}
.icon-btn:hover { background: var(--surface-2); color: var(--primary); border-color: var(--border); }

/* ---------------- 8. 表单 ---------------- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px;
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-label small { color: var(--text-3); font-weight: 400; }
.form-control {
  width: 100%; padding: 8px 12px; font-size: 14px; font-family: inherit;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.form-control::placeholder { color: #a8b3c5; }
.form-control:disabled { background: var(--surface-2); color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 76px; line-height: 1.65; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%238b96a8' d='M6 8.5 1.5 4h9z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 11px; padding-right: 30px; }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; line-height: 1.65; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > .form-col { flex: 1 1 200px; min-width: 0; }
.form-section-title {
  font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 12px;
  padding-bottom: 8px; border-bottom: 1px dashed var(--border-strong);
  display: flex; align-items: center; gap: 7px;
}
.form-section-title i { color: var(--primary); }

.checkbox, .radio { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.checkbox input, .radio input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; margin: 0; }

/* 星级选择 */
.star-picker { display: inline-flex; gap: 4px; align-items: center; }
.star-picker input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-picker label {
  cursor: pointer; font-size: 24px; color: #dbe1ea; transition: color .12s, transform .12s;
  line-height: 1; padding: 2px;
}
.star-picker label:hover { transform: scale(1.1); }
.star-picker input:checked ~ label { color: #dbe1ea; }
/* 反向着色：选中项及其之前 */
.star-picker input:checked + label,
.star-picker input:checked + label ~ label { color: #fbbf24; }
.star-picker input:focus-visible + label { outline: 2px solid var(--primary-ring); border-radius: 4px; }

/* 分段选择 */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span {
  display: block; padding: 6px 14px; font-size: 13px; border-radius: var(--radius-xs);
  color: var(--text-2); transition: all .15s; white-space: nowrap;
}
.seg input:checked + span { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-xs); }

/* 搜索框 */
.qa-search { position: relative; }
.qa-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; }
.qa-search input { padding-left: 32px; }

/* ---------------- 9. 表格 ---------------- */
.qa-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.qa-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.qa-table thead th {
  background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 12.5px;
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
.qa-table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.qa-table tbody tr:last-child td { border-bottom: 0; }
.qa-table tbody tr:hover { background: #fafbfe; }
.qa-table .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.qa-table .actions { white-space: nowrap; text-align: right; }
.qa-table .actions a, .qa-table .actions button { margin-left: 4px; }
.qa-table .cell-main { font-weight: 600; color: var(--text); }
.qa-table .cell-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.qa-empty { padding: 48px 20px; text-align: center; color: var(--text-3); }
.qa-empty i { font-size: 34px; color: #cbd5e1; display: block; margin-bottom: 12px; }

/* ---------------- 10. 徽章与标签 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px;
  font-size: 12px; font-weight: 500; border-radius: 999px; line-height: 1.7;
  white-space: nowrap;
}
.badge-primary { background: var(--primary-soft); color: var(--primary-hover); }
.badge-success { background: var(--success-soft); color: #15803d; }
.badge-warning { background: var(--warning-soft); color: #b45309; }
.badge-danger  { background: var(--danger-soft);  color: #b91c1c; }
.badge-info    { background: var(--info-soft);    color: #0e7490; }
.badge-violet  { background: var(--violet-soft);  color: #6d28d9; }
.badge-gray    { background: #f1f5f9; color: #475569; }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }
.badge-critical { background: #dc2626; color: #fff; }

.qa-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.qa-tag { display: inline-block; padding: 3px 9px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-xs); font-size: 12.5px; color: var(--text-2); margin: 0 6px 6px 0; }
.qa-tag--btn { cursor: pointer; transition: all .15s; }
.qa-tag--btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ---------------- 11. 数据概览 ---------------- */
.qa-stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 18px; }
.qa-stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-xs); position: relative; overflow: hidden;
}
.qa-stat::after {
  content: ''; position: absolute; right: -24px; top: -24px; width: 84px; height: 84px;
  border-radius: 50%; background: var(--primary-soft); opacity: .55;
}
.qa-stat.is-success::after { background: var(--success-soft); }
.qa-stat.is-warning::after { background: var(--warning-soft); }
.qa-stat.is-danger::after  { background: var(--danger-soft); }
.qa-stat.is-violet::after  { background: var(--violet-soft); }
.qa-stat .qs-label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.qa-stat .qs-label i { font-size: 13px; }
.qa-stat .qs-value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin: 7px 0 2px; line-height: 1.15; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.qa-stat .qs-value small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.qa-stat .qs-foot { font-size: 12px; color: var(--text-3); position: relative; z-index: 1; }

/* 进度条 */
.qa-progress { height: 7px; background: #eef2f8; border-radius: 999px; overflow: hidden; }
.qa-progress > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .5s ease; }
.qa-progress--sm { height: 5px; }
.qa-progress--lg { height: 11px; }

/* 等级大卡 */
.qa-grade {
  display: flex; align-items: center; gap: 20px; padding: 22px 24px;
  border-radius: var(--radius-lg); color: #fff; position: relative; overflow: hidden;
  margin-bottom: 18px;
}
.qa-grade::after {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 200px; height: 200px;
  border-radius: 50%; background: rgba(255,255,255,.12);
}
.qa-grade .qg-icon { font-size: 40px; opacity: .95; }
.qa-grade .qg-name { font-size: 27px; font-weight: 700; letter-spacing: 1px; line-height: 1.2; }
.qa-grade .qg-desc { font-size: 13px; opacity: .92; }
.qa-grade .qg-score { margin-left: auto; text-align: right; position: relative; z-index: 1; }
.qa-grade .qg-score b { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qa-grade .qg-score span { display: block; font-size: 12.5px; opacity: .9; }

/* ---------------- 12. 步骤条 ---------------- */
.qa-steps { display: flex; align-items: flex-start; gap: 0; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px; }
.qa-step { flex: 1; min-width: 120px; position: relative; padding: 0 6px; text-align: center; }
.qa-step::before {
  content: ''; position: absolute; top: 15px; left: 0; right: 50%; height: 2px; background: var(--border-strong);
}
.qa-step::after {
  content: ''; position: absolute; top: 15px; left: 50%; right: 0; height: 2px; background: var(--border-strong);
}
.qa-step:first-child::before, .qa-step:last-child::after { display: none; }
.qa-step .st-dot {
  width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 7px;
  background: var(--surface); border: 2px solid var(--border-strong); color: var(--text-3);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
  position: relative; z-index: 1; transition: all .2s;
}
.qa-step .st-name { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.qa-step.is-done .st-dot { background: var(--success); border-color: var(--success); color: #fff; }
.qa-step.is-done::before, .qa-step.is-done::after { background: var(--success); }
.qa-step.is-active .st-dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-ring); }
.qa-step.is-active::before { background: var(--success); }
.qa-step.is-active .st-name { color: var(--primary); font-weight: 600; }

/* ---------------- 13. 质检作答 ---------------- */
.qa-dim { margin-bottom: 22px; }
.qa-dim-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: linear-gradient(90deg, #f8fafc, #ffffff);
  border: 1px solid var(--border); border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.qa-dim-head .dh-ico {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.qa-dim-head h3 { margin: 0; font-size: 15.5px; }
.qa-dim-head .dh-intro { font-size: 12.5px; color: var(--text-3); line-height: 1.6; margin: 2px 0 0; }
.qa-dim-head .dh-score { margin-left: auto; text-align: right; flex-shrink: 0; }
.qa-dim-head .dh-score b { font-size: 20px; color: var(--primary); font-variant-numeric: tabular-nums; }
.qa-dim-head .dh-score span { display: block; font-size: 11.5px; color: var(--text-3); }
.qa-dim-body { border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); overflow: hidden; }

.qa-item { border-bottom: 1px solid var(--border); }
.qa-item:last-child { border-bottom: 0; }
.qa-item-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 18px 10px; background: #fcfdff; }
.qa-item-head .ih-idx {
  width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-3); font-size: 11.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.qa-item-head h4 { margin: 0; font-size: 14px; }
.qa-item-head .ih-score { margin-left: auto; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.qa-item-head .ih-score b { font-size: 15px; color: var(--primary); font-variant-numeric: tabular-nums; }

.qa-guide {
  margin: 0 18px 12px 50px; padding: 10px 13px;
  background: #f8fafc; border-left: 3px solid var(--info); border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 12.5px; color: var(--text-2); line-height: 1.75;
}
.qa-guide b { color: var(--info); }

.qa-qlist { padding: 0 18px 14px 50px; }
.qa-q {
  display: flex; align-items: flex-start; gap: 14px; padding: 10px 12px;
  border-radius: var(--radius-sm); transition: background .15s;
  border: 1px solid transparent;
}
.qa-q + .qa-q { margin-top: 2px; }
.qa-q:hover { background: #fafbfe; }
.qa-q.is-ng { background: var(--danger-soft); border-color: #fecaca; }
.qa-q.is-na { opacity: .62; }
.qa-q .qq-main { flex: 1; min-width: 0; }
.qa-q .qq-text { font-size: 13.5px; color: var(--text); line-height: 1.6; }
.qa-q .qq-text .qq-crit {
  display: inline-flex; align-items: center; gap: 3px; margin-right: 6px;
  background: var(--danger); color: #fff; font-size: 10.5px; padding: 1px 6px;
  border-radius: 4px; font-weight: 600; vertical-align: 1px;
}
.qa-q .qq-text .qq-photo { color: var(--text-3); font-size: 11.5px; margin-left: 5px; }
.qa-q .qq-hint { font-size: 12px; color: var(--text-3); margin-top: 3px; line-height: 1.6; padding-left: 10px; border-left: 2px solid var(--border); }
.qa-q .qq-remark { margin-top: 8px; }
.qa-q .qq-remark textarea { font-size: 13px; min-height: 54px; }
.qa-q .qq-photos { margin-top: 8px; }
.qa-opts { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.qa-opt { position: relative; cursor: pointer; }
.qa-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.qa-opt span {
  display: flex; align-items: center; gap: 5px; padding: 6px 13px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-2); background: var(--surface); transition: all .14s;
  white-space: nowrap;
}
.qa-opt span:hover { border-color: #b9c8de; background: var(--surface-2); }
.qa-opt input:checked + span.v-yes { background: var(--success); border-color: var(--success); color: #fff; font-weight: 600; }
.qa-opt input:checked + span.v-no  { background: var(--danger);  border-color: var(--danger);  color: #fff; font-weight: 600; }
.qa-opt input:checked + span.v-na  { background: #64748b;        border-color: #64748b;        color: #fff; font-weight: 600; }
.qa-opt input:focus-visible + span { box-shadow: 0 0 0 3px var(--primary-ring); }

/* 实时汇总浮条 */
.qa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 700;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 14px 18px; min-width: 250px;
}
.qa-float .qf-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); padding: 2px 0; }
.qa-float .qf-row b { font-variant-numeric: tabular-nums; color: var(--text); }
.qa-float .qf-total { font-size: 22px; font-weight: 700; color: var(--primary); line-height: 1.2; }

/* ---------------- 14. 照片 ---------------- */
.qa-photos { display: flex; gap: 10px; flex-wrap: wrap; }
.qa-photo {
  position: relative; width: 96px; height: 96px; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border); background: var(--surface-2);
  cursor: zoom-in;
}
.qa-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qa-photo .qp-del {
  position: absolute; top: 3px; right: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: rgba(15,23,42,.72); color: #fff; border: 0; cursor: pointer;
  font-size: 11px; display: flex; align-items: center; justify-content: center; padding: 0;
}
.qa-photo .qp-del:hover { background: var(--danger); }
.qa-photo .qp-tag {
  position: absolute; left: 3px; bottom: 3px; font-size: 10px; padding: 1px 5px;
  border-radius: 3px; background: rgba(15,23,42,.7); color: #fff;
}
.qa-uploader {
  width: 96px; height: 96px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); cursor: pointer; background: var(--surface-2); transition: all .15s;
  font-size: 11.5px; text-align: center;
}
.qa-uploader:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.qa-uploader i { font-size: 18px; }
.qa-uploader.is-busy { pointer-events: none; opacity: .7; }

/* 前后对比 */
.qa-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qa-compare-col { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.qa-compare-col .cc-head {
  padding: 8px 12px; font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--border);
}
.qa-compare-col--before .cc-head { background: var(--danger-soft); color: #b91c1c; }
.qa-compare-col--after  .cc-head { background: var(--success-soft); color: #15803d; }
.qa-compare-col .cc-body { padding: 10px; }
.qa-compare-col .cc-body .qa-photo { width: 100%; height: 150px; }

/* 灯箱 */
.qa-lightbox {
  position: fixed; inset: 0; background: rgba(8,13,25,.9); z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 32px;
}
.qa-lightbox.is-open { display: flex; }
.qa-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.qa-lightbox .lb-close {
  position: absolute; top: 20px; right: 24px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 0; color: #fff; font-size: 19px; cursor: pointer;
}
.qa-lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.14);
  border: 0; color: #fff; font-size: 20px; cursor: pointer;
}
.qa-lightbox .lb-prev { left: 20px; }
.qa-lightbox .lb-next { right: 20px; }

/* ---------------- 15. 图表容器 ---------------- */
.qa-chart { position: relative; height: 300px; }
.qa-chart--sm { height: 220px; }
.qa-chart--radar { height: 360px; }

/* ---------------- 16. 提示与空态 ---------------- */
.alert {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 14px;
  border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.65;
  margin-bottom: 14px; border: 1px solid transparent;
}
.alert i { margin-top: 2px; }
.alert-info    { background: var(--primary-soft); border-color: #dbeafe; color: #1e40af; }
.alert-success { background: var(--success-soft); border-color: #d1fae5; color: #15803d; }
.alert-warning { background: var(--warning-soft); border-color: #fde68a; color: #b45309; }
.alert-danger  { background: var(--danger-soft);  border-color: #fecaca; color: #b91c1c; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.qa-empty-state { text-align: center; padding: 52px 24px; }
.qa-empty-state i { font-size: 42px; color: #cbd5e1; margin-bottom: 14px; display: block; }
.qa-empty-state h3 { font-size: 16px; color: var(--text-2); }
.qa-empty-state p { color: var(--text-3); font-size: 13.5px; margin-bottom: 16px; }

/* 筛选栏 */
.qa-filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px;
}
.qa-filters .qf-label { font-size: 12.5px; color: var(--text-3); }

/* 问题卡片 */
.qa-issue { border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--surface); overflow: hidden; }
.qa-issue-head { display: flex; align-items: center; gap: 10px; padding: 11px 15px; flex-wrap: wrap; }
.qa-issue-head .ii-title { font-weight: 600; font-size: 13.5px; }
.qa-issue-head .ii-right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qa-issue-body { padding: 0 15px 14px; font-size: 13px; color: var(--text-2); line-height: 1.75; }
.qa-issue-body .ib-label { color: var(--text-3); }
.qa-issue--critical { border-left-color: var(--danger); }
.qa-issue--major { border-left-color: #ea580c; }
.qa-issue--minor { border-left-color: var(--info); }

/* 时间线 */
.qa-timeline { position: relative; padding-left: 24px; }
.qa-timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.qa-tl-item { position: relative; padding-bottom: 16px; }
.qa-tl-item::before {
  content: ''; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong);
}
.qa-tl-item.is-done::before { background: var(--success); border-color: var(--success); }
.qa-tl-item.is-active::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.qa-tl-item .tl-title { font-size: 13.5px; font-weight: 600; }
.qa-tl-item .tl-meta { font-size: 12px; color: var(--text-3); }
.qa-tl-item .tl-body { font-size: 12.5px; color: var(--text-2); margin-top: 4px; line-height: 1.7; }

/* 键值列表 */
.qa-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 24px; }
.qa-kv .kv-item { font-size: 13px; }
.qa-kv .kv-item .k { color: var(--text-3); font-size: 12.5px; display: block; margin-bottom: 2px; }
.qa-kv .kv-item .v { color: var(--text); font-weight: 500; word-break: break-all; }

/* 链接卡片（暗访邀请） */
.qa-linkbox {
  display: flex; gap: 8px; align-items: center; background: var(--surface-2);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px;
}
.qa-linkbox input { flex: 1; border: 0; background: transparent; font-family: var(--mono); font-size: 12.5px; color: var(--text-2); outline: none; min-width: 0; }

/* ---------------- 17. 登录页（居中卡片式） ---------------- */
.qa-login {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px 18px 22px;
  background:
    radial-gradient(860px 480px at 88% -12%, rgba(59,130,246,.38), transparent 62%),
    radial-gradient(680px 420px at -12% 112%, rgba(37,99,235,.30), transparent 62%),
    linear-gradient(160deg, #0c1830 0%, #12264c 55%, #1a3a6b 100%);
}
.qa-login-card {
  width: 100%; max-width: 400px;
  background: var(--surface); border-radius: 20px;
  box-shadow: 0 24px 70px -18px rgba(4,12,28,.55);
  padding: 34px 30px 24px; text-align: center;
}
.qa-login-card .ql-logo { height: 40px; width: auto; margin: 0 auto 16px; display: block; }
.qa-login-card .ql-name { font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.qa-login-card .ql-sub { color: var(--text-3); font-size: 12.5px; margin: 5px 0 20px; letter-spacing: .4px; }
.qa-login-card .ql-form { text-align: left; }
.qa-login-card .form-control { padding: 10px 13px; font-size: 15px; }
.qa-login-card .btn-lg { margin-top: 4px; padding: 12px 22px; font-size: 15.5px; }
.qa-login-card .ql-foot {
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-3); line-height: 1.9;
}
.qa-login-card .ql-foot a { color: var(--text-3); text-decoration: underline; text-decoration-color: var(--border-strong); }
.qa-login-card .ql-foot a:hover { color: var(--primary); }
.qa-login-brandline {
  margin-top: 22px; color: rgba(255,255,255,.52); font-size: 12px;
  letter-spacing: .3px; text-align: center; line-height: 1.8; max-width: 460px;
}

/* 暗访公开页 */
.qa-public { min-height: 100vh; background: var(--bg); padding: 26px 16px 60px; }
.qa-public-wrap { max-width: 840px; margin: 0 auto; }
.qa-public-head { text-align: center; margin-bottom: 22px; }
.qa-public-head .pb-logo { height: 34px; margin-bottom: 12px; }
.qa-public-head h1 { font-size: 23px; margin-bottom: 6px; }
.qa-public-head p { color: var(--text-3); font-size: 13.5px; }

/* ---------------- 18. 移动端适配 ---------------- */
@media (max-width: 1080px) {
  .qa-grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .qa-grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .qa-login { padding: 22px 14px 16px; justify-content: flex-start; }
  .qa-login-card { max-width: 440px; padding: 28px 22px 20px; border-radius: 16px; }
  .qa-login-card .ql-logo { height: 34px; margin-bottom: 12px; }
  .qa-login-card .ql-name { font-size: 17px; }
  .qa-login-brandline { margin-top: 16px; font-size: 11.5px; }
}
@media (max-width: 860px) {
  .qa-nav { transform: translateX(-100%); transition: transform .24s ease; box-shadow: var(--shadow-lg); }
  .qa-nav.is-open { transform: translateX(0); }
  .qa-main { margin-left: 0; }
  .qa-burger { display: inline-flex; }
  .qa-content { padding: 14px 12px calc(40px + env(safe-area-inset-bottom)); }
  .qa-grid--2, .qa-grid--3, .qa-grid--4 { grid-template-columns: 1fr; }
  .qa-grid-2 { grid-template-columns: 1fr; }
  .qa-compare { grid-template-columns: 1fr; }
  .qa-q { flex-direction: column; gap: 9px; }
  .qa-qlist { padding-left: 12px; padding-right: 12px; }
  .qa-guide { margin-left: 12px; margin-right: 12px; }
  .qa-item-head { padding-left: 12px; padding-right: 12px; }
  .qa-float { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); min-width: 0; }
  .qa-float .qf-total { font-size: 19px; }
  .qa-steps .st-name { font-size: 11px; }
  .qa-page-head h1 { font-size: 18px; }
  .qa-header { padding: 0 12px; gap: 8px; }
  .qa-header-title { font-size: 13px; }
  .qa-header-title .ht-org { display: none; }
  .qa-grade { padding: 18px 16px; gap: 14px; }
  .qa-grade .qg-icon { font-size: 28px; }
  .qa-grade .qg-name { font-size: 21px; }
  .qa-grade .qg-score b { font-size: 24px; }
  .qa-user { padding: 4px 8px 4px 5px; gap: 6px; }
  .qa-user .qu-name { display: none; }
  /* iOS：输入框 16px 起，避免聚焦自动放大 */
  .form-control, textarea.form-control, select.form-control { font-size: 16px; }
  /* 维度标题吸顶，长清单滚动时保留上下文 */
  .qa-dim-head { position: sticky; top: var(--header-h); z-index: 30; border-radius: 0; }
  /* 触控目标加大 */
  .qa-opt span { padding: 9px 14px; font-size: 13.5px; }
  .qa-nav-item { padding: 11px 18px; font-size: 14.5px; }
  .btn { padding: 9px 15px; }
  .qa-burger { font-size: 20px; padding: 8px 10px; }
  /* 表格密度与横向滚动提示 */
  .qa-table { font-size: 12.5px; }
  .qa-table thead th { padding: 9px 10px; }
  .qa-table tbody td { padding: 10px 10px; }
  .qa-compare-col .cc-body .qa-photo { height: 120px; }
  .qa-lightbox { padding: 14px; }
  .qa-lightbox .lb-nav { width: 38px; height: 38px; font-size: 17px; }
  .qa-lightbox .lb-prev { left: 10px; }
  .qa-lightbox .lb-next { right: 10px; }
  .qa-lightbox img { max-width: 96vw; max-height: 80vh; }
  .qa-stats { gap: 10px; }
  .qa-stat { padding: 13px 14px; }
}
@media (max-width: 520px) {
  .qa-photo, .qa-uploader { width: 78px; height: 78px; }
  .qa-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .qa-stat .qs-value { font-size: 21px; }
  .qa-opt span { padding: 9px 11px; font-size: 13px; }
  .qa-opts { gap: 6px; }
  /* 顶栏「新建质检」只留图标，给标题让位 */
  .qa-header-actions .btn-primary .btn-txt { display: none; }
  .qa-header-actions .btn-primary { padding: 7px 10px; }
  .qa-grade .qg-score b { font-size: 21px; }
  .qa-grade .qg-name { font-size: 19px; }
  .qa-content { padding-left: 10px; padding-right: 10px; }
  .qa-card-head { padding: 12px 14px; }
  .qa-card-body { padding: 14px; }
  .qa-issue-head { padding: 10px 12px; }
  .qa-issue-body { padding: 0 12px 12px; }
}

/* ---------------- 19. 补充组件 ---------------- */
.qa-pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.qa-pager .pg-info { font-size: 12.5px; color: var(--text-3); }
.qa-grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 6px; margin-top: 4px; }
.qa-card-sub { font-size: 12.5px; color: var(--text-3); font-weight: 400; margin-left: auto; }
.qa-stat.is-primary::after { background: var(--primary-soft); }

.qa-kv-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qa-kv-list .kv { display: flex; gap: 16px; padding: 11px 14px; font-size: 13px; border-bottom: 1px solid var(--border-soft); background: #fff; }
.qa-kv-list .kv:last-child { border-bottom: 0; }
.qa-kv-list .kv > span { flex: 0 0 152px; color: var(--text-3); font-size: 12.5px; }
.qa-kv-list .kv > b { flex: 1 1 auto; font-weight: 500; color: var(--text); line-height: 1.65; }
@media (max-width: 760px) {
  .qa-grid-2 { grid-template-columns: 1fr; }
  .qa-kv-list .kv { flex-direction: column; gap: 3px; }
  .qa-kv-list .kv > span { flex: none; }
}

/* ---------------- 20. 打印 ---------------- */
@media print {
  .qa-nav, .qa-header, .qa-float, .btn-group, .qa-filters, .qa-page-head .qh-actions { display: none !important; }
  .qa-main { margin-left: 0 !important; }
  .qa-content { padding: 0 !important; }
  .qa-card { box-shadow: none !important; break-inside: avoid; }
  body { background: #fff; }
}
