/* 思域车机助手 · 车机端样式
   刻意避开 CSS 变量、Grid、Flexbox —— 十代思域车机浏览器内核很老（Android 4.2 级），
   用最保守的语法保证能正常渲染。触摸屏为主，所有可点区域不小于 52px 高。 */

* { -webkit-box-sizing: border-box; box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #0E1218;
  color: #E8EDF3;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

a { color: #6FA8FF; text-decoration: none; }
a:active { color: #A9CBFF; }

.page { max-width: 1080px; margin: 0 auto; padding: 18px 18px 60px; }

/* ---------- 顶栏 ---------- */
.topbar { padding: 14px 0 16px; border-bottom: 1px solid #2B3542; margin-bottom: 20px; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 0.3px; }
.topbar .sub { color: #8695A8; font-size: 13px; margin-top: 6px; }

.nav { margin-top: 14px; }
.nav a {
  display: inline-block;
  padding: 11px 20px;
  margin: 0 8px 8px 0;
  border: 1px solid #2B3542;
  border-radius: 10px;
  background: #171D26;
  color: #C6D2E0;
  font-size: 15px;
  min-height: 46px;
  line-height: 24px;
}
.nav a:active { background: #212A36; }
.nav a.on { background: #E5484D; border-color: #E5484D; color: #fff; }

/* ---------- 当前身份 ---------- */
.whoami {
  margin-top: 6px;
  font-size: 13px;
  color: #8695A8;
  padding: 8px 12px;
  background: #141A22;
  border: 1px solid #232C38;
  border-radius: 8px;
}
.whoami b { color: #C6D2E0; }
.whoami .tag {
  display: inline-block;
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid #33404F;
  margin: 0 8px;
  color: #9FAEBD;
}
.whoami a.logout { float: right; }

/* ---------- 面板 ---------- */
.panel {
  background: #171D26;
  border: 1px solid #2B3542;
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.panel h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.panel h3 { margin: 18px 0 8px; font-size: 16px; font-weight: 600; }
.panel p { margin: 0 0 10px; color: #A7B4C4; }
.panel p:last-child { margin-bottom: 0; }

.muted { color: #8695A8; font-size: 13px; }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: Consolas, Menlo, monospace; }
.g { color: #6FE0A1; }
.r { color: #F7909A; }

/* ---------- 提示条 ---------- */
.tip { border-radius: 12px; padding: 14px 16px; margin: 12px 0; font-size: 14px; line-height: 1.65; border-left: 4px solid #4C8DF6; background: #16202E; color: #B7C8DC; }
.tip b { color: #DCE6F2; }
.tip.ok { border-left-color: #35C46F; background: #14241B; color: #AFD9C0; }
.tip.ok b { color: #CFF2DD; }
.tip.warn { border-left-color: #F0B429; background: #26200F; color: #DCC79A; }
.tip.warn b { color: #FFE0A3; }
.tip.bad { border-left-color: #F2606A; background: #261417; color: #E5B3B7; }
.tip.bad b { color: #FFC9CC; }

/* ---------- 设备信息 ---------- */
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table td { padding: 10px 0; border-bottom: 1px solid #232C38; vertical-align: top; }
.info-table tr:last-child td { border-bottom: 0; }
.info-table td.k { color: #8695A8; width: 38%; }
.info-table td.v { color: #E8EDF3; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  min-height: 54px;
  line-height: 22px;
  padding: 16px 26px;
  border-radius: 12px;
  background: #E5484D;
  border: 1px solid #E5484D;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
}
.btn:active { background: #C33B40; }
.btn.ghost { background: #1D2531; border-color: #33404F; color: #C6D2E0; }
.btn.ghost:active { background: #26303E; }
.btn.block { display: block; width: 100%; }
.btn.disabled, .btn[disabled] {
  background: #232A34; border-color: #2E3846; color: #5E6B7C;
}

/* ---------- 分类筛选 ---------- */
.filters { margin-bottom: 4px; }
.filters button {
  display: inline-block;
  min-height: 48px;
  padding: 12px 20px;
  margin: 0 8px 8px 0;
  border-radius: 10px;
  border: 1px solid #2B3542;
  background: #171D26;
  color: #A7B4C4;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.filters button.on { background: #2A3646; border-color: #4C8DF6; color: #FFFFFF; }

/* ---------- App 卡片 ---------- */
#list { font-size: 0; }   /* 消除 inline-block 之间的空隙 */

.appcard {
  display: inline-block;
  vertical-align: top;
  width: 49%;
  margin: 0 2% 16px 0;
  background: #171D26;
  border: 1px solid #2B3542;
  border-radius: 14px;
  padding: 18px;
  font-size: 15px;
}
.appcard:nth-child(2n) { margin-right: 0; }

@media (max-width: 760px) {
  .appcard { width: 100%; margin-right: 0; }
}

.appcard .hd { margin-bottom: 8px; }
.appcard .name { font-size: 16px; font-weight: 600; color: #EDF2F8; display: block; }
.appcard .meta { font-size: 12.5px; color: #8695A8; margin-top: 3px; }
.appcard .desc { font-size: 13.5px; color: #9FAEBD; margin: 10px 0 12px; line-height: 1.65; }
.badges { margin: 6px 0 4px; }

.badge {
  display: inline-block;
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 999px;
  margin: 0 6px 6px 0;
  border: 1px solid #33404F;
  color: #9FAEBD;
}
.badge.ok { border-color: #2E7D52; color: #6FE0A1; background: #15291E; }
.badge.warn { border-color: #8A6A18; color: #F0C964; background: #2A2412; }
.badge.bad { border-color: #8C3B41; color: #F7909A; background: #2A1619; }
.badge.hot { border-color: #8C3B41; color: #FF9AA0; background: #2A1619; }
.badge.need { border-color: #3A5C8C; color: #8FB8F0; background: #16202E; }

.appcard .foot { padding-top: 12px; border-top: 1px solid #232C38; }
.appcard .foot .btn { min-height: 50px; padding: 14px 20px; font-size: 15px; }

/* 卡片里的校验信息：精确字节数给车机端人工核对，MD5 给电脑端核对 */
.appcard .vfy { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #232C38; }
.appcard .vfy > div { margin-bottom: 4px; }
.appcard .vfy code { font-size: 11.5px; word-break: break-all; padding: 1px 4px; }

/* ---------- 校验值表格 ---------- */
.vtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.vtable th {
  text-align: left; color: #8695A8; font-size: 12px; font-weight: 600;
  padding: 8px 8px; border-bottom: 1px solid #2B3542; white-space: nowrap;
}
.vtable td { padding: 10px 8px; border-bottom: 1px solid #212A36; vertical-align: top; color: #C6D2E0; }
.vtable tr:last-child td { border-bottom: 0; }
.vtable td.mono { font-family: Consolas, Menlo, monospace; font-size: 12px; color: #9CC4F5; word-break: break-all; }

/* ---------- 步骤 ---------- */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: st; }
.steps li {
  position: relative;
  padding: 0 0 18px 46px;
  margin-left: 14px;
  border-left: 2px solid #2B3542;
  color: #A7B4C4;
  font-size: 14.5px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li:before {
  counter-increment: st;
  content: counter(st);
  position: absolute;
  left: -15px; top: -2px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #4C8DF6;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 30px;
}
.steps li.caution:before { background: #E5484D; }
.steps li b { color: #E8EDF3; display: block; margin-bottom: 2px; }

code {
  font-family: Consolas, Menlo, monospace;
  font-size: 13.5px;
  background: #1F2733;
  border: 1px solid #2E3846;
  border-radius: 5px;
  padding: 1px 6px;
  color: #9CC4F5;
}

.route {
  display: inline-block;
  vertical-align: top;
  width: 100%;
  border: 1px solid #2B3542;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  background: #151B23;
}
.route h3 { margin-top: 0; font-size: 17px; }
.route .pick { color: #6FE0A1; font-size: 12px; border: 1px solid #2E7D52; border-radius: 999px; padding: 1px 9px; margin-left: 8px; }

.footer { margin-top: 34px; padding-top: 18px; border-top: 1px solid #2B3542; color: #6C7A8C; font-size: 12.5px; line-height: 1.8; }

.loading { padding: 40px 0; text-align: center; color: #8695A8; font-size: 15px; }

/* =====================================================================
   登录页
   三层都用 top/right/bottom/left 长写法，不用 inset 简写 ——
   inset 在 Chrome<87 与部分国产内核里不识别，层会直接高度为 0。
   ===================================================================== */
.login-body {
  background: #0B0F14;
  min-height: 100%;
}
.login-wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 40px 18px 60px;
}
.login-card {
  background: #171D26;
  border: 1px solid #2B3542;
  border-radius: 16px;
  padding: 28px 26px 24px;
}
.login-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.login-sub { color: #8695A8; font-size: 13px; margin-bottom: 20px; }

.tabs {
  overflow: hidden;
  border-bottom: 1px solid #2B3542;
  margin-bottom: 20px;
}
.tabs .tab {
  float: left;
  width: 50%;
  text-align: center;
  padding: 12px 0;
  font-size: 15px;
  color: #8695A8;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs .tab.on { color: #E8EDF3; border-bottom-color: #E5484D; font-weight: 600; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  color: #8695A8;
  margin-bottom: 6px;
}
.field input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  color: #E8EDF3;
  background: #11161E;
  border: 1px solid #2E3846;
  border-radius: 10px;
}
.field input:focus { outline: none; border-color: #4C8DF6; }
.code-input {
  font-size: 26px !important;
  letter-spacing: 8px;
  text-align: center;
  font-family: Consolas, Menlo, monospace !important;
}
.hide { display: none; }
.login-foot {
  margin-top: 22px;
  color: #66748A;
  font-size: 12.5px;
  line-height: 1.8;
  text-align: center;
}
