/* 龙崽工具箱 v1 · views.css —— 各视图专属样式 */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1000px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* 识别候选卡片 */
.cand-list { display: flex; flex-direction: column; gap: 10px; }
.cand { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--unknown); }
.cand.st-exact { border-left-color: var(--exact); } .cand.st-corrected { border-left-color: var(--corrected); }
.cand.st-extra { border-left-color: var(--extra); }
.cand-main { min-width: 0; flex: 1; } .cand-sn { font-family: var(--mono); font-size: 15px; word-break: break-all; }
.cand-meta { display: flex; gap: 7px; margin-top: 5px; flex-wrap: wrap; align-items: center; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.thumb-card { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.thumb-card img { width: 100%; height: 120px; object-fit: cover; }
.thumb-card .t-foot { padding: 8px 10px; font-size: 12px; color: var(--text-dim); display: flex; justify-content: space-between; gap: 6px; }
.thumb-card .t-badge { position: absolute; top: 6px; right: 6px; }
.ocr-progress { font-size: 12.5px; color: var(--text-dim); }

/* 扫码 */
.scan-stage { position: relative; width: 100%; max-width: 720px; min-height:220px;
 aspect-ratio:16/9; border-radius: 16px; overflow: hidden;
  background: #000; border: 1px solid var(--border-strong); margin: 0 auto; }
.scan-stage video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; top:0;right:0;bottom:0;left:0;
 inset:0; pointer-events: none; }
.scan-frame::before { content: ""; position: absolute; left: 18%; right: 18%; top: 22%; bottom: 22%;
  border: 2px solid var(--gold); border-radius: 10px; box-shadow: 0 0 24px var(--gold-glow), inset 0 0 24px rgba(0,0,0,.4); }
.scan-line { position: absolute; left: 18%; right: 18%; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  animation: scan-y 2.2s ease-in-out infinite; top: 22%; }
.scan-toolbar { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap; }
.scan-hits { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }

/* 数据源 */
.source-item { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); }
.source-item .s-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--gold-2); background: var(--active-grad); }
.source-item .s-main { flex: 1; min-width: 0; } .source-item .s-name { font-weight: 600; word-break: break-all; }
.source-item .s-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.sheet-preview { position: relative; overflow: auto; height: 360px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.vl-stage { position: absolute; top:0;right:0;bottom:0;left:0;
 inset:0; width: 100%; }
.vl-spacer { width: 100%; }
.vl-row { display: flex; align-items: center; width: 100%; border-bottom: 1px solid var(--border); padding: 0 12px; gap: 8px; }
.vl-row.head-row { font-weight: 650; color: var(--text-dim); background: var(--head-bg); position: sticky; top: 0; z-index: 1; }
.vl-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }

/* 单位任务 */
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.unit-card { padding: 15px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: .15s; }
.unit-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.unit-card.current { border-color: var(--gold); box-shadow: var(--shadow-gold); }
.unit-card .u-name { font-weight: 650; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.pbar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-2)); }
.group-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.group-row .g-cell { font-size: 12.5px; } .group-row .g-cell label { color: var(--text-faint); display: block; font-size: 11px; }
.group-row .g-cell .mono { font-size: 12.5px; word-break: break-all; }

/* 结果过滤条 */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 12.5px; color: var(--text-dim); }
.filter-chip.on { background: var(--active-grad); color: var(--gold-2); border-color: var(--gold); }
.result-list { position: relative; overflow-y: auto; max-height: calc(100vh - 250px);
 max-height: calc(100dvh - 250px); min-height: 300px;
  border: 1px solid var(--border); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* 设置/日志 */
.settings-col { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.log-line { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; }
.log-line .lv { width: 46px; flex: none; } .log-line.error { color: var(--extra); } .log-line.warn { color: var(--corrected); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv .k { color: var(--text-dim); }
.about-hero { display: flex; gap: 18px; align-items: center; }
.about-hero img { width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--shadow-gold); }

@media (max-width: 640px) {
  .scan-stage { min-height:260px;
 aspect-ratio:4/3; }
  .cand { flex-wrap: wrap; }
  .result-list { max-height: none; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv .k { margin-top: 8px; }
}
