/* LH321 WebUSB DFU 升级工具 —— 页面样式
 * 主色映射站点主题变量 --color-primary（由后台「站点设置 → 主题」注入），
 * 缺省回退到蓝 #2563eb，确保与全站配色联动。 */

.lh-wrap{
  --brand: var(--color-primary, #2563eb);
  --brand-soft: color-mix(in srgb, var(--brand) 12%, #fff);
  --bg:#f5f7fa; --card:#ffffff; --line:#e3e8ef; --txt:#1f2933; --sub:#6b7785;
  --ok:#0b8a3e; --err:#c0392b; --warn:#b7791f;
  --mono:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;
  max-width:880px; margin:0 auto;
}
.lh-wrap *{box-sizing:border-box}
.lh-wrap .card{background:var(--card);border:1px solid var(--line);border-radius:10px;
  padding:16px 18px;margin-bottom:16px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.lh-wrap .row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.lh-wrap .field{font-size:13px;color:var(--txt);display:inline-flex;align-items:center;gap:6px}
.lh-wrap .hint{color:var(--sub);font-size:13px}
.lh-wrap button.btn{font:inherit;cursor:pointer;border:1px solid var(--brand);background:var(--brand);
  color:#fff;border-radius:8px;padding:9px 16px}
.lh-wrap button.btn.ghost{background:#fff;color:var(--brand)}
.lh-wrap button.btn.ok{background:var(--ok);border-color:var(--ok)}
.lh-wrap button.btn:disabled{opacity:.5;cursor:not-allowed}
.lh-wrap input[type=file],.lh-wrap input[type=number]{font:inherit}
.lh-wrap input[type=number]{width:120px;padding:7px 9px;border:1px solid var(--line);border-radius:8px}
.lh-wrap table{width:100%;border-collapse:collapse;font-size:13px;margin-top:2px}
.lh-wrap td{padding:6px 8px;border-bottom:1px solid var(--line)}
.lh-wrap td.k{color:var(--sub);width:160px;white-space:nowrap}
.lh-wrap td.v{font-family:var(--mono)}
.lh-wrap .devinfo{margin-top:12px}
.lh-wrap .log{font-family:var(--mono);font-size:12.5px;background:#0f172a;color:#d7e3f4;
  border-radius:8px;padding:12px;height:240px;overflow:auto;white-space:pre-wrap;margin-top:8px}
.lh-wrap .pill{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600}
.lh-wrap .pill.ok{background:#e6f6ec;color:var(--ok)}
.lh-wrap .pill.err{background:#fdecea;color:var(--err)}
.lh-wrap .pill.warn{background:#fdf3e2;color:var(--warn)}
.lh-wrap .pill.idle{background:#eef2f7;color:var(--sub)}
.lh-wrap .prog{height:10px;background:#eef2f7;border-radius:999px;overflow:hidden;margin-top:10px}
.lh-wrap .prog>i{display:block;height:100%;width:0;background:var(--brand);transition:width .15s}
.lh-wrap details{font-size:13px;color:var(--sub)}
.lh-wrap details summary{cursor:pointer;color:var(--brand)}
.lh-wrap code{background:#eef2f7;padding:1px 5px;border-radius:4px;font-family:var(--mono)}
.lh-wrap a{color:var(--brand)}

/* ── 连接设备弹窗 ── */
.lh-wrap .modal-mask{position:fixed;inset:0;background:rgba(15,23,42,.55);
  display:flex;align-items:center;justify-content:center;z-index:100;padding:16px}
.lh-wrap .modal{background:#fff;border-radius:14px;max-width:460px;width:100%;
  padding:22px 22px 18px;box-shadow:0 12px 40px rgba(2,8,23,.25);
  font-family:system-ui,'PingFang SC','Microsoft YaHei',sans-serif;color:var(--txt)}
.lh-wrap .modal-title{font-size:18px;margin:0 0 10px;font-weight:700}
.lh-wrap .modal-text{font-size:14px;line-height:1.6;margin:0 0 10px}
.lh-wrap .modal-tips{margin:0 0 14px;padding-left:18px;font-size:13px;color:var(--sub);line-height:1.7}
.lh-wrap .zadig-box{background:var(--brand-soft);border:1px solid color-mix(in srgb,var(--brand) 25%,#fff);
  border-radius:10px;padding:12px 14px;margin-bottom:16px}
.lh-wrap .zadig-info{font-size:13px;color:var(--txt);line-height:1.6;margin-bottom:8px}
.lh-wrap .zadig-link{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;font-weight:600;
  color:#fff;background:var(--brand);text-decoration:none;border-radius:8px;padding:8px 14px}
.lh-wrap .zadig-link:hover{filter:brightness(1.05)}
.lh-wrap .modal-actions{display:flex;justify-content:flex-end;gap:10px}
@media (max-width:480px){
  .lh-wrap .modal-actions{flex-direction:column-reverse}
  .lh-wrap .modal-actions .btn{width:100%;text-align:center}
}
