:root {
  --navy: #1d4e79;
  --navy-dark: #14375a;
  --teal: #2e9e7b;
  --teal-dark: #237a5f;
  --orange: #f5a623;
  --orange-dark: #d98d0f;
  --bg: #f4f7fa;
  --card: #ffffff;
  --text: #22303c;
  --muted: #6b7a89;
  --border: #e3eaf0;
  --success: #1e9e6a;
  --warning: #c47f17;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(29, 78, 121, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--navy); }

/* ---------- 登录页 ---------- */
.login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eaf3ee 0%, #eef4fa 55%, #fdf6ea 100%);
  padding: 2rem 1rem;
}
.login-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.75rem 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.login-logo { width: 150px; height: auto; margin-bottom: 1rem; }
.login-card h1 { font-size: 1.45rem; color: var(--navy); margin-bottom: 0.5rem; }
.login-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.75rem; }
.field-label {
  display: block; text-align: left; font-size: 0.85rem;
  color: var(--muted); margin-bottom: 0.4rem; font-weight: 600;
}
#email {
  width: 100%; padding: 0.8rem 1rem; font-size: 1rem;
  border: 1.5px solid var(--border); border-radius: 10px;
  outline: none; transition: border-color 0.2s;
}
#email:focus { border-color: var(--teal); }
.field-error { color: var(--danger); font-size: 0.85rem; margin: 0.5rem 0 0.25rem; text-align: left; }
.btn {
  display: inline-block; border: none; cursor: pointer;
  font-size: 1rem; font-weight: 600; border-radius: 10px;
  padding: 0.85rem 1.6rem; transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); }
