/* 中科微光 · 工作日志平台 一期 —— 样式（按开发文档 §5 设计规范实现） */
:root {
  --primary: #0F766E;
  --primary-dark: #0B5A54;
  --primary-bg: #E6F4F2;
  --accent: #C2410C;
  --accent-bg: #FDF1E8;
  --text: #1F2937;
  --text-2: #4B5563;
  --text-3: #9CA3AF;
  --border: #E5E7EB;
  --bg: #F7F8F9;
  --card: #FFFFFF;
  --fact: #0F766E;
  --analysis: #B45309;
  --good: #0F766E;
  --vg: #1D4ED8;
  --ex: #7C3AED;
}
html { font-size: 14px; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
button { cursor: pointer; font-family: inherit; }
a { color: var(--primary); text-decoration: none; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 54px; display: flex; align-items: center; gap: 18px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap; }
.logo i { width: 10px; height: 10px; background: var(--primary); border-radius: 3px; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav button {
  border: 0; background: transparent; padding: 8px 12px; border-radius: 6px;
  color: var(--text-2); font-size: 14px; white-space: nowrap;
}
.nav button:hover { background: #F3F4F6; }
.nav button.active { color: var(--primary); background: var(--primary-bg); font-weight: 600; }
.nav button.disabled { color: #C9CED6; cursor: not-allowed; }
.user-box { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.user-box .u-name { font-weight: 600; color: var(--text); }
.btn-logout { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 4px 10px; font-size: 12.5px; color: var(--text-2); }
.btn-logout:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 通用 ---------- */
.page { display: none; padding: 18px 0 90px; }
.page.show { display: block; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; }
.page-head .sub { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.card h3.sec-title, .sec-title { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 10px; }
.sec-title::before { content: ""; width: 3px; height: 14px; background: var(--primary); border-radius: 2px; }
.muted { color: var(--text-3); font-size: 12.5px; }
.btn {
  background: #fff; border: 1px solid var(--border); border-radius: 7px;
  padding: 7px 16px; font-size: 14px; color: var(--text);
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-warn { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-warn:hover { background: #A8360B; }
.btn-sm { padding: 3px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-ghost { border: 0; background: transparent; color: var(--primary); font-size: 13px; padding: 3px 8px; border-radius: 6px; }
.btn-ghost:hover { background: var(--primary-bg); }
.badge {
  display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 20px; font-weight: 600;
}
.badge-fact { background: var(--primary-bg); color: var(--fact); border: 1px solid #BEE3DF; }
.badge-analysis { background: #FEF3E2; color: var(--analysis); border: 1px solid #F5D9B0; }
.badge-gray { background: #F3F4F6; color: var(--text-2); }
.badge-good { background: var(--primary-bg); color: var(--good); border: 1px solid #BEE3DF; }
.badge-vg { background: #EEF2FF; color: var(--vg); border: 1px solid #C7D2FE; }
.badge-ex { background: #F5F3FF; color: var(--ex); border: 1px solid #DDD6FE; }
.badge-concl { font-size: 11.5px; padding: 0 7px; border-radius: 10px; background: var(--primary-bg); color: var(--primary); border: 1px solid #BEE3DF; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-bg); color: var(--primary);
  border-radius: 6px; padding: 1px 8px; font-size: 12px; margin: 0 6px 4px 0; border: 1px solid transparent;
  cursor: pointer;
}
.tag .x { color: var(--text-3); font-weight: 700; padding: 0 1px; }
.tag .x:hover { color: #B91C1C; }
.tag-unconfirmed { background: #F9FAFB; color: var(--text-2); border: 1px dashed #9CA3AF; }
.tag-unconfirmed:hover { color: var(--primary); border-color: var(--primary); }
.person-chip {
  display: inline-block; background: #F3F4F6; color: var(--text-2);
  border-radius: 12px; padding: 1px 10px; font-size: 12.5px; margin: 0 6px 4px 0; cursor: pointer; border: 0;
}
.person-chip:hover { background: var(--primary-bg); color: var(--primary); }
.filter-chip {
  display: inline-block; border: 1px solid var(--border); background: #fff; border-radius: 14px;
  padding: 2px 12px; font-size: 12.5px; color: var(--text-2); margin: 0 6px 6px 0;
}
.filter-chip.on { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.notice-inline { background: #FEF3E2; border: 1px solid #F5D9B0; color: #92400E; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; margin-bottom: 12px; }
.empty-tip { text-align: center; color: var(--text-3); padding: 40px 0; font-size: 13px; }

/* ---------- 弹层 / Toast ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(17,24,39,.42); z-index: 90;
  display: none; align-items: center; justify-content: center;
}
.mask.show { display: flex; }
.modal {
  background: #fff; width: 560px; max-width: 92vw; max-height: 84vh; overflow: auto;
  border-radius: 12px; padding: 20px 22px;
}
.modal-close { float: right; border: 0; background: transparent; font-size: 18px; color: var(--text-3); }
.modal h3 { font-size: 16px; margin-bottom: 10px; }
#toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; border-radius: 8px; padding: 8px 18px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 120; max-width: 80vw;
}
#toast.show { opacity: 1; }

/* ---------- 日志填写页 ---------- */
.fill-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.fill-date { font-size: 20px; font-weight: 700; }
.save-tip { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.fill-hint { color: var(--text-3); font-size: 12.5px; }
.aff-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.aff-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.aff-head .icon { width: 12px; height: 12px; border-radius: 3px; background: var(--primary); }
.aff-head .icon.dept { background: #9CA3AF; }
.aff-head .aff-name { font-weight: 600; font-size: 14.5px; }
.aff-head .spring { flex: 1; }
.item-block { border-top: 1px dashed var(--border); padding: 12px 0 6px; }
.item-block:first-of-type { border-top: 0; }
.item-title { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; margin-bottom: 6px; }
.item-title .spring { flex: 1; }
.item-text {
  width: 100%; min-height: 74px; resize: vertical; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 11px; font-size: 14px; line-height: 1.6; color: var(--text);
}
.item-text:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
.item-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.hours-input { width: 78px; text-align: center; border: 1px solid var(--border); border-radius: 7px; padding: 4px 6px; font-size: 14px; }
.hours-input:focus { outline: none; border-color: var(--primary); }
.att-chip { display: inline-flex; align-items: center; gap: 4px; background: #F3F4F6; border-radius: 6px; padding: 1px 8px; font-size: 12px; color: var(--text-2); }
.att-chip .x { cursor: pointer; color: var(--text-3); font-weight: 700; }
.att-chip .x:hover { color: #B91C1C; }
.cats-row { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 12.5px; color: var(--text-3); }
.fill-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: #fff; border-top: 1px solid var(--border);
}
.fill-sticky-inner { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fill-sticky .total { font-size: 14.5px; font-weight: 600; }
.fill-sticky .warn { color: var(--accent); font-size: 12.5px; }
.fill-sticky .ok-range { color: var(--text-3); font-size: 12.5px; }
.fill-sticky .spring { flex: 1; }
.ai-panel { border: 1px solid #F5D9B0; background: #FFFDF8; border-radius: 10px; margin-bottom: 14px; overflow: hidden; }
.ai-panel-head { background: #FDF6EC; color: #92400E; padding: 10px 14px; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; }
.ai-panel-head .spring { flex: 1; }
.ai-cat-sync { padding: 10px 14px; font-size: 12.5px; color: var(--text-2); border-bottom: 1px dashed #F1E3CC; }
.ai-sugg { padding: 10px 14px; border-bottom: 1px dashed #F1E3CC; display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.ai-sugg::before { content: "•"; color: var(--accent); font-weight: 700; }
.ai-sugg .txt { flex: 1; }
.ai-panel-foot { padding: 10px 14px; display: flex; justify-content: flex-end; gap: 10px; }
.flash { box-shadow: 0 0 0 3px rgba(15,118,110,.5) !important; transition: box-shadow .3s; border-radius: 8px; }
.success-card { text-align: center; padding: 36px 20px; }
.success-card .big-check { font-size: 40px; color: var(--primary); }
.success-card h2 { font-size: 18px; margin: 8px 0 6px; }

/* ---------- 我的日志 ---------- */
.adopt-chip { display: inline-block; background: var(--primary-bg); color: var(--primary); border-radius: 16px; padding: 3px 14px; font-size: 12.5px; font-weight: 600; }
.log-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.log-table th { background: #FAFAFA; font-size: 13px; color: var(--text-2); text-align: left; padding: 10px 14px; font-weight: 500; }
.log-table td { padding: 11px 14px; border-top: 1px solid var(--border); font-size: 13.5px; }
.st-ok { color: var(--primary); font-weight: 600; }
.st-miss { color: #B91C1C; font-weight: 600; }

/* ---------- 主管首页 ---------- */
.tab-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.tab-toggle button { border: 0; background: #fff; padding: 6px 16px; font-size: 13px; color: var(--text-2); }
.tab-toggle button.on { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.sub-strip { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; font-size: 13.5px; margin-bottom: 14px; }
.sub-strip b.n-ok { color: var(--primary); }
.sub-strip b.n-miss { color: #B91C1C; }
.sig-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.sig-half { padding: 13px 16px; }
.sig-half + .sig-half { border-top: 1px solid var(--border); }
.sig-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.sig-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; flex-wrap: wrap; }
.sig-row .up { color: #B91C1C; font-size: 12px; }
.trend-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 24px; }
.trend-bars span { width: 7px; background: var(--accent); opacity: .7; border-radius: 1px; display: inline-block; }
.ratio-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.ratio-row .r-name { width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ratio-row .r-name a { color: var(--text-2); }
.ratio-row .r-name a:hover { color: var(--primary); }
.ratio-row .r-track { flex: 1; height: 10px; background: #F3F4F6; border-radius: 5px; overflow: hidden; }
.ratio-row .r-fill { height: 100%; background: var(--primary); opacity: .5; border-radius: 5px; }
.ratio-row .r-fill.warm { background: var(--accent); opacity: .55; }
.ratio-row .r-fill.gray { background: #9CA3AF; opacity: .6; }
.ratio-row .r-pc { width: 88px; text-align: right; color: var(--text-2); font-size: 12.5px; }
.status-item { border-top: 1px dashed var(--border); padding: 12px 0; }
.status-item:first-child { border-top: 0; padding-top: 4px; }
.si-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 12.5px; }
.si-text { font-size: 14px; margin: 2px 0 6px; }
.si-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); }
.sys-ana { font-size: 12px; color: var(--text-3); }
.blk-group { font-size: 14px; color: var(--text-3); margin: 10px 0 2px; font-weight: 500; }
.refs-box { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 8px; display: none; }
.refs-box.open { display: block; }
.ref-item { background: #FAFAFA; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 12.5px; }
.ref-item b { font-size: 12.5px; }
.ref-item .rlink { color: var(--primary); cursor: pointer; }

/* ---------- 视角布局 ---------- */
.project-source-section { margin-bottom: 18px; }
.project-source-head, .platform-project-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 10px;
}
.project-source-head h2, .platform-project-head h2 { font-size: 15px; line-height: 1.4; }
.project-source-head p, .platform-project-head p { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.project-source-count {
  flex-shrink: 0; color: var(--text-2); background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; font-variant-numeric: tabular-nums;
}
.report-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.report-project-card {
  min-height: 92px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  gap: 7px; background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 13px 14px; color: var(--text); box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: transform .16s cubic-bezier(.23,1,.32,1), box-shadow .16s cubic-bezier(.23,1,.32,1), border-color .16s;
}
.report-project-card:hover { border-color: #9DCEC8; box-shadow: 0 5px 14px rgba(15,118,110,.09); transform: translateY(-1px); }
.report-project-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.report-project-card:active { transform: scale(.98); }
.report-project-card strong { font-size: 14.5px; font-weight: 650; line-height: 1.35; }
.project-source-badge {
  color: var(--primary); background: var(--primary-bg); border-radius: 5px;
  padding: 2px 7px; font-size: 11px; font-weight: 600;
}
.report-project-open { color: var(--text-3); font-size: 12px; }
.report-project-card:hover .report-project-open { color: var(--primary); }
.platform-project-head { margin: 4px 0 10px; }
.split { display: flex; gap: 16px; align-items: flex-start; }
.side-list { width: 270px; flex-shrink: 0; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.side-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 14px; font-size: 13.5px; color: var(--text); border-left: 3px solid transparent; }
.side-item:hover { background: #F9FAFB; }
.side-item.on { background: var(--primary-bg); border-left-color: var(--primary); font-weight: 600; }
.side-item .spring { flex: 1; }
.side-item .own { color: var(--text-3); font-size: 12px; font-weight: 400; }
.side-item .star { color: var(--accent); }
.side-foot { display: block; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--border); background: #FAFAFA; padding: 10px 14px; font-size: 13px; color: var(--text-2); }
.side-foot:hover { color: var(--primary); }
.main-pane { flex: 1; min-width: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.stat-card .v { font-size: 20px; font-weight: 700; }
.stat-card .k { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.stat-grid.three { grid-template-columns: repeat(3, 1fr); }
.mini-bars { display: flex; align-items: flex-end; gap: 10px; height: 74px; padding: 4px 2px 0; }
.mini-bars .col { flex: 1; max-width: 34px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mini-bars .bar { width: 100%; background: var(--primary); opacity: .85; border-radius: 3px 3px 0 0; }
.mini-bars .bar.zero { background: #E5E7EB; }
.mini-bars .lbl { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.follow-btn { background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 5px 14px; font-size: 13px; color: var(--text-2); }
.follow-btn.on { background: var(--accent-bg); border-color: #F5D9B0; color: var(--accent); font-weight: 600; }
.filter-strip { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 10px; font-size: 12.5px; color: var(--text-3); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px 16px; text-align: center; font-size: 14px; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; }
.cat-card:hover { border-color: var(--primary); color: var(--primary); }
.timeline-day { border: 1px solid var(--border); border-radius: 10px; background: var(--card); margin-bottom: 10px; overflow: hidden; }
.timeline-head { width: 100%; display: flex; align-items: center; border: 0; background: transparent; padding: 11px 14px; font-size: 13.5px; text-align: left; }
.timeline-head .spring { flex: 1; }
.timeline-body { display: none; padding: 0 14px 12px; }
.timeline-body.open { display: block; }
.quality-count { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }

/* ---------- 问答 ---------- */
.qa-scope { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 9px 14px; font-size: 12.5px; color: var(--text-2); margin-bottom: 14px; }
.qa-layout { display: flex; gap: 16px; align-items: stretch; height: calc(100vh - 250px); min-height: 420px; }
.convo-list { width: 230px; flex-shrink: 0; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: auto; }
.convo-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 14px; font-size: 13px; border-left: 3px solid transparent; }
.convo-item.on { background: var(--primary-bg); border-left-color: var(--primary); font-weight: 600; }
.qa-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.qa-msgs { flex: 1; overflow: auto; padding: 16px; }
.qa-bubble { max-width: 92%; margin-bottom: 12px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; }
.qa-user { background: var(--primary); color: #fff; margin-left: auto; border-bottom-right-radius: 3px; }
.qa-ai { background: #F8FAF9; border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.qa-ai .blk { margin: 8px 0; }
.qa-ai .blk-list { margin: 4px 0 0; padding-left: 0; list-style: none; }
.qa-ai .blk-list li { padding-left: 12px; position: relative; margin: 3px 0; }
.qa-ai .blk-list li::before { content: "·"; position: absolute; left: 2px; font-weight: 700; }
.ref-card {
  display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--border);
  border-left: 3px solid var(--primary); border-radius: 8px; padding: 7px 11px; font-size: 12.5px; margin: 6px 0; color: var(--text-2);
}
.ref-card:hover { background: var(--primary-bg); }
.qa-input-row { border-top: 1px solid var(--border); padding: 12px; display: flex; gap: 10px; }
.qa-input-row textarea { flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; resize: none; height: 42px; }
.qa-input-row textarea:focus { outline: none; border-color: var(--primary); }
.example-qs { padding: 0 16px 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.example-qs button { border: 1px dashed var(--border); background: #fff; border-radius: 16px; padding: 4px 14px; font-size: 12.5px; color: var(--text-2); }
.example-qs button:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 登录 / 管理 ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--text-2); font-weight: 500; background: #FAFAFA; }

@media (max-width: 900px) {
  .split, .qa-layout { flex-direction: column; height: auto; }
  .side-list, .convo-list { width: 100%; }
  .nav button { padding: 8px 8px; font-size: 13px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 8px 14px; }
  .report-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .report-project-grid { grid-template-columns: 1fr; }
  .project-source-head, .platform-project-head { align-items: flex-start; }
}

/* ============ 视觉与移动端打磨（覆盖层） ============ */
body { -webkit-font-smoothing: antialiased; }
.card { box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: box-shadow .18s; }
.card:hover { box-shadow: 0 3px 10px rgba(15,23,42,.06); }
.btn, .btn-primary, .btn-warn, .follow-btn, .filter-chip { transition: all .15s ease; }
.btn:active, .btn-primary:active { transform: translateY(1px); }
.nav { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav::-webkit-scrollbar { display: none; }
.modal { border-radius: 14px; box-shadow: 0 18px 50px rgba(15,23,42,.22); animation: modalIn .18s ease; }
@keyframes modalIn { from { transform: translateY(10px); opacity: .4; } to { transform: none; opacity: 1; } }
.stat-card { transition: box-shadow .18s; }
.cat-card { transition: all .15s; }
.cat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15,118,110,.10); }
.side-item, .convo-item { transition: background .15s; }
.qa-bubble { animation: msgIn .16s ease; }
@keyframes msgIn { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.log-table a { white-space: nowrap; }

@media (max-width: 900px) {
  html { font-size: 14px; }
  .page { padding-bottom: 110px; }
  .topbar-inner { flex-wrap: nowrap; overflow: hidden; gap: 10px; padding: 0 12px; height: 50px; }
  .logo span-text { display: none; }
  .logo { font-size: 14.5px; }
  .user-box #uRole { display: none; }
  .item-text { font-size: 16px; }  /* 防 iOS 聚焦缩放 */
  .hours-input { min-height: 38px; }
  .btn, .btn-primary, .btn-warn { min-height: 40px; }
  .btn-sm { min-height: 32px; }
  .fill-sticky-inner { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .fill-sticky .ok-range { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .stat-grid, .stat-grid.three { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card .v { font-size: 17px; }
  .log-table, .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
  .ratio-row .r-name { width: 110px; }
  .ratio-row .r-pc { width: 70px; }
  .mini-bars { height: 60px; }
  .qa-layout { height: auto; }
  .qa-main { min-height: 60vh; }
  .convo-list { max-height: 130px; }
  .modal { max-height: 88vh; width: 94vw; padding: 16px; }
  .sig-row { gap: 6px; }
  .timeline-head { font-size: 13px; }
  .item-meta { gap: 8px; }
  .aff-card { padding: 12px; }
}
@media (max-width: 520px) {
  .logo { display: none; }
  .nav { flex: 1; }
  .wrap { padding: 0 12px; }
}

/* 移动端顶栏两行布局：第一行 logo+用户，第二行导航整行滑动 */
@media (max-width: 900px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 6px 12px 0; row-gap: 0; }
  .logo { order: 1; display: flex; }
  .user-box { order: 2; margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; padding: 4px 0 6px; }
}
@media (max-width: 520px) {
  .logo { display: flex; font-size: 14px; }
  .logo .logo-text-full { display: none; }
}
@media (max-width: 520px) {
  .logo .logo-text-short { display: inline !important; }
}
