/* 轻轻点网页版样式（第 21-2 号 阶段一）：零外部依赖，紧凑平铺布局 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #222; background: #f5f6f8; font-size: 14px; line-height: 1.5;
}
.btn {
  border: 1px solid #d5d8de; background: #fff; color: #333; border-radius: 6px;
  padding: 6px 12px; font-size: 14px; cursor: pointer;
}
.btn:hover { background: #f0f2f5; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: #2b7cff; color: #fff; border-color: #2b7cff; }
.btn-primary:hover { background: #1f6ae8; }
.btn-danger { background: #fff; color: #d33; border-color: #e59a9a; }
.btn-danger:hover { background: #fff0f0; }
.btn-ghost { background: transparent; border-color: transparent; color: #666; }
.muted { color: #999; }
.error-text { color: #d33; min-height: 20px; margin-top: 8px; }

/* 登录 */
.login-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  background: #fff; border-radius: 12px; padding: 32px 36px; max-width: 420px; width: 100%;
  box-shadow: 0 4px 24px rgba(0,0,0,.08); text-align: center;
}
.login-card h1 { font-size: 22px; margin: 0 0 12px; }
.login-tip { color: #666; margin: 0 0 20px; }
.qr-box { display: flex; justify-content: center; min-height: 200px; }
.qr-box svg { max-width: 100%; height: auto; }
.qr-fallback { padding: 80px 10px; color: #999; }
.countdown { color: #888; margin: 10px 0; }
.code-box { border-top: 1px dashed #ddd; padding-top: 16px; margin-top: 12px; }
.code-label { font-size: 12px; color: #999; }
.code-text {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; word-break: break-all;
  background: #f5f6f8; padding: 8px 10px; border-radius: 6px; margin: 8px 0 12px; user-select: all;
}
.code-box .btn { margin: 0 4px; }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; padding: 10px 16px; border-bottom: 1px solid #e5e7eb;
}
.topbar-left { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 16px; }
.top-sep { color: #ccc; }

/* 工具栏 */
.toolbar { background: #fff; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; }
.tool-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tool-row + .tool-row { margin-top: 10px; }
.search { flex: 1; min-width: 220px; padding: 7px 10px; border: 1px solid #d5d8de; border-radius: 6px; font-size: 14px; }
.select { padding: 7px 10px; border: 1px solid #d5d8de; border-radius: 6px; font-size: 14px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 4px; color: #555; }
.scope-hint { color: #999; font-size: 12px; margin-left: 8px; }

/* 选择条 */
.selection-bar {
  background: #eef4ff; padding: 10px 16px; display: flex; gap: 10px; align-items: center;
  border-bottom: 1px solid #d5e4ff; position: sticky; top: 0; z-index: 5;
}
.selected-count { font-weight: 600; color: #2b7cff; margin-right: 8px; }

/* 列表 */
.list-head, .list-foot { padding: 8px 16px; }
.list-hint { color: #999; font-size: 13px; }
.list { padding: 0 16px; }
.item-row {
  background: #fff; border: 1px solid #eceef1; border-radius: 8px; padding: 10px 12px;
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; cursor: pointer;
}
.item-row:hover { border-color: #bcd4ff; }
.item-row.is-deleted { opacity: .55; background: #fafafa; }
.item-check { margin-top: 4px; width: 16px; height: 16px; }
.item-main { flex: 1; min-width: 0; }
.item-name-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.item-name { font-weight: 600; font-size: 15px; }
.item-path { color: #888; font-size: 13px; margin-top: 2px; }
.item-barcode { color: #aaa; font-size: 12px; margin-top: 2px; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 10px; background: #eef0f3; color: #666; }
.tag-待处理 { background: #fff3d6; color: #a06a00; }
.tag-过期提醒 { background: #ffe6e6; color: #c33; }
.tag-保养提醒 { background: #e4f0ff; color: #2b6cb0; }
.tag-已删除 { background: #eee; color: #999; }
.tag-match { background: #eaf7ee; color: #2f855a; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); align-items: center; justify-content: center;
  padding: 20px; z-index: 50;
}
.modal-box { background: #fff; border-radius: 12px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; padding: 18px 20px; }
.modal-wide { max-width: 680px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-foot { margin-top: 14px; display: flex; gap: 10px; }
.picker-list { margin-top: 10px; }
.picker-row { padding: 9px 10px; border-bottom: 1px solid #f0f1f3; cursor: pointer; }
.picker-row:hover { background: #f5f8ff; }
.picker-name { font-weight: 600; }
.picker-path { color: #999; font-size: 12px; }

/* 详情 */
.detail-title { margin: 0 0 8px; font-size: 19px; }
.detail-tags { margin-bottom: 8px; }
.detail-line { margin: 4px 0; color: #444; }
.detail-images { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.detail-img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid #eee; }
.edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 14px 0; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 12px; color: #888; }
.field input { padding: 6px 8px; border: 1px solid #d5d8de; border-radius: 6px; font-size: 14px; }
.history { border-top: 1px solid #eee; padding-top: 10px; margin: 12px 0; }
.history summary { cursor: pointer; color: #666; }
.history-line { font-size: 12px; color: #777; padding: 3px 0; border-bottom: 1px dashed #f0f0f0; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* 垃圾箱 */
.trash-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f1f3; }
.trash-info { flex: 1; min-width: 0; }

/* 轻提示 */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: #333; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { background: #c33; }

@media (max-width: 600px) {
  .edit-form { grid-template-columns: 1fr; }
  .topbar-left { font-size: 12px; }
}