.btn-outline {
  background: #fff; color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover { background: #eef4fa; }
.btn-block { width: 100%; margin-top: 1.25rem; }
.login-tip { margin-top: 1.25rem; font-size: 0.8rem; color: var(--muted); }
.site-footer { margin-top: 2rem; color: var(--muted); font-size: 0.8rem; text-align: center; }

/* ---------- 客户页布局 ---------- */
.topbar {
  background: linear-gradient(120deg, var(--navy) 0%, #2a7a5e 100%);
  color: #fff;
  padding: 0;
}
.topbar-inner {
  max-width: 980px; margin: 0 auto; padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 0.9rem;
}
.topbar-logo {
  width: 44px; height: 44px; border-radius: 10px;
  background: #fff; padding: 3px; object-fit: contain;
}
.topbar-title { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em; }
.topbar-sub { font-size: 0.78rem; opacity: 0.85; }
.topbar-right { margin-left: auto; }
.btn-logout {
  background: rgba(255,255,255,0.15); color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  font-size: 0.82rem; padding: 0.4rem 0.9rem; border-radius: 8px; cursor: pointer;
}
.btn-logout:hover { background: rgba(255,255,255,0.28); }

.page { max-width: 980px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

/* ---------- 后台：全屏自适应 ---------- */
.page.admin-wide {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1.3rem clamp(0.85rem, 2.2vw, 2rem) 3rem;
}
body.admin-wide-body .topbar-inner {
  max-width: none;
  width: 100%;
  padding: 1rem clamp(0.85rem, 2.2vw, 2rem);
}
/* 超宽屏收一点，避免表格列被拉得太散 */
@media (min-width: 1800px) {
  .page.admin-wide,
  body.admin-wide-body .topbar-inner {
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
  }
}
/* 表单列数随宽度自动增减（宽屏多列、窄屏单列） */
.page.admin-wide .grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
/* 超宽屏固定 4 列，输入框不至于被拉得过窄 */
@media (min-width: 1400px) {
  .page.admin-wide .grid-3 { grid-template-columns: repeat(4, 1fr); }
}
/* 表格：宽屏铺满；窄屏横向滚动，不挤压内容 */
.page.admin-wide .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.page.admin-wide .admin-table { min-width: 880px; }
.page.admin-wide .mail-log { min-width: 780px; }
@media (max-width: 720px) {
  .page.admin-wide { padding-left: 0.7rem; padding-right: 0.7rem; }
  .page.admin-wide .card { padding: 1.1rem 0.95rem; border-radius: 12px; }
  .page.admin-wide .admin-toolbar { gap: 0.55rem; }
  .page.admin-wide .admin-toolbar input[type="search"] { flex: 1 1 100%; min-width: 0; }
  body.admin-wide-body .topbar-title { font-size: 0.95rem; }
  body.admin-wide-body .topbar-sub { display: none; }
  body.admin-wide-body .topbar-logo { width: 36px; height: 36px; }
  .page.admin-wide .row-actions { min-width: 13rem; }
}
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.6rem 1.6rem;
  margin-bottom: 1.4rem;
}
.card h2 {
  font-size: 1.12rem; color: var(--navy);
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1.1rem;
}
.card h2 .icon { font-size: 1.2rem; }

/* 问候区 */
.greeting {
  background: linear-gradient(120deg, #ffffff 0%, #f2faf6 100%);
  border-left: 5px solid var(--teal);
}
.greeting h1 { font-size: 1.35rem; color: var(--navy); margin-bottom: 0.35rem; }
.greeting .meta { color: var(--muted); font-size: 0.9rem; }
.greeting .meta strong { color: var(--text); }
.tour-title-line { margin-top: 0.6rem; font-size: 1.05rem; font-weight: 700; color: var(--teal-dark); }

/* 付款状态 */
.pay-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.3rem; }
.pay-box {
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 1rem 1.1rem; text-align: center;
}
.pay-box .label { font-size: 0.85rem; color: var(--muted); }
.pay-box .amount { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin: 0.2rem 0; }
.pay-box .badge {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  padding: 0.18rem 0.7rem; border-radius: 999px;
}
.badge-paid { background: #e3f6ec; color: var(--success); }
.badge-pending { background: #fdf3df; color: var(--warning); }
.badge-total { background: #e8f0f8; color: var(--navy); }
.pay-box .sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

.progress-track {
  display: flex; align-items: center; margin: 0.4rem 0 1.4rem;
}
.progress-step { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; }
.progress-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  background: #e8eef3; color: var(--muted);
  border: 2px solid var(--border);
}
.progress-step.done .progress-dot { background: var(--success); border-color: var(--success); color: #fff; }
.progress-step.current .progress-dot { background: var(--orange); border-color: var(--orange); color: #fff; }
.progress-label { font-size: 0.75rem; color: var(--muted); margin-top: 0.35rem; white-space: nowrap; }
.progress-step.done .progress-label { color: var(--success); font-weight: 600; }
.progress-step.current .progress-label { color: var(--warning); font-weight: 600; }
.progress-line { flex: 1; height: 3px; background: var(--border); margin: 0 0.5rem 1.2rem; border-radius: 2px; }
.progress-line.done { background: var(--success); }

/* 支付方式标签页 */
.tabs { display: flex; gap: 0.6rem; margin-bottom: 1.2rem; }
.tab-btn {
  flex: 1; padding: 0.75rem 0.5rem; border-radius: 10px;
  border: 1.5px solid var(--border); background: #f8fafc;
  font-size: 0.95rem; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: all 0.2s;
}
.tab-btn.active {
  background: var(--navy); color: #fff; border-color: var(--navy);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.pay-method {
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.2rem; margin-bottom: 0.9rem;
}
.pay-method h3 { font-size: 1rem; color: var(--text); display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.method-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem; font-weight: 800;
}
.mi-wechat { background: #07c160; }
.mi-alipay { background: #1677ff; }
.mi-bank { background: var(--navy); }
.tutorial {
  margin-top: 0.7rem; background: #f6f9fb; border-radius: 10px;
  padding: 0.9rem 1.1rem; font-size: 0.88rem;
}
.tutorial summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.tutorial ol { margin: 0.6rem 0 0.2rem 1.2rem; }
.tutorial li { margin-bottom: 0.35rem; }
.account-info {
  font-size: 0.88rem; background: #f6f9fb; border-radius: 10px;
  padding: 0.8rem 1.1rem; margin-top: 0.6rem;
}
.account-info p { margin-bottom: 0.2rem; }
.account-info strong { color: var(--navy); }

/* 在线支付 */
.online-pay {
  border: 1.5px solid var(--orange); border-radius: 12px;
  background: #fffdf7; padding: 1.2rem 1.3rem;
}
.online-pay h3 { font-size: 1rem; color: var(--navy); margin-bottom: 0.6rem; }
.fee-notice {
  background: #fdf3df; border-left: 4px solid var(--orange);
  border-radius: 8px; padding: 0.8rem 1rem;
  font-size: 0.88rem; margin: 0.7rem 0 1rem;
}
.fee-notice strong { color: var(--warning); }
.fee-table { width: 100%; font-size: 0.9rem; margin-bottom: 1rem; }
.fee-table td { padding: 0.35rem 0; }
.fee-table td:last-child { text-align: right; font-weight: 700; color: var(--navy); }
.fee-table tr.grand td { border-top: 1.5px dashed var(--border); padding-top: 0.6rem; font-size: 1.05rem; }
.fee-table tr.grand td:last-child { color: var(--orange-dark); font-size: 1.2rem; }

/* 行程 */
.route-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; align-items: center; }
.chip {
  background: #e8f0f8; color: var(--navy); font-weight: 600;
  font-size: 0.85rem; padding: 0.3rem 0.85rem; border-radius: 999px;
}
.chip-arrow { color: var(--muted); font-size: 0.8rem; }
.timeline { position: relative; margin-left: 0.6rem; padding-left: 1.6rem; border-left: 2px solid var(--border); }
.timeline-item { position: relative; margin-bottom: 1.15rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -1.6rem; top: 0.3rem;
  transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--teal); border: 2.5px solid #d8efe6;
}
.timeline-day { font-size: 0.78rem; font-weight: 700; color: var(--teal-dark); }
.timeline-title { font-weight: 700; color: var(--text); margin: 0.1rem 0 0.25rem; }
.timeline-detail { font-size: 0.88rem; color: var(--muted); }

.include-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.4rem; }
.include-col h3 { font-size: 0.95rem; margin-bottom: 0.5rem; }
.include-col.inc h3 { color: var(--success); }
.include-col.exc h3 { color: var(--muted); }
.include-col ul { margin-left: 1.15rem; font-size: 0.88rem; }
.include-col li { margin-bottom: 0.3rem; }

/* 合同附件 */
.contract-row {
  display: flex; align-items: center; gap: 1rem;
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 1rem 1.2rem;
}
.contract-icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: #fdeaea; color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800; flex: 0 0 auto;
}
.contract-info { flex: 1; min-width: 0; }
.contract-name { font-weight: 700; font-size: 0.95rem; word-break: break-all; }
.contract-status { font-size: 0.8rem; color: var(--success); font-weight: 600; }
.contract-note { font-size: 0.78rem; color: var(--muted); }

/* 联系方式卡 */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
.contact-item {
  display: flex; align-items: center; gap: 0.8rem;
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 0.9rem 1rem;
}
.contact-item .ci {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; color: #fff;
}
.ci-wechat { background: #07c160; }
.ci-whatsapp { background: #25d366; }
.ci-email { background: var(--navy); }
.ci-phone { background: var(--orange); }
.contact-item .cl { font-size: 0.78rem; color: var(--muted); }
.contact-item .cv { font-weight: 700; font-size: 0.92rem; word-break: break-all; }
.contact-hours { margin-top: 0.9rem; font-size: 0.82rem; color: var(--muted); text-align: center; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 40, 60, 0.45);
  display: none; align-items: center; justify-content: center;
  padding: 1rem; z-index: 100;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius);
  max-width: 440px; width: 100%; padding: 1.8rem 1.7rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.modal h3 { color: var(--navy); font-size: 1.1rem; margin-bottom: 0.8rem; }
.modal p { font-size: 0.9rem; color: var(--text); margin-bottom: 0.6rem; }
.modal .modal-actions { display: flex; gap: 0.7rem; margin-top: 1.2rem; }
.modal .modal-actions .btn { flex: 1; text-align: center; margin: 0; padding: 0.75rem 0.5rem; font-size: 0.92rem; }

@media (max-width: 720px) {
  .pay-summary { grid-template-columns: 1fr; }
  .include-cols { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .login-card { padding: 2rem 1.5rem; }
  .tabs { flex-direction: column; }
}

/* ---------- 语言切换器 ---------- */
.lang-switch { position: relative; display: inline-block; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.45);
  color: #fff; font-size: 0.82rem; font-weight: 600;
  padding: 0.38rem 1.6rem 0.38rem 0.7rem; border-radius: 8px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% + 1px), calc(100% - 9px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.lang-select option { color: #22303c; }
.login-body .lang-switch { position: absolute; top: 1.25rem; right: 1.25rem; }
.login-body .lang-select {
  background-color: #fff; color: var(--navy); border-color: var(--border);
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
}
.topbar-right { display: flex; align-items: center; gap: 0.7rem; }

/* ---------- PDF 在线阅读器 ---------- */
.pdf-viewer { margin-top: 1.1rem; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; background: #f6f9fb; }
.pdf-toolbar {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.6rem 0.8rem; background: #fff; border-bottom: 1.5px solid var(--border);
}
.pdf-btn {
  background: #f1f5f9; border: 1px solid var(--border); color: var(--navy);
  font-size: 0.8rem; font-weight: 600; padding: 0.35rem 0.7rem;
  border-radius: 8px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.pdf-btn:hover:not(:disabled) { background: #e6eef5; }
.pdf-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pdf-download { background: var(--teal); color: #fff; border-color: var(--teal); }
.pdf-download:hover { background: var(--teal-dark); }
.pdf-pageinfo { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.pdf-spacer { flex: 1; }
.pdf-canvas-wrap { padding: 1rem; overflow: auto; max-height: 640px; text-align: center; background: #f6f9fb; }
.pdf-canvas { box-shadow: 0 2px 10px rgba(0,0,0,0.12); background: #fff; margin: 0 auto; }
.pdf-fail, .pdf-empty { color: var(--muted); font-size: 0.88rem; padding: 1rem; text-align: center; }
.online-desc { font-size: 0.9rem; color: var(--text); }
.modal-note { font-size: 0.8rem; color: var(--muted); }
.contact-lead { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.9rem; }

/* ---------- 后台管理 ---------- */
.admin-toolbar { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-toolbar input[type="search"] {
  flex: 1; min-width: 200px; padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--border); border-radius: 10px; font-size: 0.9rem; outline: none;
}
.admin-toolbar input[type="search"]:focus { border-color: var(--teal); }
.admin-hint { font-size: 0.82rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.admin-table th, .admin-table td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.admin-table th { color: var(--navy); background: #f6f9fb; font-size: 0.82rem; white-space: nowrap; }
.admin-table td .badge { font-size: 0.72rem; }
.admin-table tbody tr:hover { background: #fafcfe; }
/* 状态徽章与金额不折行，避免「首付款：未收」被拆成两行 */
.admin-table td .badge,
.admin-table .cell-nowrap,
.admin-table .cell-money { white-space: nowrap; }
.admin-table .cell-money { font-variant-numeric: tabular-nums; }
.admin-table .usd-hint { color: var(--muted); font-size: 0.78rem; }
/* 操作列：按钮多时整齐换行，不再挤成一坨 */
.row-actions { white-space: normal; display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; min-width: 15rem; align-items: center; }
.row-actions .link-btn { white-space: nowrap; }
.row-actions .mail-btn { color: var(--navy); font-weight: 600; }
.row-actions .mail-btn:disabled { opacity: 0.6; cursor: default; }
.link-btn {
  background: none; border: none; color: var(--navy); cursor: pointer;
  font-size: 0.82rem; font-weight: 600; padding: 0 0.35rem; text-decoration: underline;
}
.link-btn.danger { color: var(--danger); }
.sec-title {
  font-size: 0.95rem; color: var(--teal-dark); margin: 1.3rem 0 0.7rem;
  padding-bottom: 0.35rem; border-bottom: 1px dashed var(--border);
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.grid-1 { display: grid; gap: 0.9rem; }
.f { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.82rem; color: var(--muted); }
.f input, .f select, .f textarea {
  font-size: 0.9rem; padding: 0.5rem 0.7rem; border: 1.5px solid var(--border);
  border-radius: 9px; color: var(--text); font-family: inherit; outline: none; background: #fff;
}
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--teal); }
.f textarea { resize: vertical; line-height: 1.6; }
/* 按钮字段：与输入框底部对齐 */
.f-action { justify-content: flex-end; }
.f-action .btn { width: 100%; padding: 0.58rem 0.9rem; }
/* 登录页「保持登录」 */
.remember-row {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0.85rem 0 1rem; font-size: 0.85rem; color: var(--muted); cursor: pointer; user-select: none;
}
.remember-row input { width: 17px; height: 17px; accent-color: var(--teal); margin: 0; cursor: pointer; }
.lang-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.9rem; }
.lang-tab {
  background: #f1f5f9; border: 1px solid var(--border); color: var(--muted);
  font-size: 0.82rem; padding: 0.35rem 0.85rem; border-radius: 999px; cursor: pointer;
}
.lang-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.contract-upload { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.upload-status { font-size: 0.82rem; color: var(--teal-dark); }
.admin-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.admin-actions .btn-block { width: auto; margin-top: 0; }
.save-status { font-size: 0.85rem; color: var(--teal-dark); font-weight: 600; }
.btn-danger { background: #fff; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: #fdecea; }
#adminPwd {
  width: 100%; padding: 0.8rem 1rem; font-size: 1rem;
  border: 1.5px solid var(--border); border-radius: 10px; outline: none;
}
#adminPwd:focus { border-color: var(--teal); }

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- 页脚支持邮箱 ---------- */
.footer-support { margin-top: 0.4rem; }
.footer-support a {
  color: var(--teal-dark); font-weight: 600; text-decoration: none; margin-left: 0.25rem;
}
.footer-support a:hover { text-decoration: underline; }

/* ---------- 本期应付（自动从首付款推进到尾款） ---------- */
.next-due {
  background: linear-gradient(120deg, #fdf6e8 0%, #fffdf7 100%);
  border: 1.5px solid var(--orange); border-radius: 12px;
  padding: 1rem 1.2rem 1.1rem; margin-bottom: 1.2rem; text-align: center;
}
.next-due .nd-label { font-size: 0.8rem; font-weight: 700; color: var(--warning); letter-spacing: 0.04em; text-transform: uppercase; }
.next-due .nd-amount { font-size: 2.1rem; font-weight: 800; color: var(--orange-dark); line-height: 1.25; }
.next-due .nd-stage { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.next-due .nd-note { font-size: 0.82rem; color: var(--success); margin-top: 0.3rem; }
.next-due.all-paid { border-color: var(--success); background: #f1faf5; }
.next-due.all-paid .nd-stage { color: var(--success); font-size: 1rem; }
.pay-amount-line {
  background: #f6f9fb; border-left: 3px solid var(--teal); border-radius: 8px;
  padding: 0.6rem 0.9rem; font-size: 0.9rem; margin-bottom: 1rem;
}
.pay-amount-line strong { color: var(--orange-dark); font-size: 1.05rem; }
.pay-amount-line.all-paid { border-left-color: var(--success); color: var(--success); font-weight: 600; }

/* ---------- 页面兜底提示（缺少登录态 / 加载失败 / 版本过期） ---------- */
.boot-panel {
  max-width: 560px; margin: 3rem auto 4rem; padding: 2rem 1.8rem;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: center;
}
.boot-panel p { font-size: 0.95rem; color: var(--text); margin-bottom: 1.1rem; }
.boot-panel p:last-child { margin-bottom: 0; }

/* ---------- 银行汇款 / 凭证上传 ---------- */
.tabs-3 .tab-btn { font-size: 0.87rem; padding: 0.7rem 0.4rem; }
.wire-block { border: 1.5px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: 0.9rem; }
.wire-h { font-size: 0.92rem; color: var(--navy); margin-bottom: 0.6rem; }
.wire-rows { font-size: 0.88rem; }
.wire-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.34rem 0; border-bottom: 1px dashed #eef2f6; }
.wire-row:last-child { border-bottom: none; }
.wire-row span { color: var(--muted); flex: 0 0 auto; }
.wire-row strong { color: var(--text); text-align: right; word-break: break-word; font-weight: 600; }
.wire-agent { margin: 0.4rem 0 1rem; background: #f8fafc; border: 1.5px solid var(--border); border-radius: 12px; padding: 0.9rem 1.1rem; }
.wire-agent summary { cursor: pointer; font-weight: 700; color: var(--warning); font-size: 0.9rem; }
.wire-note { font-size: 0.82rem; color: #8a6320; background: #fdf3df; border-left: 3px solid var(--orange); padding: 0.6rem 0.8rem; border-radius: 6px; margin: 0.7rem 0; }
.wire-sub { font-size: 0.85rem; font-weight: 700; color: var(--navy); margin: 0.9rem 0 0.4rem; }
.receipt-box { border: 1.5px dashed var(--teal); border-radius: 12px; padding: 1rem 1.1rem; background: #f6fbf9; }
.receipt-hint { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.8rem; }
.receipt-form { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.receipt-form input[type=file] { font-size: 0.82rem; max-width: 100%; }
.receipt-status { font-size: 0.85rem; color: var(--teal-dark); min-height: 1.2rem; margin-top: 0.6rem; }
.receipt-list { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.6rem; }
.receipt-item { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--muted); text-decoration: none; }
.receipt-item img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.receipt-empty { font-size: 0.82rem; color: var(--muted); }
.usd-hint { color: var(--muted); font-size: 0.85rem; margin-left: 0.35rem; }
.stage-tag { background: #eef4fa; color: var(--navy); font-size: 0.78rem; padding: 0.1rem 0.5rem; border-radius: 999px; }

/* 后台：凭证缩略图 */
.admin-receipt-grid { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.admin-receipt-grid a { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.75rem; color: var(--muted); text-decoration: none; }
.admin-receipt-grid img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* ---------- 收款二维码 / 国际账号提示 ---------- */
.qr-box { text-align: center; margin: 0.7rem 0 0.9rem; }
.qr-box img {
  width: 168px; max-width: 62%; border-radius: 10px;
  border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.qr-hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.4rem; }
.intl-num { color: var(--navy); font-weight: 700; font-size: 0.9rem; }
.intl-note {
  font-size: 0.8rem; color: #8a6320; background: #fdf7ea;
  border-left: 3px solid var(--orange); padding: 0.5rem 0.7rem;
  border-radius: 6px; margin-top: 0.55rem; line-height: 1.55;
}
.wire-agent { background: #f8fafc; border: 1.5px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: 1rem; }

/* 后台：当前生效合同 */
.current-contract { font-size: 0.84rem; color: var(--text); margin-bottom: 0.9rem; }
.current-contract a { color: var(--navy); font-weight: 600; }

/* ---------- PC 端：微信 / 支付宝左右并排 ---------- */
.pay-grid-2 { display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
.pay-grid-2 .pay-method { margin-bottom: 0; }
@media (min-width: 760px) {
  .pay-grid-2 { grid-template-columns: 1fr 1fr; }
  .pay-grid-2 .qr-box img { width: 190px; }
}

/* ---------- 联系卡：可点击 + 备注 ---------- */
.contact-item { text-decoration: none; color: inherit; }
a.contact-item:hover { border-color: var(--teal); background: #fbfefd; }
.contact-item .cn { font-size: 0.74rem; color: var(--muted); margin-top: 0.15rem; }
.ci-toll { background: #c0392b; font-size: 0.62rem; }

/* ---------- 支付结果页 ---------- */
.result-card { max-width: 620px; margin: 2.5rem auto; text-align: center; padding: 2.2rem 1.8rem; }
.result-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
  background: #e3f6ec; color: var(--success); font-size: 2rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.result-card h1 { font-size: 1.4rem; color: var(--navy); margin-bottom: 0.6rem; }
.result-sub { font-size: 0.95rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.2rem; }
.result-status { font-size: 1.2rem; color: var(--success); min-height: 1.5rem; margin-bottom: 1.2rem; }

/* 合同状态配色 */
.contract-status.is-signed { color: var(--success); }
.contract-status.is-pending { color: var(--warning); }

/* ---------- 支付选项卡：加强可读性与点击感 ---------- */
.tabs-3 { gap: 0.7rem; }
.tabs-3 .tab-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  padding: 0.95rem 0.6rem; border-radius: 14px; border: 2px solid var(--border);
  background: #fff; color: var(--muted); font-size: 0.95rem; font-weight: 700;
  box-shadow: 0 1px 3px rgba(29, 78, 121, 0.05);
  transition: all 0.18s ease;
}
.tabs-3 .tab-btn .tab-ic { font-size: 1.4rem; line-height: 1; }
.tabs-3 .tab-btn:hover { border-color: var(--teal); color: var(--navy); transform: translateY(-1px); }
.tabs-3 .tab-btn.active {
  background: linear-gradient(135deg, var(--navy) 0%, #2a7a5e 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 8px 18px rgba(29, 78, 121, 0.22);
}
.tabs-3 .tab-btn.active .tab-ic { transform: scale(1.08); }
@media (max-width: 620px) {
  .tabs-3 { gap: 0.5rem; }
  .tabs-3 .tab-btn { padding: 0.8rem 0.3rem; font-size: 0.82rem; }
  .tabs-3 .tab-btn .tab-ic { font-size: 1.2rem; }
}

/* 在线支付状态提示 */
.pay-status { font-size: 0.85rem; color: var(--teal-dark); text-align: center; margin-top: 0.6rem; min-height: 1.2rem; }
.pay-status.is-error { color: var(--danger); }

/* ---------- 合同在线签署 ---------- */
.sign-box {
  margin-top: 1.2rem; padding: 1.1rem 1.2rem;
  border: 1.5px solid var(--border); border-radius: 12px; background: #fbfdff;
}
.sign-check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; line-height: 1.6; cursor: pointer; }
.sign-check input { margin-top: 0.25rem; width: 18px; height: 18px; accent-color: var(--teal); flex: 0 0 auto; }
.sign-box .btn { margin-top: 0.9rem; }
.sign-box .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sign-status { font-size: 0.85rem; min-height: 1.2rem; margin-top: 0.5rem; color: var(--teal-dark); }
.sign-status.is-error { color: var(--danger); }
.sign-done {
  margin-top: 1.2rem; padding: 0.9rem 1.1rem; border-radius: 12px;
  background: #eefaf4; border: 1.5px solid #bfe8d5;
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; font-size: 0.9rem; color: #1d6b4f;
}
.sign-done-mark {
  width: 26px; height: 26px; border-radius: 50%; background: var(--success); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem;
}
.sign-done .btn { margin-left: auto; padding: 0.5rem 1rem; font-size: 0.85rem; }


/* hidden 属性优先级（避免 display:flex 覆盖） */
[hidden] { display: none !important; }
.sign-hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.5rem; }

/* ---------- 邮件通知 ---------- */
.mail-panel { margin-top: 0.4rem; }
.mail-actions {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.9rem 1rem; background: #f7f9fb; border: 1px solid var(--border); border-radius: 12px;
}
.mail-actions select, .mail-actions input {
  padding: 0.5rem 0.7rem; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.88rem; background: #fff; color: var(--text);
}
.mail-actions select { min-width: 15rem; }
.mail-actions input { min-width: 13rem; }
.mail-actions .btn { padding: 0.5rem 1rem; font-size: 0.88rem; }
.mail-log { margin-top: 0.9rem; }
.mail-log td { font-size: 0.82rem; vertical-align: top; }
.mail-log .subj { max-width: 22rem; color: var(--muted); word-break: break-word; }
.mail-log .rid { font-family: ui-monospace, Consolas, monospace; font-size: 0.76rem; color: var(--muted); }
.mail-empty { color: var(--muted); font-size: 0.85rem; padding: 0.6rem 0; }
.badge-mail-sent { background: #e6f7ee; color: #1d6b4f; }
.badge-mail-failed { background: #fdeceb; color: var(--danger); }
.badge-mail-pending { background: #eef2f6; color: var(--muted); }
.badge-mail-skipped { background: #fdf4e3; color: var(--warning); }
.mail-preview-note { font-size: 0.82rem; color: var(--muted); margin-top: 0.5rem; }

/* 一次性付清按钮与全额行（2026-11-12） */
.full-pay-btn {
  background: var(--navy);
  color: #fff;
  border: 1.5px solid var(--navy);
}
.full-pay-btn:hover { opacity: 0.9; }
.fee-table tr.full-row td { padding-top: 0.6rem; font-size: 0.85rem; color: var(--muted); }
.fee-table tr.full-row td:first-child { font-weight: 700; }
.fee-table tr.full-row .full-sub { font-size: 0.78rem; }

/* 一次性付款：单个总额卡片（横跨整行）2026-11-12 */
.pay-box.pay-box-full { grid-column: 1 / -1; }
