/* ============================================================
   用户端 user-page.css
   三屏（+ KRIO）结构：兑换 / 上传 / 进度 / KRIO
   学 tbsg-ui 视觉风格，零 !important
   仅作用于 public/index.html，不影响 admin / super
   ============================================================ */

/* ---------- 1. CSS variables ---------- */
.phone-page {
  --orange-1: #ff8400;
  --orange-2: #ff5b00;
  --orange-3: #ff3e13;
  --orange-soft: #fff3e5;
  --orange-line: #ffe0c3;
  --cream: #fff5e4;

  --ink: #222;
  --ink-soft: #555;
  --muted: #888;
  --muted-2: #aab1bd;

  --green: #13c768;
  --green-soft: #eafff3;
  --green-line: #9debc7;
  --green-text: #0c9e5f;

  --blue-soft: #e6f1ff;
  --blue-text: #1f7cff;

  --red: #d83b2f;
  --red-soft: #fff0f0;
  --red-line: #ffc6bd;

  --card-bg: rgba(255, 255, 255, 0.96);
  --card-shadow: 0 18px 45px rgba(180, 84, 0, 0.13);
}

/* ---------- 2. phone-page 容器 ---------- */
html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #fff3df;
  color: var(--ink);
}

* { box-sizing: border-box; }

.phone-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #ff980d 0%, #ffb22b 28%, #fff5e4 58%, #fff 100%);
  position: relative;
  overflow: hidden;
}

.main-wrap {
  position: relative;
  margin-top: -18px;
  padding: 0 18px 34px;
}

/* ---------- 3. top-bg 海报 ---------- */
.top-bg {
  height: 228px;
  position: relative;
  padding-top: 22px;
  color: #fff;
}

/* ---------- 4. status-bar（隐藏假状态栏，避免 mockup 痕迹） ---------- */
.status-bar-fake {
  display: none;
}

/* ---------- 5. back-btn 圆形返回 ---------- */
.back-btn {
  position: absolute;
  top: 28px;
  left: 22px;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 95, 26, 0.55);
  color: #fff;
  font-size: 48px;
  line-height: 38px;
  font-family: Georgia, serif;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(218, 74, 0, 0.18);
  padding: 0;
}
.back-btn:hover { filter: brightness(1.05); }
.back-btn:active { transform: scale(0.96); }

/* ---------- 6. decor 装饰 emoji（全部在标题上方窄带 18-50px） ---------- */
.decor {
  position: absolute;
  opacity: 0.92;
  filter: drop-shadow(0 6px 10px rgba(153, 65, 0, 0.18));
  font-size: 28px;
  line-height: 1;
  pointer-events: none;
}
.decor-1 {
  top: 28px;
  left: 50%;
  transform: translateX(-50%) rotate(-15deg);
}
.decor-2 {
  top: 56px;
  left: 26%;
  color: #ffd35c;
  font-size: 22px;
}
.decor-3 {
  top: 28px;
  right: 22%;
  color: #34d399;
  font-size: 22px;
}
.decor-4 {
  top: 56px;
  right: 36%;
  background: #ff7e23;
  border-radius: 12px;
  padding: 3px 6px;
  font-size: 20px;
}
.decor-5 {
  top: 28px;
  right: 6%;
  background: #ffd85d;
  border-radius: 12px;
  padding: 3px 6px;
  font-size: 20px;
}

/* ---------- 7. h1 + sub 标题 ---------- */
.top-bg h1 {
  margin: 66px 0 8px;
  text-align: center;
  font-size: clamp(30px, 8.5vw, 42px);
  line-height: 1.1;
  font-weight: 900;
  text-shadow: 0 4px 10px rgba(171, 73, 0, 0.18);
  padding: 0 12px;
}

.top-bg .sub {
  text-align: center;
  margin: 0;
  font-size: clamp(15px, 4.4vw, 21px);
  font-weight: 600;
  opacity: 0.95;
  padding: 0 16px;
}

