* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; background:#f6f7f9; color:#222; }
a { color:#0b64c0; text-decoration:none; }
a:hover { text-decoration:underline; }
.wrap { max-width: 980px; margin: 0 auto; padding: 22px; }
.narrow { max-width: 680px; }
h1 { font-size: 26px; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.card { background:#fff; border:1px solid #e4e7ec; border-radius:12px; padding:16px; margin:14px 0; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.tip { color:#5b6472; line-height:1.6; }
.small { color:#6b7280; font-size:13px; }
.notice { background:#eef6ff; border:1px solid #b2ddff; color:#175cd3; padding:10px; border-radius:8px; margin-top:10px; }
.btn-link { display:inline-block; margin-left:10px; font-weight:700; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.compact-row { gap:18px; margin-bottom:8px; }
input[type="search"], input[type="number"], input[type="text"], input:not([type]) { padding:10px; border:1px solid #d0d5dd; border-radius:8px; }
input[type="search"] { min-width: 280px; }
button { appearance:none; border:0; background:#1677ff; color:white; border-radius:8px; padding:10px 14px; font-size:15px; cursor:pointer; margin:6px 4px 6px 0; }
table { width:100%; border-collapse: collapse; background:white; }
th, td { padding:10px; border-bottom:1px solid #edf0f3; text-align:left; font-size:14px; }
.sep { color:#98a2b3; margin:0 4px; }
input[type="file"] { display:block; width:100%; padding:12px; border:1px dashed #98a2b3; border-radius:10px; background:#fcfcfd; margin: 10px 0; }
audio { width:100%; margin:4px 0 10px; }
textarea { width:100%; padding:10px; border:1px solid #d0d5dd; border-radius:8px; line-height:1.5; font-size:15px; }
.empty { color:#667085; }
.simple-page { padding-top: 16px; }
.simple-page h1 { font-size:22px; }
.simple-card { margin:10px 0; padding:12px; }
.labels { display:grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap:10px; }
.single-labels { display:block; }
.label { background:white; border:1px solid #111; width: 160px; height: 190px; padding:8px; text-align:center; display:flex; flex-direction:column; justify-content:center; align-items:center; page-break-inside: avoid; margin:0 0 10px; }
.label-title { font-weight:700; font-size:14px; margin-bottom:5px; }
.label img { width:112px; height:112px; }
.label-id { font-size:12px; color:#555; margin-top:4px; }
@media print {
  @page { margin: 0; }
  body { background:white; }
  .no-print { display:none; }
  .wrap { max-width:none; padding:0; }
  .labels { grid-template-columns: repeat(4, 160px); gap:6px; }
  .single-labels { display:block; }
  .label { border:1px solid #000; margin:0; }
}
.section-title { font-weight:700; margin-bottom:8px; }
.record-item { border-left:4px solid #e5e7eb; }
.record-time { font-size:13px; color:#667085; margin-bottom:8px; }
.danger { background:#d92d20; }
.danger.light { background:#fff; color:#d92d20; border:1px solid #fda29b; }
.inline-form { display:inline; margin:0; padding:0; }
.link-button { background:transparent; border:0; padding:0; margin:0; color:#0b64c0; font-size:14px; cursor:pointer; }
.link-button:hover { text-decoration:underline; }
.danger-text { color:#d92d20; }
.actions { white-space:nowrap; }
.audio-list { display:flex; flex-direction:column; gap:10px; }
.audio-item { padding:10px; border:1px solid #edf0f3; border-radius:10px; background:#fcfcfd; }
.audio-item form { margin:0; }
.action-row { gap: 8px; }
.compact-audio-list { margin-bottom: 10px; }
.compact-audio-item { padding: 8px 0; border: 0; border-bottom: 1px solid #edf0f3; border-radius: 0; background: transparent; }
.compact-audio-item:last-child { border-bottom: 0; }
.compact-audio-item audio { margin: 2px 0 6px; }
.compact-audio-item .danger.light { padding: 6px 10px; font-size: 13px; }

/* 自定义文件选择按钮：功能仍然是选择/录制音频，只是隐藏浏览器默认文字 */
.hidden-file-input { position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
.fake-file-button { display:inline-block; border:1px solid #d0d5dd; border-radius:8px; background:#fff; color:#222; padding:8px 12px; cursor:pointer; margin:10px 8px 10px 0; font-size:14px; }
.fake-file-button:hover { background:#f9fafb; }
.file-status { color:#667085; font-size:14px; }
.button { display:inline-block; border-radius:8px; padding:10px 14px; margin:6px 4px 6px 0; font-size:15px; text-decoration:none; }
.button:hover { text-decoration:none; }
.button.secondary { background:#667085; color:white; }
.info-cell { max-width:360px; white-space:pre-wrap; line-height:1.45; color:#344054; }


/* 二维码列表优化 */
.list-only-wrap { max-width: 1080px; padding-top: 14px; }
.query-card { margin-top: 10px; }
.list-card { padding: 18px; }
.list-header.single-title { display:block; margin-bottom:12px; }
.list-header.single-title h2 { margin:0; }
.qr-list { display:flex; flex-direction:column; gap:14px; }
.qr-list-item { background:#fff; border:1px solid #dfe4ea; border-radius:12px; overflow:hidden; box-shadow:0 1px 2px rgba(16,24,40,.04); }
.qr-list-main { display:grid; grid-template-columns: 180px 95px 180px 110px; gap:12px; align-items:center; min-height:72px; padding:14px 16px; border-bottom:1px solid #edf0f3; background:#fcfcfd; }
.qr-meta { min-width:0; }
.meta-label { font-size:12px; color:#667085; margin-bottom:5px; }
.meta-value { font-size:14px; color:#1d2939; word-break:break-word; }
.qr-id-text { font-weight:700; color:#101828; }
.qr-actions { display:flex; gap:14px; justify-content:flex-end; align-items:center; white-space:nowrap; }
.qr-info-row { padding:12px 16px 16px; }
.info-preview-block { height:88px; overflow:auto; white-space:pre-wrap; word-break:break-word; line-height:1.55; color:#344054; background:#f9fafb; border:1px solid #edf0f3; border-radius:10px; padding:10px 12px; }
.empty-list { padding:28px; text-align:center; color:#667085; border:1px dashed #d0d5dd; border-radius:12px; background:#fcfcfd; }

@media (max-width: 760px) {
  .list-only-wrap { padding:10px; }
  .qr-list-main { grid-template-columns: 1fr 72px; gap:10px; min-height:auto; }
  .update-time { grid-column: 1 / 2; }
  .qr-actions { grid-column: 2 / 3; grid-row: 1 / 3; flex-direction:column; gap:8px; align-items:flex-end; }
  .info-preview-block { height:96px; }
}


.record-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.status-pill.pending { color:#667085; }
.status-pill.done { color:#067647; border-color:#abefc6; background:#ecfdf3; }


/* 系统名称标识：简洁显示，不改变原页面结构 */
.brand-header { display:flex; align-items:center; gap:12px; margin:0 0 12px; }
.brand-logo { width:40px; height:40px; border-radius:12px; background:linear-gradient(135deg, #1677ff, #0b64c0); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:18px; box-shadow:0 4px 10px rgba(22,119,255,.18); flex:0 0 auto; }
.brand-title { font-size:26px; line-height:1.2; margin:0; color:#101828; }
.brand-subtitle { margin-top:4px; color:#667085; font-size:13px; }
.brand-header-simple { margin-bottom:10px; }
.brand-header-simple .brand-logo { width:36px; height:36px; border-radius:10px; font-size:16px; }
.brand-header-simple .brand-title { font-size:22px; }
.list-brand-header { margin:2px 0 12px; }
.print-brand-header { margin-bottom:14px; }
@media print {
  .brand-logo { box-shadow:none; }
}
@media (max-width: 760px) {
  .brand-header { gap:10px; }
  .brand-logo { width:36px; height:36px; border-radius:10px; font-size:16px; }
  .brand-title { font-size:22px; }
  .brand-subtitle { font-size:12px; }
}

/* 品牌样式：深海蓝，简洁不臃肿 */
:root {
  --brand-navy: #123A63;
  --brand-blue: #2563EB;
  --brand-text: #111827;
  --brand-muted: #6B7280;
  --brand-bg: #F6F8FB;
}
.brand-header {
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 14px;
}
.brand-logo-img {
  width:98px;
  height:auto;
  display:block;
  flex:0 0 auto;
}
.brand-text { min-width:0; }
.brand-title {
  font-size:26px;
  line-height:1.18;
  margin:0;
  color: var(--brand-text);
  font-weight:800;
}
.brand-subtitle {
  margin-top:5px;
  color: var(--brand-muted);
  font-size:13px;
}
.brand-footer {
  text-align:center;
  color:#98A2B3;
  font-size:12px;
  line-height:1.7;
  padding:10px 0 4px;
}
.brand-header-simple .brand-logo-img { width:82px; }
.brand-header-simple .brand-title { font-size:22px; }
.print-brand-header .brand-logo-img { width:92px; }
@media (max-width: 760px) {
  .brand-header { gap:10px; margin-bottom:12px; }
  .brand-logo-img { width:76px; }
  .brand-title { font-size:22px; }
    .brand-subtitle { font-size:12px; }
  .brand-header-simple .brand-logo-img { width:70px; }
  .brand-header-simple .brand-title { font-size:20px; }
}
@media print {
  .brand-logo-img { display:none; }
  }

/* 歌碧 + 伴手礼 标题调整 */
.brand-title-gift {
  color: var(--brand-navy);
  font-size: 30px;
  letter-spacing: 1px;
  font-weight: 800;
}
.record-brand-header {
  margin: 0 0 10px;
}
.record-brand-header .brand-logo-img {
  width: 76px;
}
.record-brand-header .brand-title-gift {
  font-size: 24px;
}
@media (max-width: 760px) {
  .brand-title-gift { font-size: 24px; }
  .record-brand-header .brand-logo-img { width: 70px; }
  .record-brand-header .brand-title-gift { font-size: 22px; }
}

/* 打印页下拉和分页 */
select { padding:10px; border:1px solid #d0d5dd; border-radius:8px; background:#fff; font-size:14px; }
.pager { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:8px; }

/* 存放图片模块 */
.image-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap:10px; margin-bottom:10px; }
.image-item { border:1px solid #edf0f3; border-radius:10px; padding:8px; background:#fcfcfd; }
.image-item img { width:100%; height:110px; object-fit:cover; border-radius:8px; display:block; margin-bottom:6px; }
.image-item form { margin:0; }
.image-item .danger.light { padding:6px 10px; font-size:13px; }
@media (max-width: 760px) {
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 存放信息页：标题行右侧返回列表，上传和文字自动保存 */
.page-title-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; }
.page-title-row h1 { margin:0; }
.back-list-link { color:#0b64c0; font-size:14px; white-space:nowrap; }
.autosave-status { color:#667085; font-size:13px; margin-top:6px; }
.inline-upload-form { display:inline-block; margin:0; }
.inline-upload-form .fake-file-button { margin-right:8px; }

/* 文字模块按钮：保存文字 + 清空文字并排 */
.text-actions-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:8px; }
.text-actions-row button { margin:0; }
.text-actions-row .autosave-status { margin-top:0; margin-left:2px; }

/* 多用户远程协作版 */
.userbar { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:10px 12px; margin:0 0 14px; border:1px solid #dce4ec; border-radius:10px; background:#fff; font-size:13px; }
.userbar-left,.userbar-right { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.userbar-right { color:#667085; }
.auth-wrap { padding-top:28px; }
.auth-card { max-width:520px; margin:0 auto; }
.stack-form { display:flex; flex-direction:column; gap:14px; }
.stack-form label { display:flex; flex-direction:column; gap:6px; font-weight:600; }
.stack-form input,.stack-form select { width:100%; box-sizing:border-box; padding:11px; border:1px solid #d0d5dd; border-radius:8px; font-size:15px; }
.error-box,.success-box { padding:10px 12px; border-radius:8px; margin:0 0 14px; white-space:pre-wrap; }
.error-box { background:#fef3f2; color:#b42318; border:1px solid #fecdca; }
.success-box { background:#ecfdf3; color:#067647; border:1px solid #abefc6; }
.readonly-notice { color:#667085; padding:9px 10px; border:1px dashed #d0d5dd; border-radius:8px; background:#f9fafb; }
.readonly-text { white-space:pre-wrap; line-height:1.6; padding:12px; min-height:100px; border:1px solid #e4e7ec; border-radius:8px; background:#f9fafb; }
.user-create-form label { display:flex; flex-direction:column; gap:5px; font-size:13px; }
.user-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; }
.user-card { border:1px solid #e4e7ec; border-radius:12px; padding:14px; background:#fcfcfd; display:flex; flex-direction:column; gap:10px; }
.user-card label { display:flex; flex-direction:column; gap:5px; font-size:13px; }
.user-card input,.user-card select { width:100%; box-sizing:border-box; padding:9px; border:1px solid #d0d5dd; border-radius:8px; }
.user-card-title { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.status-pill { display:inline-flex; padding:3px 8px; border-radius:999px; border:1px solid #d0d5dd; font-size:12px; }
.check-label { flex-direction:row !important; align-items:center; }
.check-label input { width:auto; }
.table-scroll { overflow:auto; }
.table-scroll table { min-width:900px; }
@media (max-width:760px) {
  .userbar { align-items:flex-start; }
  .userbar-left,.userbar-right { width:100%; }
  .userbar-right { justify-content:space-between; }
  .auth-wrap { padding-top:12px; }
  .user-create-form { align-items:stretch; }
  .user-create-form label,.user-create-form button { width:100%; }
}

/* v1.3：手机拍照上传和单张打印/管理列表边界修复 */
.actions-inner { display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.single-labels .label { max-width:100%; margin-left:auto; margin-right:auto; }

@media (max-width: 760px) {
  /* 管理员二维码表在手机上改为卡片，避免“单张打印”超出屏幕。 */
  .admin-qr-table,
  .admin-qr-table tbody,
  .admin-qr-table tr,
  .admin-qr-table td { display:block; width:100%; }
  .admin-qr-table thead { display:none; }
  .admin-qr-table { background:transparent; }
  .admin-qr-table tr {
    margin:0 0 12px;
    padding:8px 12px;
    border:1px solid #e4e7ec;
    border-radius:12px;
    background:#fff;
    box-shadow:0 1px 2px rgba(16,24,40,.04);
  }
  .admin-qr-table td {
    display:grid;
    grid-template-columns:82px minmax(0,1fr);
    gap:10px;
    padding:9px 0;
    border-bottom:1px solid #edf0f3;
    white-space:normal;
    word-break:break-word;
  }
  .admin-qr-table td:last-child { border-bottom:0; }
  .admin-qr-table td::before {
    content:attr(data-label);
    color:#667085;
    font-size:13px;
    font-weight:600;
  }
  .admin-qr-table .info-cell { max-width:none; }
  .admin-qr-table .actions-inner {
    min-width:0;
    white-space:normal;
    justify-content:flex-start;
    gap:7px;
  }
  .admin-qr-table .sep { margin:0; }
  .print-wrap { width:100%; max-width:100%; padding:10px; overflow-x:hidden; }
  .single-labels { width:100%; display:flex; justify-content:center; }
  .single-labels .label {
    width:min(160px, calc(100vw - 32px));
    height:auto;
    min-height:190px;
  }
}

@media print {
  @page { margin:4mm; }
  html, body { width:auto; min-width:0; overflow:visible; }
  .print-wrap { width:auto; max-width:none; overflow:visible; }
  /* 单张打印按当前纸张可打印宽度自动缩放，不再使用固定160px硬顶出边界。 */
  .single-labels {
    display:flex;
    width:100%;
    justify-content:center;
    align-items:flex-start;
  }
  .single-labels .label {
    width:min(42mm, calc(100vw - 8mm));
    height:auto;
    min-height:0;
    padding:2mm;
    margin:0 auto;
    overflow:hidden;
  }
  .single-labels .label img {
    width:min(30mm, calc(100vw - 14mm));
    height:auto;
    aspect-ratio:1 / 1;
  }
  .single-labels .label-title { font-size:10pt; margin-bottom:1mm; }
  .single-labels .label-id { font-size:9pt; margin-top:1mm; word-break:break-all; }
}

/* v1.4：网页内直接录音，避免华为/鸿蒙把 audio capture 误解析为录像 */
.audio-recorder { padding: 2px 0 4px; }
.audio-recorder-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.audio-recorder-actions button,
.audio-recorder-actions .fake-file-button { margin:6px 0; }
.audio-status-row { display:flex; align-items:center; gap:10px; min-height:28px; flex-wrap:wrap; }
.record-timer { display:inline-block; min-width:54px; padding:3px 8px; border-radius:999px; background:#fff1f0; color:#b42318; font-variant-numeric:tabular-nums; font-weight:700; }
.record-browser-tip { margin-top:8px; padding:8px 10px; border-radius:8px; background:#fff8e6; color:#7a4d00; font-size:13px; line-height:1.5; }
button:disabled { cursor:not-allowed; opacity:.55; }
@media (max-width: 520px) {
  .audio-recorder-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .audio-recorder-actions button,
  .audio-recorder-actions .fake-file-button { width:100%; text-align:center; margin:0; }
  .audio-file-fallback { grid-column:1 / -1; }
}

/* v1.9：查询列表缩略图固定在“打开”按钮下方，手机端不再溢出卡片 */
.list-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.list-section-heading h2 { margin:0; }
.list-count { color:#667085; font-size:13px; }
.qr-list-thumb { width:76px; height:76px; object-fit:cover; border-radius:9px; border:1px solid #e4e7ec; display:block; background:#f2f4f7; }
.qr-thumb-link { display:inline-block; line-height:0; }
.no-thumb { color:#98a2b3; font-size:12px; white-space:nowrap; }
.thumb-cell { width:84px; }
.query-thumb-link {
  display:block;
  width:108px;
  height:74px;
  max-width:100%;
  overflow:hidden;
  line-height:0;
  border-radius:9px;
  background:#f2f4f7;
}
.query-list-thumb {
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  object-fit:cover;
  border-radius:9px;
  border:1px solid #e4e7ec;
  background:#f2f4f7;
}
.qr-list-main.has-thumb { grid-template-columns:180px 95px minmax(180px,1fr) 110px 108px; }
.list-pagination { display:flex; align-items:center; justify-content:center; gap:10px; margin-top:18px; flex-wrap:wrap; }
.list-pagination a,.list-pagination span { padding:8px 12px; border:1px solid #d0d5dd; border-radius:8px; background:#fff; color:#344054; text-decoration:none; font-size:14px; }
.list-pagination a:hover { border-color:#1570ef; color:#1570ef; }
.list-pagination .disabled { color:#98a2b3; background:#f9fafb; }

@media (max-width:760px) {
  .list-section-heading { align-items:flex-start; }
  .thumb-cell { width:auto; }
  .admin-qr-table .qr-list-thumb { width:84px; height:72px; }
  .admin-qr-table td.thumb-cell { grid-template-columns:82px minmax(0,1fr); }

  /* 手机端：左侧显示ID、状态、时间；右侧上方“打开”，下方固定缩略图。 */
  .qr-list-main,
  .qr-list-main.has-thumb {
    grid-template-columns:minmax(0,1fr) 108px;
    grid-template-rows:auto auto auto;
    column-gap:14px;
    row-gap:10px;
    align-items:start;
    overflow:hidden;
  }
  .qr-list-main .qr-id-block { grid-column:1; grid-row:1; }
  .qr-list-main .status-block { grid-column:1; grid-row:2; }
  .qr-list-main .update-time { grid-column:1; grid-row:3; }
  .qr-list-main .qr-actions {
    grid-column:2;
    grid-row:1;
    justify-content:flex-start;
    align-items:flex-end;
    flex-direction:column;
    gap:6px;
    min-width:0;
  }
  .qr-list-main:not(.has-thumb) .qr-actions { grid-row:1 / 4; }
  .qr-list-main.has-thumb .query-thumb-link {
    grid-column:2;
    grid-row:2 / 4;
    justify-self:end;
    align-self:start;
    width:108px;
    height:74px;
    max-width:100%;
  }
  .qr-list-main.has-thumb .query-list-thumb {
    width:100%;
    height:100%;
    max-width:100%;
  }
  .list-pagination { gap:6px; }
  .list-pagination a,.list-pagination span { padding:7px 9px; font-size:13px; }
}

