/* ============================================================
   云印 · 远程打印  —  清新简约 样式表
   设计基调：留白充足、圆角柔和、绿色主色、清晰层级
   ============================================================ */

:root {
  --bg: #f5f8f7;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, #eaf6f1 0%, transparent 60%),
             radial-gradient(900px 500px at -10% 10%, #eef5f3 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f3f7f6;
  --line: #e3ebe8;
  --line-soft: #eef3f1;
  --text: #1c2b27;
  --text-2: #5d6f68;
  --text-3: #93a49d;
  --accent: #14a07a;
  --accent-soft: #e7f5f0;
  --accent-deep: #0e7960;
  --accent-ring: rgba(20, 160, 122, .16);
  --warn: #c98a12;
  --warn-soft: #fdf3e0;
  --danger: #d4573f;
  --danger-soft: #fdeeea;
  --info: #3d7fc1;
  --info-soft: #ebf3fb;

  --r-s: 9px;
  --r-m: 13px;
  --r-l: 20px;

  --shadow-sm: 0 1px 2px rgba(29, 43, 39, .04), 0 6px 16px rgba(29, 43, 39, .045);
  --shadow-md: 0 2px 6px rgba(29, 43, 39, .05), 0 14px 34px rgba(29, 43, 39, .07);

  --sidebar-w: 232px;
  --content-max: 1180px;
  --space: 16px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100%;
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 通用工具 ---------- */
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.link { color: var(--accent); cursor: pointer; }
code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--surface-2); padding: 1px 6px; border-radius: 5px;
  color: var(--accent-deep);
}
::selection { background: var(--accent-soft); }

/* ============================================================
   登录
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 44px 36px 38px;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: pop .3s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.brand-mark { display: flex; justify-content: center; margin-bottom: 18px; }
.login-card h1 { font-size: 24px; font-weight: 700; letter-spacing: 4px; }
.login-card > p.muted { margin: 8px 0 28px; font-size: 13px; }
.login-card input {
  width: 100%; height: 46px; padding: 0 15px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--surface-2); font-size: 14px; color: var(--text);
  outline: none; transition: border-color .15s, background .15s, box-shadow .15s;
}
.login-card input:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.hint { font-size: 12px; color: var(--text-3); margin-top: 14px; line-height: 1.6; }

/* ============================================================
   应用骨架
   ============================================================ */
.app { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 24px; font-size: 17px; font-weight: 700;
  letter-spacing: 1px; color: var(--text);
}
#nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border: none; background: transparent; cursor: pointer;
  border-radius: var(--r-m); color: var(--text-2); font-size: 14px; font-weight: 500;
  font-family: inherit; text-align: left;
  transition: background .15s, color .15s;
}
.nav-item .ico { width: 22px; height: 22px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.nav-item .ico svg { width: 21px; height: 21px; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft); color: var(--accent-deep); font-weight: 600;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--accent);
}
.badge {
  position: absolute; top: 7px; right: 12px;
  background: var(--accent); color: #fff; font-size: 11px; font-style: normal;
  font-weight: 600; padding: 0 6px; border-radius: 9px; min-width: 18px;
  height: 17px; line-height: 17px; text-align: center;
}
.sidebar-foot {
  margin-top: auto; display: flex; flex-direction: column; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.dev-summary {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  color: var(--text-2); padding: 2px 4px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-3); }
