/* BQWZ 网页版 — 蓝白主题 (与桌面版同配色) */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: linear-gradient(165deg, #e4eefb 0%, #f2f6fc 40%, #eaf1fa 100%) fixed;
  color: #2b3547; font-size: 14px;
}
.hidden { display: none !important; }

/* ---- 登录 ---- */
.login-wrap { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-card {
  width: 400px; background: #fff; border-radius: 14px; padding: 42px 38px;
  box-shadow: 0 10px 40px rgba(47, 111, 237, .14); text-align: center;
}
.login-title { font-size: 22px; font-weight: bold; color: #1f3a6e; }
.login-title span { color: #2f6fed; }
.login-sub { color: #8a94a6; margin: 8px 0 26px; font-size: 12px; }
.login-input {
  width: 100%; padding: 12px 14px; border: 1px solid #d6e0f0; border-radius: 8px;
  font-size: 15px; outline: none; transition: border .15s;
}
.login-input:focus { border-color: #2f6fed; }
.login-msg { margin-top: 14px; color: #e5484d; font-size: 13px; min-height: 18px; }

/* ---- 布局 ---- */
.app { display: flex; height: 100vh; }
.sidebar {
  width: 252px; background: rgba(255, 255, 255, .82); border-right: 1px solid #e8eef8;
  box-shadow: 8px 0 28px rgba(31, 58, 110, .05);
  display: flex; flex-direction: column; padding: 18px 12px; flex-shrink: 0;
  transition: width .18s ease, padding .18s ease;
}
.side-head { display: flex; align-items: center; gap: 6px; padding: 4px 0 16px; }
.side-title { flex: 1; min-width: 0; color: #1f3a6e; font-size: 16px; font-weight: bold; }
.side-toggle {
  flex: 0 0 24px; width: 24px; height: 24px; padding: 0;
  border: 1px solid #dbe5f4; border-radius: 7px; background: #f2f6fd; color: #2f6fed;
  font-size: 15px; line-height: 1; font-weight: bold; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.side-toggle:hover { background: #e3edfd; border-color: #bed3f5; }
#nav { flex: 1; overflow-y: auto; }
.nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; color: #3a4a63;
  border: none; border-radius: 10px; padding: 11px 13px; font-size: 14px; line-height: 1.4;
  cursor: pointer; margin-bottom: 3px; font-family: inherit; transition: background .15s, color .15s;
}
.nav-btn:hover { background: #e8f0fc; }
.nav-btn.active {
  background: linear-gradient(135deg, #3d7bfd, #2f6fed); color: #fff; font-weight: bold;
  box-shadow: 0 6px 16px rgba(47, 111, 237, .35);
}
.nav-ico {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 26px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; background: #eaf1fd; color: #2f6fed;
}
.nav-btn.active .nav-ico { background: rgba(255,255,255,.24); color: #fff; }
.side-foot { padding: 10px 8px 0; border-top: 1px solid #e8eef8; }
.side-card { font-size: 11px; color: #6b7686; margin-bottom: 8px; line-height: 1.6; word-break: break-all; }

/* ---- 左侧菜单: 「挂机任务列表」的运行中计数徽标 ---- */
.nav-badge {
  flex: 0 0 auto; min-width: 18px; text-align: center; font-size: 11px; line-height: 17px;
  padding: 0 5px; border-radius: 9px; background: #e6f0ff; color: #2f6fed; font-weight: bold;
}
.nav-btn.active .nav-badge { background: rgba(255,255,255,.28); color: #fff; }
.sidebar.collapsed .nav-btn .nav-badge {
  position: absolute; top: 4px; right: 8px; min-width: 15px; line-height: 15px; padding: 0 3px; font-size: 9px;
}

/* ---- 页面: 挂机任务列表 (全卡密任务总览) ---- */
.tc-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 4px 0 14px; padding: 12px 14px;
  background: rgba(255, 255, 255, .82); border: 1px solid #e8eef8; border-radius: 12px;
}
.tc-bar .sj-search { flex: 1 1 260px; width: auto; margin: 0; padding: 8px 12px; font-size: 13px; }
.tc-bar .btn { flex: 0 0 auto; }
.tc-stat { color: #6b7686; font-size: 12px; line-height: 1.6; white-space: nowrap; }
.tc-stat b { color: #2f6fed; font-size: 14px; }
.sj-search {
  box-sizing: border-box; border: 1px solid #dbe5f4; border-radius: 8px;
  background: #f7faff; font-family: inherit; color: #3a4a63; outline: none;
}
.sj-search:focus { border-color: #a9c6f8; background: #fff; }
.sj-list { display: flex; flex-direction: column; gap: 6px; }
.sj-empty {
  color: #8a94a6; font-size: 13px; text-align: center; padding: 48px 12px;
  line-height: 2; white-space: pre-line;
}
.sj-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border: 1px solid #e8eef8; border-radius: 11px; background: #fff;
  box-shadow: 0 1px 3px rgba(31, 58, 110, .03);
  transition: background .15s, border-color .15s;
}
.sj-row:hover { background: #f7faff; border-color: #d3e2fb; }
.sj-row.live { border-left: 3px solid #2f6fed; }
.sj-row.bad { border-left: 3px solid #d9534f; }
.sj-main { flex: 1; min-width: 0; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.sj-label {
  flex: 0 1 260px; min-width: 120px; font-size: 13px; font-weight: 600; color: #1f3a6e;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sj-meta {
  flex: 1 1 auto; min-width: 0; font-size: 12px; color: #6b7686;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sj-st { display: inline-block; padding: 0 7px; border-radius: 7px; font-size: 11px; line-height: 18px; }
.sj-st.run { background: #e6f0ff; color: #2f6fed; }
.sj-st.ok  { background: #e7f7ee; color: #1a7f4b; }
.sj-st.bad { background: #fdecec; color: #c03538; }
.sj-st.off { background: #eef1f6; color: #6b7686; }
.sj-acts { flex: 0 0 auto; display: flex; gap: 6px; }
.sj-acts button {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #dbe5f4; border-radius: 8px;
  background: #f4f8ff; color: #2f6fed; font-size: 13px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; transition: background .15s, border-color .15s;
}
.sj-acts button:hover:not(:disabled) { background: #e3edfd; border-color: #bed3f5; }
.sj-acts button.danger { color: #c03538; background: #fff6f6; border-color: #f6d9d9; }
.sj-acts button.danger:hover:not(:disabled) { background: #fdecec; }
.sj-acts button:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 900px) {
  .sj-label { flex: 0 1 140px; }
  .sj-meta { font-size: 11px; }
}

/* ---- 左侧栏收缩态: 只留图标 ---- */
.sidebar.collapsed { width: 72px; padding: 18px 8px; }
.sidebar.collapsed .side-title { display: none; }
.sidebar.collapsed .side-head { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar.collapsed #nav { overflow: visible; }
.sidebar.collapsed .nav-btn { justify-content: center; gap: 0; padding: 11px 0; position: relative; }
.sidebar.collapsed .nav-btn > span:not(.nav-ico) { display: none; }
.sidebar.collapsed .nav-btn:hover::after {
  content: attr(data-label);
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: #1f3a6e; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.2;
  padding: 6px 10px; border-radius: 7px; white-space: nowrap; pointer-events: none;
  box-shadow: 0 8px 20px rgba(31, 58, 110, .28); z-index: 60;
}
.sidebar.collapsed .side-foot { padding: 10px 0 0; }
.sidebar.collapsed .side-card { display: none; }
.sidebar.collapsed #logoutBtn { width: 100%; padding: 8px 0; font-size: 10px; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; }
@media (max-height: 560px) {
  .sidebar.collapsed #nav { overflow-y: auto; }
  .sidebar.collapsed .nav-btn:hover::after { display: none; }
}
.page { flex: 1; overflow-y: auto; padding: 22px 28px 60px; min-width: 0; }
.page > * { max-width: 1500px; }

/* ---- 右侧任务中心 (当前页面任务 + 日志) ---- */
.rail {
  width: 550px; flex-shrink: 0; background: #fff; border-left: 1px solid #eaf0f9;
  display: flex; flex-direction: column; padding: 16px 14px; min-height: 0;
  overflow-y: auto;
  box-shadow: -10px 0 28px rgba(31, 58, 110, .05);
}
.rail-head { font-size: 15px; font-weight: bold; color: #1f3a6e; padding: 2px 4px 12px; }
.rail-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.rail-section-title { font-size: 13px; font-weight: bold; color: #1f3a6e; margin: 6px 0 8px; }
.rail-log-title { margin-top: 14px; }
.rail-body .tbl { table-layout: fixed; width: 100%; min-width: 0; }
.rail-body .tbl th, .rail-body .tbl td {
  padding: 7px 5px; font-size: 11.5px; word-break: break-all; overflow-wrap: anywhere;
}
.rail-body .tbl th:nth-child(1) { width: 26px; }
.rail-body .tbl th:nth-child(2), .rail-body .tbl td:nth-child(2) { white-space: nowrap; }
.rail-body .log { height: 300px; font-size: 11px; }
.rail-empty { color: #8a94a6; font-size: 13px; text-align: center; margin-top: 40px; line-height: 2; }
.rail-task {
  background: #f7fafe; border: 1px solid #e3eaf6; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 12px; font-size: 13px;
}
.rail-task .rt-label { font-weight: 600; color: #1f3a6e; margin-bottom: 6px; word-break: break-all; }
.rail-task .rt-meta { color: #6b7686; font-size: 12px; line-height: 1.9; word-break: break-all; }
.rail-task .rt-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rail-log {
  flex: 1; min-height: 120px; background: #0f1626; color: #c8d6f0;
  font-family: Consolas, monospace; font-size: 11px; line-height: 1.65;
  border-radius: 10px; padding: 10px 12px; overflow-y: auto;
  white-space: pre-wrap; word-break: break-all;
}
.rail-log .t-err { color: #ff8f8f; }
.rail-log .t-ok { color: #7ee2a8; }
.rail-log .t-info { color: #7fb3ff; }
.rail-foot { color: #a8b3c5; font-size: 11px; text-align: center; padding-top: 8px; }
@media (max-width: 1280px) {
  .rail { width: 430px; }
}
@media (max-width: 1080px) { .rail { display: none; } }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9d6ee; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #a9bde4; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- 通用组件 ---- */
h1.pg-title { font-size: 20px; font-weight: bold; color: #1f3a6e; margin-bottom: 6px; }
.pg-tip { color: #6b7686; margin-bottom: 16px; line-height: 1.7; }
.card {
  background: #fff; border: 1px solid #eaf0f9; border-radius: 14px;
  padding: 18px 20px; margin-bottom: 16px;
  box-shadow: 0 6px 22px rgba(31, 58, 110, .06);
}
.card h3 { font-size: 14px; color: #1f3a6e; margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row + .row { margin-top: 10px; }
.grow { flex: 1; }
label.chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
select, input[type=text], input[type=number], textarea {
  border: 1px solid #d6e0f0; border-radius: 8px; padding: 8px 10px; font-size: 13px;
  font-family: inherit; outline: none; background: #fff; color: #2b3547;
}
select:focus, input:focus, textarea:focus { border-color: #2f6fed; }
textarea { width: 100%; resize: vertical; }

.btn {
  border: 1px solid #d6e0f0; background: #fff; color: #3a4a63; border-radius: 8px;
  padding: 8px 16px; font-size: 13px; cursor: pointer; font-family: inherit;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: #2f6fed; color: #2f6fed; }
.btn.primary { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.btn.primary:hover { background: #245bd0; }
.btn.danger { color: #e5484d; border-color: #f3c2c4; }
.btn.danger:hover { background: #fdf0f0; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.big { width: 100%; padding: 12px; font-size: 15px; margin-top: 18px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表格 */
.tbl-wrap { max-height: 480px; overflow: auto; border: 1px solid #eef2f9; border-radius: 8px; }
/* 卡片内自适应宽表: 不撑破卡片右边框（打造提升排行榜等 8 列宽表） */
.tbl-fit { width: 100%; min-width: 0; table-layout: fixed; }
.tbl-fit th, .tbl-fit td {
  padding: 7px 6px; font-size: 12px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.tbl-fit th:nth-child(1), .tbl-fit td:nth-child(1) { width: 46px; }
.tbl-fit th:nth-child(2), .tbl-fit td:nth-child(2) { width: 20%; text-align: left; }
.tbl-fit th:nth-child(7), .tbl-fit td:nth-child(7),
.tbl-fit th:nth-child(8), .tbl-fit td:nth-child(8) { width: 92px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 1080px; }
.tbl th {
  text-align: center; background: #f2f7ff; color: #5a6b8c; font-weight: 600;
  padding: 9px 10px; border-bottom: 1px solid #e3eaf6; white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
.tbl td { padding: 8px 10px; border-bottom: 1px solid #eef2f9; vertical-align: middle; text-align: center; }
.tbl tr:hover td { background: #f8fbff; }
.tbl td.num { font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }
.tbl .op-cell { white-space: nowrap; }
.tbl select.mini { padding: 3px 6px; font-size: 12px; border-radius: 6px; }
.grid-count { color: #8a94a6; font-size: 12px; white-space: nowrap; }
.card.compact { padding: 13px 15px; }
.card.compact h3 { margin-bottom: 9px; }

/* 徽章 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge.ok { background: #e6f7ed; color: #1a7f4b; }
.badge.warn { background: #fff4e5; color: #b06f00; }
.badge.err { background: #fdecec; color: #c03538; }
.badge.blue { background: #e8f0ff; color: #2f6fed; }
.badge.gray { background: #eef1f6; color: #6b7686; }

/* 小号按钮 */
.btn.tiny { padding: 3px 9px; font-size: 11.5px; border-radius: 6px; }

/* 进度条 (发放流水) */
.prog { height: 22px; background: #eef2f9; border-radius: 11px; overflow: hidden; margin-top: 12px; }
.prog-in { height: 100%; width: 0; background: linear-gradient(90deg, #34b96f, #1a7f4b); border-radius: 11px; transition: width .4s; }
.prog-txt { text-align: center; color: #1a7f4b; font-size: 12.5px; font-weight: 600; margin-top: 6px; }

/* 后台浏览器截图 */
.shot { display: none; width: 100%; border-radius: 10px; border: 1px solid #e3eaf6; cursor: crosshair; background: #0f1626; min-height: 60px; }
.shot.on { display: block; }

/* 账号选择列表 */
.acct-list {
  border: 1px solid #e3eaf6; border-radius: 8px; height: 150px; overflow-y: auto;
  background: #fff; margin-top: 6px;
}
.acct-item { padding: 7px 10px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.acct-item:hover { background: #f4f8ff; }
.acct-item.sel { background: #e8f0ff; }
.acct-item .nick { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-item .uid { color: #8a94a6; font-size: 12px; }

/* 日志 */
.log {
  background: #0f1626; color: #c8d6f0; font-family: Consolas, monospace; font-size: 12px;
  border-radius: 10px; padding: 12px 14px; height: 260px; overflow-y: auto;
  line-height: 1.7; white-space: pre-wrap; word-break: break-all;
}
.log .t-err { color: #ff8f8f; }
.log .t-ok { color: #7ee2a8; }
.log .t-info { color: #7fb3ff; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 22, 38, .45); z-index: 50;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: #fff; border-radius: 14px; padding: 24px 26px; width: auto;
  min-width: 380px; max-width: 94vw; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 16px 60px rgba(0, 0, 0, .25);
}
.modal .btn.tiny { display: inline-block; padding: 2px 8px; }
.modal::-webkit-scrollbar { width: 8px; }
.modal::-webkit-scrollbar-thumb { background: #c9d6ee; border-radius: 4px; }
.modal h3 { color: #1f3a6e; margin-bottom: 14px; font-size: 16px; }
.modal .qr-img { display: block; margin: 10px auto; width: 220px; height: 220px; }
.modal .qr-tip { text-align: center; color: #6b7686; font-size: 13px; margin-top: 8px; }

/* ---- 登录前《用户协议与风险提示》弹窗（登录页专用：那时 app.js 还没加载） ---- */
.agree-panel {
  width: min(760px, 94vw); max-width: min(760px, 94vw); min-width: 0;
  max-height: 88vh; padding: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
.agree-head {
  flex: 0 0 auto; padding: 16px 22px 12px; border-bottom: 1px solid #e6ecf6;
  font-size: 17px; font-weight: 700; color: #1f3a6e;
}
.agree-head span { float: right; font-size: 12px; font-weight: 400; color: #8a94a6; }
.agree-warn {
  flex: 0 0 auto; margin: 12px 22px 0; padding: 10px 14px; border-radius: 10px;
  background: #fff7e8; border: 1px solid #f2d9a8; color: #8a5a00;
  font-size: 13px; line-height: 1.75;
}
.agree-body {
  flex: 1 1 auto; padding: 12px 22px 6px;
  overflow-y: auto; overscroll-behavior: contain;
}
.agree-body h4 { color: #1f3a6e; font-size: 14px; margin: 16px 0 8px; }
.agree-body h4:first-child { margin-top: 2px; }
.agree-body ol { padding-left: 20px; margin: 0; }
.agree-body li { color: #3a4a63; font-size: 13px; line-height: 1.85; margin-bottom: 5px; }
.agree-body p { color: #3a4a63; font-size: 13px; line-height: 1.85; margin: 0 0 8px; }
.agree-body em { font-style: normal; color: #c03538; font-weight: 600; }
.agree-foot {
  flex: 0 0 auto; padding: 12px 22px 18px;
  border-top: 1px solid #e6ecf6; background: #fbfcfe;
}
.agree-foot label {
  display: block; margin-bottom: 9px; font-size: 13px; line-height: 1.7;
  color: #3a4a63; cursor: pointer; user-select: none;
}
.agree-foot label input { margin-right: 8px; vertical-align: middle; }
.agree-err { color: #e5484d; font-size: 12.5px; margin-top: 6px; min-height: 16px; }
.agree-btns { display: flex; gap: 12px; margin-top: 12px; }
.agree-btns .btn { flex: 1 1 0; padding: 11px; font-size: 14px; }

/* toast */
.toast {
  position: fixed; top: 26px; left: 50%; transform: translateX(-50%); z-index: 99;
  background: #1f3a6e; color: #fff; padding: 10px 22px; border-radius: 10px;
  font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.toast.err { background: #c03538; }
.toast.ok { background: #1a7f4b; }

/* 批量状态条 */
.batch-bar {
  background: #f4f8ff; border: 1px dashed #c9d9f5; border-radius: 8px;
  padding: 9px 12px; color: #3a4a63; font-size: 12.5px; margin-top: 10px; line-height: 1.8;
}

/* 总览统计格 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat-cell { background: #f4f8ff; border-radius: 10px; padding: 14px 16px; white-space: nowrap; }
.stat-cell .v { font-size: 22px; font-weight: bold; color: #2f6fed; }
.stat-cell .k { font-size: 12px; color: #6b7686; margin-top: 4px; }
.stat-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.stat-grid .stat-cell { flex: 1 1 180px; max-width: 100%; }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: 13px; }
.kv .k { color: #8a94a6; white-space: nowrap; }
.kv .v { color: #2b3547; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* 公告 */
.ann-item { border-bottom: 1px solid #eef2f9; padding: 12px 2px; }
.ann-item:last-child { border-bottom: none; }
.ann-title { font-weight: 600; color: #1f3a6e; margin-bottom: 6px; }
.ann-time { color: #a8b3c5; font-size: 11px; margin-left: 8px; font-weight: 400; }
.ann-body { color: #4a5a75; white-space: pre-wrap; line-height: 1.7; font-size: 13px; }

@media (max-width: 900px) {
  html, body { min-width: 0; overflow-x: hidden; }
  .app { display: block; height: auto; min-height: 100vh; }
  .sidebar { position: sticky; top: 0; z-index: 20; width: 100%; height: auto; padding: 8px; display: block; border-right: 0; border-bottom: 1px solid #dfe7f3; }
  .side-title { font-size: 14px; }
  .side-head { padding: 2px 6px 7px; }
  .side-toggle { display: none; }
  .sidebar.collapsed { width: 100%; padding: 8px; display: block; }
  .sidebar.collapsed .side-title { display: block; }
  .sidebar.collapsed #nav { display: flex; overflow-x: auto; overflow-y: hidden; }
  .sidebar.collapsed .nav-btn { justify-content: flex-start; gap: 6px; padding: 8px 10px; }
  .sidebar.collapsed .nav-btn > span:not(.nav-ico) { display: inline; }
  .sidebar.collapsed .nav-btn:hover::after { display: none; }
  .sidebar.collapsed .side-foot { display: flex; align-items: center; gap: 8px; padding: 6px 4px 0; }
  .sidebar.collapsed .side-card { display: block; }
  .sidebar.collapsed #logoutBtn { width: auto; padding: 8px 10px; font-size: 12px; }
  #nav { display: flex; gap: 5px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; -webkit-overflow-scrolling: touch; }
  .nav-btn { flex: 0 0 auto; width: auto; margin: 0; padding: 8px 10px; font-size: 12px; white-space: nowrap; }
  .side-foot { display: flex; align-items: center; gap: 8px; padding: 6px 4px 0; border-top: 1px solid #e3eaf6; }
  .side-card { flex: 1; margin: 0; max-height: 34px; overflow: hidden; font-size: 10px; }
  .page { width: 100%; min-width: 0; padding: 12px 10px 34px; overflow: visible; }
  .page > * { max-width: none; }
  .card { border-radius: 9px; padding: 12px; margin-bottom: 10px; }
  .row { gap: 6px; }
  .row > .grow { display: none; }
  .btn { min-height: 38px; padding: 8px 10px; font-size: 12px; }
  .btn.small, .btn.tiny { min-height: 34px; padding: 6px 8px; }
  select, input[type=text], input[type=number], textarea { min-height: 38px; max-width: 100%; font-size: 16px; }
  h1.pg-title { font-size: 18px; margin-bottom: 5px; }
  .pg-tip { font-size: 12px; margin-bottom: 10px; }
  .stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .stat-grid .stat-cell { min-width: 0; padding: 10px; flex: none; }
  .stat-cell .v { font-size: 18px; overflow: hidden; text-overflow: ellipsis; }
  .tbl-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 920px; }
  .tbl th, .tbl td { padding: 7px 8px; }
  .kv { grid-template-columns: 92px minmax(0, 1fr); gap: 6px 8px; font-size: 12px; }
  .kv .v { overflow-wrap: anywhere; white-space: normal; }
  .modal-mask { align-items: flex-start; padding: 8px; overflow-y: auto; }
  .modal { width: 100%; min-width: 0; max-width: 100%; max-height: calc(100vh - 16px); padding: 16px 12px; border-radius: 10px; }
  .modal .qr-img { width: min(68vw, 260px); height: min(68vw, 260px); image-rendering: auto; }
  .modal .row { width: 100%; }
  .modal .row .btn, .modal input, .modal select { max-width: 100%; }
  .log { height: 220px !important; font-size: 11px; padding: 9px; }
  .prog { margin-top: 8px; }
  .toast { top: 10px; width: calc(100vw - 20px); text-align: center; padding: 10px 12px; font-size: 12px; }
  #gridCount { margin-left: auto; }
  .login-wrap { min-height: 100svh; height: auto; padding: 16px 10px; }
  .login-card { width: 100%; max-width: 400px; padding: 28px 20px; border-radius: 10px; }
}

