/* ============================================================
 * admin.css — 汽车公园统一管理后台
 * NFS 竞速风暗色面板；基元来自 nfs-base.css
 * ============================================================ */

:root {
  --a-acc: #22d3ee;
  --a-acc2: #ffb020;
  --a-line: #22384c;
  --a-ink: #eaf6ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background: #050a10; color: var(--a-ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
input, button { font-family: inherit; }

/* ── 登录屏 ── */
#login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#login.off { display: none; }
.lg-box { position: relative; width: min(380px, 92vw); padding: 36px 34px 30px;
  background: linear-gradient(165deg, rgba(13, 26, 40, .96), rgba(8, 14, 22, .97));
  border: 1px solid var(--a-line); border-top: 3px solid var(--a-acc);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
  text-align: center; }
.lg-logo { font-size: 52px; font-weight: 900; font-style: italic; letter-spacing: 3px; color: #fff;
  transform: skewX(-8deg); text-shadow: 0 0 28px rgba(34, 211, 238, .6); }
.lg-logo b { color: var(--a-acc2); font-size: 26px; }
.lg-cn { margin: 8px 0 26px; font-size: 14px; letter-spacing: 3px; color: #7fb4cf; }
.lg-row { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center; margin-bottom: 12px; }
.lg-row span { font-size: 13px; color: #7fa3bd; letter-spacing: 2px; }
.lg-row input { background: #0b1622; border: 1px solid #24425a; color: #eaf6ff; border-radius: 4px;
  padding: 10px 12px; font-size: 14px; outline: none; }
.lg-row input:focus { border-color: var(--a-acc); }
.lg-box .fl-cta { margin-top: 8px; }
.lg-hint { margin-top: 18px; font-family: Consolas, monospace; font-size: 10.5px; letter-spacing: 1px; color: #4e6e85; }
.lg-err { margin-top: 10px; font-size: 12.5px; color: #ff8d85; min-height: 16px; }

/* ── 主界面 ── */
#adm { min-height: 100vh; display: flex; flex-direction: column; }
#aTb { height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  background: linear-gradient(180deg, #0e1a28, #0a1420); border-bottom: 1px solid var(--a-line); position: sticky; top: 0; z-index: 20; }
.a-brand { display: flex; align-items: center; gap: 10px; }
.a-logo { width: 34px; height: 34px; display: grid; place-items: center; font-size: 17px;
  background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .4); border-radius: 8px; }
.a-brand .l1 { display: flex; align-items: baseline; gap: 8px; }
.a-brand .l1 b { font-size: 16px; color: #fff; }
.a-brand .l1 .cn { font-size: 12.5px; color: var(--a-acc); letter-spacing: 2px; }
.a-brand small { display: block; font-family: Consolas, monospace; font-size: 9.5px; letter-spacing: 2px; color: #527a93; }
.a-tb-right { display: flex; gap: 8px; }
.a-btn { display: inline-block; background: #182231; border: 1px solid #33445c; color: #b6cadf;
  padding: 6px 12px; border-radius: 3px; cursor: pointer; font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.a-btn:hover { border-color: var(--a-acc2); color: #ffe3ad; }
.a-btn.sm { padding: 4px 10px; font-size: 12px; }
.a-btn.file { position: relative; overflow: hidden; }
.a-btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.a-btn.danger:hover { border-color: #ff3b30; color: #ffb0ab; }

#aMain { flex: 1; width: min(860px, 96vw); margin: 0 auto; padding: 22px 0 40px; display: flex; flex-direction: column; gap: 18px; }

.a-card { background: linear-gradient(165deg, rgba(13, 26, 40, .92), rgba(8, 14, 22, .95));
  border: 1px solid var(--a-line); border-left: 3px solid var(--a-acc); border-radius: 8px; padding: 16px 20px 18px; }
.a-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.a-h { font-size: 17px; font-weight: 900; color: #fff; letter-spacing: 1px; }
.a-h span { font-family: Consolas, monospace; font-size: 10px; letter-spacing: 2px; color: #527a93; }
.a-row { display: grid; grid-template-columns: 84px 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.a-row label { font-size: 13px; color: #7fa3bd; }
.a-row input[type=text] { background: #0b1622; border: 1px solid #24425a; color: #eaf6ff;
  border-radius: 4px; padding: 8px 12px; font-size: 13.5px; outline: none; }
.a-row input[type=text]:focus { border-color: var(--a-acc); }
.a-row small { font-size: 11px; color: #4e6e85; }
.a-row.chk { grid-template-columns: 84px 1fr; }
.a-row.chk label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #cfe4f2; }
.a-num { font-size: 20px; color: #52ff9a; font-family: Consolas, monospace; }
.a-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.a-save { cursor: pointer; border: none; color: #06121c; font-weight: 800; font-size: 13px; letter-spacing: 2px;
  padding: 9px 26px; transform: skewX(-10deg); background: linear-gradient(115deg, #37e6ff, #19b8d8);
  box-shadow: 0 6px 16px rgba(34, 211, 238, .25); }
.a-save:hover { filter: brightness(1.15); }
.a-ok { font-size: 12px; color: #52ff9a; }
.a-note { margin-top: 10px; font-size: 11.5px; color: #527a93; line-height: 1.7; }

/* 园区开关列表 */
.a-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.a-zone { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #0b1622; border: 1px solid #1d3145; border-radius: 6px; }
.a-zone i { font-style: normal; font-size: 20px; }
.a-zone .zx { flex: 1; min-width: 0; }
.a-zone .zx b { display: block; font-size: 13.5px; color: #eaf6ff; }
.a-zone .zx span { font-family: Consolas, monospace; font-size: 9px; letter-spacing: 1px; color: #527a93; }
.a-zone label { position: relative; display: inline-block; width: 42px; height: 22px; flex: 0 0 auto; cursor: pointer; }
.a-zone label input { opacity: 0; width: 0; height: 0; }
.a-zone label i { position: absolute; inset: 0; background: #233042; border-radius: 22px; transition: .2s; font-size: 0; }
.a-zone label i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #62809a; transition: .2s; }
.a-zone label input:checked + i { background: rgba(82, 255, 154, .25); }
.a-zone label input:checked + i::after { transform: translateX(20px); background: #52ff9a; box-shadow: 0 0 8px rgba(82, 255, 154, .6); }
.a-zone.warn input:checked + i { background: rgba(255, 176, 32, .25); }
.a-zone.warn input:checked + i::after { background: var(--a-acc2); box-shadow: 0 0 8px rgba(255, 176, 32, .6); }

/* 子系统链接 */
.a-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.a-links a { display: block; text-align: center; padding: 12px 8px; background: #0b1622;
  border: 1px solid #1d3145; border-radius: 6px; color: #cfe4f2; text-decoration: none; font-size: 13.5px;
  transition: border-color .15s, color .15s; }
.a-links a:hover { border-color: var(--a-acc); color: #9fd8ea; }

#aFoot { flex: 0 0 auto; padding: 10px 16px 14px; text-align: center;
  font-family: Consolas, monospace; font-size: 10.5px; letter-spacing: 1px; color: #3d5a72;
  border-top: 1px solid #0e1a26; }

/* ── 车辆管理行 ── */
#carRows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.a-crow { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center;
  padding: 8px 10px; background: #0b1622; border: 1px solid #1d3145; border-radius: 6px; }
.a-crow.off .a-cth, .a-crow.off .a-ct b { opacity: .45; filter: grayscale(.8); }
.a-cth { height: 40px; display: grid; place-items: center; background:
  linear-gradient(rgba(34, 211, 238, .05) 1px, transparent 1px),
  linear-gradient(90deg, rgba(34, 211, 238, .05) 1px, transparent 1px);
  background-size: 12px 12px; border-radius: 4px; overflow: hidden; }
.a-cth canvas { max-width: 100%; max-height: 38px; }
.a-cth span { font-family: Consolas, monospace; font-size: 9px; color: #3d5a72; }
.a-ct { min-width: 0; }
.a-ct b { font-size: 14px; color: #fff; }
.a-ct .en { font-family: Consolas, monospace; font-size: 9px; letter-spacing: 1px; color: #527a93; margin-left: 8px; }
.a-ct .dim { font-family: Consolas, monospace; font-size: 11px; color: #9dbccb; margin-top: 2px; }
.a-ct .dim b { font-size: 12px; color: #52ff9a; }
.a-ct .st { display: inline-block; margin-left: 8px; font-size: 10.5px; color: #ffb020; }
.a-cops { display: flex; gap: 6px; flex-wrap: wrap; }
.a-cops button { cursor: pointer; font-size: 12px; background: #101c2a; color: #9dbccd;
  border: 1px solid #24425a; border-radius: 4px; padding: 5px 9px; transition: border-color .15s, color .15s; }
.a-cops button:hover { border-color: var(--a-acc); color: #9fd8ea; }
.a-cops .del:hover, .a-cops .del.arm { border-color: #ff3b30; color: #ffb0ab; }
.a-cops .del.arm { background: rgba(255, 59, 48, .2); color: #fff; }
.a-cops .off-btn.on { border-color: rgba(82, 255, 154, .5); color: #52ff9a; }

/* ── 车辆 新增 / 编辑 弹窗（自车库页移植） ── */
.g-modal { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  background: rgba(3, 7, 12, .74); backdrop-filter: blur(3px); }
.g-modal.on { display: flex; }
.g-box {
  width: min(640px, 94vw); max-height: 88vh; overflow-y: auto;
  background: linear-gradient(165deg, #0e1a26 0%, #0a121c 55%, #070d15 100%);
  border: 1px solid var(--a-line); border-top: 3px solid var(--a-acc);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  padding: 20px 24px 22px;
}
.g-mh { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px;
  font-size: 24px; font-weight: 900; font-style: italic; color: #fff; transform: skewX(-6deg); }
.g-mh span { font-family: Consolas, monospace; font-size: 10px; letter-spacing: 2px; color: #6f9ab3; }
.g-mh button { margin-left: auto; cursor: pointer; background: none; border: 1px solid #24425a; color: #7fa3bd;
  border-radius: 4px; padding: 3px 10px; font-size: 13px; transform: skewX(6deg); }
.g-mh button:hover { border-color: var(--a-acc); color: #9fd8ea; }
.g-mrow { display: grid; grid-template-columns: 56px 1fr 56px 1fr; gap: 8px; align-items: center; margin-bottom: 10px; }
.g-mrow.g-up { grid-template-columns: 1fr 1fr; }
.g-mrow.g-desc { grid-template-columns: 56px 1fr; }
.g-mrow label { font-size: 12.5px; color: #7fa3bd; letter-spacing: 1px; }
.g-mrow input[type=text], .g-mrow input[type=number] {
  background: #0b1622; border: 1px solid #24425a; color: #eaf6ff;
  border-radius: 4px; padding: 7px 10px; font-size: 13.5px; outline: none;
}
.g-mrow input:focus { border-color: var(--a-acc); }
.g-file { display: block; text-align: center; cursor: pointer; padding: 10px 8px;
  border: 1px dashed #3a5a75; color: #9fd8ea; font-size: 12.5px; letter-spacing: 1px; transition: border-color .2s; }
.g-file:hover { border-color: var(--a-acc); }
.g-file input { display: none; }
.g-file b { font-weight: 700; margin-left: 8px; color: #62809a; }
.g-file b.ok { color: #52ff9a; }
.g-prev { margin: 10px 0; min-height: 96px; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, rgba(34, 211, 238, .03) 0 12px, transparent 12px 24px), #0a141f;
  border: 1px solid #1d3145; border-radius: 6px; overflow: hidden; }
.g-prev canvas { max-width: 100%; max-height: 160px; }
.g-prev span { font-family: Consolas, monospace; font-size: 11px; color: #3d5a72; padding: 20px; }
.g-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin-top: 4px; }
.g-st label { display: flex; justify-content: space-between; font-family: Consolas, monospace;
  font-size: 10.5px; letter-spacing: 1px; color: #62809a; margin-bottom: 3px; }
.g-st label b { color: #9fd8ea; }
.g-st input[type=range] { width: 100%; accent-color: var(--a-acc); }
.g-mfoot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 16px; }
@media (max-width: 640px) {
  .g-mrow { grid-template-columns: 74px 1fr; }
  .g-mrow.g-up { grid-template-columns: 1fr; }
  .g-stats { grid-template-columns: 1fr; }
  .a-crow { grid-template-columns: 72px 1fr; }
  .a-cops { grid-column: 1 / -1; }
}

/* 轻提示 */
#aToast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  z-index: 100; padding: 10px 22px; background: linear-gradient(165deg, #14212f, #0b141e);
  border: 1px solid rgba(34, 211, 238, .55); color: #bfeeff; font-size: 13.5px; white-space: nowrap;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; }
#aToast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
  .a-brand small { display: none; }
  .a-row { grid-template-columns: 74px 1fr; }
  .a-row small { grid-column: 2; }
}

#adm[hidden] { display: none !important; }

/* ═══ 轮毂定位编辑（可视化标定 wheelCal） ═══ */
.g-mrow.w-row { grid-template-columns: 56px auto 1fr; }
.wheel-state { font-family: Consolas, monospace; font-size: 12px; color: #9fd8ea; letter-spacing: .5px; }
.wbox { width: min(880px, 96vw); }
.w-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.w-tools button { background: #182231; border: 1px solid #33445c; color: #b6cadf;
  border-radius: 4px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.w-tools button:hover { border-color: var(--a-acc); color: #d9f99d; }
.w-tools button.on { border-color: #84cc16; color: #d9f99d; background: rgba(132, 204, 22, .12); }
.w-tools .w-hint { margin-left: auto; font-size: 11px; color: #62809a; }
.w-cvwrap { margin-bottom: 12px; }
#wCv { width: 100%; display: block; border: 1px solid #1d3145; border-radius: 6px; cursor: crosshair;
  background: repeating-linear-gradient(45deg, rgba(34, 211, 238, .03) 0 12px, transparent 12px 24px), #0a141f; }
.w-foot { display: flex; align-items: center; gap: 12px; }
#wInfo { flex: 1; font-family: Consolas, monospace; font-size: 11.5px; color: #62809a; letter-spacing: .5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
