* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #1467c2; --brand-dark: #0e4d94; --bg: #f2f5f9; --card: #fff;
  --text: #223; --muted: #7a8699; --red: #d0342c; --green: #1a9e46; --amber: #d97706;
}
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: var(--bg); color: var(--text); font-size: clamp(14px, 12.5px + 0.3vw, 16px); }
a { color: var(--brand); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; padding: 9px 12px; border: 1px solid #cfd8e3; border-radius: 6px; width: 100%; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc4ee; border-color: var(--brand); }
label { display: block; margin: 10px 0 4px; font-weight: 600; color: #334; }
.btn { display: inline-block; border: none; border-radius: 6px; padding: 10px 20px; font-size: inherit; background: var(--brand); color: #fff; }
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn.danger { background: var(--red); }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }
.card { background: var(--card); border-radius: 10px; padding: clamp(14px, 1.6vw, 24px); box-shadow: 0 1px 4px rgba(20,40,80,.08); }
.err { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 18px; }
.ok { color: var(--green); font-size: 13px; margin-top: 8px; }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #e7eefc; color: var(--brand); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: clamp(8px, 0.7vw, 12px) 12px; border-bottom: 1px solid #e8edf4; text-align: left; font-size: clamp(13px, 12px + 0.2vw, 15px); }
th { background: #f7fafd; color: #456; white-space: nowrap; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(135deg, #0e4d94 0%, #1467c2 55%, #2f8fe0 100%); }
.login-box { width: 420px; max-width: 100%; background: #fff; border-radius: 14px; padding: 26px 28px 20px; box-shadow: 0 10px 40px rgba(0,20,60,.35); }
.login-box h1 { font-size: 22px; color: var(--brand-dark); text-align: center; }
.login-box .sub { text-align: center; color: var(--muted); font-size: 12px; margin: 6px 0 14px; }
.tabs { display: flex; border-bottom: 2px solid #e6ecf4; margin-bottom: 6px; }
.tabs button { flex: 1; border: none; background: none; padding: 10px 0; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs button.on { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand); }
.tab-pane { display: none; padding: 6px 0 4px; }
.tab-pane.on { display: block; }
.ver-foot { text-align: center; color: #9aa7b8; font-size: 12px; margin-top: 14px; }
.radio-row { display: flex; gap: 10px; margin-top: 6px; }
.radio-row label { flex: 1; margin: 0; border: 1px solid #cfd8e3; border-radius: 8px; padding: 10px; text-align: center; font-weight: 400; cursor: pointer; }
.radio-row label.on { border-color: var(--brand); background: #eef5ff; color: var(--brand); font-weight: 700; }
.prov-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 4px; }
.prov-grid span { border: 1px solid #d6dee9; border-radius: 5px; text-align: center; padding: 5px 0; cursor: pointer; }
.prov-grid span.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 应用外壳 */
.trial-banner { background: #fff3cd; color: #7a5b00; text-align: center; padding: 7px; font-weight: 700; border-bottom: 2px solid #ffe08a; }
.topbar { display: flex; align-items: center; gap: 12px; background: var(--brand-dark); color: #fff; padding: 0 14px; height: 52px; }
.topbar .logo { font-size: 17px; font-weight: 800; }
.topbar .appver { background: rgba(255,255,255,.18); border-radius: 10px; padding: 2px 10px; font-size: 12px; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; opacity: .92; }
.topbar button { background: rgba(255,255,255,.16); border: none; color: #fff; border-radius: 6px; padding: 6px 12px; font-size: 13px; }
.layout { display: flex; min-height: calc(100vh - 52px); }
.sidenav { width: clamp(168px, 13vw, 230px); background: #10233c; padding: 10px 0; flex-shrink: 0; }
.sidenav a { display: block; color: #b9c6d8; padding: 11px 18px; font-size: 14.5px; border-left: 3px solid transparent; }
.sidenav a.on { color: #fff; background: #16345c; border-left-color: #4aa3ff; font-weight: 700; }
/* v1.26.0 导航分三层(日常/分析/管理):分组标题要弱于菜单项,否则比菜单本身还抢眼 */
.sidenav .nav-grp { color: #6b7f99; font-size: 11px; letter-spacing: 1.5px; font-weight: 700; padding: 14px 18px 4px; user-select: none; }
.sidenav .nav-grp:first-child { padding-top: 2px; }
.main { flex: 1; padding: clamp(16px, 2vw, 30px); min-width: 0; }
.placeholder { color: var(--muted); text-align: center; padding: 70px 20px; font-size: 15px; }

/* 按钮式选择(代替勾选框):.pick 点击切换 .on 高亮 —— PC 上加大点击热区 */
.pick { border: 2px solid #cfd8e3; background: #fff; color: #334; border-radius: 8px; padding: clamp(9px, 0.8vw, 14px) clamp(14px, 1.4vw, 24px); font-size: clamp(14px, 13px + 0.25vw, 16px); font-weight: 700; min-width: clamp(72px, 6vw, 96px); }
.pick.on { border-color: var(--brand); background: #e6f0fc; color: var(--brand-dark); box-shadow: inset 0 0 0 1px var(--brand); }
.pick.on::after { content: " ✓"; }
.pick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pick.big { min-width: 96px; padding: 14px 18px; font-size: 15px; }

/* 弹窗:宽度由调用方给 CSS 尺寸字符串(默认自适应小窗),内部超高滚动 */
.modal-mask { position: fixed; inset: 0; background: rgba(8,18,35,.66); display: flex; align-items: center; justify-content: center; z-index: 99; padding: 12px; }
.modal { background: #fff; border-radius: 12px; padding: clamp(18px, 1.8vw, 28px); width: min(94vw, 480px); max-height: 94vh; overflow: auto; }
.modal h3 { color: var(--brand-dark); margin-bottom: 6px; }
.modal .m-actions { display: flex; gap: 10px; margin-top: 14px; }
.modal .m-actions .btn { padding: 11px 18px; font-size: 15px; }

/* 摩托车款式全局配色:男装绿 / 女装红 / 电动白牌灰 / 电动黄牌金 / 电动蓝牌蓝(v1.14.0) */
.st-m { color: #1a9e46; font-weight: 700; }
.st-f { color: #d0342c; font-weight: 700; }
.st-ew { color: #5c6b7a; font-weight: 700; }
.st-ey { color: #b8860b; font-weight: 700; }
.st-eb { color: #2b6cb8; font-weight: 700; }
.pick[data-v="male"] { color: #1a9e46; }
.pick[data-v="female"] { color: #d0342c; }
.pick[data-v="male"].on { color: #0d7a35; }
.pick[data-v="female"].on { color: #a82821; }

/* 表单双列网格(宽弹窗内 2 列,窄屏自动单列) */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid .span2 { grid-column: span 2; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
}

/* 宽表格在窄屏出现横向滚动,不挤压布局 */
@media (max-width: 900px) {
  .card > table, .modal > table { display: block; overflow-x: auto; max-width: 100%; white-space: nowrap; }
}

@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidenav { width: 100%; display: flex; overflow-x: auto; padding: 0; }
  .sidenav a { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; padding: 10px 14px; }
  .sidenav a.on { border-bottom-color: #4aa3ff; }
  .sidenav .nav-grp { display: none; } /* v1.26.0 窄屏是横向滚动条,分组标题会挤占一屏宽度 */
  .prov-grid { grid-template-columns: repeat(6, 1fr); }
}
