/* ============================================================
   算数 · 广告媒介管理系统  UI
   移动优先，桌面侧栏 + 手机底部 dock
   ============================================================ */
:root {
  --ink: #0a2237;
  --navy: #0b2a45;
  --navy-2: #123a5b;
  --navy-3: #1a4c72;
  --brand: #0d3f63;
  --brand-2: #17688f;
  --accent: #f0a63c;
  --accent-2: #ffd166;
  --bg: #f3f6f9;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-2: #cdd8e3;
  --muted: #6c7d90;
  --muted-2: #93a3b3;
  --ok: #1c9b68;
  --ok-bg: #e6f6ee;
  --warn: #cf7a1e;
  --warn-bg: #fdf1df;
  --danger: #d04747;
  --danger-bg: #fdecec;
  --info-bg: #e9f3fb;
  --shadow: 0 10px 30px rgba(12, 42, 69, .08);
  --shadow-sm: 0 4px 14px rgba(12, 42, 69, .07);
  --radius: 16px;
  --radius-sm: 10px;
  --dock-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.55;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }
code { background: #eef3f8; padding: 1px 6px; border-radius: 5px; font-size: .92em; }

/* ---------------- 通用按钮 / 徽标 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  padding: 9px 16px; border-radius: 10px; cursor: pointer; font-weight: 600;
  transition: .18s ease; white-space: nowrap; line-height: 1.2;
}
.btn:hover { border-color: var(--brand-2); color: var(--brand-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(13, 63, 99, .22); }
.btn.primary:hover { color: #fff; filter: brightness(1.06); }
.btn.accent { background: linear-gradient(135deg, #e89a2a, var(--accent)); color: #3a2200; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: #eef3f8; color: var(--brand); }
.btn.danger { color: var(--danger); border-color: #f1c3c3; background: #fff; }
.btn.danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn.small { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link { background: none; border: 0; color: var(--brand-2); cursor: pointer; padding: 0; font-weight: 600; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: var(--ink); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; position: relative;
}
.icon-btn:hover { background: #eef3f8; }
.dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #e8543f; border: 2px solid #fff; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef3f8; color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--brand-2); }
.badge.gold { background: #fdf4e3; color: #b07316; }
.badge.dark { background: var(--navy); color: #fff; }

/* ---------------- 登录页 ---------------- */
.login-body { background: #dfe7ef; }
.login-page { min-height: 100vh; display: flex; align-items: stretch; padding: 0; }
.login-wrap { display: grid; grid-template-columns: 1.15fr .85fr; width: 100%; min-height: 100vh; }
.login-intro {
  position: relative; overflow: hidden; color: #eaf4fb; padding: 54px 58px;
  background:
    radial-gradient(900px 500px at 88% 8%, rgba(240, 166, 60, .28), transparent 60%),
    radial-gradient(700px 460px at 8% 92%, rgba(23, 104, 143, .55), transparent 62%),
    linear-gradient(150deg, #0a2136 0%, #0d3654 55%, #0b2a45 100%);
  display: flex; flex-direction: column; justify-content: center;
}
.login-intro::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 52px 52px; mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 80%);
}
.login-intro > * { position: relative; z-index: 1; }
.brand-line { display: flex; align-items: center; gap: 14px; margin-bottom: 52px; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #e2811f); color: #2a1700;
  font-weight: 800; font-size: 25px; box-shadow: 0 10px 26px rgba(240,166,60,.35);
}
.brand-mark.small { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; flex: 0 0 auto; }
.brand-line strong { font-size: 20px; letter-spacing: .5px; }
.brand-line p { margin: 2px 0 0; color: #9fc0d8; font-size: 12.5px; letter-spacing: 2px; }
.login-intro h1 { font-size: 42px; line-height: 1.24; letter-spacing: 1px; font-weight: 700; margin-bottom: 22px; }
.login-intro h1 em { font-style: normal; color: var(--accent-2); }
.intro-lead { color: #b7d0e3; max-width: 560px; font-size: 14.5px; line-height: 1.9; margin-bottom: 30px; }
.intro-points { list-style: none; padding: 0; margin: 0 0 34px; display: grid; gap: 14px; max-width: 580px; }
.intro-points li { display: flex; gap: 14px; align-items: flex-start; }
.intro-points b { color: var(--accent); font-size: 13px; letter-spacing: 1px; padding-top: 2px; min-width: 24px; }
.intro-points span { color: #cfe1ee; font-size: 13.5px; }
.intro-stats { display: flex; gap: 46px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.intro-stats strong { display: block; font-size: 30px; color: #fff; letter-spacing: 1px; }
.intro-stats span { color: #9fc0d8; font-size: 12px; letter-spacing: 1px; }

.login-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 42px 40px; background: linear-gradient(180deg, #f7fafc, #eef3f8); }
.login-card { width: 100%; max-width: 424px; background: #fff; border-radius: 22px; padding: 32px 32px 24px; box-shadow: 0 24px 60px rgba(13, 45, 70, .14); }
.login-card-head h2 { font-size: 24px; letter-spacing: .5px; }
.login-card-head p { color: var(--muted); font-size: 12.5px; margin-top: 6px; margin-bottom: 18px; }
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 20px; }
.role-card { text-align: left; border: 1px solid var(--line); background: #fafcfe; border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: .16s; }
.role-card:hover, .role-card.active { border-color: var(--brand-2); background: #f1f8fd; box-shadow: 0 6px 14px rgba(23,104,143,.1); }
.role-card strong { display: block; font-size: 12.5px; }
.role-card span { color: var(--muted); font-size: 11px; }
.stack-form { display: grid; gap: 12px; }
.stack-form label { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stack-form input, .stack-form select, .stack-form textarea { border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 12px; background: #fff; outline: none; transition: .15s; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(23,104,143,.12); }
.login-msg { color: var(--danger); font-size: 12.5px; min-height: 17px; }
.login-card-foot { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.login-tip { color: var(--muted); font-size: 12px; margin-top: 20px; text-align: center; max-width: 420px; }
.login-copy { color: var(--muted); opacity: .8; font-size: 11.5px; margin-top: 8px; text-align: center; }
.login-copy a { color: var(--brand-2, #17688f); text-decoration: none; border-bottom: 1px solid rgba(23,104,143,.3); }
.login-copy a:hover { color: var(--navy, #0b2a45); }

/* ---------------- 应用外壳 ---------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: 0 0 236px; background: linear-gradient(180deg, #0a2237, #0b2a45 60%, #092133);
  color: #cfe1ee; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.side-brand strong { color: #fff; font-size: 15px; letter-spacing: .5px; }
.side-brand p { color: #8fb0c8; font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.side-nav { flex: 1; overflow-y: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.side-nav .nav-group { color: #6f92ac; font-size: 10.5px; letter-spacing: 2px; padding: 14px 12px 6px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #b9d2e4; font-size: 13.5px; font-weight: 500; }
.side-nav a svg { opacity: .8; flex: 0 0 auto; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: linear-gradient(90deg, rgba(240,166,60,.18), rgba(240,166,60,.03)); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.side-nav a .n { margin-left: auto; background: #d04747; color: #fff; font-size: 10.5px; border-radius: 999px; padding: 1px 7px; }
.side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.side-user { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(140deg, var(--accent), #d67f1e); color: #2a1700; display: grid; place-items: center; font-weight: 800; }
.side-user strong { color: #fff; font-size: 13px; display: block; }
.side-user p { color: #8fb0c8; font-size: 11px; }

.main { flex: 1; min-width: 0; margin-left: 236px; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.menu-btn { display: none; flex-direction: column; gap: 4px; }
.menu-btn span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 19px; letter-spacing: .3px; }
.topbar-title p { color: var(--muted); font-size: 12px; margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.view { padding: 24px 28px 48px; max-width: 1360px; width: 100%; margin: 0 auto; }

/* ---------------- 卡片 / 布局 ---------------- */
.section { margin-bottom: 22px; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 16.5px; }
.section-head p { color: var(--muted); font-size: 12.5px; }
.section-head .spacer { flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; margin-bottom: 4px; color: var(--ink); }

/* 看板 */
.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.welcome h2 { font-size: 24px; letter-spacing: .4px; }
.welcome h2 em { font-style: normal; color: var(--brand-2); }
.welcome p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.quick-links { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-links .btn { background: #fff; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
.kpi { padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -18px; bottom: -26px; width: 82px; height: 82px; border-radius: 50%; background: var(--info-bg); }
.kpi.gold::after { background: #fdf3e2; }
.kpi.green::after { background: var(--ok-bg); }
.kpi.red::after { background: var(--danger-bg); }
.kpi span { position: relative; z-index: 1; color: var(--muted); font-size: 12px; display: block; }
.kpi strong { position: relative; z-index: 1; display: block; font-size: 26px; letter-spacing: .5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 3px; font-weight: 500; }
.dash-split { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; }
.bar-list { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 74px 1fr 52px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-track { height: 8px; border-radius: 6px; background: #eef3f8; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand-2), #4aa3c7); }
.bar-row.gold .bar-fill { background: linear-gradient(90deg, var(--accent), #e2811f); }

/* 资源卡片 */
.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.res-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); transition: .18s; display: flex; flex-direction: column; }
.res-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c6d6e4; }
.res-thumb { position: relative; aspect-ratio: 16/9.4; background: #0b2a45; overflow: hidden; }
.res-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .35s; }
.res-card:hover .res-thumb img { transform: scale(1.04); }
.res-thumb .flag { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.res-thumb .idle { position: absolute; right: 10px; bottom: 10px; background: rgba(5,20,32,.72); color: #ffd166; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(4px); }
.res-body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.res-body h3 { font-size: 15.5px; line-height: 1.35; }
.res-meta { display: flex; gap: 8px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.res-price { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.res-price strong { font-size: 20px; color: #b5620f; font-variant-numeric: tabular-nums; }
.res-price span { color: var(--muted); font-size: 12px; }
.res-foot { display: flex; align-items: center; gap: 8px; padding-top: 9px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 11.5px; }
.res-foot .spacer { flex: 1; }
.tag { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: #eef4f9; color: #456; font-size: 11px; }

/* 筛选栏 */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.filter-bar label { display: grid; gap: 5px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.filter-bar select, .filter-bar input { border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px; background: #fff; min-width: 112px; outline: none; }
.filter-bar input[type=search] { min-width: 190px; }
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--brand-2); }
.filter-bar .grow { flex: 1; }
.filter-bar .grow input { width: 100%; }

.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; }
.pager button { min-width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.pager button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .info { color: var(--muted); font-size: 12px; margin: 0 8px; }

/* 列表 / 表格 */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 720px; }
table.tbl th, table.tbl td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
table.tbl th { background: #f7fafc; color: var(--muted); font-size: 11.5px; letter-spacing: .4px; font-weight: 600; white-space: nowrap; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #fbfdff; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-title { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 11.5px; margin-top: 1px; }

/* 待审卡片 */
.audit-card { display: grid; grid-template-columns: 190px 1fr; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.audit-card img { width: 100%; height: 100%; object-fit: cover; }
.audit-body { padding: 14px 16px 15px; display: flex; flex-direction: column; gap: 8px; }
.audit-body h3 { font-size: 15.5px; }
.audit-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }

/* 询价 / 订单卡片 */
.list-stack { display: grid; gap: 12px; }
.record { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: flex-start; }
.record-thumb { width: 74px; height: 74px; border-radius: 10px; object-fit: cover; background: #eaf1f6; flex: 0 0 auto; }
.record-main { flex: 1; min-width: 0; }
.record-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.record-top h3 { font-size: 14.5px; }
.record-meta { display: flex; gap: 14px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.record-amount { font-weight: 700; color: #b5620f; font-variant-numeric: tabular-nums; }
.record-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.record-side { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: 0 0 auto; }

/* 详情抽屉 / 弹窗 */
.modal-layer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-mask { position: absolute; inset: 0; background: rgba(7, 24, 38, .55); backdrop-filter: blur(3px); }
.modal { position: relative; background: #fff; width: 100%; max-width: 720px; max-height: 90vh; border-radius: 18px; box-shadow: 0 30px 90px rgba(4,18,30,.35); display: flex; flex-direction: column; animation: pop .2s ease; }
.modal.wide { max-width: 980px; }
.modal.narrow { max-width: 520px; }
@keyframes pop { from { transform: translateY(12px) scale(.985); opacity: .4; } to { transform: none; opacity: 1; } }
.modal-head { padding: 17px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.modal-head h3 { font-size: 16.5px; flex: 1; }
.modal-body { padding: 20px 22px 24px; overflow-y: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea { border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; background: #fff; outline: none; font-weight: 500; color: var(--ink); }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(23,104,143,.1); }
.field .hint { color: var(--muted-2); font-weight: 400; font-size: 11px; }
.switch-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); font-weight: 500; padding-top: 4px; }
.switch-line input { width: auto; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 20px; margin-top: 6px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-foot .spacer { flex: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand-2); }

/* 上传 */
.uploader { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 16px; text-align: center; background: #fbfdff; cursor: pointer; transition: .15s; }
.uploader:hover { border-color: var(--brand-2); background: #f4fafe; }
.uploader input { display: none; }
.uploader strong { display: block; font-size: 13px; }
.uploader span { color: var(--muted); font-size: 11.5px; }
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.upload-item { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.upload-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-item button { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(10,30,45,.72); color: #fff; cursor: pointer; font-size: 11px; line-height: 1; }

/* 详情展示 */
.detail-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.gallery-main { border-radius: 14px; overflow: hidden; background: #0b2a45; aspect-ratio: 16/10; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 7px; border: 2px solid transparent; cursor: pointer; }
.gallery-thumbs img.active { border-color: var(--accent); }
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.info-list div { display: grid; gap: 1px; }
.info-list span { color: var(--muted); font-size: 11.5px; }
.info-list strong { font-size: 13.5px; font-weight: 600; }
.detail-price { display: flex; align-items: baseline; gap: 8px; padding: 12px 0; }
.detail-price strong { font-size: 30px; color: #b5620f; letter-spacing: .5px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; padding: 0 0 16px 20px; border-left: 2px solid var(--line); margin-left: 5px; }
.timeline-item::before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 3px #e9f3fb; }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item strong { font-size: 13px; }
.timeline-item p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.timeline-item time { color: var(--muted-2); font-size: 11px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--brand); border-color: var(--accent); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; cursor: pointer; color: var(--muted); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* 消息 */
.notif-panel { position: fixed; top: 62px; right: 24px; width: 360px; max-height: 70vh; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); z-index: 60; display: flex; flex-direction: column; overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.notif-list { overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: #f6fbff; }
.notif-item strong { font-size: 13px; display: block; }
.notif-item p { color: var(--muted); font-size: 12px; margin: 3px 0; }
.notif-item time { color: var(--muted-2); font-size: 10.5px; }

/* 底部 dock */
.mobile-dock { display: none; }

/* toast */
.toast-wrap { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast { background: rgba(10, 34, 55, .94); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; box-shadow: 0 12px 30px rgba(0,0,0,.2); animation: toastIn .2s ease; }
.toast.err { background: #a63232; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .res-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dash-split { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-intro { display: none; }
  .login-panel { min-height: 100vh; padding: 28px 18px; }
  .sidebar { transform: translateX(-100%); transition: .24s ease; width: 260px; }
  .sidebar.open { transform: none; }
  .nav-mask { position: fixed; inset: 0; background: rgba(6,20,32,.5); z-index: 35; }
  .nav-mask.hidden { display: none; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; height: 60px; }
  .topbar-title h1 { font-size: 17px; }
  .topbar-title p { display: none; }
  .topbar-actions .btn.primary { display: none; }
  .view { padding: 16px 14px calc(var(--dock-h) + 22px); }
  .mobile-dock {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: var(--dock-h);
    background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    z-index: 45; padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-dock a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; }
  .mobile-dock a.active { color: var(--brand); }
  .mobile-dock a svg { width: 20px; height: 20px; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-hero { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .res-grid { grid-template-columns: 1fr; }
  .audit-card { grid-template-columns: 1fr; }
  .audit-card img { height: 170px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { max-height: 94vh; border-radius: 16px; }
  .modal-layer { padding: 10px; }
  .record { flex-wrap: wrap; }
  .record-side { width: 100%; align-items: flex-start; flex-direction: row; justify-content: space-between; }
  .info-list { grid-template-columns: 1fr 1fr; }
  .welcome h2 { font-size: 20px; }
  .notif-panel { top: 56px; left: 10px; right: 10px; width: auto; }
  .filter-bar { padding: 12px; }
  .filter-bar label { flex: 1 1 45%; }
  .filter-bar select, .filter-bar input { width: 100%; min-width: 0; }
  .filter-bar .grow { flex: 1 1 100%; }
  .record-actions .btn { flex: 1 1 auto; }
  .detail-price strong { font-size: 25px; }
}

/* ---------- 资源对比 / 草稿 / 语音 ---------- */
.btn.tiny { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; }
.cmp-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 60;
  background: #0b2a45; color: #fff; border-radius: 14px; box-shadow: 0 14px 34px rgba(11,42,69,.32);
  padding: 10px 14px; animation: cmpIn .2s ease;
}
@media (max-width: 900px) { .cmp-bar { bottom: calc(var(--dock-h) + 12px); } }
@keyframes cmpIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cmp-bar-inner { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.cmp-bar .btn.ghost { color: #cfe0ee; border-color: rgba(255,255,255,.28); background: transparent; }
.cmp-bar .btn.primary { background: #3ea0ff; border-color: #3ea0ff; }
.cmp-table th { white-space: nowrap; }
.cmp-table td { vertical-align: top; min-width: 148px; }
.cmp-head a { display: flex; flex-direction: column; gap: 4px; color: inherit; }
.cmp-head img { width: 100%; height: 78px; object-fit: cover; border-radius: 8px; }
.draft-banner {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: #fffaf1; border: 1px solid #f0d4a8; color: #a5651b;
  border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; font-size: 12.5px;
}

/* 断网提示：置顶常驻，恢复网络后自动消失 */
.net-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300; height: 34px;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px;
  background: #a63232; color: #fff; font-size: 12.5px; line-height: 1.3;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
body.has-net-banner .sidebar { top: 34px; }
body.has-net-banner .topbar { top: 34px; }
body.has-net-banner .notif-panel { top: 96px; }

/* ---------- 三步录入向导 ---------- */
.wiz-head { display: flex; gap: 8px; margin-bottom: 16px; }
.wiz-chip {
  flex: 1; display: flex; align-items: center; gap: 9px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; color: var(--muted);
  transition: .2s; min-width: 0;
}
.wiz-chip b {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: grid; place-items: center;
  background: #dfe8f1; color: #5f7488; font-size: 12px;
}
.wiz-chip span { display: flex; flex-direction: column; font-size: 12.5px; font-weight: 700; min-width: 0; }
.wiz-chip i { font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-chip.active { border-color: var(--brand); background: #f0f7ff; color: var(--brand); }
.wiz-chip.active b { background: var(--brand); color: #fff; }
.wiz-chip.done b { background: #1e8a5f; color: #fff; }
.wiz-chip.done { border-color: #cfe9dd; background: #f4fbf7; color: #1e8a5f; }
.wiz-step { display: none; }
.wiz-step.active { display: block; }
.wiz-step .form-foot { margin-top: 16px; }
@media (max-width: 680px) {
  .wiz-head { gap: 6px; }
  .wiz-chip { padding: 8px; gap: 6px; }
  .wiz-chip i { display: none; }
  .wiz-chip span { font-size: 11.5px; }
}

.wiz-more { margin-top: 14px; border: 1px dashed var(--line); border-radius: 12px; padding: 4px 12px 10px; background: #fbfdff; }
.wiz-more > summary { cursor: pointer; padding: 8px 0; font-size: 12.5px; font-weight: 700; color: var(--muted); list-style: none; }
.wiz-more > summary::-webkit-details-marker { display: none; }
.wiz-more > summary::before { content: "＋ "; color: var(--brand); }
.wiz-more[open] > summary::before { content: "－ "; }
.wiz-more[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }

/* ---------- 名片拍照识别 ---------- */
.card-scan { border: 1px solid var(--line); background: #f8fafc; border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.card-uploader { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px; border: 1px dashed var(--brand); border-radius: 12px; background: #fff; cursor: pointer; text-align: center; }
.card-uploader input { display: none; }
.card-uploader strong { font-size: 14px; color: var(--brand); }
.card-uploader span { font-size: 11.5px; color: var(--muted); }
.card-scan-status { margin-top: 8px; font-size: 12px; min-height: 18px; }
.danger-text { color: #c0392b; }
.card-scan-preview { position: relative; margin-top: 10px; display: inline-block; }
.card-scan-preview img { max-height: 180px; border-radius: 10px; border: 1px solid var(--line); }
.card-scan-preview .btn { position: absolute; right: 6px; bottom: 6px; }

/* ---------- 地图找点 ---------- */
.map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.map-toolbar label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.map-toolbar select, .map-toolbar input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.map-count { font-size: 12.5px; color: var(--muted); }
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.map-canvas { height: 560px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #eef3f8; position: relative; z-index: 0; }
.map-side { max-height: 560px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.map-card { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.map-card img { width: 56px; height: 44px; object-fit: cover; border-radius: 8px; flex: 0 0 56px; }
.map-card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; cursor: pointer; }
.map-card-body strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-card.active { border-color: var(--brand); box-shadow: 0 6px 18px rgba(26,115,232,.14); }
.map-pin { display: grid; place-items: center; }
.map-pin span { display: block; padding: 3px 7px; border-radius: 8px 8px 8px 2px; background: #5f7488; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; box-shadow: 0 4px 10px rgba(16,38,58,.25); }
.map-pin.idle span { background: var(--brand); }
.map-pop { display: flex; flex-direction: column; gap: 4px; }
.map-pop img { width: 100%; height: 96px; object-fit: cover; border-radius: 8px; }
.leaflet-container { font: inherit; }
@media (max-width: 900px) {
  .map-wrap { grid-template-columns: minmax(0, 1fr); }
  .map-canvas { height: 380px; }
  .map-side { max-height: 260px; }
}

.tpl-switch { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }
.tpl-switch .switch-line { padding: 6px 0; }
.tpl-switch code { background: #f1f5f9; padding: 1px 5px; border-radius: 5px; font-size: 11px; }

.pick-area { margin: 4px 0 12px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; background: #fbfdff; }

.demo-wm{position:fixed;inset:0;z-index:80;pointer-events:none;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MjAiIGhlaWdodD0iMjQwIiB2aWV3Qm94PSIwIDAgNDIwIDI0MCI+CjxnIHRyYW5zZm9ybT0icm90YXRlKC0yNCAyMTAgMTIwKSIgZmlsbD0iIzRkNmY4YyIgZmlsbC1vcGFjaXR5PSIwLjEzIgogICBmb250LWZhbWlseT0iTWljcm9zb2Z0IFlhSGVpLFBpbmdGYW5nIFNDLFNvdXJjZSBIYW4gU2FucyBTQyxOb3RvIFNhbnMgU0Msc2Fucy1zZXJpZiIKICAgdGV4dC1hbmNob3I9Im1pZGRsZSIgZm9udC13ZWlnaHQ9IjYwMCI+Cjx0ZXh0IHg9IjIxMCIgeT0iMTEyIiBmb250LXNpemU9IjE1Ij7kuIrmtbfmgJ3miazkv6Hmga8gwrcg566X5pWw56eR5oqAPC90ZXh0Pgo8dGV4dCB4PSIyMTAiIHk9IjE0MCIgZm9udC1zaXplPSIxNCI+5ryU56S65L2/55SoIMK3IDE4MDE2MzEzMzQyIOW+ruS/oeWQjOWPtzwvdGV4dD4KPC9nPgo8L3N2Zz4=");background-repeat:repeat;background-size:420px 240px;background-position:0 0;}
@media print{.demo-wm{display:none}}

/* ---------- 演示水印与版权（上海思扬信息 · 算数科技） ---------- */
.demo-wm-badge{position:fixed;right:14px;bottom:14px;z-index:81;pointer-events:none;
  font-size:11.5px;letter-spacing:.2px;color:rgba(12,42,68,.42);background:rgba(255,255,255,.72);
  border:1px solid rgba(12,42,68,.1);border-radius:999px;padding:4px 10px;backdrop-filter:blur(4px)}
.side-copy{padding:10px 2px 2px;text-align:center;font-size:10.5px;line-height:1.75;letter-spacing:0;color:rgba(207,225,238,.5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side-copy a{color:rgba(207,225,238,.72);text-decoration:none}
.side-copy a:hover{color:#fff;text-decoration:underline}
@media print{.demo-wm,.demo-wm-badge{display:none}}
