:root {
  --orange: #f6a63a;
  --orange-dark: #e48c19;
  --gold-soft: #ffe6b8;
  --bg: #f6f7f9;
  --text: #222;
  --muted: #666;
  --line: #ededed;
  --success: #2dbe64;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #eceff3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }

.app-shell {
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 26px rgba(0, 0, 0, .12);
  overflow-x: hidden;
}

.view { display: none; min-height: 100vh; padding-bottom: 28px; }
.view.active { display: block; }

.hero {
  position: relative;
  min-height: 214px;
  padding: 42px 20px 38px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(246, 166, 58, .98), rgba(255, 223, 165, .86)),
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, .55), transparent 28%),
    linear-gradient(160deg, #ed9c2e, #ffdca1);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 58px auto auto -24px;
  width: 120px;
  height: 120px;
  border: 24px solid rgba(255, 255, 255, .18);
  border-radius: 22px;
  transform: rotate(8deg);
}

.hero h1 {
  position: relative;
  z-index: 2;
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 900;
  font-style: italic;
  text-shadow: 0 8px 14px rgba(152, 94, 25, .22);
}

.hero p {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin: 0;
  padding: 9px 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .34);
  font-weight: 700;
}

.hero-mark {
  position: absolute;
  right: 18px;
  top: 28px;
  color: rgba(255, 255, 255, .18);
  font-size: 72px;
  font-weight: 900;
}

.panel {
  margin: 16px 12px;
  padding: 20px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(32, 39, 52, .06);
}

.intro-panel { margin-top: -34px; position: relative; z-index: 4; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.section-title h2, .panel h2 {
  margin: 0;
  font-size: 19px;
  color: var(--orange-dark);
}

.section-title span {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fbe7c4, #f5b650);
}

.intro-text {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.advantages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.advantages div {
  min-height: 106px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 12px 8px;
  border: 1px solid #f3eadc;
  border-radius: 8px;
  background: #fffdfa;
  text-align: center;
}

.advantages i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  font-size: 25px;
  font-style: normal;
  font-weight: 900;
}

.advantages b { font-size: 13px; }

.hero-actions, .bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary, .ghost {
  min-height: 46px;
  border-radius: 8px;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 8px 18px rgba(246, 166, 58, .28);
}

.ghost {
  color: var(--orange-dark);
  background: #fff8ed;
  border: 1px solid #ffd58e;
}

.full { width: 100%; margin-top: 12px; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.steps div {
  text-align: center;
  color: #555;
  font-size: 12px;
}

.steps i {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 8px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ffd990, var(--orange));
  font-style: normal;
  font-size: 22px;
  font-weight: 900;
}

.plain-head {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  height: 58px;
  padding: 0 8px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.plain-head.sticky {
  position: sticky;
  top: 0;
  z-index: 10;
}

.plain-head h1 {
  margin: 0;
  text-align: center;
  font-size: 18px;
}

.icon-btn, .text-btn {
  background: transparent;
  color: var(--orange-dark);
  font-weight: 800;
}

.icon-btn { font-size: 34px; line-height: 1; }
.text-btn { font-size: 14px; }

.login-card h2, .success-card h2 { margin: 0 0 8px; color: var(--text); }
.login-card p, .success-card p { margin: 0 0 18px; color: var(--muted); }

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 8px;
  background: #f3f4f6;
}

.auth-switch button {
  height: 40px;
  border-radius: 6px;
  background: transparent;
  color: #666;
  font-weight: 800;
}

.auth-switch button.active {
  color: var(--orange-dark);
  background: #fff;
  box-shadow: 0 2px 8px rgba(32, 39, 52, .08);
}

label {
  display: block;
  margin-top: 14px;
  color: #333;
  font-size: 14px;
  font-weight: 700;
}

input, textarea, select {
  width: 100%;
  margin-top: 8px;
  padding: 12px 12px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  background: #fbfbfb;
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 82px;
  resize: vertical;
  line-height: 1.55;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(246, 166, 58, .15);
}

input[readonly] { color: #555; background: #f2f3f5; }

.field-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.form-wrap { padding-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.bottom-actions {
  position: sticky;
  bottom: 0;
  z-index: 8;
  padding: 12px;
  background: rgba(246, 247, 249, .92);
  backdrop-filter: blur(10px);
}

.success-card { text-align: center; }
.check {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 10px auto 14px;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  font-size: 42px;
  font-weight: 900;
}

.summary {
  margin: 18px 0;
  padding: 12px;
  border-radius: 8px;
  background: #f8faf9;
  text-align: left;
}

.summary p, .detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: #333;
}

.summary p:last-child, .detail-row:last-child { border-bottom: 0; }
.summary b, .detail-row b { flex: 0 0 110px; color: #777; }
.summary span, .detail-row span { flex: 1; text-align: right; word-break: break-word; }

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
}

.tabs button {
  height: 36px;
  border-radius: 999px;
  background: #fff;
  color: #666;
  font-weight: 800;
}

.tabs button.active {
  color: #fff;
  background: var(--orange);
}

.records { padding: 0 12px 24px; }

.record-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px 12px;
}

.record-actions .ghost { min-height: 38px; padding: 0 18px; }
.record-actions .text-btn { min-height: 38px; padding: 0 8px; }

.record-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.record-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.record-card h3 {
  margin: 0;
  font-size: 16px;
}

.status-tag {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--success);
  background: #eaf8ef;
  font-size: 12px;
  font-weight: 800;
}

.record-card p {
  margin: 6px 0;
  color: #555;
  font-size: 14px;
}

.empty {
  margin-top: 60px;
  text-align: center;
  color: var(--muted);
}

.detail { padding: 0 12px 24px; }

.detail-section {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-section h2 {
  margin: 0 0 8px;
  color: var(--orange-dark);
  font-size: 17px;
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--orange-dark);
  background: #fffaf2;
  text-decoration: none;
}

.attachment-list span { min-width: 0; word-break: break-all; }
.attachment-list small { flex: 0 0 auto; color: var(--muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 99;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(32, 32, 32, .86);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 360px) {
  .hero h1 { font-size: 30px; }
  .grid-2, .hero-actions, .bottom-actions { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
}
