/* ============================================================================
   页面级样式：登录 / 注册 / 表单页 / 详情
   ========================================================================== */

/* ------------------------------ 登录 / 注册 ------------------------------ */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-white);
}

/* 左侧品牌区：深色 + 渐变，取自 qrbjx 的深色 hero 语言 */
.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 60px;
  background: var(--bg-dark);
  color: #fff;
}

.auth-aside::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  top: -220px;
  right: -200px;
  background: radial-gradient(circle, rgba(37, 99, 235, .55), transparent 68%);
  pointer-events: none;
}

.auth-aside::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  bottom: -240px;
  left: -160px;
  background: radial-gradient(circle, rgba(124, 58, 237, .45), transparent 68%);
  pointer-events: none;
}

.auth-aside-inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.auth-badge {
  display: inline-block;
  padding: 6px 15px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #e0e7ff;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 22px;
}

.auth-aside h2 {
  font-size: 34px;
  line-height: 1.3;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.auth-aside h2 em {
  font-style: normal;
  background: linear-gradient(90deg, #93c5fd, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-aside p {
  font-size: var(--fs-md);
  line-height: 1.85;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 30px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-feature {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: var(--fs-base);
  color: rgba(255, 255, 255, .82);
  line-height: 1.6;
}

.auth-feature svg {
  flex: none;
  margin-top: 2px;
  color: #93c5fd;
}

/* 右侧表单区 */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg-light);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 34px 32px 30px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.auth-brand .logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--geo));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .3);
}

.auth-brand .accent {
  color: var(--primary);
}

.auth-card h1 {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: var(--fs-sm);
  color: var(--text-light);
  margin-bottom: 24px;
}

.auth-form .form-item {
  margin-bottom: 16px;
}

/* 验证码行：输入框 + 图片 */
.captcha-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.captcha-row .input {
  flex: 1;
  min-width: 0;
}

.captcha-img {
  width: 108px;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  flex: none;
  transition: var(--tr-fast);
  padding: 0;
}

.captcha-img:hover {
  border-color: var(--primary);
}

.captcha-img svg {
  width: 100%;
  height: auto;
}

.captcha-img .captcha-loading {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 20px;
  flex-wrap: wrap;
}

.auth-form .btn-block {
  padding: 12px 18px;
  font-size: var(--fs-md);
}

.auth-foot {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-light);
}

.auth-foot a {
  font-weight: 600;
}

/* 演示账号提示 */
.demo-tip {
  margin-bottom: 18px;
  padding: 10px 13px;
  background: var(--bg-tint);
  border: 1px dashed rgba(37, 99, 235, .3);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--primary-dark);
  line-height: 1.65;
}

.demo-tip b {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* 登录页表单级错误 */
.auth-error {
  display: none;
  margin-bottom: 16px;
  padding: 10px 13px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: #991b1b;
  line-height: 1.6;
}

.auth-error.is-visible {
  display: block;
}

@media (max-width: 1024px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    display: none;
  }

  .auth-main {
    padding: 28px 18px;
    align-items: flex-start;
  }

  .auth-card {
    margin-top: 8vh;
  }
}

@media (max-width: 480px) {
  .auth-main {
    padding: 16px 12px;
    background: var(--bg-white);
  }

  .auth-card {
    margin-top: 4vh;
    padding: 26px 20px 22px;
    border-radius: var(--r-lg);
    box-shadow: none;
    border-color: transparent;
  }

  .auth-card h1 {
    font-size: var(--fs-xl);
  }

  .captcha-img {
    width: 96px;
  }
}

/* -------------------------------- 表单页 -------------------------------- */

.form-page {
  max-width: 860px;
}

/* 参考后台的 form-horizontal：标签左侧固定宽，控件右侧 */
.form-horizontal .form-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}

.form-horizontal .form-label {
  margin-bottom: 0;
  padding-top: 9px;
  text-align: right;
  color: var(--text-mid);
  font-weight: 500;
}

.form-horizontal .form-control-wrap {
  min-width: 0;
  max-width: 440px;
}