.dot.on { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.dot.off { background: #cdd7d3; }

/* ---------- 主内容 ---------- */
.main {
  flex: 1; min-width: 0;
  padding: 36px 40px 72px;
  max-width: calc(var(--content-max) + 80px);
  margin: 0 auto;
  width: 100%;
}
.page { display: none; animation: fade .22s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.page-head h2 { font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.page-head p { font-size: 13px; margin-top: 4px; color: var(--text-2); }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.stat-row { display: flex; gap: 26px; }
.stat { text-align: right; line-height: 1.3; }
.stat b { display: block; font-size: 22px; font-weight: 700; color: var(--text); }
.stat span { font-size: 12px; color: var(--text-3); }

/* ============================================================
   卡片 / 网格
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 15.5px; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.card-title::before {
  content: ""; width: 4px; height: 15px; border-radius: 3px; background: var(--accent); display: inline-block;
}

/* 打印页：左侧内容 + 右侧设置（桌面） */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
/* 平衡多卡：设置页 / 下载安装步骤 */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.grid-cards .card { margin-bottom: 0; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line);
  border-radius: var(--r-s); background: var(--surface-2); color: var(--text);
  font-size: 13.5px; font-family: inherit; outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-ring); }
.input.slim { height: 36px; width: auto; min-width: 132px; font-size: 13px; }
select.input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235d6f68' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 32px;
}
.input::placeholder { color: var(--text-3); }
.textarea { height: auto; padding: 13px; line-height: 1.75; resize: vertical; min-height: 220px; font-family: inherit; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); cursor: pointer; margin-bottom: 14px; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* 分段控件 */
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-s); padding: 3px; gap: 3px; }
.seg-btn {
  flex: 1; border: none; background: transparent; padding: 7px 0; border-radius: 7px;
  cursor: pointer; font-size: 13px; font-weight: 500; font-family: inherit; color: var(--text-2);
  transition: all .14s;
}
.seg-btn.active { background: #fff; color: var(--accent-deep); box-shadow: 0 1px 3px rgba(29, 43, 39, .08); }

.more { margin: 6px 0 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.more summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2);
  list-style: none; padding: 4px 0; user-select: none;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "＋ "; color: var(--accent); font-weight: 700; }
.more[open] summary::before { content: "－ "; }
.more > *:not(summary) { margin-top: 14px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--r-s);
  font-size: 13.5px; font-weight: 500; font-family: inherit; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 1px 3px var(--accent-ring); }
