:root {
  /* 豆小黑 IP 配色：黑身 + 橙帽 */
  --orange: #f97316;
  --orange-deep: #ea6a0a;
  --orange-soft: #fff1e4;
  --black: #1d1d24;
  --bg: #f6f4f1;
  --card: #ffffff;
  --line: #eceae6;
  --red: #e34d4d;
  --red-bg: #fdeaea;
  --green: #22a45d;
  --yellow-t: #9a7b1e;
  --yellow-bg: #fdf6e0;
  --ink: #23232b;
  --ink2: #5b5b66;
  --muted: #9b9aa4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page { max-width: 448px; margin: 0 auto; padding: 18px 14px 0; }

/* ===== 品牌头部：豆小黑 ===== */
.brand {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 2px;
}
.brand-logo {
  width: 54px; height: 54px; border-radius: 14px;
  box-shadow: 0 6px 16px -6px rgba(29, 29, 36, 0.35);
  background: #fff;
}
.brand-text h1 {
  font-size: 22px; font-weight: 800; color: var(--black);
  letter-spacing: 0.5px; line-height: 1.2;
}
.brand-text p { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(30, 25, 15, 0.05);
}

.card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; font-weight: 700; color: var(--black); }
.step {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--black); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700;
}
.step.done { background: var(--orange); font-size: 13px; }

/* ===== 警示框 ===== */
.warn-red {
  background: var(--red-bg); color: var(--red);
  border-radius: 10px; padding: 11px 13px;
  font-size: 12.5px; line-height: 1.7; font-weight: 500;
  margin-bottom: 14px;
}
.warn-yellow {
  background: var(--yellow-bg); color: var(--yellow-t);
  border-radius: 10px; padding: 9px 12px;
  font-size: 12px; line-height: 1.6; font-weight: 500;
  margin-top: 14px; text-align: center;
}
.hint-gray { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ===== 首页 3 条提示 ===== */
.notice {
  background: var(--orange-soft);
  border: 1px solid #f6d9bd;
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 14px;
  font-size: 12.5px;
  line-height: 1.9;
  color: #7a5230;
}
.notice-item { display: flex; gap: 6px; }
.notice-item::before { content: ""; flex: none; }

/* ===== 登录方式切换 ===== */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.tab {
  height: 46px; border: 0; border-radius: 10px; cursor: pointer;
  background: #edecea; color: #46454e;
  font: 600 14.5px -apple-system, sans-serif;
  transition: all 0.15s;
}
.tab.active {
  background: var(--black); color: #fff;
  box-shadow: 0 6px 16px -6px rgba(29, 29, 36, 0.5);
}

/* ===== 二维码 ===== */
.qr-wrap {
  width: 232px; height: 232px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 6px 18px -8px rgba(29, 29, 36, 0.16);
}
.qr-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 4px; }
.qr-placeholder { color: var(--muted); font-size: 13px; text-align: center; line-height: 1.7; }

