﻿/* =========================================================
   升环报价通 — 全局样式（移动优先 / 响应式）
   ========================================================= */
:root {
  --brand: #009a44;
  --brand-dark: #007a36;
  --brand-soft: #e6f6ec;
  --accent: #7c8d85;
  --accent-soft: #eef2f0;
  --bg: #f3f7f5;
  --card: #ffffff;
  --text: #222b26;
  --muted: #6a7a72;
  --line: #e1eae4;
  --line-dark: #cfddd4;
  --danger: #c4453b;
  --danger-soft: #fbecea;
  --ok: #009a44;
  --ok-soft: #e6f6ec;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(0, 80, 40, .10);
  --shadow-sm: 0 2px 10px rgba(0, 80, 40, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
::selection { background: rgba(0, 154, 68, .18); }

/* ---------- 启动页 ---------- */
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.boot-logo {
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), #33b06a);
  color: #fff; font-weight: 800; font-size: 24px; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 154, 68, .3);
}
.boot-text { color: var(--muted); font-size: 14px; }

/* ---------- 通用布局 ---------- */
.shell { display: flex; min-height: 100vh; }
.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 18px 16px 96px; }
.main.narrow { max-width: 760px; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 14px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.topbar .brand .logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), #33b06a); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.topbar .title { font-weight: 600; font-size: 16px; }
.topbar .spacer { flex: 1; }
.topbar .icon-btn { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--muted); background: transparent; border: 1px solid transparent; }
.topbar .icon-btn svg { width: 21px; height: 21px; }
.topbar .icon-btn:hover { background: var(--brand-soft); color: var(--brand); }

.user-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 5px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 13px; font-weight: 600;
}
.user-chip .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }

/* ---------- 侧边栏（桌面） ---------- */
.side { display: none; }
@media (min-width: 960px) {
  .side {
    display: flex; flex-direction: column;
    width: 236px; flex: 0 0 236px;
    background: #fff; border-right: 1px solid var(--line);
    padding: 18px 14px; position: sticky; top: 0; height: 100vh;
  }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
  .side .brand .logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), #33b06a); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
  .side .brand .name { font-weight: 700; font-size: 16px; line-height: 1.2; }
  .side .brand .sub { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
  .side-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: 12px; color: #3c4c49; font-weight: 500; font-size: 14.5px;
  }
  .side-nav a svg { width: 20px; height: 20px; flex: 0 0 20px; }
  .side-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
  .side-nav a.active { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(0, 154, 68, .25); }
  .side-nav a .count { margin-left: auto; font-size: 12px; background: rgba(255,255,255,.25); padding: 1px 7px; border-radius: 99px; }
  .side-nav a:not(.active) .count { background: var(--brand-soft); color: var(--brand-dark); }
  .side-foot { margin-top: auto; padding: 12px 8px; color: var(--muted); font-size: 12px; }
  .side-user { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 12px; background: var(--bg); margin-top: 8px; }
  .side-user .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
  .side-user .meta { min-width: 0; }
  .side-user .meta b { display: block; font-size: 13.5px; }
  .side-user .meta span { font-size: 11.5px; color: var(--muted); }
}

/* ---------- 底部导航（手机） ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: stretch;
  height: calc(62px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(0, 80, 40, .06);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: #8a9a97; font-size: 11px; font-weight: 500;
}
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a .ico { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.bottom-nav a .ico svg { width: 22px; height: 22px; }
.bottom-nav a.active .ico { position: relative; }
@media (min-width: 960px) { .bottom-nav { display: none; } .topbar .brand { display: none; } }
@media (max-width: 959px) { .topbar .user-chip { margin-left: auto; } }
@media (max-width: 640px) {
  .topbar .user-chip span:not(.avatar) { display: none; }
  .topbar .user-chip { padding: 4px; }
  .topbar .title { font-size: 15px; }
}

/* ---------- 卡片 / 区块 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  padding: 18px; margin-bottom: 14px;
}
.card.tight { padding: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-title .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.card-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .5px; margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; } .flex-between { display: flex; align-items: center; justify-content: space-between; } .flex-center { display: flex; align-items: center; } .flex-wrap { flex-wrap: wrap; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; }
.grow { flex: 1; }
.center { text-align: center; }
.right { text-align: right; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent;
  background: var(--brand); color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 19px; height: 19px; }
.btn-ghost { background: #fff; color: var(--brand-dark); border-color: var(--line-dark); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-soft:hover { background: #d8ece8; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #a8352c; }
.btn-warn { background: var(--accent); color: #4a3208; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { min-height: 52px; font-size: 16px; border-radius: 14px; padding: 0 24px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; background: #fff; border: 1px solid var(--line-dark); color: var(--muted); }
.btn-icon:hover { color: var(--brand); background: var(--brand-soft); }
.btn-icon.danger:hover { color: var(--danger); background: var(--danger-soft); }
.btn-icon svg { width: 17px; height: 17px; }
.btn-link { background: none; border: none; color: var(--brand); font-size: 13px; padding: 4px 6px; cursor: pointer; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.label { display: block; font-size: 13px; font-weight: 600; color: #374744; margin-bottom: 6px; }
.label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-dark); border-radius: 11px;
  background: #fff; color: var(--text); font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 76px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 154, 68, .12); }
.input[readonly] { background: #f6f9f8; color: var(--muted); }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.err { color: var(--danger); font-size: 12px; margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row3 { grid-template-columns: 1fr 1fr; } }

/* 后置单位输入框 */
.with-unit { position: relative; }
.with-unit .input { padding-right: 46px; }
.with-unit .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12.5px; pointer-events: none; }

