/* 登录弹窗 + 账户页 + 管理员页公用样式 */

/* ── 弹窗 ── */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s var(--ease);
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 420px;
  margin: 20px;
  padding: 32px;
  position: relative;
  animation: slideUp 0.3s var(--ease);
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-mute);
  font-size: 1.6rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-head h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.modal-head p {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.modal-body label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 8px;
  font-weight: 500;
}
.modal-body input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.modal-body input:focus {
  outline: none;
  border-color: var(--accent);
}
.modal-body input#login-code {
  letter-spacing: 8px;
  font-size: 1.5rem;
  text-align: center;
  font-weight: 700;
  font-family: var(--font-serif);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-mute);
  margin-bottom: 14px;
}

.login-msg {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  min-height: 1.2em;
}
.login-msg-error   { background: rgba(239,68,68,0.1); color: var(--red); }
.login-msg-success { background: rgba(74,222,128,0.1); color: var(--green); }
.login-msg-info    { background: rgba(212,165,116,0.1); color: var(--accent); }

/* ── 用户徽章 ── */
.user-email {
  font-size: 0.85rem;
  color: var(--text-soft);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.user-badge.paid {
  background: rgba(74,222,128,0.15);
  color: var(--green);
}

/* ── 通用页面布局 ── */
.page {
  padding: 60px 0 100px;
  min-height: 80vh;
}
.page-head {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.page-head h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-head p {
  color: var(--text-soft);
  margin-top: 8px;
}

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.panel h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

/* ── 表格 ── */
.tbl {
  width: 100%;
  border-collapse: collapse;
}
.tbl th, .tbl td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.tbl th {
  color: var(--text-mute);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tbl td b { color: var(--text); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending   { background: rgba(251,191,36,0.15); color: var(--amber); }
.badge-approved  { background: rgba(74,222,128,0.15); color: var(--green); }
.badge-rejected  { background: rgba(239,68,68,0.15); color: var(--red); }

/* ── QR 二维码区 ── */
.qr-box {
  background: white;
  padding: 16px;
  border-radius: var(--r-md);
  display: inline-block;
}
.qr-box img {
  display: block;
  width: 240px;
  height: 240px;
  object-fit: contain;
}
.qr-label {
  text-align: center;
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.9rem;
}