/* ===== 已扫描遮罩 ===== */
.qr-scanned-wrap { position: relative; width: 100%; height: 100%; }
.qr-scanned-wrap img { opacity: 0.25; }
.qr-scanned-mask {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center;
}
.scan-ok { width: 54px; height: 54px; filter: drop-shadow(0 6px 14px rgba(34, 164, 93, 0.35)); }
.scan-ok svg { width: 100%; height: 100%; display: block; }
.scan-ok circle {
  fill: var(--green); stroke: #d9f2e4; stroke-width: 2;
  transform-origin: center; animation: scan-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.scan-ok path {
  fill: none; stroke: #fff; stroke-width: 5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: scan-draw 0.35s 0.22s ease forwards;
}
@keyframes scan-pop { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes scan-draw { to { stroke-dashoffset: 0; } }
.qr-scanned-txt { font-size: 14.5px; font-weight: 700; color: var(--green); }
.qr-mock {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--muted); font-size: 12.5px;
  border: 2px dashed #d9d6d0; border-radius: 12px;
}
.qr-mock-icon { font-size: 40px; color: #f3b27a; }
.qr-meta { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.qr-meta .expire { color: var(--muted); }
.qr-meta .expire.soon { color: var(--red); }
.qr-meta a { color: var(--orange); font-weight: 600; cursor: pointer; margin-left: 8px; }
.qr-meta a:hover { text-decoration: underline; }

/* ===== 表单 ===== */
.field { margin-bottom: 13px; }
.field .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field input {
  width: 100%; height: 46px;
  border: 1px solid #e5e3df; border-radius: 10px;
  padding: 0 13px; font-size: 15px; color: var(--ink);
  outline: none; background: #fff;
  transition: border-color 0.15s;
}
.field input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14); }
.code-row { display: flex; gap: 9px; }
.code-row input { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; white-space: nowrap;
  font: 600 14px -apple-system, sans-serif;
  transition: all 0.15s;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  height: 46px; padding: 0 15px; border-radius: 10px;
  background: #edecea; color: #46454e;
}
.btn-primary {
  width: 100%; height: 46px; border-radius: 10px;
  background: linear-gradient(135deg, #ff8f3a, var(--orange-deep));
  color: #fff; font-size: 15px;
  box-shadow: 0 8px 20px -8px rgba(234, 106, 10, 0.6);
}
.btn-primary:hover { filter: brightness(1.04); }

/* ===== 已登录：账号卡 ===== */
.acct { display: flex; align-items: center; gap: 11px; }
.acct-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  object-fit: cover; display: block;
  background: #edecea;
}
.acct-avatar-fb {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #ff8f3a, var(--orange-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
}
.acct-info { flex: 1; min-width: 0; }
.acct-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-sub { margin-top: 5px; display: flex; align-items: center; gap: 6px; }
.badge {
  font-size: 11px; font-weight: 600; color: var(--orange-deep);
  background: var(--orange-soft); padding: 2px 9px; border-radius: 999px;
}
.badge.gray { color: var(--muted); background: #f1f0ee; }
.btn-logout {
  flex: none; height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1px solid #f0b9b9; background: #fff; color: var(--red);
  font: 600 12.5px -apple-system, sans-serif; cursor: pointer;
}
.btn-logout:hover { background: #fff5f5; }

.divider { height: 1px; background: var(--line); margin: 14px 0; }

.kv { display: flex; align-items: baseline; gap: 12px; padding: 5px 0; font-size: 13px; }
.kv .k { color: var(--muted); flex: none; width: 52px; }
.kv .v { color: var(--ink); font-weight: 600; }
.kv-none { font-size: 12.5px; color: var(--muted); padding: 3px 0 0 64px; }

/* ===== 查询结果（开学季横幅同款框架：渐变底 + 描边 + 圆角 + 图标 + 粗标题 + 副标题） ===== */
.result-panel {
  background: linear-gradient(135deg, #fff7ef, #fffdfd);
  border: 1px solid #f6d9bd; border-radius: 14px;
  padding: 16px 14px 18px; text-align: center;
  box-shadow: 0 6px 16px -12px rgba(234, 106, 10, 0.45);
}
.rp-head { margin-bottom: 8px; }
.rp-title { display: flex; flex-direction: column; gap: 1px; text-align: center; }
.rp-title b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.rp-title i { font-style: normal; font-size: 11px; color: var(--muted); line-height: 1.4; }
.result-panel .big-num {
  font-size: 46px; font-weight: 800; color: var(--black);
  letter-spacing: -1px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.result-panel .cap { margin-top: 10px; font-size: 12.5px; color: #b08c6a; }
.result-panel .loading {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--ink2); font-size: 13.5px; padding: 8px 0;
}
.spinner {
  width: 26px; height: 26px;
  border: 3px solid #f7d9bc; border-top-color: var(--orange);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.msg-orange { margin-top: 12px; font-size: 12.5px; color: #e08a2e; text-align: center; }
.msg-red { margin-top: 12px; font-size: 12.5px; color: var(--red); text-align: center; line-height: 1.6; }

.btn-soft {
  width: 100%; height: 44px; border-radius: 10px;
  background: var(--orange-soft); color: var(--orange-deep);
  font: 600 14px -apple-system, sans-serif;
  margin-top: 16px;
}
.btn-soft:hover { filter: brightness(0.98); }

/* ===== 错误页 ===== */
.error-box { text-align: center; padding: 26px 8px; }
.error-box .emoji { font-size: 38px; margin-bottom: 12px; }
.error-box .msg { font-size: 14.5px; line-height: 1.7; color: var(--ink); }
.error-box .btn-primary { margin-top: 20px; }

/* ===== 招代理挂件（header 下方吊牌样式，点击复制微信号） ===== */
.agent-tag {
  position: relative;
  width: fit-content;
  margin: 0 auto 16px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transform-origin: top center;
  animation: tag-sway 4.5s ease-in-out infinite;
}
.agent-tag:active { animation-play-state: paused; }
.agent-tag-rope {
  display: block;
  width: 2px; height: 14px;
  margin: 0 auto;
  background: linear-gradient(#d8d4cd, var(--orange));
  border-radius: 2px;
}
.agent-tag-body {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff;
  border: 1px solid #f6d9bd;
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: 0 6px 16px -8px rgba(234, 106, 10, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}
.agent-tag:hover .agent-tag-body {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -8px rgba(234, 106, 10, 0.55);
}
.agent-tag-icon { font-size: 14px; }
.agent-tag-text { font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.agent-tag-wx {
  font-size: 12.5px; font-weight: 700; color: var(--orange-deep);
  background: var(--orange-soft);
  padding: 2px 10px; border-radius: 999px;
}
.agent-tag-tip {
  position: absolute; left: 50%; top: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--black); color: #fff;
  font-size: 11.5px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
  z-index: 5;
}
.agent-tag.copied .agent-tag-tip { opacity: 1; }
@keyframes tag-sway {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(1.6deg); }
  75% { transform: rotate(-1.6deg); }
}

/* ===== 页脚 ===== */
.footer {
  text-align: center; font-size: 12px; color: #a5a3ab;
  line-height: 1.8; padding: 8px 0 34px;
}

.hidden { display: none !important; }
