@charset "utf-8";

/* ================= 卡片 ================= */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 18px 20px; }

.proj-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 20px 22px 18px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  position: relative;
  overflow: hidden;
}
.proj-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 30%, transparent));
  opacity: 0;
  transition: opacity .18s;
}
.proj-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  opacity: .75;
}
.proj-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}
.proj-card:hover::before { opacity: 1; }
.proj-card h3 { margin: 0 0 5px; font-size: 1.08em; letter-spacing: .4px; font-weight: 700; }
.proj-card .meta { color: var(--text-faint); font-size: .84em; }

.cat-dots { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 14px; }
.cat-dot { display: inline-flex; align-items: center; gap: 5px; font-size: .82em; color: var(--text-dim); }
.cat-dot i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; transform: rotate(45deg); }
.cat-架桥机 { background: #c2410c; }
.cat-提梁机 { background: #a16207; }
.cat-运梁车 { background: #1d4ed8; }
.cat-叉车 { background: #15803d; }
.cat-其他大型设备 { background: #6d28d9; }

/* 进度条 */
.progress {
  height: 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  overflow: hidden;
  margin: 7px 0;
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: width .45s cubic-bezier(.22, .8, .36, 1);
}
.progress.low > i { background: linear-gradient(90deg, #d97706, #b45309); }
.progress.bad > i { background: linear-gradient(90deg, #dc2626, #991b1b); }

/* ================= 统计卡 ================= */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--gap);
  margin-bottom: 6px;
}
.stat {
  padding: 16px 20px 14px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
  transition: transform .16s, box-shadow .16s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.stat::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3.5px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
  opacity: .8;
}
.stat.danger::before { background: var(--danger); }
.stat.warn::before { background: var(--warn); }
.stat .k { font-size: .8em; color: var(--text-faint); letter-spacing: .1em; }
.stat .v { font-size: 2em; font-weight: 750; line-height: 1.3; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.stat .u { font-size: .82em; color: var(--text-faint); margin-left: 4px; font-weight: 400; }
.stat.danger .v { color: var(--danger); }
.stat.warn .v { color: var(--warn); }

/* ================= 徽标 ================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1.5px 9px;
  border-radius: 7px;
  font-size: .78em;
  font-weight: 650;
  letter-spacing: .3px;
  white-space: nowrap;
  line-height: 1.6;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.na { background: var(--na-soft); color: var(--na); }
.badge.info { background: var(--brand-soft); color: var(--brand-strong); }
.badge.solid { background: var(--danger); color: #fff; box-shadow: 0 1px 4px var(--danger-soft); }

.pill {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: .8em;
  font-weight: 550;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  background: var(--panel-2);
}
.pill.在用 { border-color: color-mix(in srgb, var(--ok) 55%, transparent); color: var(--ok); background: var(--ok-soft); }
.pill.停用 { border-color: var(--na); color: var(--na); }
.pill.待检 { border-color: color-mix(in srgb, var(--warn) 55%, transparent); color: var(--warn); background: var(--warn-soft); }
.pill.已报废 { border-color: color-mix(in srgb, var(--danger) 55%, transparent); color: var(--danger); background: var(--danger-soft); }

/* ================= 提示条 ================= */
.alert-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid var(--line);
  font-size: .94em;
}
.alert-bar.danger {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--danger);
}
.alert-bar.warn {
  background: var(--warn-soft);
  border-color: color-mix(in srgb, var(--warn) 35%, transparent);
  color: var(--warn);
}
.alert-bar .ai {
  width: 21px; height: 21px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .76em; font-weight: 700;
  background: currentColor;
  color: var(--panel);
}
.alert-bar b { font-weight: 700; }

/* ================= 表格 ================= */
.tbl-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow-1);
}
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: .93em;
}
table.tbl th {
  text-align: left;
  font-weight: 650;
  font-size: .84em;
  letter-spacing: .08em;
  color: var(--text-faint);
  background: var(--panel-2);
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
table.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: var(--hover); }
table.tbl tbody tr:last-child td { border-bottom: 0; }

/* ================= 清单（一机一档） ================= */
.grp {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-1);
}
.grp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  background: var(--panel-2);
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background .14s;
}
.grp-head:hover { background: var(--hover); }
.grp.open .grp-head { border-bottom-color: var(--line); }
.grp-head .chev {
  width: 14px; text-align: center;
  color: var(--text-faint);
  transition: transform .18s;
  font-size: .8em;
}
.grp.open .grp-head .chev { transform: rotate(90deg); }
.grp-head .gname { font-weight: 700; letter-spacing: .5px; }
.grp-head .gstat { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.grp-body { display: none; }
.grp.open .grp-body { display: block; }

.it {
  display: grid;
  grid-template-columns: 56px 1fr 130px 96px 92px;
  gap: 10px;
  align-items: center;
  padding: 10px 18px 10px 15px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  font-size: .94em;
  transition: background .12s;
}
.it:last-child { border-bottom: 0; }
.it:hover { background: var(--hover); }

.it.state-missing {
  background: color-mix(in srgb, var(--danger) 6%, var(--panel));
  border-left-color: var(--danger);
}
.it.state-missing:hover { background: color-mix(in srgb, var(--danger) 11%, var(--panel)); }
.it.state-na { opacity: .6; }

.it .seq {
  font-family: var(--mono);
  font-size: .8em;
  font-weight: 650;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 5px;
  padding: 1px 0;
  text-align: center;
  letter-spacing: .5px;
}
.it .nm { min-width: 0; }
.it .nm .t { font-weight: 600; }
.it .nm .t.custom::after {
  content: "自定";
  margin-left: 6px;
  font-size: .68em;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  vertical-align: 1px;
}
.it .nm .b { font-size: .78em; color: var(--text-faint); margin-top: 1px; }
.it .st { display: flex; align-items: center; gap: 6px; }
.it .fl { font-size: .82em; color: var(--text-faint); }
.it .op { display: flex; gap: 6px; justify-content: flex-end; }

.it .arrow {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: .7em;
  font-weight: 800;
  color: #fff;
  background: var(--danger);
  flex: none;
  box-shadow: 0 1px 4px var(--danger-soft);
}

.it-detail {
  padding: 6px 18px 14px 74px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: .9em;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.file-row:last-child { border-bottom: 0; }
.file-row .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fs { color: var(--text-faint); font-size: .84em; white-space: nowrap; }

/* ================= 按钮 ================= */
.btn {
  height: 33px;
  padding: 0 15px;
  font-size: .9em;
  font-weight: 550;
  font-family: inherit;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: var(--brand-soft);
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(140deg, var(--brand), var(--brand-strong));
  border-color: transparent;
  color: #fff;
  font-weight: 650;
  box-shadow: 0 3px 10px var(--brand-soft), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { height: 27px; padding: 0 11px; font-size: .84em; border-radius: 7px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.upload-btn {
  height: 26px;
  padding: 0 10px;
  font-size: .82em;
  border-radius: 7px;
  border: 1px dashed color-mix(in srgb, var(--danger) 55%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
  cursor: pointer;
  font-family: inherit;
  transition: all .14s;
}
.upload-btn:hover { background: var(--danger); color: #fff; border-style: solid; }

/* ================= 抽屉 / 弹层 ================= */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 18, .45);
  backdrop-filter: blur(3px);
  z-index: 100;
  animation: fadeIn .14s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(28px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes popIn { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(720px, 82vw);
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  z-index: 101;
  display: flex;
  flex-direction: column;
  animation: slideIn .18s ease;
}
.drawer.wide { width: min(980px, 90vw); }
.drawer.narrow { width: min(460px, 92vw); }
.drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.drawer-head h3 { margin: 0; font-size: 1.04em; font-weight: 700; flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.drawer-foot {
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex: none;
  background: var(--panel-2);
}

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, 92vw);
  background: var(--panel);
  border-radius: 14px;
  box-shadow: var(--shadow-3);
  z-index: 101;
  animation: popIn .16s ease;
  overflow: hidden;
  border: 1px solid var(--line);
}
.modal-head { padding: 18px 22px 6px; font-weight: 700; font-size: 1.05em; }
.modal-body { padding: 6px 22px 18px; color: var(--text-dim); }
.modal-foot {
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: var(--panel-2);
}

/* ================= 表单 ================= */
.field { margin-bottom: 15px; }
.field > label {
  display: block;
  font-size: .84em;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.field input, .field select, .field textarea {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  font-size: .94em;
  font-family: inherit;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.field textarea { height: auto; min-height: 74px; padding: 8px 11px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px var(--brand-soft);
}
.field input:disabled, .field select:disabled, .field textarea:disabled {
  background: var(--panel-2);
  color: var(--text-faint);
}
.field .hint { font-size: .78em; color: var(--text-faint); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: .92em; }
.check input { width: 15px; height: 15px; accent-color: var(--brand); }

/* ================= 参数卡 ================= */
.param-sec { border-bottom: 1px solid var(--line); }
.param-sec:last-child { border-bottom: 0; }
.param-sec > summary {
  padding: 11px 15px;
  cursor: pointer;
  font-size: .88em;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: .5px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: background .13s;
}
.param-sec > summary::-webkit-details-marker { display: none; }
.param-sec > summary::before {
  content: "▸";
  font-size: .8em;
  color: var(--brand);
  transition: transform .16s;
}
.param-sec[open] > summary::before { transform: rotate(90deg); }
.param-sec > summary:hover { background: var(--hover); }

.param-list { padding: 0 15px 12px; }
.param-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  padding: 4px 0;
  font-size: .9em;
  align-items: baseline;
}
.param-row .k { color: var(--text-faint); }
.param-row .v { color: var(--text); word-break: break-all; }
.param-row .v.v-na { color: var(--text-faint); }

/* ================= 时间轴 ================= */
.timeline { padding: 4px 2px; }
.tl-item {
  position: relative;
  padding: 0 0 14px 20px;
  border-left: 1px solid var(--line-strong);
  font-size: .88em;
}
.tl-item:last-child { border-left-color: transparent; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -4.5px; top: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.tl-item.hi::before {
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.tl-item .tt { color: var(--text-faint); font-size: .84em; font-family: var(--mono); }
.tl-item .td { color: var(--text-dim); }

/* ================= Toast ================= */
#toastRoot {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.toast {
  padding: 10px 17px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  font-size: .9em;
  font-weight: 550;
  animation: popIn .16s ease;
  max-width: 420px;
}
.toast.ok { border-left: 3px solid var(--ok); }
.toast.err { border-left: 3px solid var(--danger); }
.toast.warn { border-left: 3px solid var(--warn); }

/* ================= 进度 ================= */
.upbar {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.upbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-strong)); transition: width .12s; }

/* ================= 分类标签 ================= */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; }
.tab {
  padding: 5px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-dim);
  font-size: .88em;
  font-weight: 550;
  cursor: pointer;
  font-family: inherit;
  transition: all .14s;
}
.tab:hover { border-color: var(--brand); color: var(--brand-strong); }
.tab.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-color: transparent;
  color: #fff;
  font-weight: 650;
  box-shadow: 0 3px 10px var(--brand-soft);
}
.tab .n { opacity: .7; margin-left: 4px; font-size: .88em; }

/* ================= 设备卡 ================= */
.dev-card {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s;
  text-decoration: none;
  color: inherit;
}
.dev-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}
.dev-thumb {
  width: 78px; height: 56px;
  border-radius: var(--radius-sm);
  background: var(--panel-2) center/cover no-repeat;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.dev-thumb .ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: .76em; color: var(--text-faint);
}
.dev-card h4 { margin: 0 0 2px; font-size: 1em; letter-spacing: .3px; font-weight: 700; }
.dev-card .sub { font-size: .84em; color: var(--text-faint); }
.dev-card .right { display: flex; align-items: center; gap: 16px; }

/* 圆环 */
.ring { position: relative; width: 46px; height: 46px; flex: none; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .rt {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: .76em; font-weight: 750;
  font-variant-numeric: tabular-nums;
}

/* ================= 搜索 ================= */
.search-res { max-width: 980px; }
.sr-group { margin-bottom: 18px; }
.sr-item {
  display: flex; gap: 12px; align-items: baseline;
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all .14s;
  box-shadow: var(--shadow-1);
}
.sr-item:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateX(2px);
}
.sr-item mark { background: var(--brand-soft); color: var(--brand-strong); padding: 0 2px; border-radius: 2px; }

/* ================= 主题选择 ================= */
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.theme-opt {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--panel);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.theme-opt:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.theme-opt.active { border-color: var(--brand); box-shadow: 0 0 0 3.5px var(--brand-soft); }
.theme-opt .th {
  height: 76px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.theme-opt .th span {
  position: absolute; left: 8px; bottom: 6px;
  font-size: .76em;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .52);
  color: #fff;
  backdrop-filter: blur(4px);
}
.theme-opt .tn {
  padding: 8px 11px;
  font-size: .86em;
  font-weight: 550;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  overflow: hidden;
}
.seg button {
  border: 0;
  padding: 5px 15px;
  background: var(--panel);
  color: var(--text-dim);
  font-family: inherit;
  font-size: .86em;
  font-weight: 550;
  cursor: pointer;
  transition: all .13s;
}
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-weight: 650;
}

/* ================= 打印 ================= */
@media print {
  #sidebar, #topbar, .drawer-foot, .it .op { display: none !important; }
  #app { display: block; height: auto; }
  #view { overflow: visible; padding: 0; }
  .card, .grp { box-shadow: none; break-inside: avoid; }
}

/* ================= 附件与预览（M4） ================= */
.files { margin: 6px 0 8px; }
.file-row .fi {
  flex: none;
  width: 34px;
  height: 22px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: .66em;
  font-weight: 700;
  letter-spacing: .3px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.file-row .fn {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-row .btn.sm { height: 24px; padding: 0 9px; font-size: .8em; }

.drop-zone {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  padding: 11px 15px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  transition: border-color .15s, background .15s;
}
.drop-zone.over, .drop-zone:hover { border-color: var(--brand); background: var(--brand-soft); }
.drop-zone.busy { opacity: .6; pointer-events: none; }
.drop-zone a { color: var(--brand-strong); text-decoration: underline; }

.pv-wrap {
  max-height: 72vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.pv-wrap img { display: block; max-width: 100%; margin: 0 auto; }
.pv-wrap iframe { display: block; width: 100%; height: 70vh; border: 0; }
.pv-text {
  max-height: 66vh;
  overflow: auto;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  font-family: var(--mono);
  font-size: .86em;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 条目上的管理员操作 */
.it .nm .it-acts {
  display: none;
  gap: 10px;
  margin-top: 5px;
  font-size: .8em;
}
.it:hover .nm .it-acts { display: flex; }
.it .nm .it-acts a { color: var(--brand-strong); text-decoration: none; }
.it .nm .it-acts a:hover { text-decoration: underline; }
.it .nm .it-acts a.danger { color: var(--danger); }

/* 设备页头部 */
.dev-head { display: flex; gap: 16px; margin-bottom: 6px; align-items: stretch; flex-wrap: wrap; }
.dev-photo { width: 280px; flex: none; display: flex; flex-direction: column; gap: 12px; }
.dev-photo .ph-img {
  height: 176px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-1);
}
.dev-photo .ph-none {
  height: 176px; display: grid; place-items: center; text-align: center;
  border-radius: var(--radius-sm); border: 1.5px dashed var(--line-strong);
  background: var(--panel-2); color: var(--text-faint); font-size: .9em; line-height: 1.8;
}
.dev-photo .ph-acts { display: flex; gap: 8px; justify-content: center; }
.dev-photo .dev-rate { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.grid-params { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; }
.grid-params .param-row { grid-template-columns: 86px 1fr; }

/* 待补清单筛选标签 */
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--panel);
  color: var(--text); font-family: inherit; font-size: .86em; font-weight: 550; cursor: pointer;
  transition: all .13s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-strong); }
.chip.on {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-color: transparent; color: #fff;
  box-shadow: 0 3px 10px var(--brand-soft);
}
.chip b { font-variant-numeric: tabular-nums; opacity: .85; }
.chip.on b { opacity: 1; }

/* ================= 项目头部：代号徽标 ================= */
.proj-head { align-items: flex-start; }
.proj-id { display: flex; gap: 18px; align-items: center; min-width: 0; }
.proj-code {
  position: relative; min-width: 100px; padding: 12px 16px 11px;
  border-radius: 14px; color: #fff; text-align: center;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-strong) 100%);
  box-shadow: 0 8px 22px var(--brand-soft), 0 2px 6px rgba(15, 23, 42, .12);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}
.proj-code::before {
  content: "";
  position: absolute;
  top: -40%; right: -30%;
  width: 70%; height: 130%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .28), transparent);
  transform: rotate(18deg);
  pointer-events: none;
}
.proj-code .pc-v {
  font-family: var(--mono); font-size: 1.56em; font-weight: 750;
  letter-spacing: 2.5px; line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}
