/* Tebbit退款 */
:root {
  --bg: #eef3f1;
  --ink: #12201c;
  --muted: #6b7c76;
  --line: #dce5e1;
  --card: #ffffff;
  --brand: #0f766e;
  --brand-deep: #0d5f59;
  --brand-soft: #d8f3ef;
  --danger: #c2410c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: #dfe8e4;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}

body {
  display: flex;
  justify-content: center;
}

.page {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100%;
  min-height: 100dvh;
  background:
    radial-gradient(120% 70% at 10% -10%, rgba(45, 212, 191, 0.28), transparent 55%),
    radial-gradient(90% 50% at 100% 0%, rgba(15, 118, 110, 0.18), transparent 50%),
    linear-gradient(180deg, #e7f2ef 0%, var(--bg) 42%, #f7faf9 100%);
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  overflow-y: auto;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  flex-shrink: 0;
  padding: 28px 22px 36px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  right: -40px;
  top: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.hero-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 10px 28px rgba(13, 95, 89, 0.28);
}

.hero-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.15;
  color: var(--ink);
}

.hero-desc {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* ========== Form sheet ========== */
.sheet {
  position: relative;
  z-index: 2;
  flex: 1;
  margin: 0 14px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(18, 32, 28, 0.08);
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

.sheet-inner {
  padding: 22px 18px 22px;
}

.section-head {
  margin-bottom: 18px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.section-desc {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-name {
  font-size: 13px;
  font-weight: 600;
  color: #31463f;
}

.field-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbfa;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.field-input::placeholder {
  color: #9aada6;
}

.field-input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.amount-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbfa;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.amount-field:focus-within {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.amount-field .field-input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.amount-unit {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  line-height: 48px;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

.agree {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  cursor: pointer;
  user-select: none;
}

.agree input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.agree-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--brand);
}

.agree input:not(:checked) + .agree-box {
  background: #fff;
}

.agree input:not(:checked) + .agree-box svg {
  opacity: 0;
}

.agree-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.agree-text a {
  color: var(--brand);
  text-decoration: none;
}

.submit-btn {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #11998a 0%, var(--brand-deep) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.28);
  transition: opacity 0.15s, transform 0.1s;
}

.submit-btn:active {
  opacity: 0.92;
  transform: scale(0.985);
}

.submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* ========== Tabbar ========== */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 430px;
  height: calc(58px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(220, 229, 225, 0.9);
  display: flex;
  align-items: stretch;
  z-index: 20;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: #9aaea7;
  font-size: 11px;
  line-height: 1.2;
}

.tab svg {
  display: block;
}

.tab.active {
  color: var(--brand);
}

/* ========== Success ========== */
.page-success {
  background:
    radial-gradient(100% 60% at 50% -5%, rgba(45, 212, 191, 0.22), transparent 55%),
    linear-gradient(180deg, #e8f4f1 0%, #f6faf9 100%);
}

.page-success[hidden],
.page[hidden],
.tabbar[hidden] {
  display: none !important;
}

.success-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 22px 0;
}

.success-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(13, 95, 89, 0.2);
}

.success-top span {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.success-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 22px 20px;
  text-align: center;
}

.success-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.28);
}

.success-title {
  margin-top: 18px;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

.success-desc {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.success-card {
  width: 100%;
  margin-top: 28px;
  padding: 6px 18px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(18, 32, 28, 0.07);
  text-align: left;
}

.success-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid #eef3f1;
}

.success-row:last-child {
  border-bottom: none;
}

.success-label {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted);
}

.success-value {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.success-actions {
  width: 100%;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.success-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}

.success-btn:active {
  opacity: 0.9;
  transform: scale(0.985);
}

.success-btn.primary {
  background: linear-gradient(135deg, #11998a 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.25);
}

.success-btn.outline {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid rgba(15, 118, 110, 0.45);
}

.success-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  font-size: 12px;
  color: #8aa099;
}

.success-footer-logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 24px;
  }
  .hero-logo {
    width: 48px;
    height: 48px;
  }
  .sheet-inner {
    padding: 18px 14px 18px;
  }
}
