:root {
  --brand: #6d5cf7;
  --brand-2: #9b7bff;
  --ink: #101223;
  --ink-2: #3b4056;
  --muted: #7d8398;
  --line: #e8e9f2;
  --bg: #f5f6fb;
  --card: #ffffff;
  --ok: #12b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --sh: 0 10px 30px -18px rgba(30, 25, 80, .22);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.35; }
p { margin: 0; }
code { background: #f1f0f9; padding: 1px 6px; border-radius: 5px; font-size: 12px; }
[hidden] { display: none !important; }

/* ---------- 登录 ---------- */
.login { position: fixed; inset: 0; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; z-index: 100; }
.login-left { position: relative; overflow: hidden; background: #0e1020; color: #fff; padding: 46px 54px; display: flex; flex-direction: column; }
.login-brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 2; }
.login-brand b { display: block; font-size: 16px; letter-spacing: -.2px; }
.login-brand i { display: block; font-style: normal; font-size: 9px; letter-spacing: 2.6px; color: #7d84a3; margin-top: 3px; }
.logo-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; overflow: hidden; font-weight: 800; color: #fff; background: linear-gradient(140deg, #6d5cf7, #9b7bff 60%, #22c7d6); box-shadow: 0 10px 22px -12px rgba(109, 92, 247, .9); flex: none; }
.logo-mark img { width: 100%; height: 100%; display: block; }
.login-copy { margin: auto 0; position: relative; z-index: 2; max-width: 430px; }
.login-copy h1 { font-size: 40px; line-height: 1.22; letter-spacing: -1.6px; }
.login-copy > p { color: #a6acc7; font-size: 14.5px; margin: 18px 0 34px; line-height: 1.85; }
.login-copy ul { display: grid; gap: 14px; }
.login-copy li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: #cfd3e6; }
.login-copy li span { font-size: 10.5px; color: #8b7bff; border: 1px solid rgba(139, 123, 255, .3); border-radius: 6px; padding: 2px 6px; letter-spacing: .5px; }
.login-foot { position: relative; z-index: 2; font-size: 11.5px; color: #5c6280; }
.login-glow { position: absolute; width: 620px; height: 620px; right: -240px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(109, 92, 247, .55), transparent 62%); filter: blur(50px); }
.login-right { display: grid; place-items: center; padding: 40px; }
.login-form { width: 100%; max-width: 356px; }
.login-form h2 { font-size: 26px; letter-spacing: -.8px; }
.login-sub { color: var(--muted); font-size: 13.5px; margin: 6px 0 28px; }
.fld { display: block; margin-bottom: 16px; }
.fld > span { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; }
.fld input, .fld select, .fld textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; outline: none; background: #fbfbfe; transition: .2s; color: var(--ink); }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: #b9aeff; background: #fff; box-shadow: 0 0 0 3px rgba(109, 92, 247, .1); }
.fld textarea { resize: vertical; min-height: 90px; line-height: 1.75; }
.fld .hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; display: block; }
.login-err { color: var(--danger); font-size: 12.5px; margin-bottom: 12px; background: #fef2f2; border: 1px solid #fee2e2; border-radius: 8px; padding: 8px 12px; }
.login-tip { font-size: 11.5px; color: var(--muted); margin-top: 16px; line-height: 1.8; }
.login-back { display: inline-block; font-size: 12.5px; color: var(--muted); margin-top: 18px; }
.login-back:hover { color: var(--brand); }

/* ---------- 布局 ---------- */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.side { background: #0e1020; color: #c3c8dc; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 22px 20px 18px; }
.side-brand b { display: block; color: #fff; font-size: 14.5px; }
.side-brand i { display: block; font-style: normal; font-size: 10.5px; color: #6d7391; margin-top: 2px; letter-spacing: .5px; }
.side-nav { padding: 8px 12px; display: grid; gap: 2px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; color: #a7adc6; transition: .18s; }
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav a.is-active { background: linear-gradient(100deg, rgba(109, 92, 247, .95), rgba(139, 114, 255, .8)); color: #fff; box-shadow: 0 12px 24px -16px rgba(109, 92, 247, 1); }
.nav-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: #ff6b81; box-shadow: 0 0 0 3px rgba(255, 107, 129, .18); }
.side-foot { margin-top: auto; padding: 14px 12px 20px; display: grid; gap: 2px; border-top: 1px solid rgba(255, 255, 255, .07); }
.side-link { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; color: #8b91ab; width: 100%; text-align: left; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 30; }
.crumb { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.crumb b { color: var(--ink); font-weight: 600; font-size: 14px; }
.top-act { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.top-link { font-size: 12.5px; color: var(--muted); }
.top-link:hover { color: var(--brand); }
.user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #6d5cf7, #9b7bff); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.user-t b { display: block; font-size: 12.5px; }
.user-t i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: #f1f0f9; }
.side-toggle { display: none; }

.view { padding: 26px 30px 50px; max-width: 1440px; width: 100%; margin: 0 auto; }

/* ---------- 通用 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; letter-spacing: -.6px; }
.page-head p { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.page-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--sh); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 15px; }
.card-head p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.card-body { padding: 22px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; font-size: 13px; font-weight: 600; border: 1px solid transparent; transition: .18s; white-space: nowrap; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 10px 22px -14px rgba(109, 92, 247, .9); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -14px rgba(109, 92, 247, .95); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #d6d2ee; color: var(--ink); }
.btn-danger { background: #fef2f2; color: #dc2626; border-color: #fde0e0; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; font-weight: 500; }
.btn-block { width: 100%; }
.btn-lg { height: 46px; font-size: 14px; border-radius: 11px; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn .spinner { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; overflow: hidden; box-shadow: var(--sh); }
.stat::after { content: ""; position: absolute; right: -40px; top: -50px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, rgba(109, 92, 247, .1), transparent 70%); }
.stat-t { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.stat-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #f2f0fe; color: var(--brand); }
.stat b { display: block; font-size: 29px; letter-spacing: -1px; margin: 10px 0 2px; }
.stat i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.stat .up { color: var(--ok); }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }
.grid-2 > .card + .card { margin-top: 0; }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding: 10px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 26px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #a89bff, #6d5cf7); min-height: 3px; transition: height .5s ease; position: relative; }
.chart-bar:hover { background: linear-gradient(180deg, #9b7bff, #5a46e8); }
.chart-x { font-size: 9.5px; color: #a3a8bd; transform: rotate(-30deg); white-space: nowrap; }

.list { display: grid; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.list-row:last-child { border-bottom: 0; }
.list-row .rank { width: 20px; height: 20px; border-radius: 6px; background: #f3f1fe; color: var(--brand); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row i { font-style: normal; color: var(--muted); font-size: 11px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; font-size: 11.5px; color: var(--muted); letter-spacing: .3px; padding: 12px 14px; background: #fafafe; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid #f2f2f8; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fbfaff; }
.tbl .cell-main { display: flex; align-items: center; gap: 11px; }
.pico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--tb, #f1eeff); color: var(--tc, #6d5cf7); flex: none; }
.pico.has-img { background: #fff; overflow: hidden; box-shadow: 0 0 0 1px rgba(24, 16, 62, .08) inset; }
.pico.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tone-violet { --tc: #6d5cf7; --tb: #f1eeff; }
.tone-blue { --tc: #3b7bfa; --tb: #eaf1ff; }
.tone-pink { --tc: #ef4e87; --tb: #ffeaf2; }
.tone-orange { --tc: #ef9028; --tb: #fff2e0; }
.tone-teal { --tc: #10ae9d; --tb: #e2faf5; }
.tone-amber { --tc: #d99a12; --tb: #fdf4dd; }
.tone-slate { --tc: #5a6a85; --tb: #eef2f8; }
.tone-indigo { --tc: #5560e6; --tb: #ebedff; }
.cell-main b { display: block; font-size: 13px; }
.cell-main i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: #f1f2f8; color: #5c6380; white-space: nowrap; }
.tag.ok { background: #e8faf2; color: #0f9d70; }
.tag.off { background: #f4f4f8; color: #9aa0b4; }
.tag.warn { background: #fff6e6; color: #b7791f; }
.tag.brand { background: #f1eeff; color: #6d5cf7; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }
.table-wrap { overflow-x: auto; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty svg { opacity: .45; margin-bottom: 10px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-inp { position: relative; }
.search-inp input { height: 38px; width: 240px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px 0 34px; outline: none; background: #fbfbfe; font-size: 13px; }
.search-inp input:focus { border-color: #b9aeff; background: #fff; box-shadow: 0 0 0 3px rgba(109, 92, 247, .08); }
.search-inp svg { position: absolute; left: 11px; top: 11px; color: var(--muted); }
select.inp, input.inp, textarea.inp { height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fbfbfe; outline: none; font-size: 13px; color: var(--ink); }
textarea.inp { height: auto; padding: 10px 12px; line-height: 1.75; resize: vertical; }
select.inp:focus, input.inp:focus, textarea.inp:focus { border-color: #b9aeff; background: #fff; box-shadow: 0 0 0 3px rgba(109, 92, 247, .08); }

/* 表单布局 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field > label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field > label em { font-style: normal; color: var(--danger); margin-left: 2px; }
.field input, .field select, .field textarea { width: 100%; }
.field .hint { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--brand); }
.chk-row { display: flex; gap: 18px; flex-wrap: wrap; padding-top: 6px; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d7d9e6; border-radius: 999px; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(16px); }

/* 设置页 */
.set-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.set-tabs::-webkit-scrollbar { display: none; }
.set-tabs button { height: 42px; padding: 0 13px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.set-tabs button.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.set-panel { display: none; }
.set-panel.is-active { display: block; }
.repeater { display: grid; gap: 10px; }
.rep-row { display: grid; gap: 8px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fcfcff; }
.rep-del { color: var(--danger); height: 34px; width: 34px; border-radius: 8px; display: grid; place-items: center; background: #fef2f2; }
.rep-del:hover { background: #fee2e2; }
.rep-add { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--brand); padding: 8px 0; }
.rep-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
/* 页面文案：紧凑行 + 搜索 */
.txt-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.txt-tools .inp { max-width: 340px; height: 38px; }
.txt-count { font-size: 12.5px; color: var(--muted); margin-left: auto; }
#repTexts { gap: 6px; }
#repTexts .rep-row { padding: 6px 8px; align-items: center; }
#repTexts .rep-row textarea.inp { min-height: 34px; height: 34px; padding: 7px 10px; line-height: 1.5; resize: none; overflow: hidden; }
#repTexts .rep-row .inp[data-k="key"] { font-size: 12px; color: #6b6786; background: #f7f6fd; }
#repTexts .rep-row .inp[data-k="label"] { font-size: 12.5px; color: var(--ink-2); background: #fbfaff; }
#repTexts .rep-del { height: 30px; width: 30px; }
.save-bar { position: sticky; bottom: 0; margin-top: 18px; padding: 14px 22px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); display: flex; justify-content: flex-end; gap: 10px; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(14, 16, 32, .48); backdrop-filter: blur(4px); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow: auto; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: 100%; max-width: 720px; background: #fff; border-radius: 18px; box-shadow: 0 50px 90px -40px rgba(10, 10, 40, .6); animation: slideUp .25s ease; overflow: hidden; }
.modal.sm { max-width: 460px; }
.modal.lg { max-width: 900px; }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; }
.modal-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.modal-close:hover { background: #f2f1f8; color: var(--ink); }
.modal-body { padding: 22px; max-height: calc(100vh - 260px); overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fcfcff; }
.modal-err { color: var(--danger); font-size: 12px; margin-top: 10px; }

/* 上传 */
.uploader { position: relative; border: 1.5px dashed #d8d2f5; border-radius: 12px; padding: 18px; text-align: center; background: #fbfaff; transition: .2s; }
.uploader:hover, .uploader.drag { border-color: var(--brand); background: #f7f5ff; }
.uploader input[type=file] { display: none; }
.up-ico { width: 38px; height: 38px; border-radius: 10px; background: #f1eeff; color: var(--brand); display: grid; place-items: center; margin: 0 auto 8px; }
.uploader b { font-size: 13px; display: block; }
.uploader i { font-style: normal; font-size: 11.5px; color: var(--muted); display: block; margin-top: 3px; }
.up-progress { height: 6px; border-radius: 4px; background: #eceaf8; margin-top: 12px; overflow: hidden; }
.up-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .2s; }
.up-x { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: #fff; color: #9a94b3; box-shadow: 0 1px 4px rgba(78, 60, 160, .16); cursor: pointer; transition: .16s; z-index: 2; }
.up-x:hover { background: #ffe9ea; color: #e0484f; box-shadow: 0 2px 8px rgba(224, 72, 79, .22); }
.up-x[hidden] { display: none; }
.tag-toggle { border: 0; cursor: pointer; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #f0eef8; color: #6f6a86; transition: .16s; }
.tag-toggle::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #a9a3bd; margin-right: 6px; vertical-align: 1px; }
.tag-toggle:hover { background: #e6e2f8; }
.tag-toggle.on { background: #e9f7ee; color: #1a8f4c; }
.tag-toggle.on::before { background: #24b36a; }
.tag-toggle.on:hover { background: #dff3e7; }
.ord { display: inline-flex; align-items: center; gap: 4px; }
.ord b { min-width: 20px; text-align: center; font-size: 12.5px; color: #4a4560; }
.ord button { width: 20px; height: 20px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid #e6e2f3; border-radius: 6px; background: #fff; color: #807aa0; cursor: pointer; transition: .14s; }
.ord button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); background: #f7f5ff; }
.ord button:disabled { opacity: .45; cursor: default; }
/* 双平台安装包上传 */
.dual-up { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.up-label { display: block; margin-bottom: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.dual-up .uploader { padding: 16px 12px; }
.dual-up .uploader b { font-size: 12.5px; }
@media (max-width: 720px) { .dual-up { grid-template-columns: 1fr; } }
.file-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12.5px; }
.file-chip b { font-size: 12.5px; display: block; word-break: break-all; }
.file-chip i { font-style: normal; font-size: 11px; color: var(--muted); }
.file-chip .grow { flex: 1; min-width: 0; }

/* 提示 */
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 300; display: grid; gap: 10px; }
.toast { display: flex; align-items: center; gap: 9px; background: #101223; color: #fff; padding: 11px 16px; border-radius: 11px; font-size: 12.5px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); animation: toastIn .25s ease; max-width: 360px; }
.toast.ok { background: #0f9d70; }
.toast.err { background: #dc2626; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* 产品页小卡 */
.prod-cell { display: flex; align-items: center; gap: 10px; }
.sort-inp { width: 60px; height: 32px; text-align: center; }
.msg-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.msg-card.unread { border-color: #ddd6ff; background: #fbfaff; }
.msg-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.msg-top b { font-size: 13px; }
.msg-body { font-size: 13px; color: var(--ink-2); line-height: 1.75; white-space: pre-wrap; }
.msg-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 16px; }
.pager span { font-size: 12px; color: var(--muted); }

.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.qa { display: block; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: #fcfcff; transition: .2s; }
.qa svg { color: var(--brand); }
.qa b { display: block; font-size: 13.5px; margin: 10px 0 4px; }
.qa i { font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.6; display: block; }
.qa:hover { border-color: #d9d3fb; background: #f8f6ff; transform: translateY(-2px); box-shadow: 0 12px 24px -18px rgba(60, 40, 160, .5); }

/* 响应式 */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 244px; z-index: 100; transform: translateX(-100%); transition: .25s; }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .4); }
  .side-toggle { display: grid; }
  .top-link { display: none; }
  .view { padding: 18px 16px 40px; }
  .topbar { padding: 0 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .search-inp input { width: 170px; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .modal-mask { padding: 14px 10px; }
  .modal-body { max-height: calc(100vh - 190px); padding: 16px; }
  .user-t { display: none; }
  /* 概览趋势图 14 列在窄屏会把整页撑宽，压缩列距并裁掉超出部分 */
  .chart { gap: 2px; overflow: hidden; }
  .chart-col { min-width: 0; }
  .chart-x { font-size: 8px; letter-spacing: -.2px; }
  .card, .grid-2 > * { min-width: 0; }
}

/* 二维码上传 */
.qr-up { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border: 1.5px dashed #ded8f8; border-radius: 14px; background: #fbfaff; cursor: pointer; transition: .2s; }
.qr-up:hover, .qr-up.is-drag { border-color: var(--brand, #6d5cf7); background: #f6f3ff; }
.qr-up input[type=file] { display: none; }
.qr-thumb { flex: none; width: 84px; height: 84px; border-radius: 12px; background: #fff; border: 1px solid #ece7fb; display: grid; place-items: center; overflow: hidden; color: #b9bcd0; }
.qr-thumb img { width: 100%; height: 100%; object-fit: contain; }
.qr-thumb span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; }
.qr-up-txt b { display: block; font-size: 13px; color: #2b2a3f; }
.qr-up-txt i { display: block; margin-top: 4px; font-style: normal; font-size: 11.5px; color: #8b8fa6; }
.qr-up + .inp { margin-top: 10px; }
