:root {
  --bg: #f4f6f9;
  --bg-2: #f7f9fc;
  --panel: #ffffff;
  --border: #e3e8ef;
  --border-strong: #d0d7e2;
  --text: #1c2430;
  --text-2: #5b6675;
  --text-3: #8a94a3;
  --primary: #1f5fd4;
  --primary-light: #eaf1fd;
  --primary-dark: #17489f;
  --green: #12805c;
  --green-bg: #e6f6ef;
  --red: #c0392b;
  --red-bg: #fdeceb;
  --amber: #9a6700;
  --amber-bg: #fdf5e2;
  --blue: #1f5fd4;
  --blue-bg: #eaf1fd;
  --gray-bg: #eef1f5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
}

/* 禁用态输入：未选车场时车辆类型不可选，给出明确的灰化反馈 */
select:disabled,
input:disabled {
  background: var(--bg-2, #f5f6f8);
  color: var(--text-3);
  cursor: not-allowed;
  opacity: 0.75;
}

/* ---------- 登录（左插画 + 右表单） ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  background: #ffffff;
}

.login-left {
  flex: 1.45;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(900px 500px at 18% 8%, #f4f8fe 0%, rgba(244, 248, 254, 0) 60%),
    linear-gradient(158deg, #f3f7fd 0%, #e6eefb 55%, #d9e5f8 100%);
}

.login-left svg {
  width: min(72%, 560px);
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(31, 95, 212, 0.12));
}

.login-left-name {
  font-size: 15px;
  letter-spacing: 3px;
  color: #6d84a8;
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.login-panel {
  width: 360px;
  max-width: 100%;
}

.login-logo {
  height: 46px;
  width: auto;
  margin-bottom: 16px;
}

.login-title {
  color: var(--primary);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 0 30px;
}

.login-welcome {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 6px;
}

.login-tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

.login-tab {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  padding: 10px 2px;
  font-size: 14px;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
}

.login-tab.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

.login-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 13px;
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 95, 212, 0.1);
}

.login-input svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: var(--text-3);
  stroke-width: 1.8;
}

.login-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
}

.li-eye {
  display: flex;
  border: none;
  background: none;
  padding: 2px;
  cursor: pointer;
  color: var(--text-3);
}

.li-eye svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.login-row {
  display: flex;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-2);
  margin: 0 0 12px;
}

.login-check {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.login-check input {
  width: 13px;
  height: 13px;
  accent-color: var(--primary);
  cursor: pointer;
}

.login-check a {
  color: var(--primary);
}

.login-btn {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 8px;
  text-indent: 8px;
  cursor: pointer;
  transition: filter 0.15s, box-shadow 0.15s;
}

.login-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 18px rgba(31, 95, 212, 0.28);
}

.login-tip {
  color: var(--text-3);
  font-size: 11.5px;
  margin: 14px 0 0;
}

.login-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 0 10px;
  color: var(--text-2);
  font-size: 13.5px;
}

.login-qr .qr-box {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--gray-bg);
  color: var(--text-3);
  margin-bottom: 10px;
}

.login-qr .qr-box svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.login-qr .sub {
  color: var(--text-3);
  font-size: 12px;
  margin: 0;
}

.login-qr p {
  margin: 0;
}

.login-foot {
  margin-top: 36px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
}

@media (max-width: 920px) {
  .login-left {
    display: none;
  }
  .login-right {
    background: linear-gradient(180deg, #f6f9fe 0%, #eef3fb 100%);
  }
  .login-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 30px 26px;
  }
}

/* ---------- 布局 ---------- */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 216px;
  flex: 0 0 216px;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-brand {
  padding: 14px 12px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.side-brand .side-logo {
  width: 51px;
  height: 51px;
  object-fit: contain;
  flex: none;
}

/* Logo 右侧到侧栏右边这段空间内居中 */
.side-brand .brand-text {
  margin: 0 auto;
  text-align: center;
  min-width: 0;
}

.side-brand .t1 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.side-brand .t2 {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 1px;
}

.nav {
  padding: 10px 10px 20px;
  overflow-y: auto;
  flex: 1;
}

.nav-group {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  padding: 12px 10px 6px;
  letter-spacing: 0.02em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 2px;
  transition: background 0.12s, color 0.12s;
}

.nav-item:hover {
  background: #f6f8fb;
  color: var(--text);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  border-radius: 9px;
  font-size: 10.5px;
  padding: 0 6px;
  line-height: 16px;
  font-weight: 600;
}

.side-foot {
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 58px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h2 {
  font-size: 15.5px;
  margin: 0;
  font-weight: 600;
}

.topbar .crumb {
  color: var(--text-3);
  font-size: 12px;
}

.topbar .spacer {
  flex: 1;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  border: none;
  background: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
}

.user-chip:hover {
  background: var(--gray-bg);
}

.user-chip svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--text-3);
  stroke-width: 2;
  transition: transform 0.15s;
}

.user-menu.open .user-chip svg {
  transform: rotate(180deg);
}

.user-menu {
  position: relative;
}

.user-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 168px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 150;
}