.proj-code .pc-k { font-size: .66em; letter-spacing: 5px; opacity: .85; margin-top: 2px; }
.proj-code::after {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .25); pointer-events: none;
}
.proj-code.empty {
  background: var(--panel-2); color: var(--text-faint);
  border: 1.5px dashed var(--line-strong); box-shadow: none;
}
.proj-code.empty::after { border-color: transparent; }
.proj-idtext { min-width: 0; }
.proj-rate { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.proj-head .dot { opacity: .38; margin: 0 3px; }

/* ================= 标签 / 筛选片 ================= */
.tag {
  display: inline-block; padding: 1.5px 8px; border-radius: 6px; font-size: .76em;
  font-weight: 650;
  background: var(--brand-soft); color: var(--brand-strong); white-space: nowrap;
}
.tag-hot { background: var(--warn-soft); color: var(--warn); }
.tag.ghost { background: transparent; border: 1px solid var(--line); color: var(--text-faint); font-weight: 550; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.mini-input {
  height: 32px; min-width: 220px; padding: 0 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--input-bg); color: var(--text); font-family: inherit; font-size: .92em;
}
.mini-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3.5px var(--brand-soft); }
.ok-text { color: var(--ok); }
.danger-text { color: var(--danger); }
mark { background: var(--warn-soft); color: inherit; padding: 0 2px; border-radius: 3px; }