/* 数字步进 */
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line-dark); border-radius: 11px; overflow: hidden; background: #fff; }
.stepper button { width: 40px; border: none; background: #f4f8f7; color: var(--brand-dark); font-size: 20px; font-weight: 600; cursor: pointer; }
.stepper button:active { background: var(--brand-soft); }
.stepper input { flex: 1; min-width: 0; border: none; text-align: center; font-size: 16px; font-weight: 600; outline: none; min-height: 44px; }
.stepper .unit { display: flex; align-items: center; padding: 0 10px; color: var(--muted); font-size: 12px; background: #f9fbfb; border-left: 1px solid var(--line); }

/* 开关 */
.switch { position: relative; width: 48px; height: 28px; flex: 0 0 48px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #ccd8d5; border-radius: 999px; transition: background .18s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); transition: transform .18s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ---------- 标签 / 徽章 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-dark); background: #fff; color: #44534f;
  font-size: 13.5px; font-weight: 500; cursor: pointer; user-select: none;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(0, 154, 68, .22); }
.chip.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-dark); }
.chip.sm { min-height: 28px; padding: 0 10px; font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.badge.draft { background: #eef2f1; color: #65736f; }
.badge.quoted { background: var(--brand-soft); color: var(--brand-dark); }
.badge.won { background: var(--ok-soft); color: var(--ok); }
.badge.void { background: var(--danger-soft); color: var(--danger); }
.badge.pill { background: var(--accent-soft); color: #8a5b12; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 18px; background: radial-gradient(1200px 600px at 20% -10%, #ddf1e4 0%, var(--bg) 45%); }
.login-card { width: 100%; max-width: 420px; margin: 0 auto; background: #fff; border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 80, 40, .12); padding: 30px 26px 24px; }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.login-brand .logo { width: 52px; height: 52px; border-radius: 15px; background: linear-gradient(135deg, var(--brand), #33b06a); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; box-shadow: 0 8px 20px rgba(0, 154, 68, .28); }
.login-brand .name { font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.login-brand .sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.login-foot { text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 20px; line-height: 1.7; }
.demo-hint { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: #f6faf9; border: 1px dashed var(--line-dark); font-size: 12px; color: var(--muted); line-height: 1.7; }
.demo-hint b { color: var(--brand-dark); }

/* ---------- 首页 ---------- */
.hero { background: linear-gradient(135deg, var(--brand) 0%, #007a36 55%, #33b06a 100%); color: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 14px 34px rgba(0, 154, 68, .25); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -50px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero::before { content: ""; position: absolute; right: 30px; bottom: -70px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.07); }
.hero .hello { font-size: 13px; opacity: .85; }
.hero h2 { font-size: 22px; margin: 3px 0 4px; letter-spacing: .2px; }
.hero p { font-size: 13px; opacity: .88; }
.hero .cta { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 2; }
.hero .cta .btn { background: #fff; color: var(--brand-dark); }
.hero .cta .btn:hover { background: #f0f8f6; }
.hero .cta .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.hero .cta .btn-ghost:hover { background: rgba(255,255,255,.2); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 6px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 12px; }
.stat .num { font-size: 19px; font-weight: 800; color: var(--brand-dark); letter-spacing: .2px; }
.stat .num small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.stat .lbl { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); gap: 14px; } .stat .num { font-size: 24px; } }

.quick-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .quick-grid { grid-template-columns: 1fr 1fr; } }
.quick-item { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; transition: all .15s; }
.quick-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.quick-item .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.quick-item .t { font-weight: 700; font-size: 14px; }
.quick-item .d { font-size: 12px; color: var(--muted); margin-top: 2px; }

.list { display: flex; flex-direction: column; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.list-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.list-item .main-info { flex: 1; min-width: 0; }
.list-item .name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .amount { text-align: right; flex: 0 0 auto; }
.list-item .amount b { font-size: 16px; color: var(--brand-dark); font-weight: 800; }
.list-item .amount small { display: block; font-size: 11px; color: var(--muted); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .big { font-size: 36px; margin-bottom: 8px; opacity: .5; }

/* ---------- 步骤条 ---------- */
.stepbar { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.stepbar .step { flex: 0 1 auto; display: flex; align-items: center; gap: 7px; min-width: 0; }
.stepbar .n { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: #e6eeec; color: #7a8a87; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.stepbar .t { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: visible; }
.stepbar .step.active .n { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(15,125,108,.3); }
.stepbar .step.active .t { color: var(--brand-dark); font-weight: 700; }
.stepbar .step.done .n { background: var(--brand-soft); color: var(--brand-dark); }
.stepbar .bar { height: 2px; background: var(--line); flex: 1; border-radius: 2px; min-width: 8px; }

/* ---------- 报价项目卡 ---------- */
.item-card { border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; background: #fff; margin-bottom: 10px; }
.item-card .top { display: flex; align-items: flex-start; gap: 10px; }
.item-card .cat { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.item-card .nm { font-weight: 700; font-size: 14.5px; }
.item-card .fx { color: var(--muted); font-size: 11.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-card .qty { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.item-card .qty span { background: #f5f8f7; border: 1px solid var(--line); border-radius: 7px; padding: 2px 8px; font-size: 11.5px; color: #53625e; }
.item-card .money-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.item-card .money-row .price b { font-size: 16px; color: var(--brand-dark); }
.item-card .ops { display: flex; gap: 4px; margin-left: auto; }

/* ---------- 合计条 ---------- */
.sum-line { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.sum-line + .sum-line { border-top: 1px dashed var(--line); }
.sum-line .k { color: #4a5a56; }
.sum-line .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.sum-line.total { font-size: 16px; padding-top: 12px; }
.sum-line.total .v { color: var(--brand-dark); font-size: 20px; font-weight: 800; }
.sum-line .v.old { color: var(--muted); font-weight: 500; text-decoration: line-through; font-size: 13px; }
.sum-line.hl { background: var(--brand-soft); margin: 8px -10px 0; padding: 12px 10px; border-radius: 12px; border-top: none; }
.big-total { background: linear-gradient(135deg, #009a44, #1a8f7c); color: #fff; border-radius: 16px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; margin: 14px 0; box-shadow: 0 10px 26px rgba(15,125,108,.22); }
.big-total .lbl { font-size: 12.5px; opacity: .85; }
.big-total .val { font-size: 26px; font-weight: 800; letter-spacing: .3px; }
.big-total .val small { font-size: 14px; font-weight: 600; }
.big-total .meta { text-align: right; font-size: 11.5px; opacity: .85; line-height: 1.6; }

/* ---------- 向导底部操作栏 ---------- */
.wiz-footer {
  position: sticky; bottom: 0; z-index: 30;
  display: flex; gap: 10px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, rgba(242,246,245,0));
  margin-top: 10px;
}
.wiz-footer .btn { flex: 1; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table th { background: #f6f9f8; font-size: 12px; color: #53625e; font-weight: 700; }
.table tr:last-child td { border-bottom: none; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(12, 30, 27, .45); display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fadeIn .15s ease; }
.modal { width: 100%; max-width: 560px; max-height: 92vh; background: #fff; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: slideUp .2s ease; overflow: hidden; }
@media (min-width: 640px) { .modal-mask { align-items: center; padding: 24px; } .modal { border-radius: 20px; max-height: 86vh; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fafcfb; }
.modal-foot .btn { flex: 1; }
.x-btn { width: 32px; height: 32px; border-radius: 9px; border: none; background: #f3f7f5; color: var(--muted); font-size: 17px; cursor: pointer; }

/* ---------- 提示 ---------- */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(14px); background: rgba(22, 42, 38, .92); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13.5px; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 88vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(150, 40, 32, .94); }

/* ---------- 上传检测方案 ---------- */
.upload-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed #b9d3cb; border-radius: 14px; padding: 26px 16px; background: #f7fbfa; cursor: pointer; text-align: center; color: var(--brand-dark); transition: border-color .15s, background .15s; }
.upload-zone:hover { border-color: var(--brand); background: #f0f8f5; }
.upload-zone svg { width: 34px; height: 34px; opacity: .85; }
.upload-zone .uz-t { font-weight: 700; font-size: 15px; }
.upload-zone .uz-d { font-size: 12px; color: var(--muted); }
.import-or { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #eef6f2; color: #24604f; font-size: 12px; line-height: 1.5; }
.tag-warn { background: #fdf3e3; color: #8a5b12; }
.import-group .pp { font-weight: 800; color: var(--brand-dark); }
.import-group .qty-grid { margin-top: 10px; }

/* ---------- 检测方案（方案库） ---------- */
.plan-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; }
.plan-row.added { background: #f6faf9; }
.plan-row .pi { flex: 1; min-width: 0; }
.plan-row .pn { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-row .pm { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.plan-row .pp { flex: 0 0 auto; font-weight: 800; color: var(--brand-dark); font-size: 14px; }
.plan-list { max-height: 52vh; overflow: auto; margin-top: 10px; }
.plan-item-list { max-height: 52vh; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; }
.plan-item-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.plan-item-row:last-child { border-bottom: none; }
.plan-item-row .no { color: var(--muted); flex: 0 0 26px; text-align: right; }
.plan-item-row .nm { font-weight: 600; flex: 1 1 38%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-item-row .mt { color: var(--muted); font-size: 11px; flex: 1 1 40%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-item-row .pr { flex: 0 0 80px; text-align: right; color: var(--brand-dark); font-weight: 700; }
.qty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
@media (max-width: 480px) {
  .qty-grid { grid-template-columns: 1fr 1fr; }
  .plan-row { flex-wrap: wrap; }
  .plan-row .pi { flex: 1 1 100%; }
  .plan-row .pp { margin-left: auto; }
  .plan-row .pn { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
.item-sub { font-weight: 800; color: var(--brand-dark); padding-top: 10px; font-size: 15px; }
.hint.warn { color: #8a5b12; background: #fdf3e3; border-radius: 8px; padding: 6px 8px; }

/* ---------- LIMS 检测项目选择器 ---------- */
.lims-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; }
.lims-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.lims-item:last-child { border-bottom: none; }
.lims-item:hover { background: var(--brand-soft); }
.lims-item input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--brand); }
.lims-item .nm { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lims-item .mt { color: var(--muted); font-size: 11px; flex: 0 1 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lims-item .pr { flex: 0 0 84px; text-align: right; font-weight: 700; color: var(--brand-dark); }
@media (max-width: 640px) {
  .lims-item { flex-wrap: wrap; }
  .lims-item .mt { flex-basis: 100%; order: 3; }
  .lims-item .pr { flex: 0 0 70px; }
}

/* ---------- 报价单打印样式 ---------- */
.quote-doc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 14px; }
.doc-title { text-align: center; font-size: 19px; font-weight: 800; letter-spacing: 2px; margin-bottom: 4px; }
.doc-sub { text-align: center; font-size: 11px; color: var(--muted); margin-bottom: 14px; }
.doc-head { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid #333; border-bottom: none; }
.doc-head .cell { display: flex; border-bottom: 1px solid #333; font-size: 12px; }
.doc-head .cell.full { grid-column: 1 / -1; }
.doc-head .cell .k { width: 64px; flex: 0 0 64px; background: #f3f7f5; padding: 5px 7px; border-right: 1px solid #333; font-weight: 600; }
.doc-head .cell .v { flex: 1; padding: 5px 8px; min-width: 0; word-break: break-all; }
.doc-sec-title { font-size: 13px; font-weight: 800; margin: 12px 0 5px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.doc-table th, .doc-table td { border: 1px solid #333; padding: 3px 4px; text-align: center; vertical-align: middle; }
.doc-table th { background: #f3f7f5; font-weight: 700; }
.doc-table td.l { text-align: left; }
.doc-table td.r { text-align: right; }
.doc-table .factors { text-align: left; line-height: 1.35; font-size: 10px; }
.doc-notes { font-size: 11px; margin-top: 10px; line-height: 1.7; color: #333; }
.doc-notes b { font-weight: 700; }
.doc-sign { display: flex; justify-content: space-between; margin-top: 18px; font-size: 12px; color: #333; }
.doc-sign > div { width: 46%; }
.doc-footer { margin-top: 12px; font-size: 11px; color: #555; line-height: 1.7; border-top: 1px dashed #bbb; padding-top: 8px; }
.print-hint { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

/* ---------- 管理页 ---------- */
.tabs { display: flex; gap: 4px; background: #e9efee; padding: 4px; border-radius: 12px; margin-bottom: 14px; overflow-x: auto; }
.tabs button { flex: 1; min-width: 90px; border: none; background: transparent; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: #5c6c68; cursor: pointer; white-space: nowrap; }
.tabs button.active { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-sm); }
.cat-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.cat-card .head { display: flex; align-items: center; gap: 8px; }
.cat-card .head .nm { font-weight: 700; }
.pkg-row { border-top: 1px dashed var(--line); padding: 10px 0; }
.pkg-row:first-of-type { border-top: none; }
.pkg-grid { display: grid; grid-template-columns: 1fr 110px; gap: 8px; margin-top: 8px; }
.factor-box { font-size: 12px; color: #4a5a56; background: #f7faf9; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; line-height: 1.6; margin-top: 8px; }

/* ---------- 帮助/我的 ---------- */
.kv { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; word-break: break-word; }
.help ol { padding-left: 20px; margin: 8px 0; }
.help li { margin-bottom: 8px; font-size: 14px; line-height: 1.6; }
.help h4 { font-size: 15px; margin: 16px 0 6px; }
.help p { font-size: 14px; color: #40504c; line-height: 1.7; }

/* ---------- 动画 ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- 打印 ---------- */
@media screen and (max-width: 720px) {
  .quote-doc { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .quote-doc .doc-head { min-width: 660px; }
  .quote-doc .doc-table { min-width: 660px; }
  .quote-doc .doc-notes, .quote-doc .doc-sign, .quote-doc .doc-footer { min-width: 660px; }
}

@media print {
  .quote-doc .doc-head, .quote-doc .doc-table, .quote-doc .doc-notes, .quote-doc .doc-sign, .quote-doc .doc-footer { min-width: 0 !important; }
  html, body { background: #fff !important; }
  .no-print, .side, .topbar, .bottom-nav, .toast, .modal-mask, .wiz-footer, .print-hint { display: none !important; }
  .shell, .workspace { display: block !important; }
  .main { max-width: none; margin: 0; padding: 0; }
  .quote-doc { border: none; border-radius: 0; padding: 0; margin: 0; }
  .quote-doc, .doc-table, .doc-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc-table { font-size: 10.5px; }
  @page { size: A4; margin: 12mm; }
}

/* ---------- 品牌 Logo / 登录记忆 ---------- */
.brand-img { height: 30px; width: auto; display: block; }
.side .brand .brand-img { height: 38px; width: auto; flex: 0 0 auto; }
  .side .brand > div { min-width: 0; overflow: hidden; }
  .side .brand .name { white-space: nowrap; }
.boot-logo-img { height: 64px; width: auto; display: block; }
.login-logo { height: 52px; width: auto; display: block; }
.login-brand-text { min-width: 0; }
.login-remember { display: flex; align-items: center; gap: 8px; margin: 2px 0 16px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.login-remember input { width: 17px; height: 17px; accent-color: var(--brand); flex: 0 0 17px; }
.login-card { border-top: 4px solid var(--brand); }
.login-wrap { background: radial-gradient(1200px 620px at 15% -10%, #d9f2e3 0%, #f3f7f5 48%, #e9f0ec 100%); }
.hero { background: linear-gradient(135deg, #009a44 0%, #007a36 58%, #00ab4f 100%); box-shadow: 0 14px 34px rgba(0, 100, 45, .25); }

/* ---------- 分享访问地址 ---------- */
.login-access { margin: 14px 0 2px; padding: 10px 12px; border-radius: 12px; background: #eef7f1; border: 1px solid #d5e9dc; }
.login-access .access-tip { font-size: 12px; color: #37624c; margin-bottom: 4px; }
.login-access .access-row { display: flex; align-items: center; gap: 8px; }
.login-access .access-row b { font-size: 14px; color: #007a36; word-break: break-all; flex: 1; min-width: 0; }
.login-access .tiny { margin-top: 4px; }