.ud-name {
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ud-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: none;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--red);
}

.ud-item:hover {
  background: var(--red-bg);
}

.ud-item svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 12px;
}

.content {
  padding: 20px 22px 40px;
  flex: 1;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.card-head h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}

.card-head .sub {
  color: var(--text-3);
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

.card-body.tight {
  padding: 0;
}

/* 卡内的「车场参数条」：车牌名单等按车场分组时，把该车场可设置的全部参数平铺一行行 */
.park-params {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px 18px;
  padding: 12px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.park-params .item {
  min-width: 0;
}

.park-params .item.full {
  grid-column: 1 / -1;
}

.park-params .label {
  font-size: 11.5px;
  color: var(--text-3);
  margin-bottom: 2px;
}

.park-params .value {
  font-size: 12.8px;
  color: var(--text);
  word-break: break-all;
}

/* ---------- 统计卡 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  /* 等高：数字大的卡片把说明行压到底部，一排卡片底边对齐 */
  display: flex;
  flex-direction: column;
}

.stat .label {
  color: var(--text-3);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat .value {
  font-size: 25px;
  font-weight: 650;
  margin-top: 4px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat .value small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  margin-left: 4px;
}

.stat .foot {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: auto;
  padding-top: 6px;
}

/* 概览/报表的双卡行：左右等高，表格长时卡片内滚动 */
/* 与上方 stat-grid 对齐：同用 5 等分列（左卡跨 3 列、右卡跨 2 列），
   列分隔线与统计卡完全重合；gap 也统一 12px */
.duo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.duo-grid > .card:first-child {
  grid-column: span 3;
}

.duo-grid > .card:last-child {
  grid-column: span 2;
}

/* 上方统计卡是 4 张的页面（中转控制台）：4 等分列对齐 */
.duo-grid.cols4 {
  grid-template-columns: repeat(4, 1fr);
}

.duo-grid.cols4 > .card:first-child,
.duo-grid.cols4 > .card:last-child {
  grid-column: span 2;
}

.duo-grid .card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.duo-grid .card-body {
  flex: 1;
  min-height: 0;
}

.duo-grid .card-body svg.chart {
  height: 100%;
  min-height: 168px;
}

@media (max-width: 1100px) {
  .duo-grid {
    grid-template-columns: 1fr;
  }

  .duo-grid > .card:first-child,
  .duo-grid > .card:last-child {
    grid-column: auto;
  }
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

/* ---------- 工具条 ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.toolbar .grow {
  flex: 1;
}

/* 工具栏里的行内复选框：不需要 .field 那样的纵向布局 */
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.check-inline input[type='checkbox'] {
  margin: 0;
  cursor: pointer;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field label {
  font-size: 12px;
  color: var(--text-2);
}

/* 发卡页表单：字段名调大加粗，突出显示 */
#card-form .field > label,
#card-form > .field > label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.field .hint {
  font-size: 11.5px;
  color: var(--text-3);
}

/* 未写 type 的输入框默认就是文本框，用排除法让它们也命中 */
input:not([type='checkbox']):not([type='radio']):not([type='file']):not([type='range']),
input[type="number"],
input[type="password"],
input[type="datetime-local"],
input[type="date"],
select,
textarea {
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  min-width: 0;
}

textarea {
  height: auto;
  padding: 7px 12px;
  resize: vertical;
  line-height: 1.5;
}

/* 弹窗标签的分散对齐是可继承属性，会漏进输入框内部把占位文字撑开，这里切断 */
input,
select,
textarea {
  text-align: left;
  text-align-last: auto;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 95, 212, 0.12);
}

select {
  padding-right: 6px;
  cursor: pointer;
}

.btn {
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}

.btn:hover {
  background: #f7f9fc;
  border-color: #bcc6d4;
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 500;
}

.btn.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn.danger {
  color: var(--red);
  border-color: #eccac6;
}

.btn.danger:hover {
  background: var(--red-bg);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--primary);
  padding: 0 6px;
  height: 26px;
}

.btn.ghost:hover {
  background: var(--primary-light);
}

.btn.sm {
  height: 26px;
  font-size: 12px;
  padding: 0 9px;
  border-radius: 6px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.link {
  color: var(--primary);
  cursor: pointer;
  font-size: 12.5px;
}

.link.danger {
  color: var(--red);
}

.link.muted {
  color: var(--text-2);
}

/* ---------- 表格 ---------- */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.8px;
}

thead th {
  text-align: left;
  font-weight: 600;
  color: var(--text-2);
  background: #f8fafc;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 12px;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f4f8;
  vertical-align: middle;
}

tbody tr:hover {
  background: #fafbfd;
}

tbody tr:last-child td {
  border-bottom: none;
}

td.mono,
.mono {
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
  font-size: 12px;
}

td.actions {
  white-space: nowrap;
  text-align: right;
}

.empty {
  padding: 40px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
}

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--gray-bg);
  color: var(--text-2);
  white-space: nowrap;
}