.form-horizontal .form-foot {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.form-horizontal .form-foot .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .form-horizontal .form-item,
  .form-horizontal .form-foot {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .form-horizontal .form-label {
    padding-top: 0;
    text-align: left;
  }

  .form-horizontal .form-control-wrap {
    max-width: none;
  }

  .form-horizontal .form-foot {
    margin-top: 20px;
    padding-top: 16px;
  }

  .form-horizontal .form-foot .actions .btn {
    flex: 1;
  }
}

/* 批量添加的格式说明 */
.format-hint {
  padding: 11px 14px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 9px;
}

.format-hint code {
  padding: 1px 6px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--primary-dark);
}

/* 批量结果面板 */
.batch-result {
  margin-top: 18px;
}

.batch-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.batch-stat {
  flex: 1 1 130px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--bg-white);
}

.batch-stat .k {
  font-size: var(--fs-xs);
  color: var(--text-light);
  margin-bottom: 3px;
}

.batch-stat .v {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.batch-stat.is-success {
  border-color: rgba(16, 185, 129, .3);
  background: #f6fefb;
}

.batch-stat.is-success .v {
  color: var(--success);
}

.batch-stat.is-danger {
  border-color: rgba(239, 68, 68, .3);
  background: #fffafa;
}

.batch-stat.is-danger .v {
  color: var(--danger);
}

.batch-list {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.batch-row {
  display: flex;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-light);
  font-size: var(--fs-sm);
  align-items: flex-start;
}

.batch-row:last-child {
  border-bottom: none;
}

.batch-row .line-no {
  flex: none;
  width: 34px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.batch-row .line-text {
  flex: 1;
  min-width: 0;
  color: var(--text-mid);
  word-break: break-all;
}

.batch-row .line-status {
  flex: none;
  font-weight: 600;
}

.batch-row.is-ok .line-status {
  color: var(--success);
}

.batch-row.is-fail {
  background: #fffafa;
}

.batch-row.is-fail .line-status {
  color: var(--danger);
}

.batch-row .line-reason {
  display: block;
  color: var(--danger-dark);
  font-size: var(--fs-xs);
  margin-top: 2px;
}

/* ------------------------------ 公告详情 ------------------------------ */

.news-detail h1 {
  font-size: var(--fs-xl);
  margin-bottom: 8px;
  line-height: 1.45;
}

.news-meta {
  font-size: var(--fs-sm);
  color: var(--text-light);
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

.news-body {
  font-size: var(--fs-md);
  line-height: 1.95;
  color: var(--text-mid);
  white-space: pre-wrap;
  word-break: break-word;
}

/* 公告列表：标题可点 */
.news-title-link {
  color: var(--text-dark);
  font-weight: 600;
}

.news-title-link:hover {
  color: var(--primary);
}

/* ------------------------------ 账户概览条 ------------------------------ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: var(--gap);
}

.stat-card {
  padding: 16px 18px;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  transition: var(--tr-fast);
}

.stat-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card .k {
  font-size: var(--fs-sm);
  color: var(--text-light);
  margin-bottom: 6px;
}

.stat-card .v {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-card .v small {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-light);
  margin-left: 2px;
}

.stat-card.is-primary {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  border-color: var(--primary-light);
}

.stat-card.is-primary .v {
  color: var(--primary-dark);
}

.stat-card.is-geo {
  background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: var(--geo-light);
}

.stat-card.is-geo .v {
  color: var(--geo);
}

/* ---------- 支付宝扫码充值 ---------- */
.pay-qr {
  text-align: center;
}

.pay-qr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 220px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.pay-qr-box svg {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
}

.pay-qr-hint {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.pay-order-meta {
  margin: 14px auto 0;
  max-width: 340px;
  text-align: left;
  border-top: 1px solid var(--border-light);
}

.pay-order-meta > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.pay-order-meta .k {
  color: var(--text-muted);
}

.pay-order-meta .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.pay-qr-foot {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.pay-qr-error {
  padding: 40px 10px;
  color: var(--danger);
  font-size: 13px;
}

@media (max-width: 480px) {
  .pay-qr-box { min-width: 190px; min-height: 190px; padding: 10px; }
}
