:root {
  --brand: #2f6bff;
  --brand-dark: #1f4fd6;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #8a93a6;
  --border: #e6e9f2;
  --ok: #1bb98a;
  --shadow: 0 8px 30px rgba(31, 39, 48, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* 居中容器：移动端满宽，PC 端限制宽度 */
.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 18px 40px;
  display: flex;
  flex-direction: column;
}
.page--wide { max-width: 720px; }

.brand-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #5a8bff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
  box-shadow: var(--shadow);
}
.brand-title { font-size: 18px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--muted); }

.hero {
  background: linear-gradient(135deg, var(--brand), #5a8bff);
  color: #fff;
  border-radius: 18px;
  padding: 22px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.hero h1 { margin: 0 0 6px; font-size: 20px; }
.hero p { margin: 0; font-size: 13px; opacity: 0.92; }

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px 18px;
  box-shadow: var(--shadow);
}

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 600;
}
.input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fbfcfe;
}
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
  background: #fff;
}

.btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn--ghost {
  background: #eef2ff;
  color: var(--brand);
}
.btn--ghost:hover { background: #e2e9ff; }

.result { margin-top: 20px; }

.notice {
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.notice--info { background: #eef2ff; color: var(--brand-dark); }
.notice--warn { background: #fff4e5; color: #b9701a; }
.notice--error { background: #ffeaea; color: #c0392b; }

.mask-tip { font-size: 13px; color: var(--muted); margin: 4px 2px 14px; }

.product-list { display: flex; flex-direction: column; gap: 12px; }
.product {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s, transform .05s, box-shadow .15s;
  text-align: left;
  width: 100%;
}
.product:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.product:active { transform: scale(0.995); }
.product__icon {
  width: 42px; height: 42px; border-radius: 11px;
  flex: 0 0 42px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.product__icon--link { background: #e7f0ff; }
.product__icon--pdf { background: #ffe9ec; }
.product__body { flex: 1; min-width: 0; }
.product__name { font-weight: 700; font-size: 15px; }
.product__desc {
  font-size: 12.5px; color: var(--muted);
  margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product__arrow { color: var(--muted); font-size: 18px; flex: 0 0 auto; }

/* 管理端 */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 26px 16px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone--over { border-color: var(--brand); background: #f7f9ff; }
.dropzone strong { color: var(--brand); }

.token-input { letter-spacing: 1px; }

.section-title { font-size: 14px; font-weight: 700; margin: 22px 0 10px; }

.preview {
  background: #0f1422;
  color: #d7e0f5;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 12px; margin-bottom: 8px; font-size: 14px;
}
.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #eef2ff; color: var(--brand); font-weight: 700;
}
.footer-link {
  text-align: center; margin-top: 18px; font-size: 12px; color: var(--muted);
}
.footer-link a { color: var(--brand); text-decoration: none; }

/* 返回按钮（结果页右上角） */
.back-btn {
  margin-left: auto;
  border: none;
  background: #eef2ff;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.back-btn:active { transform: scale(0.97); }

/* 客户信息卡片 */
.cust {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 4px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.cust__row {
  display: flex;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.cust__row:last-child { border-bottom: none; }
.cust__k { color: var(--muted); font-size: 14px; width: 64px; flex: 0 0 64px; }
.cust__v { font-size: 16px; font-weight: 700; }