/* ================= 规范库 ================= */
.reg-search { display: flex; gap: 8px; align-items: center; }
.reg-search input {
  width: 380px; height: 36px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--input-bg); color: var(--text); font-family: inherit;
  transition: border-color .14s, box-shadow .14s;
}
.reg-search input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3.5px var(--brand-soft);
}
.reg-filters {
  display: flex; flex-direction: column; gap: 10px;
  padding: 13px 16px; margin: 16px 0 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.reg-frow { display: flex; gap: 12px; align-items: flex-start; }
.reg-frow .fk { width: 34px; flex: none; color: var(--text-faint); font-size: .86em; padding-top: 4px; }
.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 13px; }
.reg-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 17px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow-1);
  transition: transform .16s, box-shadow .16s, border-color .16s;
  position: relative;
  overflow: hidden;
}
.reg-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  opacity: .55;
  transition: opacity .16s;
}
.reg-card:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}
.reg-card:hover::before { opacity: 1; }
.rc-head { display: flex; gap: 8px; align-items: center; }
.rc-code { font-size: .82em; color: var(--brand-strong); font-weight: 700; letter-spacing: .3px; }
.reg-card h4 { margin: 2px 0 0; font-size: 1em; line-height: 1.45; font-weight: 700; }
.rc-sum {
  color: var(--text-faint); font-size: .84em; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.rc-meta { font-size: .78em; }
.rc-acts { display: flex; gap: 6px; margin-top: 4px; }

.reg-hits { display: flex; flex-direction: column; gap: 10px; }
.reg-hit {
  display: block; padding: 13px 16px; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm); background: var(--panel);
  transition: .15s;
  box-shadow: var(--shadow-1);
}
.reg-hit:hover {
  background: var(--brand-soft);
  border-left-color: var(--brand-strong);
  transform: translateX(2px);
}
.rh-top { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.rh-code { color: var(--brand-strong); font-weight: 650; }
.rh-reg { font-size: .86em; color: var(--text-faint); }
.rh-title { font-weight: 650; margin-bottom: 3px; }
.rh-text { font-size: .9em; line-height: 1.75; color: var(--text-dim); }

.clause-list { display: flex; flex-direction: column; gap: 10px; }
.clause {
  padding: 13px 17px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: border-color .14s, box-shadow .14s;
}
.clause:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow-2); }
.cl-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.cl-no {
  color: var(--brand-strong); font-weight: 700; font-size: .9em;
  background: var(--brand-soft);
  padding: 1px 8px; border-radius: 6px; white-space: nowrap;
}
.cl-title { font-weight: 650; }
.cl-text { line-height: 1.9; color: var(--text-dim); }

