/* ORICO 闪存报价模型 · 样式 */
:root {
  --bg: #f9fafb; --panel: #fff; --border: #e5e7eb; --text: #111827;
  --sub: #4b5563; --mute: #9ca3af;
  --primary: #1a56db; --primary-soft: #e0e7ff; --primary-dark: #1e3a8a;
  --up: #d92d20; --up-soft: #fee4e2;
  --down: #0f9d58; --down-soft: #dcfae6;
  --warn: #b54708; --warn-soft: #fef3c7;
  --cost: #fef3c7;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.55 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif; }

.topbar { background: linear-gradient(135deg,#1a56db,#2563eb); color: #fff; height: 54px; padding: 0 18px; display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 30; flex-wrap: nowrap; }
.topbar > * { flex: 0 0 auto; }
.topbar .btn, .role-switch button, .lang-switch button { white-space: nowrap; }
/* 英文文案更长，窄屏收起次要信息，避免顶栏挤爆 */
@media (max-width: 1500px) { .logo .sub, .rate-box .trunc { display: none; } .topbar { gap: 10px; } }
@media (max-width: 1280px) { .live-badge .hint { display: none; } }
.logo { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.logo .sub { font-weight: 400; opacity: .75; font-size: 12px; }
.role-switch { display: flex; background: rgba(255,255,255,.16); border-radius: 8px; padding: 3px; }
.role-switch button { border: 0; background: transparent; color: #e5e7eb; padding: 5px 14px; border-radius: 6px; cursor: pointer; font-size: 12.5px; font-family: inherit; }
.role-switch button.active { background: #fff; color: var(--primary-dark); font-weight: 600; }
.rate-box { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.rate-box input { width: 74px; padding: 4px 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.16); color: #fff; font-family: inherit; }
.rate-box input::placeholder { color: #dbeafe; }
.rate-box .trunc { opacity: .8; font-size: 11.5px; }
.spacer { flex: 1; }
.lang-switch { display: flex; background: rgba(255,255,255,.16); border-radius: 8px; padding: 3px; }
.lang-switch button { border: 0; background: transparent; color: #e5e7eb; padding: 4px 9px; border-radius: 6px; cursor: pointer; font-size: 12px; font-family: inherit; line-height: 1.2; }
.lang-switch button.active { background: #fff; color: var(--primary-dark); font-weight: 600; }
.live-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; background: rgba(255,255,255,.14); padding: 4px 11px; border-radius: 20px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #6ee7b7; animation: pl 1.6s infinite; }
.pulse.off { background: #d1d5db; animation: none; }
@keyframes pl { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.btn { border: 1px solid var(--border); background: #fff; color: var(--text); padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 12.5px; font-family: inherit; }
.btn:hover { border-color: #c7d2fe; color: var(--primary); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); color: #fff; }
.btn.danger { color: var(--up); border-color: #fecaca; }
.topbar .btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }
.topbar .btn:hover { background: rgba(255,255,255,.28); color: #fff; }

.wrap { max-width: 1560px; margin: 0 auto; padding: 14px 18px 110px; }
.formula { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.f-item { display: flex; flex-direction: column; gap: 1px; }
.f-item b { font-size: 12px; color: var(--sub); font-weight: 600; }
.f-item code { font-size: 12.5px; font-family: "SF Mono", Consolas, Menlo, monospace; color: var(--primary-dark); }
.f-item.hl code { color: var(--up); font-weight: 700; }
.formula .arrow { color: var(--mute); align-self: center; font-size: 15px; }
.hint { color: var(--mute); font-size: 11.5px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 11px; margin-bottom: 14px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 14px; box-shadow: var(--shadow); }
.card .k { font-size: 12px; color: var(--sub); }
.card .v { font-size: 20px; font-weight: 700; letter-spacing: -.3px; margin-top: 2px; }
.card .s { font-size: 11.5px; color: var(--mute); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; font-size: 13px; color: var(--sub); font-family: inherit; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-hd { padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-hd h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.panel-bd { padding: 12px 14px; }
.chk { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--sub); cursor: pointer; }
.chk-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.bulk { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--border); background: #f9fafb; flex-wrap: wrap; }
.bulk .bt { font-size: 12px; color: var(--sub); font-weight: 600; }

.scroll { overflow-x: auto; max-height: 68vh; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { position: sticky; top: 0; z-index: 2; text-align: left; font-weight: 600; color: var(--sub); padding: 8px 9px; border-bottom: 1px solid var(--border); background: #f3f4f6; white-space: nowrap; }
td { padding: 6px 9px; border-bottom: 1px solid #f1f3f5; vertical-align: middle; }
tbody tr:hover { background: #f8fafc; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.c-img { width: 46px; }
.thumb { width: 34px; height: 34px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 5px; }
.noimg { width: 34px; height: 34px; border: 1px dashed var(--border); border-radius: 5px; display: flex; align-items: center; justify-content: center; color: #d1d5db; font-size: 15px; }
.cost-col { background: #fffbeb; }
th.cost-col { background: #fef3c7; }
input[type=text], input[type=number], select { border: 1px solid var(--border); border-radius: 5px; padding: 3px 6px; font-size: 12.5px; font-family: inherit; color: var(--text); background: #fff; }
input:focus, select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
.w70 { width: 70px; } .w60 { width: 60px; } .w80 { width: 80px; }
.up { color: var(--up); font-weight: 600; } .down { color: var(--down); font-weight: 600; } .flat { color: var(--mute); }
.tag { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 11px; background: #f3f4f6; color: var(--sub); border: 1px solid var(--border); }
.tag.a { background: var(--primary-soft); color: var(--primary); border-color: #c7d2fe; }
.tag.b { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }
.tag.gap { background: var(--up-soft); color: var(--up); border-color: #fecaca; }
.rec { color: #f59e0b; font-size: 13px; }
.model-name { font-weight: 600; font-family: "SF Mono", Consolas, monospace; font-size: 12px; }
.mask-note { color: var(--mute); font-size: 11px; }
.flash-up { animation: fu 1s; } .flash-down { animation: fd 1s; }
@keyframes fu { 0% { background: #fee4e2; } 100% { background: transparent; } }
@keyframes fd { 0% { background: #dcfae6; } 100% { background: transparent; } }
.quote-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.field { display: flex; align-items: center; gap: 6px; }
.field label { color: var(--sub); font-size: 12.5px; }
.valid-note { background: var(--warn-soft); border: 1px solid #fde68a; color: var(--warn); padding: 8px 13px; border-radius: var(--radius); font-size: 12.5px; margin-bottom: 12px; }
.tier-now { background: var(--primary-soft); color: var(--primary); padding: 1px 6px; border-radius: 4px; font-size: 11px; }
.big { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty { padding: 36px; text-align: center; color: var(--mute); }

.basket { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,.06); z-index: 40; }
.bk-inner { max-width: 1560px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 14px; }
.bk-l { display: flex; flex-direction: column; }
.bk-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bk-total { font-size: 19px; font-weight: 700; color: var(--up); font-variant-numeric: tabular-nums; margin-right: 6px; }

.modal-mask { position: fixed; inset: 0; background: rgba(17,24,39,.4); display: none; align-items: center; justify-content: center; z-index: 50; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 10px; width: 520px; max-width: 92vw; max-height: 86vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal-hd { padding: 13px 17px; border-bottom: 1px solid var(--border); font-weight: 600; }
.modal-bd { padding: 15px 17px; }
.modal-ft { padding: 11px 17px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.form-row { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.form-row label { width: 92px; color: var(--sub); font-size: 12.5px; flex-shrink: 0; }
.form-row input, .form-row select { flex: 1; }
.ov-pick { display: flex; gap: 6px; margin: 10px 0 6px; }
.ov-pick-list { max-height: 150px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; }
.ov-pick-list div { padding: 4px 9px; cursor: pointer; font-size: 12px; display: flex; justify-content: space-between; }
.ov-pick-list div:hover { background: var(--primary-soft); }
.ov-list { display: flex; flex-direction: column; gap: 5px; max-height: 170px; overflow: auto; }
.ov-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ov-row span { flex: 1; font-family: "SF Mono", Consolas, monospace; }
.toast { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%) translateY(16px); background: #111827; color: #fff; padding: 8px 17px; border-radius: 18px; font-size: 12.5px; opacity: 0; transition: .22s; pointer-events: none; z-index: 99; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hidden { display: none !important; }

.sync-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
.sync-row > label { color: var(--sub); font-size: 12.5px; white-space: nowrap; }
.sync-row code { font-family: "SF Mono", Consolas, monospace; font-size: 11.5px; background: #f3f4f6; padding: 1px 5px; border-radius: 4px; }
.drop { border: 1.5px dashed #c7d2fe; background: #f8faff; border-radius: 10px; padding: 22px 18px; text-align: center; cursor: pointer; transition: .15s; margin-top: 8px; }
.drop:hover, .drop.over { background: var(--primary-soft); border-color: var(--primary); }
.drop b { font-size: 13px; color: var(--primary-dark); }
.drop .hint { margin-top: 5px; }
#diffBody tr td:nth-child(5) { color: var(--mute); }

/* 官网链接 */
.site-link { text-decoration: none; display: inline-flex; align-items: center; }
.site-go { font-size: 11px; color: var(--primary); text-decoration: none; opacity: .55; margin-left: 2px; }
.site-go:hover { opacity: 1; text-decoration: underline; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 4px 0; font-size: 11.5px; color: var(--mute); }
.foot a { color: var(--primary); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* 快速更新 / 粘贴区 */
.qk-area { width: 100%; min-height: 128px; resize: vertical; border: 1px solid var(--border); border-radius: 7px; padding: 9px 11px;
  font-family: "SF Mono", Consolas, Monaco, monospace; font-size: 12.5px; line-height: 1.75; color: var(--text); background: #fcfcfd; tab-size: 8; }
.qk-area:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.qk-area.sm { min-height: 84px; }
.paste-box { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--border); }
.warn-note { margin-top: 8px; padding: 8px 11px; background: var(--warn-soft); border: 1px solid #fde68a; border-radius: 6px; color: var(--warn); line-height: 1.7; }

/* 邮件预览 */
.mail-preview { border: 1px solid var(--border); border-radius: 6px; max-height: 260px; overflow: auto; background: #f4f5f7; padding: 0; }
.modal-bd textarea { width: 100%; border: 1px solid var(--border); border-radius: 5px; padding: 5px 8px; font-family: inherit; font-size: 12.5px; resize: vertical; }

@media print { .topbar, .basket, .quote-bar, .tabs, .bulk, .panel-hd, .valid-note, .formula { display: none !important; } .scroll { max-height: none; overflow: visible; } }

/* ---------- 登录 ---------- */
.login-mask { position: fixed; inset: 0; background: linear-gradient(135deg,#1e3a8a,#1a56db 55%,#2563eb); display: none; align-items: center; justify-content: center; z-index: 100; }
.login-mask.show { display: flex; }
.login-card { width: 366px; background: #fff; border-radius: 12px; box-shadow: 0 20px 45px rgba(0,0,0,.28); padding: 26px 26px 22px; }
.lg-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.lg-brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }
.lg-brand b { font-size: 16px; letter-spacing: .5px; }
.lg-brand .sub { font-size: 12px; color: var(--mute); margin-left: auto; }
.lg-btn { width: 100%; padding: 8px; font-size: 13.5px; margin-top: 4px; }
.lg-err { color: var(--up); background: var(--up-soft); border: 1px solid #fecaca; border-radius: 6px; padding: 6px 9px; font-size: 12px; margin: 8px 0; }
.lg-tip { color: var(--mute); font-size: 11.5px; margin-top: 10px; text-align: center; line-height: 1.5; }
.lg-cmd { display: block; background: #f3f4f6; border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; font-family: "SF Mono", Consolas, monospace; font-size: 12px; margin: 8px 0; }
#lgOffline .btn { width: 100%; margin-top: 6px; }

/* ---------- 顶栏账号 ---------- */
.user-chip { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,.14); padding: 4px 9px; border-radius: 20px; }
.user-chip .u-n { font-size: 12.5px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-tag { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: rgba(255,255,255,.28); white-space: nowrap; }
.role-tag.r-admin { background: #fde68a; color: #78350f; }
.role-tag.r-operator { background: #bfdbfe; color: #1e3a8a; }
.role-tag.r-customer { background: #bbf7d0; color: #14532d; }

/* 无成本权限时隐藏成本列（表格单元格与表头共用 .cost-col） */
.no-cost .cost-col { display: none; }

/* ==========================================================
   ThinkPHP 服务端渲染页面（原生视图）补充样式
   ========================================================== */
.hidden { display: none !important; }
.wrap { max-width: 1680px; }

/* ---------- 顶栏 ---------- */
.rate-box { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.14); padding: 4px 10px; border-radius: 8px; }
.rate-box label { font-size: 12px; color: #e5e7eb; }
.rate-box input { width: 76px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.2); color: #fff; border-radius: 5px; padding: 3px 6px; font: inherit; font-size: 12.5px; }
.rate-box .trunc, .rate-box .ro { font-size: 11.5px; color: #bfdbfe; }
.sw-box { color: #fff; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; user-select: none; }
.switch input { width: 15px; height: 15px; accent-color: var(--primary); }
.lang-switch a { padding: 4px 9px; border-radius: 6px; color: #e5e7eb; text-decoration: none; font-size: 12px; }
.lang-switch a.active { background: #fff; color: var(--primary-dark); font-weight: 600; }
.cust-pick select { border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.2); color: #fff; border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 12.5px; }
.cust-pick select option { color: #111827; }
.site-link { text-decoration: none; }

/* ---------- Tab ---------- */
.tabs a.tab { border: 0; background: transparent; padding: 8px 14px; text-decoration: none; font-size: 13px; color: var(--sub); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.tab:hover { color: var(--primary); }
.tabs a.tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* ---------- 工具条 ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ipt { border: 1px solid var(--border); border-radius: 6px; padding: 5px 9px; font: 13px/1.4 inherit; background: #fff; color: var(--text); }
.ipt:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.ipt.num { width: 100px; }
.ipt.ta { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.ipt.file { padding: 3px; }
.ipt.inline { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0; }
select.ipt[multiple] { height: 84px; }
.meta { margin: 0 0 8px; color: var(--sub); font-size: 12.5px; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.btn.xs { padding: 1px 7px; font-size: 11.5px; }
.btn.ghost { background: #f9fafb; }
.btn.block { width: 100%; text-align: center; }

/* ---------- 表格 ---------- */
.panel { padding: 12px 14px; }
.table-scroll { overflow: auto; max-height: 74vh; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.grid th { position: sticky; top: 0; z-index: 2; background: #f3f4f6; text-align: left; font-weight: 600; color: var(--sub); }
.grid td, .grid th { border-bottom: 1px solid var(--border); padding: 4px 7px; white-space: nowrap; }
.grid tbody tr:hover { background: #f9fafb; }
.grid.sm td, .grid.sm th { padding: 3px 6px; }
.cell { width: 100%; box-sizing: border-box; border: 1px solid transparent; background: transparent; padding: 3px 5px; font: inherit; color: inherit; border-radius: 4px; min-width: 66px; }
.cell:hover { border-color: var(--border); background: #fff; }
.cell:focus { border-color: var(--primary); background: #fff; outline: none; box-shadow: 0 0 0 2px var(--primary-soft); }
.cell.num { text-align: right; }
.cell:disabled { border-color: transparent; background: transparent; color: var(--sub); }
select.cell { min-width: 108px; }
.c-gap.warn, td.warn { background: var(--up-soft); color: var(--up); font-weight: 600; }
.c-gap.note { background: var(--warn-soft); color: var(--warn); }
td.miss { background: #fff5f5; color: var(--up); }
.empty { text-align: center; color: var(--mute); padding: 24px; }
.c-no { width: 46px; color: var(--mute); }
.c-model { min-width: 186px; font-weight: 600; }
.mlink { color: var(--primary); text-decoration: none; }
.mlink:hover { text-decoration: underline; }
.sub-en { display: block; font-size: 11px; color: var(--mute); font-weight: 400; }
.c-ops { white-space: nowrap; }
.c-code b { letter-spacing: .3px; }
.sort { color: inherit; text-decoration: none; }
.sort:hover { color: var(--primary); }
.pill { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-size: 11px; text-align: center; }
.tag.ok { background: var(--down-soft); color: var(--down); border-color: #a7f3d0; }
.tag.bad { background: var(--up-soft); color: var(--up); border-color: #fecaca; }
.c-ts, .c-msg { color: var(--mute); font-size: 11.5px; }
.c-pos { color: var(--sub); }
.c-price b { color: var(--up); }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 5px; align-items: center; margin: 10px 0 2px; flex-wrap: wrap; }
.pager .btn { text-decoration: none; }
.pager .btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 区块与表单 ---------- */
.block { margin-bottom: 18px; }
.block-title { font-size: 13.5px; margin: 0 0 8px; font-weight: 600; }
.hint-block { color: var(--sub); font-size: 12.5px; margin: 6px 0; line-height: 1.65; }
.ul { margin: 6px 0 0 18px; padding: 0; color: var(--sub); font-size: 12.5px; }
.ul li { margin-bottom: 3px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .cols-2 { grid-template-columns: 1fr; } }
.stat-line { font-size: 12.5px; color: var(--sub); margin: 8px 0; padding: 6px 10px; background: #f9fafb; border: 1px solid var(--border); border-radius: 6px; }
.result-box { margin-top: 10px; max-height: 360px; overflow: auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 9px; }
.frow { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.frow > label, .frow > span { color: var(--sub); font-size: 12px; }
.frow.wide { grid-column: 1 / -1; }
.frow.actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.frow.switch-row { flex-direction: row; align-items: center; justify-content: space-between; }
.modal-body .frow { margin-bottom: 9px; }
.src-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.src-card { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: #fff; }
.src-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.src-card b { display: block; margin-bottom: 4px; font-size: 13px; }
.src-card p { margin: 0; color: var(--sub); font-size: 12px; }
.src-card code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

/* ---------- 弹窗（覆盖旧版 .modal 卡片式定义） ---------- */
.modal { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: flex; align-items: flex-start; justify-content: center; z-index: 60; padding: 44px 16px; overflow: auto; width: auto; max-width: none; max-height: none; border-radius: 0; box-shadow: none; }
.modal.hidden { display: none; }
.modal-card { background: #fff; border-radius: 10px; width: 560px; max-width: 94vw; box-shadow: 0 20px 50px rgba(0,0,0,.22); }
.modal-card.wide { width: 840px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; }
.modal-body { padding: 14px 16px; max-height: 66vh; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); }

/* ---------- 登录页 ---------- */
.login-page .login-mask { display: flex; }
.login-card .lc-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 16px; }
.login-card .lc-brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); display: inline-block; }
.login-card .lc-brand .sub { font-size: 12px; color: var(--mute); font-weight: 400; margin-left: 2px; }
.lc-label { display: block; font-size: 12px; color: var(--sub); margin: 10px 0 4px; }
.lc-input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 13.5px; }
.lc-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.lc-err { background: var(--up-soft); color: var(--up); border: 1px solid #fecaca; border-radius: 6px; padding: 7px 10px; font-size: 12.5px; margin-bottom: 4px; }
.login-card .btn.block { margin-top: 16px; padding: 8px; font-size: 13.5px; }
.lc-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; }
.lc-foot a { color: var(--mute); text-decoration: none; }
.lc-foot a:hover { color: var(--primary); }
.lc-foot .spacer { flex: 1; }

/* ---------- 客户页 ---------- */
.cust-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 14px; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; box-shadow: var(--shadow); }
.cc-name { font-size: 15px; }
.cc-code { color: var(--mute); font-size: 12px; margin-left: 8px; }
.cc-en { color: var(--sub); font-size: 12px; margin-left: 8px; }
.cc-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--sub); font-size: 12.5px; }
.cc-meta b { color: var(--text); }
.tier-hint { font-size: 12.5px; color: var(--sub); }
.tier-hint b { color: var(--primary); }

/* ============ 客户视图：次导航 / 勾选条 / 报价单 / 打印 ============ */

.subnav { display: flex; gap: 2px; padding: 0 18px; background: var(--panel); border-bottom: 1px solid var(--border); }
.subnav .sn-item { padding: 9px 15px; font-size: 13px; color: var(--sub); text-decoration: none; border-bottom: 2px solid transparent; }
.subnav .sn-item:hover { color: var(--primary); }
.subnav .sn-item.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

.pick-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 10px; margin-bottom: 8px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; color: var(--sub); }
.pick-bar .ck-all { display: flex; align-items: center; gap: 5px; cursor: pointer; color: var(--text); }
.pick-bar .pb-total b { color: var(--up); font-size: 14px; }
.grid .c-pick { width: 34px; text-align: center; }
.grid .c-pick input { cursor: pointer; }

/* 勾选表单：只是包一层，不要影响原有排版与滚动区 */
.quote-form { margin: 0; }
.modal-foot .spacer { flex: 1; }

.quote-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12.5px; color: var(--sub); }
.quote-bar b { color: var(--text); }

/* 报价单纸张 */
.sheet { background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
  padding: 30px 34px 26px; max-width: 980px; margin: 0 auto; }
.sh-head { display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 2px solid var(--text); padding-bottom: 12px; }
.sh-brand { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.sh-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); display: inline-block; }
.sh-brand .sub { font-size: 12px; color: var(--mute); font-weight: 400; }
.sh-title { text-align: right; }
.sh-title h1 { margin: 0; font-size: 22px; letter-spacing: 3px; }
.sh-title p { margin: 3px 0 0; font-size: 11.5px; color: var(--mute); }

.sh-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.sh-box { border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; display: flex; flex-direction: column; gap: 2px; }
.sh-k { font-size: 11px; color: var(--mute); }
.sh-v { font-size: 13.5px; font-weight: 600; }

.sh-party { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.sh-to, .sh-from { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--sub); }
.sh-to b, .sh-from b { font-size: 14px; color: var(--text); margin-bottom: 2px; }

.sh-grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sh-grid th, .sh-grid td { border: 1px solid var(--border); padding: 6px 8px; }
.sh-grid thead th { background: #f8fafc; text-align: left; font-weight: 600; }
.sh-grid .c-qty, .sh-grid .c-price, .sh-grid .c-amt { text-align: right; width: 92px; }
.sh-grid tfoot td { background: #f8fafc; font-weight: 600; }
.sh-grid .tf-label { text-align: right; }
.sh-grid .tf-total { color: var(--up); font-size: 14px; }
.sh-grid .empty { text-align: center; color: var(--mute); padding: 18px; }

.sh-rule { margin: 10px 0 4px; font-size: 12px; color: var(--sub); }
.sh-remark, .sh-terms { margin-top: 12px; font-size: 12.5px; }
.sh-remark p { margin: 4px 0 0; color: var(--text); }
.sh-terms pre { margin: 4px 0 0; white-space: pre-wrap; font-family: inherit; color: var(--sub); line-height: 1.7; }

.sh-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 26px; }
.sg-box { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--mute); }
.sg-line { height: 46px; border-bottom: 1px dashed var(--border); margin: 6px 0; }

/* 历史 / 资料 */
.pn-head { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.pn-head b { font-size: 13.5px; }
.panel + .panel { margin-top: 12px; }
.c-time { color: var(--mute); font-size: 12px; white-space: nowrap; }
.c-mail { color: var(--sub); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.bad { background: var(--up-soft); color: var(--up); }
.pill.ok { background: #dcfce7; color: #15803d; }
.pill.warn { background: #fef3c7; color: #b45309; }
.c-gap.up { color: var(--up); }
.c-gap.down { color: #15803d; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
table.kv { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.kv th { width: 120px; text-align: left; color: var(--mute); font-weight: 400; padding: 7px 14px; }
table.kv td { padding: 7px 14px; border-bottom: 1px solid #f1f5f9; }
.panel .hint { padding: 8px 14px 12px; font-size: 12px; color: var(--mute); }

.pwd-form { padding: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 240px)); gap: 10px; align-items: end; }
.pwd-form .frow { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.pwd-form label { font-size: 12px; color: var(--sub); }
.pwd-form .btn { height: 32px; }

.flash { padding: 9px 14px; border-radius: 8px; font-size: 12.5px; margin-bottom: 12px; }
.flash.ok { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.flash.bad { background: var(--up-soft); color: var(--up); border: 1px solid #fecaca; }

/* 登录页补充 */
.lc-remember { display: flex; align-items: center; gap: 6px; margin: 12px 0 4px; font-size: 12.5px; color: var(--sub); cursor: pointer; }
.lc-tip { margin: 14px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--mute); }

/* 打印：只留报价单纸张 */
@media print {
  .topbar, .subnav, .quote-bar, #toast, .modal { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; max-width: none; }
  .sheet { border: 0; box-shadow: none; border-radius: 0; padding: 0; max-width: none; }
  .sh-grid th, .sh-grid td { padding: 5px 6px; }
}

/* ---------- 购物车 ---------- */
.cart-btn { position: relative; }
.grid .c-qty { width: 86px; }
.grid .row-qty { width: 72px; padding: 3px 5px; text-align: right; }
.grid .tier-hint { display: block; font-size: 10.5px; color: var(--mute); font-weight: 400; line-height: 1.2; }
.cart-card { width: min(860px, 94vw); max-height: 86vh; display: flex; flex-direction: column; }
.cart-card .modal-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.cart-card form { display: flex; flex-direction: column; min-height: 0; }
.cart-list { overflow: auto; padding: 10px 12px; flex: 1 1 auto; min-height: 120px; }
.cart-grid th, .cart-grid td { padding: 6px 8px; white-space: nowrap; }
.cart-grid .cart-qty { width: 78px; text-align: right; }
.cart-grid .c-ops { text-align: right; }
.cart-foot { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border);
  background: var(--panel); font-size: 13px; }
.cart-foot .cart-total { color: var(--up); font-size: 16px; }
@media print { .cart-card { display: none !important; } }

/* ---------- 产品图片 / 规格 / 悬浮放大 ---------- */
.grid .c-img { width: 54px; text-align: center; }
.grid .c-img .pthumb { display: inline-block; line-height: 0; cursor: zoom-in; }
.grid .c-img img { width: 44px; height: 44px; object-fit: contain; background: #fff;
  border: 1px solid var(--border); border-radius: 6px;
  transition: transform .12s ease, box-shadow .12s ease; }
.grid .c-img .pthumb:hover img { transform: scale(1.06); box-shadow: 0 3px 12px rgba(15,23,42,.18); }
.grid .c-img .no-img { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center;
  color: var(--mute); border: 1px dashed var(--border); border-radius: 6px; background: var(--panel); font-size: 11px; }

.c-model .sub-line { display: block; font-weight: 400; font-size: 11px; color: var(--sub); line-height: 1.35;
  max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-model .sub-line.pos { color: var(--mute); }

/* 2026-11-04 列表拆细：型号 / 产品图片 / 定位 / 品类 / 容量 / Read Speed / Write Speed / Feature / Warranty
   客户页与管理端共用这套列样式（两处都有 .grid） */
.grid .c-pos { font-size: 11.5px; color: var(--mute); }
.grid .c-rd, .grid .c-wr { font-size: 11.5px; color: var(--sub); white-space: nowrap; }
.page-client .grid .c-rd, .page-client .grid .c-wr { text-align: right; }
.grid .c-feat { font-size: 11.5px; color: var(--sub); }
/* 长文本用内层 span 截断：td 上的 max-width 在自动布局里不生效 */
.grid .c-pos .clip, .grid .c-feat .clip { display: inline-block; max-width: 175px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
/* 管理端：规格列给定宽度上限，避免把价格列挤到看不见 */
.page-admin #prodGrid .c-pos { max-width: 150px; }
.page-admin #prodGrid .c-feat { max-width: 150px; }
.page-admin #prodGrid .c-pos .clip, .page-admin #prodGrid .c-feat .clip { max-width: 150px; }
.page-admin #prodGrid .c-rd, .page-admin #prodGrid .c-wr, .page-admin #prodGrid .c-war { white-space: nowrap; }
/* 编辑弹窗里的图片预览 */
.fimg-pre { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; margin-top: 4px; }
.c-spec { font-size: 11.5px; color: var(--sub); white-space: nowrap; }
.c-spec .rw { display: block; line-height: 1.35; }
.c-spec .rw i { font-style: normal; display: inline-block; width: 13px; color: var(--mute); font-weight: 600; }
.c-spec .spec-feat { display: block; color: var(--sub); font-size: 11px; }
.c-spec .spec-war { display: block; color: var(--mute); font-size: 11px; }
.c-war { font-size: 12px; color: var(--sub); white-space: nowrap; }

/* 放大预览：fixed 定位，逃出 .table-scroll 的 overflow 裁剪 */
.img-zoom { position: fixed; z-index: 9990; left: -9999px; top: 0; width: 330px; height: 330px; padding: 12px;
  display: flex; align-items: center; justify-content: center; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 44px rgba(15,23,42,.24);
  opacity: 0; visibility: hidden; transform: scale(.96);
  transition: opacity .12s ease, transform .12s ease; pointer-events: none; }
.img-zoom.on { opacity: 1; visibility: visible; transform: scale(1); }
.img-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; }

.sheet-hint { margin: 10px 0 0; padding: 10px 12px; background: var(--warn-soft); color: var(--warn);
  border-radius: 8px; font-size: 12.5px; }

@media print { .img-zoom { display: none !important; } }