/* ---------- 7b. 功能屏（上传/进度/KRIO）紧凑海报 ---------- */
/* 首页 redeem 保留大海报；功能屏压缩高度、缩小标题、卡片上移 */
.phone-page.screen-upload .top-bg,
.phone-page.screen-progress .top-bg,
.phone-page.screen-krio .top-bg {
  height: 168px;
}
.phone-page.screen-upload .top-bg h1,
.phone-page.screen-progress .top-bg h1,
.phone-page.screen-krio .top-bg h1 {
  margin-top: 58px;
  font-size: clamp(26px, 7vw, 34px);
}
.phone-page.screen-upload .top-bg .sub,
.phone-page.screen-progress .top-bg .sub,
.phone-page.screen-krio .top-bg .sub {
  font-size: clamp(13px, 3.6vw, 16px);
  margin-top: 4px;
}
/* 功能屏装饰收紧到顶部窄带，避免压标题 */
.phone-page.screen-upload .decor,
.phone-page.screen-progress .decor,
.phone-page.screen-krio .decor {
  top: 18px;
  font-size: 18px;
  opacity: 0.75;
}
.phone-page.screen-upload .decor-1,
.phone-page.screen-progress .decor-1,
.phone-page.screen-krio .decor-1 {
  font-size: 22px;
}
.phone-page.screen-upload .decor-2,
.phone-page.screen-progress .decor-2,
.phone-page.screen-krio .decor-2,
.phone-page.screen-upload .decor-4,
.phone-page.screen-progress .decor-4,
.phone-page.screen-krio .decor-4 {
  display: none;
}

/* ---------- 8. .screen 切换 ---------- */
.screen {
  display: none;
}
.screen.active {
  display: block;
}

/* ---------- 9. card 通用 ---------- */
.card {
  background: var(--card-bg);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.card + .card {
  margin-top: 18px;
}

/* ---------- 10. screenRedeem ---------- */
.input-line {
  height: 86px;
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(220, 220, 220, 0.7);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
}
.input-line .icon {
  font-size: 26px;
  color: var(--orange-2);
  flex-shrink: 0;
}
.input-line input {
  border: 0;
  outline: 0;
  font-size: 22px;
  font-weight: 700;
  width: 100%;
  color: #333;
  background: transparent;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
}
.input-line input::placeholder {
  color: #aaa;
  letter-spacing: 0;
}

.primary-btn {
  width: 100%;
  height: 68px;
  border: 0;
  border-radius: 26px;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-3));
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  margin-top: 20px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 83, 0, 0.23);
  transition: filter 0.15s, transform 0.15s;
}
.primary-btn:hover { filter: brightness(1.05); }
.primary-btn:active { transform: scale(0.985); }
.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.hint-line {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff8ef;
  border: 1px dashed #ffd2aa;
  color: #8a6250;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}
.hint-line span {
  color: var(--orange-3);
  font-weight: 900;
}

/* 教程卡片 */
.tutorial-card {
  padding: 22px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}
.small-orange-btn {
  border: 0;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-3));
  color: #fff;
  border-radius: 22px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(255, 84, 0, 0.2);
}
.small-orange-btn:active { transform: scale(0.97); }

.tutorial-preview {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: #fafafa;
  cursor: pointer;
}
.tutorial-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff6ed;
}
.zoom-tip {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
}
.tutorial-tips {
  font-size: 14px;
  color: #777;
  text-align: center;
  margin: 14px 0 0;
}

