/* ================= 精益提案管理系统 · 科技蓝主题 ================= */
:root {
  --brand: #0000e2;
  --brand-600: #0000c4;
  --brand-400: #3a3aff;
  --brand-soft: #eaeafd;
  --brand-50: #f0f0ff;
  --brand-100: #e0e0ff;
  --brand-200: #c8c8ff;
  --ink: #12142b;
  --ink-2: #4a4f6a;
  --ink-3: #858aa5;
  --line: #e6e8f2;
  --bg: #f4f6fb;
  --card: #ffffff;
  --ok: #12b76a;
  --warn: #f79009;
  --danger: #e5372b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(16, 24, 64, 0.06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 64, 0.14);
  --nav-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { margin: 0; font-weight: 600; }
a { color: var(--brand); text-decoration: none; }
.hidden { display: none !important; }
.only-mobile { display: none; }

/* ---------------- 登录页 ---------------- */
.login-view {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 20% 10%, #2a2aff 0%, #0000e2 45%, #00008f 100%);
  overflow: auto; padding: 20px;
}
.login-bg {
  position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 46px 46px, 46px 46px;
  mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 30% 20%, #000 0%, transparent 70%);
}
.login-card {
  position: relative; width: 100%; max-width: 410px;
  background: #fff; border-radius: 20px; padding: 34px 30px 26px;
  box-shadow: 0 30px 70px rgba(0, 8, 80, .45);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-logo {
  width: 52px; height: 52px; border-radius: 14px; flex: 0 0 52px;
  background: linear-gradient(135deg, var(--brand-400), var(--brand));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 226, .3);
}
.login-title { font-size: 21px; letter-spacing: .5px; color: var(--ink); }
.login-sub { margin: 2px 0 0; font-size: 11px; color: var(--ink-3); letter-spacing: 1.2px; }
.login-form .field { margin-bottom: 16px; }
.login-form label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .i { position: absolute; left: 12px; color: var(--ink-3); }
.input-wrap input {
  width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 12px;
  padding: 0 42px 0 38px; font-size: 15px; outline: none; color: var(--ink); background: #fbfcff;
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,0,226,.12); background: #fff; }
.eye { position: absolute; right: 8px; background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: 6px; }
.login-extra { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin: 6px 0 18px; color: var(--ink-2); }
.check { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.check input { accent-color: var(--brand); width: 15px; height: 15px; }
.link { background: none; border: 0; color: var(--brand); font-size: 13px; cursor: pointer; padding: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px;
  font-size: 15px; cursor: pointer; font-weight: 500; transition: .15s; white-space: nowrap;
  background: #fff; color: var(--ink);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--brand-400), var(--brand)); color: #fff; box-shadow: 0 6px 16px rgba(0,0,226,.28); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn-outline:hover { background: var(--brand-50); }
.btn-ghost { background: #f3f4fb; color: var(--ink-2); border-color: var(--line); }
.btn-danger { background: #fff; color: var(--danger); border-color: #ffd5d2; }
.btn-danger:hover { background: #fff5f4; }
.btn-success { background: var(--ok); color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
#btn-login { height: 48px; font-size: 16px; letter-spacing: 3px; font-weight: 600; }
.login-demo { margin-top: 14px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-3); text-align: center; }
.login-footer { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.6); font-size: 12px; }
.login-view .login-card { position: relative; z-index: 2; }

/* 大屏登录页品牌区 */
.login-hero { display: none; color: #fff; max-width: 470px; position: relative; z-index: 2; }
.hero-badge { display: inline-block; font-size: 12px; letter-spacing: 2px; padding: 5px 12px; border-radius: 20px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); margin-bottom: 22px; }
.hero-title { font-size: 38px; line-height: 1.32; letter-spacing: 1px; font-weight: 700; }
.hero-desc { margin: 18px 0 22px; font-size: 14.5px; line-height: 1.85; color: rgba(255,255,255,.82); max-width: 420px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags span { font-size: 13px; padding: 5px 13px; border-radius: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); }
.hero-meta { display: flex; gap: 34px; margin-top: 40px; }
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta b { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-meta small { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; }

@media (min-width: 1024px) {
  .login-view { justify-content: space-between; padding: 0 8vw; }
  .login-hero { display: block; }
  .login-card { max-width: 400px; }
}

/* ---------------- 应用框架 ---------------- */
.app { min-height: 100%; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: linear-gradient(135deg, #0000e2, #00009f); color: #fff;
  display: flex; align-items: center; padding: 0 14px; gap: 8px;
  padding-top: env(safe-area-inset-top, 0px);
  box-shadow: 0 2px 12px rgba(0,0,140,.18);
}
.topbar-title { font-size: 16px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title .t-desc { font-weight: 400; opacity: .78; font-size: 13.5px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.who { font-size: 12.5px; opacity: .92; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; display: flex; border-radius: 9px; }
.icon-btn:active { background: rgba(255,255,255,.16); }

.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 222px; z-index: 60;
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; transition: transform .25s ease;
}
.sidebar-head {
  height: var(--nav-h); display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: linear-gradient(135deg, #0000e2, #00009f); color: #fff;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 34px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.brand-text b { font-size: 14px; }
.brand-text small { font-size: 11px; opacity: .8; }
.nav { flex: 1; overflow-y: auto; padding: 10px 10px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); cursor: pointer; margin-bottom: 3px; font-size: 14.5px; position: relative;
}
.nav-item svg { flex: 0 0 20px; opacity: .8; }
.nav-item:hover { background: #f3f4fb; }
.nav-item.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--brand); }
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; font-weight: 600; }
.sidebar-foot { padding: 10px; border-top: 1px solid var(--line); }
.ver { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: 8px; }
.mask { position: fixed; inset: 0; background: rgba(10,14,40,.5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
.mask.show { opacity: 1; pointer-events: auto; }

.main { margin-left: 222px; padding: 18px; min-height: calc(100vh - var(--nav-h)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; padding-bottom: var(--safe-b);
  box-shadow: 0 -2px 12px rgba(16,24,64,.06);
}
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 7px 2px 6px; color: var(--ink-3); font-size: 11px; cursor: pointer; }
.tab-item.active { color: var(--brand); font-weight: 600; }
.tab-item svg { width: 22px; height: 22px; }
.fab {
  position: fixed; right: 16px; bottom: calc(72px + var(--safe-b)); z-index: 49;
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--brand-400), var(--brand)); color: #fff;
  box-shadow: 0 8px 22px rgba(0,0,226,.4); display: flex; align-items: center; justify-content: center;
}

/* ---------------- 通用组件 ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.page-head h2 { font-size: 19px; }
.page-head .desc { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #f0f1f7; }
.card + .card { margin-top: 14px; }
.card-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-head h3 { font-size: 15px; }
.card-body { padding: 14px 16px; }
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.form-item label .req { color: var(--danger); margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 14.5px; outline: none; background: #fff; color: var(--ink);
  font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.form-item textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,0,226,.1);
}
.form-item select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23858aa5'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 20px; padding-right: 32px; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ---- 提案费用：自由输入 + 快捷标签 ---- */
.cost-field { position: relative; }
.cost-field input { padding-right: 34px; }
.cost-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; line-height: 1; border-radius: 50%; border: none; cursor: pointer;
  background: #eceefa; color: var(--ink-3); font-size: 16px; display: none;
}
.cost-field input:not(:placeholder-shown) ~ .cost-clear { display: block; }
.cost-clear:hover { background: #dfe2f4; color: var(--ink); }
.cost-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 14px; border-radius: 999px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  transition: all .15s; user-select: none;
}
.chip:hover { border-color: var(--brand-400); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(0,0,226,.22); }
.upload-block { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 12px; padding: 12px 14px 14px; }
.upload-block .photo-add { background: #fff; }
.modal-foot textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font-size: 14px; min-height: 54px; max-height: 110px; resize: none; font-family: inherit;
  outline: none; color: var(--ink); background: #fbfcff;
}
.modal-foot textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,0,226,.1); background: #fff; }
.foot-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar .grow { flex: 1; min-width: 120px; }
.spacer { flex: 1; }

.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.filters label { font-size: 12px; color: var(--ink-2); display: block; margin-bottom: 4px; }
.filters select, .filters input {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; font-size: 14px; outline: none; background: #fff;
}
.filters select:focus, .filters input:focus { border-color: var(--brand); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl th { background: #fafbff; color: var(--ink-2); font-weight: 600; font-size: 13px; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
table.tbl tbody tr:hover { background: #fafbff; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 可勾选表格 */
.tbl-select .col-chk { width: 40px; text-align: center; padding-left: 8px; padding-right: 4px; }
.tbl-select .col-chk input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
.tbl-select tbody tr.row-on { background: var(--brand-50); }
.tbl-select tbody tr.row-on:hover { background: #e2e4fb; }
.tbl-select td { white-space: nowrap; }
.tbl-select td:nth-child(3) { font-variant-numeric: tabular-nums; }
.cell-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 320px; }
.money { font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 8px; border-radius: 20px; background: #f0f1f8; color: var(--ink-2); white-space: nowrap; }
.tag-blue { background: var(--brand-100); color: var(--brand); }
.tag-green { background: #e6f8ef; color: #07783d; }
.tag-orange { background: #fff2e0; color: #b25e09; }
.tag-red { background: #ffeceb; color: #c4271c; }
.tag-gray { background: #f0f1f5; color: var(--ink-2); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(166px, 1fr)); gap: 12px; }
.stat-grid.cols4 { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 901px) {
  .grid.charts > *:first-child { padding-right: 22px; }
}
.stat-grid.cols3 { grid-template-columns: repeat(3, 1fr); }
.stat-card { background: #fff; border-radius: var(--radius); padding: 14px 16px; border: 1px solid #eef0f7; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: var(--brand-50); }
.stat-card .k { font-size: 12.5px; color: var(--ink-3); position: relative; z-index: 1; }
.stat-card .v { font-size: 21px; font-weight: 700; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; position: relative; z-index: 1; white-space: nowrap; }
.stat-card .sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.stat-card .ico { position: absolute; right: 14px; top: 14px; color: var(--brand); opacity: .25; }
.stat-card.accent::after { background: #e6f8ef; }

.empty { text-align: center; padding: 46px 16px; color: var(--ink-3); }
.empty svg { opacity: .35; margin-bottom: 8px; }

/* 列表卡片（移动端） */
.plist { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .plist { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.pcard {
  background: #fff; border: 1px solid #eef0f7; border-radius: var(--radius); padding: 12px 14px;
  box-shadow: var(--shadow); cursor: pointer; transition: .15s;
}
.pcard:active { transform: scale(.995); }
.pcard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pcard-no { font-weight: 700; color: var(--brand); font-size: 14px; font-variant-numeric: tabular-nums; }
.pcard-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; line-height: 1.45; }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--ink-3); }
.pcard-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; }

/* 照片 */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.photo-detail { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.photo-item { position: relative; aspect-ratio: 1/1; border-radius: 10px; overflow: hidden; background: #f2f3f8; border: 1px solid var(--line); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-del { position: absolute; right: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; }
.photo-add {
  aspect-ratio: 1/1; border: 1.5px dashed var(--brand-200); border-radius: 10px; background: var(--brand-50);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--brand); font-size: 12px; cursor: pointer;
}
.photo-add:active { background: var(--brand-100); }
.section-title { font-size: 14px; font-weight: 600; margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.section-title::before { content: ""; width: 3px; height: 14px; background: var(--brand); border-radius: 2px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* 详情抽屉/弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(10,14,40,.5); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 0; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); }
.modal-head { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 14px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; padding-bottom: calc(12px + var(--safe-b)); }
.close-x { background: none; border: 0; font-size: 22px; color: var(--ink-3); cursor: pointer; line-height: 1; }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 10px; font-size: 14px; }
.kv .k { color: var(--ink-3); }
.kv .v { color: var(--ink); word-break: break-word; }

/* Toast / Loading */
.toast {
  position: fixed; left: 50%; top: 22%; transform: translate(-50%, -10px);
  background: rgba(18,20,43,.92); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; z-index: 500; opacity: 0; pointer-events: none; transition: .22s; max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { position: fixed; inset: 0; background: rgba(255,255,255,.55); z-index: 400; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: var(--brand); font-size: 14px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--brand-200); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 0; font-size: 13px; color: var(--ink-2); }
.pager button { height: 32px; min-width: 32px; padding: 0 10px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager .cur { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 图表 */
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 13px; }
.bar-label { width: 156px; flex: 0 0 156px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bar-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; min-width: 0; height: 18px; background: #f1f2f8; border-radius: 9px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--brand-400), var(--brand)); transition: width .6s ease; }
.bar-val { flex: 0 0 auto; text-align: right; color: var(--brand); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12.5px; white-space: nowrap; }

/* ---------------- 响应式：移动端 ---------------- */
@media (max-width: 900px) {
  body { font-size: 14.5px; }
  .only-mobile { display: flex; }
  .tabbar { display: flex; }
  .fab { display: flex; }
  .sidebar { transform: translateX(-100%); width: 250px; }
  .sidebar.open { transform: translateX(0); }
  .topbar-title { font-size: 15px; }
  .topbar-title .t-desc { display: none; }
  .who { display: none; }
  .main { margin-left: 0; padding: 12px 12px calc(88px + var(--safe-b)); }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .g2, .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid, .stat-grid.cols3, .stat-grid.cols4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 12px 13px; }
  .stat-card .v { font-size: 18px; }
  .stat-card .v { overflow: hidden; text-overflow: ellipsis; }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .card { border-radius: 12px; }
  .login-card { padding: 26px 20px 20px; border-radius: 18px; }
  .login-footer { display: none; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-detail { grid-template-columns: repeat(2, 1fr); }
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal { max-width: 100%; border-radius: 16px 16px 0 0; max-height: 92vh; }
  .kv { grid-template-columns: 84px 1fr; }
  .cell-clamp { max-width: 180px; }
  .grid.charts { grid-template-columns: 1fr; }
  .bar-label { width: 132px; flex: 0 0 132px; font-size: 12px; }
  .bar-val { font-size: 11.5px; }
}
@media (min-width: 901px) {
  .only-mobile { display: none !important; }
  .topbar { margin-left: 222px; }
}
@media (max-width: 380px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= 分析报告（报表预览） ================= */
.rpt { background: #fff; border: 1px solid #e3e8f0; border-radius: 10px; overflow: hidden; }
.rpt-title {
  background: linear-gradient(180deg, #16ab55, #0f9447);
  color: #fff; text-align: center; font-size: 19px; font-weight: 700;
  padding: 13px 10px; letter-spacing: .5px;
}
.rpt-period {
  background: #f2f8f4; color: #4b5a72; font-size: 12.5px;
  padding: 7px 14px; border-bottom: 1px solid #e3eee7;
}
.rpt-summary {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid #e3e8f0;
}
.rpt-sum-item { padding: 12px 10px; text-align: center; border-right: 1px solid #eef1f7; }
.rpt-sum-item:last-child { border-right: none; }
.rpt-sum-item .k { font-size: 11.5px; color: #6b7590; line-height: 1.35; }
.rpt-sum-item .v { font-size: 21px; font-weight: 700; color: #1b2440; margin-top: 4px; font-variant-numeric: tabular-nums; }
.rpt-sum-item .v.green { color: #0f9447; }
.rpt-sum-item .v.orange { color: #d97706; }
.rpt-sum-item .v.brand { color: #0000e2; font-size: 18px; }

.rpt-section {
  margin: 16px 14px 8px; font-size: 13.5px; font-weight: 700; color: #0b5d2e;
  padding-left: 9px; border-left: 3px solid #16ab55; line-height: 1.2;
}
.rpt-wrap { margin: 0 14px; overflow-x: auto; }
.rpt-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rpt-tbl th {
  background: #eaf6ee; color: #0b5d2e; font-weight: 600;
  padding: 7px 8px; text-align: center; border: 1px solid #cfe6d8; white-space: nowrap;
}
.rpt-tbl td { padding: 6px 8px; border: 1px solid #dfeae3; color: #22304a; }
.rpt-tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rpt-tbl td.left { text-align: left; }
.rpt-tbl tbody tr:nth-child(even) { background: #fbfdfc; }
.rpt-tbl tr.rpt-total td { background: #eaf6ee; font-weight: 700; color: #0b5d2e; }
.rpt-point, .rpt-basis {
  display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rpt-text { margin: 0 14px 6px; }
.rpt-text p { font-size: 13px; line-height: 1.9; color: #22304a; margin: 0 0 2px; }
.rpt-text p b { color: #0000e2; font-weight: 600; margin-right: 2px; }
.rpt-text p.rpt-sug { padding-left: 2px; }

.btn-ai {
  background: linear-gradient(135deg, #5b5bff, #0000e2);
  color: #fff; border: none; box-shadow: 0 3px 10px rgba(0,0,226,.25);
}
.btn-ai:hover { filter: brightness(1.08); }
.btn-ai:disabled { opacity: .65; cursor: default; }

.filters-report { grid-template-columns: repeat(3, minmax(140px, 220px)) !important; }
.hint-inline { display: inline-block; font-size: 13px; color: var(--ink-3); padding-top: 9px; }

@media (max-width: 900px) {
  .rpt-title { font-size: 15.5px; padding: 11px 8px; }
  .rpt-summary { grid-template-columns: repeat(2, 1fr); }
  .rpt-sum-item { border-bottom: 1px solid #eef1f7; }
  .rpt-sum-item:nth-child(2n) { border-right: none; }
  .rpt-tbl { font-size: 11.5px; }
  .rpt-tbl th, .rpt-tbl td { padding: 5px 6px; }
  .rpt-wrap { margin: 0 10px; }
  .rpt-text { margin: 0 10px 6px; }
  .rpt-text p { font-size: 12.5px; line-height: 1.8; }
  .filters-report { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ================= 权限矩阵 ================= */
.perm-box { overflow-x: auto; }
.perm-tbl th, .perm-tbl td { text-align: center; }
.perm-tbl td:nth-child(1), .perm-tbl td:nth-child(2) { text-align: left; }
.perm-tbl th:nth-child(1), .perm-tbl th:nth-child(2) { text-align: left; }
.perm-cell { text-align: center !important; }
.perm-check { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.perm-check input { width: 17px; height: 17px; accent-color: #0000e2; cursor: pointer; }
.perm-check.lock input { cursor: not-allowed; opacity: .5; }
.perm-tbl tbody tr:hover { background: #fafbff; }

@media (max-width: 900px) {
  .tbl-select .col-chk {
    position: sticky; left: 0; z-index: 3; background: #fff;
    box-shadow: 4px 0 6px -4px rgba(16,24,64,.18);
  }
  .tbl-select tbody tr.row-on .col-chk { background: var(--brand-50); }
  .tbl-select thead th.col-chk { background: #fafbff; }
  .rpt-tbl { min-width: 560px; }
  .rpt-wrap { padding-bottom: 4px; }
}
