/* ============================================================
   前台收银台公共样式（cashier.php / pay_qrcode.php 共用）
   移动端优先，柔和渐变，卡片质感
   ============================================================ */

:root {
  --accent: #4f46e5;
  --accent-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --green-grad: linear-gradient(135deg, #43e97b 0%, #38c172 100%);
  --text-main: #1e293b;
  --text-muted: #94a3b8;
  --card-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--accent-grad);
  min-height: 100vh;
  padding: 32px 16px 48px;
  -webkit-font-smoothing: antialiased;
}

.page-header {
  text-align: center;
  margin-bottom: 24px;
}
.page-header h1 {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.card {
  max-width: 380px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px 32px;
  box-shadow: var(--card-shadow);
}

/* 账户信息 */
.account-info { text-align: center; margin-bottom: 20px; }
.account-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
}
.account-tip {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

/* 收款二维码（品牌码） */
.qr-wrap { text-align: center; margin-bottom: 22px; }
.qr-img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fafafa;
  padding: 6px;
}

/* 金额输入 */
.amount-group { margin-bottom: 18px; }
.amount-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}
.amount-input-row {
  display: flex;
  align-items: center;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color .15s;
}
.amount-input-row:focus-within { border-color: var(--accent); }
.amount-prefix {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin-right: 6px;
}
.amount-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  padding: 12px 0;
  background: transparent;
}
.amount-input::placeholder { color: #c3c6d0; font-weight: 400; }

/* 主按钮 */
.pay-btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 15px 0;
  background: var(--green-grad);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  box-shadow: 0 6px 18px rgba(56, 193, 114, .35);
  cursor: pointer;
  transition: transform .1s, opacity .15s;
}
.pay-btn:active { transform: scale(.98); }
.pay-btn:disabled { opacity: .6; box-shadow: none; }

.pay-msg {
  text-align: center;
  font-size: 13px;
  color: #e74c3c;
  margin-top: 12px;
  min-height: 18px;
}

/* 状态提示 */
.status-tip { text-align: center; margin-bottom: 16px; }
.status-tip .amount {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-main);
}
.status-tip .sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

/* 等待页订单信息 */
.order-info {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 10px 0 14px;
  word-break: break-all;
}

/* 等待页二维码展示 */
.qr-pay-wrap {
  max-width: 260px;
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fafafa;
  text-align: center;
}
.qr-pay-wrap img.qr-pay {
  display: block;
  width: 100%;
  height: auto;
}
.qr-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 8px;
}
.qr-url {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
  margin-top: 8px;
}

/* 成功提示 */
.success-box {
  text-align: center;
  padding: 30px 0;
  display: none;
}
.success-box .icon {
  font-size: 56px;
  color: #38c172;
  margin-bottom: 12px;
}
.success-box .title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}
.success-box .sub {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* 文字链接返回 */
.back-link {
  display: block;
  text-align: center;
  margin-top: 18px;
  color: #fff;
  font-size: 13px;
  text-decoration: underline;
  opacity: .9;
}

/* 加载动画 */
.spinner {
  width: 28px;
  height: 28px;
  margin: 14px auto;
  border: 3px solid rgba(79, 70, 229, .2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }