:root {
  --bg: #ece8df;
  --surface: #fffdf8;
  --surface-soft: #f7f3ea;
  --ink: #171713;
  --muted: #70695d;
  --line: #e2dacb;
  --accent: #b78a3a;
  --accent-2: #d7b96a;
  --dark: #25231f;
  --green: #516b63;
  --danger: #a34538;
  --shadow: rgba(31, 29, 24, .12);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  justify-items: center;
  background:
    linear-gradient(90deg, rgba(255,255,255,.35), transparent 18%, transparent 82%, rgba(255,255,255,.35)),
    var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.phone-app {
  width: min(430px, 100%);
  min-height: 100vh;
  background: #f8f5ee;
  padding: 12px 12px 88px;
}
.app-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  min-height: 188px;
  border-radius: 26px;
  padding: 22px;
  color: #fffdf8;
  box-shadow: 0 18px 42px rgba(31,29,24,.2);
}
.app-hero::after {
  content: "";
  position: absolute;
  right: -42px;
  top: -46px;
  width: 168px;
  height: 168px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
}
.theme-education { --accent: #b78a3a; --accent-2: #f1d783; }
.theme-service { --accent: #516b63; --accent-2: #a6b997; }
.theme-enterprise { --accent: #6d665a; --accent-2: #d7b96a; }
.theme-shop { --accent: #9b6848; --accent-2: #e3b86a; }
.theme-education .app-hero { background: linear-gradient(135deg, #27251f, #9b7435); }
.theme-service .app-hero { background: linear-gradient(135deg, #1d332f, #6f8c76); }
.theme-enterprise .app-hero { background: linear-gradient(135deg, #22211e, #666052); }
.theme-shop .app-hero { background: linear-gradient(135deg, #4b3428, #b78a3a); }
.hero-top,
.hero-actions,
.section-head,
.list-row,
.bottom-nav,
.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hero-top { position: relative; z-index: 1; }
.brand-name span,
.hero-kicker {
  display: block;
  color: rgba(255,253,248,.68);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}
.brand-name strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  font-weight: 900;
}
.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 {
  margin: 8px 0 0;
  font-size: 29px;
  line-height: 1.15;
  letter-spacing: 0;
}
.hero-copy p {
  margin: 10px 0 0;
  color: rgba(255,253,248,.72);
  font-size: 13px;
  line-height: 1.7;
}
.hero-actions { position: relative; z-index: 1; justify-content: flex-start; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(255,253,248,.14);
  color: #fffdf8;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 900;
}
.panel,
.stat,
.module-card,
.tab-screen,
.detail-drawer {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(31,29,24,.07);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.stat {
  min-height: 82px;
  padding: 14px 10px;
}
.stat b {
  display: block;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1;
}
.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.tab-screen {
  margin-top: 12px;
  padding: 16px;
}
.section-head { margin-bottom: 14px; }
.section-head h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}
.section-head span,
.section-head a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}
.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}
.search-row input,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  padding: 9px 12px;
  color: var(--ink);
}
.search-row button,
.primary-action,
.secondary-action,
.icon-action {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}
.search-row button,
.primary-action {
  min-height: 42px;
  background: var(--dark);
  color: #fffdf8;
  padding: 0 16px;
}
.secondary-action {
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
}
.module-list {
  display: grid;
  gap: 10px;
}
.module-card {
  overflow: hidden;
  padding: 14px;
}
.list-row { align-items: flex-start; }
.thumb {
  display: grid;
  place-items: center;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(183,138,58,.18), #f4eee1);
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 900;
}
.content { min-width: 0; flex: 1; }
.content h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
.content p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.content strong {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 15px;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tag,
.status {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
}
.tag { background: var(--surface-soft); color: var(--muted); }
.status { background: rgba(81,107,99,.12); color: var(--green); }
.status.warn { background: rgba(183,138,58,.14); color: var(--accent); }
.status.danger { background: rgba(163,69,56,.12); color: var(--danger); }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.form-grid {
  display: grid;
  gap: 12px;
}
.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.field textarea {
  min-height: 86px;
  resize: vertical;
}
.notice {
  border-radius: 16px;
  background: #fff8e8;
  color: #765923;
  padding: 12px;
  font-size: 12px;
  line-height: 1.7;
}
.progress {
  height: 10px;
  border-radius: 999px;
  background: #ded8cb;
  margin-top: 10px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.timeline {
  display: grid;
  gap: 12px;
}
.timeline-item {
  position: relative;
  padding-left: 24px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-item b,
.timeline-item span {
  display: block;
}
.timeline-item b { font-size: 14px; }
.timeline-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.product-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
}
.product-card .thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1.1;
  margin-bottom: 10px;
}
.product-card h3 {
  margin: 0;
  font-size: 14px;
}
.product-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.cart-line {
  border-top: 1px solid #eee6d7;
  padding: 11px 0;
}
.cart-line:first-child { border-top: 0; padding-top: 0; }
.cart-line b { font-size: 14px; }
.cart-line span { color: var(--muted); font-size: 12px; }
.qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}
.summary {
  display: grid;
  gap: 8px;
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 12px;
}
.summary div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.summary strong {
  color: var(--ink);
  font-size: 17px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 82px;
  z-index: 20;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  min-height: 40px;
  border-radius: 999px;
  background: rgba(37,35,31,.92);
  color: #fffdf8;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
  transition: .22s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  width: min(430px, 100%);
  min-height: 68px;
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(255,253,248,.96);
  box-shadow: 0 -12px 28px rgba(31,29,24,.08);
}
.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.bottom-nav button.active { color: var(--accent); }
.bottom-nav i {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: currentColor;
  opacity: .2;
}
.bottom-nav button.active i { opacity: .45; }
.detail-drawer {
  position: fixed;
  left: 50%;
  bottom: 78px;
  z-index: 30;
  width: min(406px, calc(100% - 24px));
  max-height: 74vh;
  overflow: auto;
  transform: translateX(-50%);
  padding: 18px;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(24,23,19,.24);
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.drawer-head h2 {
  margin: 0;
  font-size: 20px;
}
.icon-action {
  width: 34px;
  height: 34px;
  background: var(--surface-soft);
  color: var(--ink);
}
.empty {
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 20px;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 430px) {
  .phone-app { width: 100%; padding-left: 10px; padding-right: 10px; }
  .app-hero { border-radius: 22px; }
  .hero-copy h1 { font-size: 27px; }
}