.btn.primary:hover { background: var(--accent-deep); }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--text-2); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.btn.danger { background: transparent; border-color: var(--line); color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn.tiny { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.big { height: 48px; font-size: 15px; font-weight: 600; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 上传 ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.tab {
  border: none; background: transparent; padding: 8px 16px; border-radius: 20px;
  font-size: 13.5px; font-weight: 500; font-family: inherit; color: var(--text-2);
  cursor: pointer; transition: all .15s;
}
.tab.active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }

.drop {
  border: 1.5px dashed #cfe0da; border-radius: var(--r-m); background: var(--surface-2);
  padding: 52px 20px; text-align: center; cursor: pointer; transition: all .18s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-ico { display: flex; justify-content: center; margin-bottom: 14px; }
.drop-ico svg { width: 44px; height: 44px; }
.drop-title { font-size: 14.5px; font-weight: 500; margin-bottom: 5px; color: var(--text); }

.file-preview {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface-2);
}
.fp-icon {
  width: 46px; height: 46px; border-radius: var(--r-s); background: var(--accent-soft);
  color: var(--accent-deep); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.fp-meta { flex: 1; min-width: 0; }
.fp-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   任务列表
   ============================================================ */
.job-list { display: flex; flex-direction: column; gap: 12px; }
.job {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 16px 20px;
  transition: border-color .15s, box-shadow .15s;
}
.job:hover { border-color: #d4e3de; box-shadow: var(--shadow-sm); }
.job-ico {
  width: 42px; height: 42px; border-radius: var(--r-s); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--text-2);
}
.job-main { flex: 1; min-width: 0; }
.job-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-actions { display: flex; gap: 7px; flex-shrink: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  padding: 4px 12px; border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.chip.queued { background: var(--surface-2); color: var(--text-2); }
.chip.dispatched { background: var(--info-soft); color: var(--info); }
.chip.printing { background: var(--warn-soft); color: var(--warn); }
.chip.done { background: var(--accent-soft); color: var(--accent-deep); }
.chip.failed { background: var(--danger-soft); color: var(--danger); }
.chip.canceled { background: var(--surface-2); color: var(--text-3); }
.chip .pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.empty {
  text-align: center; padding: 64px 24px; color: var(--text-3);
  font-size: 13.5px; line-height: 1.8; border: 1px dashed var(--line); border-radius: var(--r-l);
  background: var(--surface);
}

/* ============================================================
   设备
   ============================================================ */
.device-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.device-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: 22px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.device-card:hover { border-color: #d4e3de; box-shadow: var(--shadow-md); }
.dc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.dc-head h4 { font-size: 15.5px; font-weight: 600; }
.dt-select {
  margin-left: auto; font-size: 12px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dt-select:hover { border-color: var(--accent); background: var(--accent-soft); }
.dc-meta { font-size: 12.5px; color: var(--text-3); margin-bottom: 16px; line-height: 1.7; }
.printer-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.printer-row {
  display: block; padding: 12px 13px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-s); font-size: 13px;
}
.printer-row.def { background: var(--accent-soft); border-color: var(--accent); }
.printer-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.printer-name { font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 8px; }
.conn-tag { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #eef2f4; color: var(--text-3); letter-spacing: .3px; }
.conn-tag.usb { background: #e8f1ff; color: #2563eb; }
.conn-tag.network { background: #e9f7ef; color: #10835a; }
.conn-tag.local { background: #f1f3f5; color: #6b7785; }
.printer-state { display: flex; align-items: center; gap: 6px; }

/* 状态 / 默认 徽章（pill，区别于侧边栏角标 .badge） */
.pill { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; line-height: 1.6; white-space: nowrap; }
.st-ready    { background: #e9f7ef; color: #10835a; }
.st-printing { background: #e8f1ff; color: #2563eb; }
.st-offline  { background: #f1f3f5; color: #6b7785; }
.st-error    { background: #fdecec; color: #c0392b; }
.st-warn     { background: #fff4e5; color: #b9770e; }
.st-unknown  { background: #f1f3f5; color: #8a96a3; }
.def-pill    { background: var(--accent); color: #fff; }

/* 墨量条 */
.ink-block { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.ink { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-2); }
.ink-label { width: 16px; font-weight: 600; color: var(--text-3); flex: none; }
.ink-track { flex: 1; height: 8px; background: #eceff1; border-radius: 999px; overflow: hidden; }
.ink-fill { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.ink-black { background: linear-gradient(90deg, #3a3f47, #1f2329); }
.ink-gray { background: linear-gradient(90deg, #8a939b, #5b636b); }
.ink-cyan { background: linear-gradient(90deg, #19b6c9, #0e8fa0); }
.ink-magenta { background: linear-gradient(90deg, #d6409f, #b32e85); }
.ink-yellow { background: linear-gradient(90deg, #e8b500, #c99700); }
.ink-red { background: linear-gradient(90deg, #e5564b, #c33c33); }
.ink-green { background: linear-gradient(90deg, #2faf5b, #1f8c46); }
.ink-blue { background: linear-gradient(90deg, #2b8aef, #1f6fd0); }
.ink-fill.low { background: #e8730c !important; box-shadow: 0 0 0 1px rgba(232, 115, 12, .25); }
.ink-pct { width: 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-1); font-weight: 600; flex: none; }
.ink-none { margin-top: 9px; font-size: 12px; }
.printer-actions { margin-top: 11px; }

/* 打印页：所选打印机状态/墨量提示 */
.printer-hint { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.printer-hint .hint-ink { font-size: 12px; color: var(--text-3); background: var(--surface-2); padding: 2px 8px; border-radius: 999px; }

.dc-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.token-box { display: flex; gap: 7px; align-items: center; margin-top: 14px; }
.token-box input { flex: 1; font-family: var(--mono); font-size: 11.5px; height: 34px; }

/* ============================================================
   智能体
   ============================================================ */
.key-list { display: flex; flex-direction: column; gap: 9px; }
.key-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px;
  background: var(--surface-2); border-radius: var(--r-s); flex-wrap: wrap;
}
.key-val { font-family: var(--mono); font-size: 12px; color: var(--text-2); flex: 1; min-width: 200px; word-break: break-all; }

.code-block {
  position: relative; background: #1d2b27; border-radius: var(--r-m);
  padding: 18px 18px; overflow: auto; margin-top: 12px;
}
.code-block pre {
  color: #d8e6e1; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; white-space: pre;
}
.copy-btn {
  position: absolute; top: 11px; right: 11px;
  background: rgba(255, 255, 255, .1); border: none; color: #cfe0da;
  font-size: 11.5px; padding: 5px 11px; border-radius: 6px; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.copy-btn:hover { background: rgba(255, 255, 255, .22); }

.api-doc { display: flex; flex-direction: column; gap: 9px; margin-bottom: 8px; }
.api-row {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px;
  background: var(--surface-2); border-radius: var(--r-s); font-size: 13px; flex-wrap: wrap;
}
.method { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-deep); }
.method.get { background: var(--info-soft); color: var(--info); }
.api-path { font-family: var(--mono); font-size: 12.5px; color: var(--text); }
.api-desc { color: var(--text-3); font-size: 12.5px; margin-left: auto; }

/* ============================================================
   客户端下载
   ============================================================ */
.download-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  background: linear-gradient(120deg, var(--accent-soft), #fff 70%);
}
.dl-left h3 { font-size: 18px; font-weight: 700; margin-bottom: 5px; }
.dl-left > .muted { line-height: 1.7; }
.dl-actions { display: flex; gap: 9px; margin: 18px 0 10px; flex-wrap: wrap; }
.dl-badge {
  width: 104px; height: 104px; border-radius: 26px; flex-shrink: 0;
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.dl-badge svg { width: 54px; height: 54px; }
.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.steps li::marker { color: var(--accent); font-weight: 700; }

/* ============================================================
   toast / modal
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 12px 22px; border-radius: 24px;
  font-size: 13.5px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 100; max-width: 90vw; box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

.modal {
  position: fixed; inset: 0; background: rgba(29, 43, 39, .4);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 90;
  backdrop-filter: blur(2px);
}
.modal-card {
  background: var(--surface); border-radius: var(--r-l); padding: 26px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-md);
  animation: pop .22s ease;
}
.modal-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 20px; }

/* ============================================================
   响应式  —  适配不同设备屏幕
   ============================================================ */

/* 平板 / 小笔记本：打印双栏提前收起，避免右侧设置过窄 */
@media (max-width: 1080px) {
  .grid-2 { grid-template-columns: 1fr; }
  .main { padding: 30px 28px 72px; }
  :root { --sidebar-w: 210px; }
}

/* 窄屏平板：侧栏更紧凑 */
@media (max-width: 920px) {
  :root { --sidebar-w: 196px; }
  .main { padding: 26px 22px 80px; }
  .stat-row { gap: 18px; }
}

/* 手机：侧栏变底部标签栏 */
@media (max-width: 720px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: fixed; bottom: 0; top: auto; z-index: 60;
    flex-direction: row; align-items: stretch; padding: 7px 6px;
    border-right: none; border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }
  .logo, .sidebar-foot { display: none; }
  #nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
  .nav-item {
    flex-direction: column; gap: 3px; font-size: 11px; font-weight: 500;
    padding: 6px 4px; border-radius: 10px; flex: 1; justify-content: center;
  }
  .nav-item .ico svg { width: 22px; height: 22px; }
  .nav-item.active::before { display: none; }
  .badge { top: 2px; right: 50%; transform: translateX(14px); }
  .main { padding: 20px 16px 92px; max-width: 100%; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
  .page-head h2 { font-size: 20px; }
  .stat-row { gap: 22px; }
  .stat { text-align: left; }
  .download-hero { flex-direction: column; align-items: flex-start; }
  .dl-badge { width: 84px; height: 84px; border-radius: 22px; }
  .dl-badge svg { width: 44px; height: 44px; }
  .device-list { grid-template-columns: 1fr; }
  .job { flex-wrap: wrap; gap: 12px; }
  .job-actions { width: 100%; }
  .grid-cards { grid-template-columns: 1fr; }
  .card { padding: 20px 18px; }
}

/* 超小屏：进一步收紧 */
@media (max-width: 420px) {
  body { font-size: 13.5px; }
  .main { padding: 16px 12px 96px; }
  .card { padding: 18px 14px; border-radius: var(--r-m); }
  .login-card { padding: 36px 22px 30px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .head-actions { width: 100%; }
  .head-actions .btn, .head-actions .input.slim { flex: 1; }
  .dl-actions { flex-direction: column; }
  .dl-actions .btn { width: 100%; }
  .modal-card { padding: 22px 18px; }
  .toast { bottom: 94px; }
}