.badge.green {
  background: var(--green-bg);
  color: var(--green);
}

.badge.red {
  background: var(--red-bg);
  color: var(--red);
}

.badge.amber {
  background: var(--amber-bg);
  color: var(--amber);
}

.badge.blue {
  background: var(--blue-bg);
  color: var(--blue);
}

.badge.gray {
  background: var(--gray-bg);
  color: var(--text-2);
}

.badge.outline {
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
}

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-2);
}

.pager .spacer {
  flex: 1;
}

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 40, 0.35);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
  z-index: 100;
}

.modal {
  background: #fff;
  border-radius: 12px;
  width: 560px;
  max-width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: pop 0.14s ease-out;
}

.modal.wide {
  width: 860px;
}

@keyframes pop {
  from {
    transform: translateY(-6px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.modal-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-head h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
}

.modal-head .close {
  margin-left: auto;
  cursor: pointer;
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
}

.modal-head .close:hover {
  background: #f2f5f9;
  color: var(--text);
}

.modal-body {
  padding: 18px;
  max-height: 66vh;
  overflow-y: auto;
}

.modal-foot {
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  background: #fbfcfe;
  border-radius: 0 0 12px 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 14px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

/* ---------- 提示 ---------- */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 300;
}

.toast {
  background: #1c2430;
  color: #fff;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12.8px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.16s ease-out;
  max-width: 380px;
}

.toast.error {
  background: #a5342a;
}

.toast.ok {
  background: #146a4f;
}

/* ---------- 图表 ---------- */
.chart {
  width: 100%;
  height: 180px;
}

.legend {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  color: var(--text-2);
  align-items: center;
}

/* ---------- 适配器卡 ---------- */
.adapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.adapter-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}

.adapter-card h4 {
  margin: 0 0 2px;
  font-size: 13.5px;
}

.adapter-card .type {
  font-family: Consolas, monospace;
  font-size: 11px;
  color: var(--text-3);
}

.adapter-card .caps {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.kv {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 7px 12px;
  font-size: 12.5px;
}

.kv dt {
  color: var(--text-3);
}

.kv dd {
  margin: 0;
  word-break: break-all;
}

pre.code {
  background: #0f1720;
  color: #d6e2f0;
  padding: 12px;
  border-radius: 8px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11.8px;
  line-height: 1.55;
  overflow: auto;
  max-height: 260px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.tab {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  margin: 4px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.notice {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 12.3px;
  color: var(--text-2);
  margin-bottom: 12px;
}

.copy {
  cursor: pointer;
  color: var(--text-3);
  font-size: 11.5px;
  margin-left: 4px;
}

.copy:hover {
  color: var(--primary);
}

.spin {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 弹窗表单对齐 ----------
 * 适用：.form-grid 里 label 直接包裹 input/select 的表单
 * （车场、车道、车辆、车场接入、名单下发设置等）。
 * label 变成两列网格：第一列放标签文字（按本表单里最长的标签自适应），
 * 第二列放输入框并占满，保证同一弹窗里所有输入框左缘对齐。
 * 用 .field 结构（label 与输入框分开写）的表单不受影响。 */
.form-grid > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}

.form-grid > label > input,
.form-grid > label > select {
  width: 100%;
  min-width: 0;
}

/* 弹窗表单输入框统一成「机构秘钥」那种圆弧样式：
   加高、圆角加大、左右内边距加大，输入文字不贴边 */
.form-grid > label > input,
.form-grid > label > select {
  height: 36px;
  border-radius: 10px;
  padding: 0 12px;
}

/* 弹窗输入框外观统一：只保留一条浅灰边框，
   去掉浏览器给部分字段画的外圈描边（autofill 高亮等） */
.form-grid > label > input,
.form-grid > label > select {
  border: 1px solid var(--border-strong);
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-grid > label > input:focus,
.form-grid > label > select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 95, 212, 0.12);
}

/* 标签列定宽：同一弹窗里所有输入框左缘对齐到同一条线
   （标签文字超宽会自动换行，不影响输入框起点） */
.form-grid.label-fixed > label {
  grid-template-columns: 76px minmax(0, 1fr);
}

/* 标签文字分散对齐：首字贴左、尾字贴右（与 4 字标签首尾对齐），中间的字居中 */
.form-grid.label-fixed > label {
  text-align: justify;
  text-align-last: justify;
}

/* 占位提示文字淡化，与实际输入的文字区分开（全站） */
input::placeholder,
textarea::placeholder,
select:invalid {
  color: var(--text-3);
  opacity: 1;
}

/* 弹窗标签文字加深一档（与主文字同色），更醒目 */
.form-grid.label-fixed > label {
  color: var(--text);
  font-weight: 500;
}

/* ---- 所有 form-grid 弹窗统一：标签定宽、分散对齐、加深 ----
 * 100px 按 UI 里最长的标签「入向后自动转发」定，4 字标签居中撑开。
 * （覆盖前面 .label-fixed 的 76px 局部规则，全部弹窗同一宽度） */
.form-grid > label {
  grid-template-columns: 100px minmax(0, 1fr);
  text-align: justify;
  text-align-last: justify;
  color: var(--text);
  font-weight: 500;
}

/* 中文日期框：原生日期输入文字隐藏（含灰色的 yyyy-mm-dd 占位），
 * 覆盖层显示「2026年11月13日」样式；点框或日历图标照常弹系统选择器 */
.date-cn {
  position: relative;
  display: block;
  min-width: 0;
}

.date-cn > input[type='date'] {
  width: 100%;
  min-width: 0;
}

.date-cn > input[type='date']::-webkit-datetime-edit {
  color: transparent;
}

.date-cn > input[type='date']:focus::-webkit-datetime-edit {
  color: var(--text); /* 聚焦编辑时显示原生格式，方便逐段改 */
}

.date-cn-show {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  padding-right: 40px; /* 给右侧日历图标留位置 */
  pointer-events: none;
  color: var(--text);
  font-size: 13px;
}

.date-cn-show.ph {
  color: var(--text-3);
}

/* ---------------- 抓拍图 ---------------- */
/* 列表里的缩略图：固定 56×40，不撑高表格行；点开看大图 */
.shot-thumb {
  display: block;
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel-2, rgba(0, 0, 0, 0.04));
  cursor: zoom-in;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.shot-thumb:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.shot-pair {
  display: flex;
  gap: 6px;
  align-items: center;
}
.shot-empty {
  color: var(--text-3);
  font-size: 11.5px;
}
/* 大图查看：点任意位置关闭 */
.shot-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 10, 14, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  cursor: zoom-out;
}
.shot-viewer img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  background: #fff;
}
.shot-viewer .shot-viewer-bar {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: #e8ebf0;
  font-size: 12.5px;
  letter-spacing: 0.3px;
  pointer-events: none;
  opacity: 0.85;
}

/* 远程图已过期 / 加载失败：淡成空框，不显示浏览器破图图标 */
.shot-thumb.broken {
  opacity: 0.12;
  cursor: default;
}
