:root {
  --primary: #409eff;
  --primary-dark: #337ecc;
  --bg: #f5f7fa;
  --card: #fff;
  --text: #333;
  --text-2: #666;
  --text-3: #999;
  --border: #e4e7ed;
  --danger: #f56c6c;
  --success: #67c23a;
  --warning: #e6a23c;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
#app { min-height: 100%; }
.page { padding: 12px; padding-bottom: 80px; }

/* header */
.header { position: sticky; top: 0; z-index: 10; background: var(--card); padding: 12px; display: flex; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.header .back { width: 32px; color: var(--text-2); font-size: 20px; }
.header .title { flex: 1; text-align: center; font-size: 16px; font-weight: 500; }
.header .right { width: 32px; text-align: right; }

/* login */
.login-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; background: linear-gradient(180deg, #eef5ff 0%, #fff 60%); }
/* ---- 前置选择页 ---- */
.welcome-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; background: linear-gradient(180deg, #eef5ff 0%, #fff 60%); }
.welcome-logo { width: 80px; height: 80px; border-radius: 20px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; margin-bottom: 20px; }
.welcome-title { font-size: 22px; font-weight: 600; margin-bottom: 36px; }
.welcome-cards { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.welcome-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.welcome-card:active { transform: scale(.98); border-color: var(--primary); }
.wc-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; }
.wc-icon-money { background: #fff4e5; }
.wc-icon-ticket { background: #e8f3ff; }
.wc-name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.wc-desc { font-size: 13px; color: var(--text-2); }
.welcome-footer { margin-top: 40px; font-size: 12px; color: var(--text-3, #999); }
.login-logo { width: 80px; height: 80px; border-radius: 20px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 24px; }
.login-title { font-size: 20px; font-weight: 600; margin-bottom: 32px; }
.login-form { width: 100%; max-width: 320px; }
.input-group { margin-bottom: 16px; }
.input-group label { display: block; margin-bottom: 6px; color: var(--text-2); }
.input-group label .required { color: var(--danger); margin-left: 2px; }
.reg-tip { background: #f5f7fa; border-radius: 8px; padding: 12px 14px; font-size: 12px; color: var(--text-2); line-height: 1.7; margin-bottom: 16px; max-width: 320px; }
.reg-login-link { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 16px; }
.reg-login-link a { color: var(--primary); font-weight: 600; }
.input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; }
.input:focus { outline: none; border-color: var(--primary); }
.btn { display: block; width: 100%; padding: 12px; border: none; border-radius: 8px; font-size: 15px; text-align: center; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-default { background: #fff; color: var(--text); border: 1px solid var(--border); }

/* home */
.home-welcome { font-size: 16px; margin-bottom: 16px; }
.home-welcome span { font-weight: 600; }
.home-org { font-size: 13px; color: #888; margin-top: 4px; }
.menu-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.menu-btn { display: flex; align-items: center; justify-content: center; padding: 18px; border-radius: 10px; color: #fff; font-size: 16px; font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.menu-btn.blue { background: #5b9bf7; }
.menu-btn.orange { background: #f0ad4e; }
.menu-btn.green { background: #7bc142; }
.menu-btn.red { background: #e46b68; }
.menu-btn.white { background: #fff; color: var(--text); border: 1px solid var(--border); }
.menu-btn .icon { margin-right: 10px; font-size: 20px; }

/* list */
.search-bar { display: flex; gap: 10px; margin-bottom: 12px; }
.search-bar .input { flex: 1; }
.filter-tabs { display: flex; gap: 12px; margin-bottom: 12px; overflow-x: auto; }
.filter-tab { white-space: nowrap; padding: 6px 0; color: var(--text-2); border-bottom: 2px solid transparent; }
.filter-tab.active { color: var(--primary); border-color: var(--primary); }
.card { background: var(--card); border-radius: 10px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.card-row { display: flex; justify-content: space-between; margin-bottom: 6px; line-height: 1.5; }
.card-row .label { color: var(--text-2); }
.card-row .value { text-align: right; max-width: 60%; }
.progress-red { color: #e02020; font-weight: 600; font-size: 19px; }
.card-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.link { color: var(--primary); }
.status-red { color: var(--danger); }
.status-green { color: var(--success); }
.status-orange { color: var(--warning); }
.empty { text-align: center; color: var(--text-3); padding: 40px 0; }

/* float publish */
.float-publish { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; }
.float-publish .btn { border-radius: 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* form */
.form-page .section-title { font-size: 15px; font-weight: 600; margin: 16px 0 10px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text); }
.form-group label .required { color: var(--danger); margin-left: 2px; }
.radio-group { display: flex; flex-wrap: wrap; gap: 14px; }
.radio { display: flex; align-items: center; cursor: pointer; }
.radio input { margin-right: 6px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 14px; }
.checkbox { display: flex; align-items: center; cursor: pointer; }
.checkbox input { margin-right: 6px; }
.textarea { width: 100%; min-height: 80px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
.image-uploader { display: flex; flex-wrap: wrap; gap: 10px; }
.image-uploader::before, .qr-uploader::before { content: '请传图'; display: block; width: 100%; font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
#qr_imgs::before { content: '请传图：出库现场照片'; }
.image-item { width: 80px; height: 80px; border-radius: 8px; background: #f0f0f0; position: relative; overflow: hidden; }
.image-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-item .del { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; background: var(--danger); color: #fff; border-radius: 50%; text-align: center; line-height: 18px; font-size: 12px; }
.image-add { width: 80px; height: 80px; border: 1px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 24px; background: #fff; }
.image-preview { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 100; display: flex; align-items: center; justify-content: center; }
.image-preview img { max-width: 90vw; max-height: 70vh; object-fit: contain; border-radius: 4px; -webkit-touch-callout: default; }
.image-preview .close-preview { position: absolute; top: 16px; right: 16px; color: #fff; font-size: 28px; line-height: 1; padding: 8px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.form-actions .btn { flex: 1; }
.locate-btn { flex-shrink: 0; white-space: nowrap; padding: 0 14px; }
.locate-btn:disabled { opacity: 0.6; }

/* v286：通用图片缩略图（盒子订货记录/公告等页面），cost-card 内已有更具体样式会覆盖 */
.images { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.images img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; background: #f0f0f0; cursor: pointer; }

/* cost cards */
.cost-card .images { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.cost-card .images img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; background: #f0f0f0; }
.bank-images { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.bank-images img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; background: #f0f0f0; }

/* notice rich content */
.notice-content { margin: 8px 0; line-height: 1.7; font-size: 15px; color: var(--text); word-break: break-word; }
.notice-content.collapsed { max-height: 90px; overflow: hidden; }
.notice-content img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 8px auto; }
.notice-content p { margin: 6px 0; }

/* picker */
.picker-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; }
.picker-sheet { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; max-height: 70vh; z-index: 51; display: flex; flex-direction: column; }
.picker-header { display: flex; justify-content: space-between; padding: 14px; border-bottom: 1px solid var(--border); }
.picker-body { overflow-y: auto; padding: 8px 0; }
.picker-item { padding: 14px; border-bottom: 1px solid var(--border); }
.picker-item.selected { background: #eef5ff; color: var(--primary); }
.picker-search { padding: 10px 14px 2px; }
.sn-item { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--border); }
.sn-item.selected { background: #eef5ff; }
.sn-item.disabled { opacity: 0.45; }
.sn-check { flex: 0 0 20px; width: 20px; height: 20px; line-height: 20px; text-align: center; border: 1.5px solid var(--border); border-radius: 4px; font-size: 13px; color: #fff; }
.sn-item.selected .sn-check { background: var(--primary); border-color: var(--primary); }
.sn-name { flex: 1; word-break: break-all; font-size: 14px; }
.sn-bound { flex: 0 0 auto; font-size: 12px; color: #999; background: #f5f5f5; border-radius: 4px; padding: 2px 6px; }

/* toast */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.75); color: #fff; padding: 12px 20px; border-radius: 8px; z-index: 100; }

/* bottom actions (filter buttons) */
.bottom-actions { display: flex; gap: 10px; margin-top: 16px; }
.bottom-actions .btn { flex: 1; }
.btn-active { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; }

/* cumulative */
.cumulative-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.cumulative-actions .btn { width: 100%; }
.cumulative-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.cumulative-table th, .cumulative-table td { padding: 10px 6px; border-bottom: 1px solid var(--border); text-align: center; }
.cumulative-table th { background: #f5f7fa; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.cumulative-table td { color: var(--text); word-break: break-all; }
.notice-section-title { margin: 18px 0 10px; font-size: 15px; font-weight: 600; color: var(--text); }
.notice-toggle { color: var(--primary); font-size: 13px; margin-top: 6px; text-align: right; }

/* ---- 记住密码 / 切换账号 ---- */
.remember-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; font-size: 14px; color: var(--text-2); cursor: pointer; user-select: none; }
.remember-row input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.acc-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.acc-item:active { transform: scale(.98); }
.acc-item.current { border-color: var(--primary); background: #f0f7ff; }
.acc-avatar { width: 44px; height: 44px; border-radius: 50%; background: #e8f3ff; display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.acc-info { flex: 1; min-width: 0; }
.acc-name { font-size: 16px; font-weight: 600; color: var(--text); display: flex; align-items: center; }
.acc-cur { font-size: 11px; color: #fff; background: var(--primary); border-radius: 4px; padding: 1px 6px; margin-left: 6px; font-weight: 400; }
.acc-sub { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.acc-del { padding: 8px; font-size: 18px; color: #ccc; flex: none; }
.acc-del:active { color: var(--danger); }
.acc-add { width: 100%; margin-top: 16px; }
.empty-tip { text-align: center; color: var(--text-3); padding: 50px 0; font-size: 14px; line-height: 1.8; }

/* ---- BD 顶部下拉选择器 ---- */
.bd-selector { display: flex; align-items: center; gap: 4px; color: var(--primary); font-size: 13px; padding: 4px 2px; border-radius: 6px; cursor: pointer; max-width: 120px; }
.bd-selector span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-arrow { font-size: 10px; opacity: 0.8; }
.header .right { display: flex; align-items: center; justify-content: flex-end; }

/* ---- 每日出库排行榜弹窗（9:16） ---- */
.rank-overlay { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.62); display: flex; align-items: center; justify-content: center; animation: rkFade .25s ease; }
@keyframes rkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rkUp { from { transform: translateY(26px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes rkPop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rkShine { 0%,100% { text-shadow: 0 0 6px rgba(255,215,112,.55); } 50% { text-shadow: 0 0 16px rgba(255,215,112,.95); } }
.rank-modal { position: relative; height: min(82vh, 780px); aspect-ratio: 9 / 16; max-width: 92vw; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(175deg, #40102a 0%, #8f1d2c 48%, #c23a2b 100%); box-shadow: 0 18px 60px rgba(0,0,0,.5); animation: rkUp .35s ease; padding: 4% 5% 3.2%; box-sizing: border-box; }
.rank-modal::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% -10%, rgba(255,213,128,.28), transparent 55%), radial-gradient(ellipse at 50% 115%, rgba(255,180,60,.18), transparent 50%); pointer-events: none; }
.rank-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; line-height: 30px; text-align: center; border-radius: 50%; background: rgba(255,255,255,.14); color: #ffe9c9; font-size: 22px; cursor: pointer; z-index: 2; }
.rank-head { text-align: center; flex: none; margin-top: 1.5%; }
.rank-kicker { font-size: 12px; letter-spacing: 3px; color: #ffce7a; opacity: .9; }
.rank-title { font-size: 34px; font-weight: 800; color: #ffd970; margin-top: 8px; letter-spacing: 4px; animation: rkShine 2.4s ease-in-out infinite; }
.rank-date { display: inline-block; margin-top: 10px; font-size: 13px; color: #fff3e0; background: rgba(0,0,0,.22); border: 1px solid rgba(255,215,112,.4); border-radius: 999px; padding: 3px 14px; letter-spacing: 1px; }
.rank-podium { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4%; margin-top: 4%; min-height: 0; }
.rk-col { display: flex; flex-direction: column; align-items: center; width: 30%; max-width: 108px; animation: rkPop .45s ease both; }
.rk-col:nth-child(1) { animation-delay: .18s; }
.rk-col:nth-child(2) { animation-delay: .02s; }
.rk-col:nth-child(3) { animation-delay: .34s; }
.rk-crown { font-size: 22px; height: 26px; margin-bottom: 2px; }
.rk-crown-none { visibility: hidden; }
.rk-medal { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(160deg, #fff6dd, #e8c98a); display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 4px 12px rgba(0,0,0,.3), inset 0 -2px 6px rgba(160,110,20,.35); }
.rk-1 .rk-medal { width: 68px; height: 68px; font-size: 34px; }
.rk-name { margin-top: 8px; font-size: 15px; font-weight: 700; color: #fff; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-1 .rk-name { font-size: 17px; color: #ffe9b8; }
.rk-count { margin-top: 3px; font-size: 24px; font-weight: 800; color: #ffd970; }
.rk-1 .rk-count { font-size: 30px; }
.rk-count span { font-size: 12px; font-weight: 400; color: #ffce7a; margin-left: 2px; }
.rk-types { margin-top: 3px; font-size: 10.5px; color: #ffd9b0; opacity: .92; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 14px; }
.rk-bar { width: 100%; border-radius: 8px 8px 0 0; margin-top: 8px; display: flex; align-items: flex-start; justify-content: center; font-size: 20px; font-weight: 800; color: rgba(255,255,255,.85); padding-top: 6px; box-sizing: border-box; }
.rk-bar-1 { height: 92px; background: linear-gradient(180deg, #ffe08a, #d4a017); color: #7a4d00; }
.rk-bar-2 { height: 64px; background: linear-gradient(180deg, #eceff5, #9aa6b8); color: #4a5568; }
.rk-bar-3 { height: 48px; background: linear-gradient(180deg, #f2c59a, #b0713d); color: #6b3d12; }
.rank-slogan { flex: none; text-align: center; margin-top: 5%; font-size: 16px; line-height: 1.7; font-weight: 600; color: #fff3e0; letter-spacing: 2px; }
.rank-btn { flex: none; margin: 4% auto 0; background: linear-gradient(180deg, #ffd970, #f0a93a); color: #6b2a00; font-size: 16px; font-weight: 800; letter-spacing: 2px; border-radius: 999px; padding: 12px 44px; cursor: pointer; box-shadow: 0 6px 18px rgba(240,169,58,.45); }
.rank-btn:active { transform: scale(.96); }

/* ---- v237 BD 盒子自检公告弹窗（复用 rank-overlay/rank-close/rank-btn，覆盖尺寸） ---- */
.box-reminder-modal { height: auto; aspect-ratio: auto; width: min(86vw, 360px); padding: 26px 22px 22px; text-align: center; }
.box-reminder-head { margin-top: 8px; }
.box-reminder-count { margin-top: 14px; font-size: 56px; font-weight: 900; color: #ffe08a; line-height: 1; text-shadow: 0 4px 18px rgba(0,0,0,.35); }
.box-reminder-count span { font-size: 18px; font-weight: 700; margin-left: 4px; color: #ffce7a; }
.box-reminder-sub { margin-top: 8px; font-size: 14px; color: #ffe9c9; letter-spacing: 1px; }
.box-reminder-msg { margin-top: 18px; font-size: 15px; line-height: 1.8; font-weight: 600; color: #fff3e0; letter-spacing: 1px; }
.box-reminder-msg b { color: #ffe08a; }

/* ---- v238 零交易盒子清单（第二个自检公告） ---- */
.box-zero-modal { width: min(92vw, 420px); }
.box-sn-list { margin-top: 14px; max-height: 34vh; overflow-y: auto; background: rgba(255,255,255,.12); border-radius: 10px; padding: 6px 10px; text-align: left; }
.box-sn-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px dashed rgba(255,255,255,.18); }
.box-sn-row:last-child { border-bottom: none; }
.box-sn-code { font-family: Consolas, Menlo, monospace; font-size: 12px; font-weight: 700; color: #ffe9c9; word-break: break-all; }
.box-sn-mer { flex-shrink: 0; max-width: 42%; font-size: 12px; color: rgba(255,243,224,.85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 订单出库新表单：SN工具 / 扫码 / 省市区 / QR码 ---- */
.sn-tools { display: flex; gap: 8px; margin-bottom: 8px; }
.sn-tools .input { flex: 1; }
.sn-btn { flex: 0 0 auto; padding: 0 14px; width: auto; white-space: nowrap; }
.sn-sel { display: flex; justify-content: space-between; align-items: center; background: #fff; cursor: pointer; }
.sn-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sn-chip { display: inline-flex; align-items: center; gap: 6px; background: #eef5ff; color: var(--primary); border: 1px solid #c6e0ff; border-radius: 6px; padding: 4px 8px; font-size: 12px; max-width: 100%; }
.sn-chip b { cursor: pointer; color: var(--danger); font-weight: 600; padding: 0 2px; }
.sn-tip { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.region-sel-box { display: flex; justify-content: space-between; align-items: center; background: #fff; cursor: pointer; }
.region-sel-box span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 省市区滚轮选择器 */
.wheel-sheet { height: 350px; max-height: 350px; }
.wheel-box { position: relative; display: flex; height: 240px; background: #fff; }
.wheel-highlight { position: absolute; left: 10px; right: 10px; top: 100px; height: 40px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #f3f7ff; border-radius: 8px; z-index: 0; pointer-events: none; }
.wheel-col { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; z-index: 1; }
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-inner { padding: 100px 0; }
.wheel-item { height: 40px; line-height: 40px; text-align: center; color: #666; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.wheel-item.active { color: var(--primary); font-weight: 600; }
.wheel-empty { color: #bbb; }
.addr-row { display: flex; gap: 8px; margin-top: 8px; }
.addr-row .input { flex: 1; }
.red-tip { color: #e02020; font-size: 13px; line-height: 1.6; margin-top: 8px; padding: 10px 12px; background: #fff5f5; border: 1px solid #f5c2c2; border-radius: 8px; }
.ub-tag { display: inline-block; font-size: 12px; border-radius: 4px; padding: 2px 8px; margin-right: 6px; }
.ub-tag.bound { color: #e02020; background: #ffecec; border: 1px solid #f5b8b8; }
.ub-tag.free { color: #0a7d3c; background: #e9f9ef; border: 1px solid #b7e6c8; }
.ub-btn { flex: 0 0 auto; color: #fff; background: #e02020; border: none; border-radius: 6px; padding: 8px 18px; font-size: 14px; }
.ub-btn:active { opacity: 0.8; }
.qr-uploader { display: flex; flex-wrap: wrap; gap: 10px; }
.qr-item { width: 180px; height: 180px; border-radius: 8px; background: #f0f0f0; position: relative; overflow: hidden; }
.qr-item img { width: 100%; height: 100%; object-fit: contain; display: block; }
.qr-item .del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; background: var(--danger); color: #fff; border-radius: 50%; text-align: center; line-height: 20px; font-size: 13px; }
.qr-add { width: 180px; height: 180px; border: 1px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 28px; background: #fff; }
.scan-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.88); z-index: 90; display: flex; align-items: center; justify-content: center; }
.scan-box { width: 88vw; max-width: 380px; background: #fff; border-radius: 14px; overflow: hidden; }
.scan-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
.scan-header span:last-child { cursor: pointer; color: var(--text-3); font-size: 18px; }
.scan-box video { width: 100%; height: auto; display: block; background: #000; }
.scan-hint { padding: 10px 14px; font-size: 13px; color: var(--text-2); text-align: center; line-height: 1.6; min-height: 38px; }
.scan-box .btn { margin: 0 14px 14px; width: calc(100% - 28px); }


/* ---------- 多身份角色标签 + 切换弹层 ---------- */
.home-welcome { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.role-chip {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 999px;
  background: #e8f1ff; color: #2a6cff;
  font-size: 12px; font-weight: 600; line-height: 20px;
  cursor: pointer; user-select: none;
  border: 1px solid #bcd4ff;
}
.role-chip.single { cursor: default; }
.role-chip:active { opacity: 0.8; }
/* v317：顶部「修改密码」入口（紫色，与蓝色身份标签区分） */
.role-chip.pwd { background: #f3e8ff; color: #7c3aed; border-color: #ddd6fe; margin-left: 6px; }
/* 结算类型标签：日结（橙，有出库校验/日结账单规则）/ 月结（灰） */
.settle-chip {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 20px;
  user-select: none; vertical-align: middle;
}
.settle-chip.daily { background: #fff3e6; color: #d97a00; border: 1px solid #ffd9a8; }
.settle-chip.monthly { background: #f0f2f5; color: #6b7280; border: 1px solid #dfe3e8; }
.sheet-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 999; display: flex; align-items: flex-end;
  animation: fadeIn 0.15s ease;
}
.sheet {
  width: 100%; background: var(--bg, #fff); border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  animation: sheetUp 0.2s ease;
}
.sheet-title { text-align: center; font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.sheet-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; border-radius: 10px; margin-bottom: 6px;
  background: rgba(0,0,0,0.03); cursor: pointer;
}
.sheet-item.active { background: #e8f1ff; }
.sheet-item:active { opacity: 0.8; }
.sheet-item-name { font-weight: 600; font-size: 15px; }
.sheet-item-sub { font-size: 12px; color: #888; margin-top: 2px; }
.sheet-item-cur { font-size: 12px; color: #2a6cff; font-weight: 600; }
.sheet-cancel {
  text-align: center; padding: 12px; border-radius: 10px;
  background: rgba(0,0,0,0.05); color: #666; font-size: 14px; cursor: pointer;
}
/* v314：划拨弹层 BD 列表——限高可滚动（修复不能下拉滚动），配合搜索框过滤 */
.bd-list { max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; padding: 0 2px; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.login-sub { text-align: center; font-size: 12px; color: #999; margin-bottom: 18px; }
.qr-guide { background: #f7f8fa; border-radius: 8px; padding: 12px; margin-bottom: 10px; text-align: center; }
.qr-guide-txt { font-size: 12px; color: #666; line-height: 1.5; margin: 0 0 10px; text-align: left; }
.qr-guide-img { width: 180px; height: auto; border-radius: 6px; display: block; margin: 0 auto; }