/* ================= 一键上传 ================= */
.batch-zone {
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
  padding: 28px 16px; text-align: center; color: var(--text-faint);
  transition: .15s; cursor: pointer;
  background: var(--panel-2);
}
.batch-zone:hover, .batch-zone.over {
  border-color: var(--brand); background: var(--brand-soft);
  color: var(--brand-strong);
}
.bz-icon { font-size: 1.7em; opacity: .5; margin-bottom: 4px; }
.batch-list { margin-top: 10px; max-height: 240px; overflow: auto; }
.bl-item {
  display: flex; gap: 10px; align-items: center; padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.bl-item:last-child { border-bottom: 0; }
.bl-item .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-item a { color: var(--danger); }

/* ================= 参数识别确认 ================= */
.scan-row {
  display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.scan-row:last-child { border-bottom: 0; }
.scan-chk { padding-top: 4px; }
.scan-main { flex: 1; min-width: 0; }
.scan-label { font-size: .86em; color: var(--text-faint); margin-bottom: 4px; }
.scan-main input {
  width: 100%; height: 33px; padding: 0 11px; font-family: inherit;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--input-bg); color: var(--text); margin-bottom: 3px;
}
.scan-photo { display: flex; gap: 10px; align-items: center; }
.scan-photo img {
  width: 120px; height: 84px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