/* ---------- 11. screenUpload ---------- */
.cdk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--orange-line);
}
.cdk-bar-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.cdk-bar-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.cdk-bar-code {
  font-family: ui-monospace, "SF Mono", Consolas, "Microsoft YaHei", monospace;
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cdk-bar-switch {
  flex-shrink: 0;
  border: 2px solid var(--orange-2);
  background: #fff7ef;
  color: var(--orange-2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.cdk-bar-switch:hover { background: #ffe2c7; }

.success-banner {
  border-radius: 22px;
  background: linear-gradient(90deg, var(--green-soft), #f2fff8);
  border: 2px solid var(--green-line);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--green-text);
  margin-bottom: 22px;
}
.success-banner.processing {
  background: linear-gradient(90deg, #fff8df, #fffbed);
  border-color: #ffe0a0;
  color: #9a6815;
}
.success-banner.fail {
  background: var(--red-soft);
  border-color: var(--red-line);
  color: var(--red);
}
.success-banner.queued {
  background: var(--orange-soft);
  border-color: #ffd5ad;
  color: #9a4f22;
}
.success-banner strong {
  display: block;
  font-size: clamp(20px, 5.6vw, 26px);
  line-height: 1.2;
  font-weight: 900;
}
.success-banner small {
  display: block;
  font-size: 14px;
  margin-top: 5px;
  font-weight: 600;
}
.big-check {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  flex: 0 0 auto;
}
.success-banner.processing .big-check { background: #ffb800; }
.success-banner.fail .big-check { background: var(--red); }
.success-banner.queued .big-check { background: var(--orange-2); }

.bound-url {
  background: #fffaf3;
  border: 1px solid var(--orange-line);
  padding: 12px 14px;
  border-radius: 16px;
  word-break: break-all;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 18px;
  line-height: 1.5;
}
.bound-url .label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 700;
}

.url-block {
  margin-bottom: 18px;
}
.url-block h3 {
  font-size: 20px;
  margin: 0 0 14px;
  color: var(--ink);
  font-weight: 900;
}

.upload-row {
  display: flex;
  gap: 12px;
}
.upload-placeholder {
  flex: 1;
  min-height: 64px;
  border-radius: 18px;
  background: #111927;
  color: #8d97a8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding: 0 14px;
  text-align: center;
  word-break: break-all;
}
.upload-placeholder.has-file {
  background: linear-gradient(135deg, #1a3a2a, #112417);
  color: #6ef0a8;
}
.upload-btn {
  flex-shrink: 0;
  width: 168px;
  min-height: 64px;
  border-radius: 18px;
  background: #fff6ed;
  border: 1px solid #ffd0af;
  color: var(--orange-2);
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
}
.upload-btn:hover { background: #ffead2; }
.scanning {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  min-height: 18px;
}
.scanning.ok { color: var(--green-text); }
.scanning.error { color: var(--red); }

/* 下单链接横条（识别结果 / 手动粘贴） */
.url-field {
  margin-top: 14px;
}
.url-field-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.url-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--orange-line);
  border-radius: 14px;
  padding: 4px 6px 4px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.url-field-row:focus-within {
  border-color: var(--orange-2);
  box-shadow: 0 0 0 4px rgba(255, 91, 0, 0.1);
}
.url-field-row input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  padding: 12px 0;
  min-width: 0;
}
.url-field-row input::placeholder {
  color: #b3b3ba;
  font-size: 13px;
}
.url-clear-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: #f3f0ec;
  color: #999;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.url-clear-btn:hover { background: #e8e4df; color: #666; }

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.action-row .primary-btn {
  flex: 1;
  margin-top: 0;
}

.btn-green {
  background: linear-gradient(135deg, var(--green), #1cc4b1);
  color: #03110b;
  box-shadow: 0 12px 24px rgba(33, 209, 159, 0.22);
}
.btn-gold {
  background: linear-gradient(135deg, #ffb800, #ff7a59);
  color: #2a1a06;
  box-shadow: 0 12px 24px rgba(255, 122, 89, 0.22);
}
.btn-ghost {
  background: #fff;
  color: var(--orange-2);
  border: 2px solid var(--orange-line);
  box-shadow: none;
}

.msg {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  min-height: 18px;
  line-height: 1.5;
  color: var(--muted);
}
.msg.err { color: var(--red); }
.msg.ok { color: var(--green-text); }

/* ---------- 12. screenProgress ---------- */
.progress-card {
  padding: 24px;
}
.progress-status {
  border-radius: 22px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}
.progress-status.processing {
  background: linear-gradient(90deg, #fff8df, #fffbed);
  border: 2px solid #ffe0a0;
  color: #9a6815;
}
.progress-status.done {
  background: linear-gradient(90deg, var(--green-soft), #f2fff8);
  border: 2px solid var(--green-line);
  color: var(--green-text);
}
.progress-status.fail {
  background: var(--red-soft);
  border: 2px solid var(--red-line);
  color: var(--red);
}
.progress-status strong {
  display: block;
  font-size: clamp(20px, 5.6vw, 26px);
  font-weight: 900;
  line-height: 1.2;
}
.progress-status small {
  display: block;
  font-size: 14px;
  margin-top: 5px;
  font-weight: 600;
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 22px;
  padding: 4px 6px 0;
}
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed #f0e2d0;
  font-size: 14px;
  line-height: 1.4;
}
.info-row:last-child { border-bottom: 0; }
.info-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  flex-shrink: 0;
}
.info-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--orange-soft);
  color: var(--orange-2);
  font-size: 13px;
  line-height: 1;
}
.info-value {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
  word-break: break-all;
  letter-spacing: 0.01em;
}
.info-value.mono {
  font-family: ui-monospace, "SF Mono", Consolas, "Microsoft YaHei", monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.info-value .green-num {
  color: var(--green-text);
  font-size: 17px;
}

/* 100% 时显示的管理员自定义完成提示语 */
.completion-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(135deg, #fff8df, #fffbed);
  border: 1.5px solid #ffe0a0;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 22px;
  color: #7a5612;
  font-size: 14px;
  line-height: 1.6;
}
.completion-note-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffd55a;
  color: #7a5612;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}
.completion-note-text {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-all;
  font-weight: 600;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}

/* 订单分组（下单 / 补单 各一组） */
.order-group {
  margin-bottom: 18px;
}
.order-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.order-group-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.order-group-title .clicks-chip {
  font-size: 12px;
  font-weight: 800;
  color: var(--orange-2);
  background: var(--orange-soft);
  border: 1px solid var(--orange-line);
  border-radius: 999px;
  padding: 2px 9px;
}
.order-group-title .clicks-chip.refill {
  color: #b97700;
  background: #fff5d8;
  border-color: #ffe0a0;
}
.order-group-badge {
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 11px;
}
.order-group-badge.done { background: #dcfff1; color: #079f5c; }
.order-group-badge.running { background: #fff5d8; color: #b97700; }
.order-group-badge.fail { background: var(--red-soft); color: var(--red); }
.order-group-badge.queued { background: var(--blue-soft); color: var(--blue-text); }
.order-group .task-list { margin-bottom: 0; }
.refill-note {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff8df;
  border: 1px solid #ffe0a0;
  color: #9a6815;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}
.task-box {
  border: 1.5px solid #dce9ff;
  background: #fbfdff;
  border-radius: 20px;
  padding: 18px;
}
.task-title {
  font-size: 16px;
  color: #16213e;
  margin-bottom: 12px;
  font-weight: 800;
}
.task-title b {
  color: #16213e;
}
.tag {
  display: inline-block;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}
.tag.blue {
  background: var(--blue-soft);
  color: var(--blue-text);
}
.tag.green {
  background: #dcfff1;
  color: #079f5c;
}
.tag.gold {
  background: #fff5d8;
  color: #b97700;
}
.tag.red {
  background: var(--red-soft);
  color: var(--red);
}
.tag.gray {
  background: #f0f1f5;
  color: var(--muted);
}

.progress-track {
  height: 12px;
  background: #edf1f5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange-1), var(--orange-3));
  border-radius: 999px;
  transition: width 0.35s;
}
.progress-fill.done {
  background: linear-gradient(90deg, #25d486, #16b86a);
}
.task-meta {
  font-size: 13px;
  color: var(--muted);
}
.task-meta b { color: var(--ink-soft); }
.task-error {
  margin-top: 6px;
  color: var(--red);
  font-size: 13px;
  word-break: break-all;
}

.small-note {
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.55;
}

.secondary-btn {
  width: 100%;
  height: 60px;
  border-radius: 22px;
  border: 1.5px solid #ddd;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  margin-top: 12px;
  cursor: pointer;
}
.secondary-btn:hover { background: #fafafa; }

/* ---------- 13. screenKrio ---------- */
.krio-result {
  text-align: center;
}
.krio-icon {
  font-size: 48px;
  margin-bottom: 10px;
  line-height: 1;
}
.krio-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--green-text);
}
.krio-account-box {
  background: #fffaf4;
  border: 1.5px solid var(--orange-line);
  border-radius: 16px;
  padding: 18px 14px;
  margin-bottom: 14px;
  word-break: break-all;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
  text-align: left;
}
.krio-copy-btn {
  display: block;
  width: 100%;
  height: 60px;
  border: 0;
  border-radius: 22px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--green), #1cc4b1);
  color: #03110b;
  box-shadow: 0 12px 24px rgba(33, 209, 159, 0.22);
}
.krio-copy-btn:active { transform: scale(0.985); }
.krio-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.krio-note {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff8df;
  border: 1px solid #ffe0a0;
  border-radius: 14px;
  font-size: 13px;
  color: #9a6815;
  text-align: left;
  line-height: 1.55;
}

/* ---------- 14. toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  display: none;
  z-index: 90;
  max-width: 80%;
  text-align: center;
}
.toast.show { display: block; }

/* ---------- 15. tutorial-image-modal ---------- */
.tutorial-image-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}
.tutorial-image-modal.show { display: flex; }
.tutorial-image-box {
  position: relative;
  width: min(94vw, 430px);
  max-height: 88vh;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.tutorial-image-box img {
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  background: #fff7ec;
}
.tutorial-image-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-size: 28px;
  line-height: 34px;
  font-weight: 900;
  cursor: pointer;
}

/* ---------- 16. showAlert 全屏弹窗 ---------- */
.alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: alertFadeIn 0.15s ease;
}
@keyframes alertFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.alert-card {
  background: #fff;
  border-radius: 22px;
  padding: 28px 22px 22px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.alert-icon {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 10px;
}
.alert-text {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 20px;
  word-break: break-all;
  max-height: 50vh;
  overflow-y: auto;
  white-space: pre-line;
  text-align: left;
}
.alert-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-3));
}
.alert-btn.green {
  background: linear-gradient(135deg, var(--green), #1cc4b1);
  color: #03110b;
}
.alert-btn.red {
  background: linear-gradient(135deg, var(--red), #c0392b);
}

/* ---------- 17. 媒体查询：小屏微调 ---------- */
@media (max-width: 380px) {
  .top-bg { height: 206px; }
  .top-bg h1 { margin-top: 56px; font-size: 32px; }
  .back-btn { top: 22px; left: 14px; width: 42px; height: 42px; font-size: 38px; line-height: 30px; }
  .decor-1 { top: 24px; font-size: 26px; }
  .decor-2 { top: 50px; left: 22%; font-size: 18px; }
  .decor-3 { top: 24px; right: 24%; font-size: 18px; }
  .decor-4 { top: 50px; right: 38%; font-size: 16px; padding: 2px 5px; }
  .decor-5 { top: 24px; right: 4%; font-size: 16px; padding: 2px 5px; }
  .card { padding: 20px; border-radius: 24px; }
  .input-line { height: 76px; padding: 0 16px; }
  .input-line input { font-size: 19px; }
  .primary-btn { height: 60px; font-size: 22px; border-radius: 22px; }
  .upload-row { flex-direction: column; }
  .upload-btn { width: 100%; }
  .info-row { font-size: 13px; padding: 10px 0; }
  .info-value.mono { font-size: 12px; }
  .progress-card { padding: 20px; }
  .task-box { padding: 14px; }
  .secondary-btn { height: 54px; font-size: 17px; }
}

@media (max-width: 340px) {
  .top-bg h1 { font-size: 28px; margin-top: 54px; }
  .decor-2, .decor-4 { display: none; }
  .decor-1 { top: 22px; }
  .decor-3 { top: 26px; right: 18%; }
  .decor-5 { top: 26px; }
  .cdk-bar-code { font-size: 16px; }
  .upload-btn { font-size: 16px; }
}
