:root {
  --brand: #16B56F;
  --brand-dark: #0E8F58;
  --brand-light: #E8F8F1;
  --blue: #2F7CF6;
  --orange: #FF8A34;
  --danger: #E5484D;
  --yellow: #F7C948;
  --bg: #F6F7F8;
  --surface: #FFFFFF;
  --border: #E5E8EC;
  --text: #17212B;
  --muted: #5F6B76;
  --tertiary: #9AA4AF;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: #dfe5e2; color: var(--text); }
button, input, textarea { font: inherit; }
button { border: 0; cursor: pointer; }

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.phone {
  width: min(430px, 100vw);
  height: min(900px, 100vh);
  overflow: hidden;
  position: relative;
  background: var(--bg);
  border-radius: 34px;
  box-shadow: 0 30px 90px rgba(23, 33, 43, .22);
}

.view {
  display: none;
  height: calc(100% - 72px);
  overflow-y: auto;
  padding: 18px 16px 110px;
}
.view.active { display: block; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 0;
  background: var(--bg);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--text);
  color: white;
  font-size: 16px;
  font-weight: 900;
}
.brand-lockup b,
.brand-lockup small {
  display: block;
  white-space: nowrap;
}
.brand-lockup b { font-size: 14px; line-height: 1.1; }
.brand-lockup small { margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: 0; }
.city, .quick button, .section-head button {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.quick { display: flex; gap: 8px; }
.quick button { padding: 0 10px; }

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(23, 33, 43, .04);
}
.search input { flex: 1; border: 0; outline: 0; color: var(--text); }

.hero {
  margin-top: 14px;
  padding: 22px;
  border-radius: 20px;
  color: white;
  background:
    linear-gradient(135deg, rgba(16, 41, 30, .96) 0%, rgba(14, 143, 88, .9) 58%, rgba(47, 124, 246, .86) 100%),
    url("https://images.unsplash.com/photo-1581578731548-c64695cc6952?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
  box-shadow: 0 14px 34px rgba(14, 143, 88, .18);
}
.hero p, .hero span { margin: 0; color: rgba(255,255,255,.82); font-size: 13px; }
.hero h1 { margin: 10px 0 12px; font-size: 24px; line-height: 1.18; letter-spacing: 0; }

.stats, .category-grid, .promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stats div, .category, .card, .tier, .tiers article, .order-card, .admin-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.stats div { padding: 12px 8px; text-align: center; }
.stats b { display: block; font-size: 22px; }
.stats span, .muted, .service-sub, .tier p, .meta, .card p { color: var(--muted); font-size: 13px; line-height: 1.45; }

.section-head { display: flex; justify-content: space-between; align-items: end; margin: 22px 0 12px; }
.section-head small { color: var(--brand); font-weight: 800; }
.section-head h2 { margin: 2px 0 0; font-size: 19px; }

.category-grid { grid-template-columns: repeat(4, 1fr); }
.category { min-height: 82px; padding: 10px 4px; text-align: center; }
.category.active { background: var(--brand-light); border-color: rgba(22,181,111,.45); }
.cat-icon { display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 8px; border-radius: 12px; background: rgba(22,181,111,.1); }
.category:nth-child(3) .cat-icon { background: rgba(255,138,52,.12); }
.category:nth-child(4) .cat-icon { background: rgba(47,124,246,.12); }
.category:nth-child(5) .cat-icon { background: rgba(247,201,72,.18); }
.category:nth-child(7) .cat-icon { background: rgba(229,72,77,.1); }
.category span:last-child { font-size: 12px; font-weight: 700; }

.service-list { display: grid; gap: 12px; }
.service-card { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.service-card:active, .category:active, .primary:active, .ghost:active { transform: scale(.99); }
.service-card img { width: 100%; height: 138px; object-fit: cover; display: block; }
.service-body { padding: 14px; }
.service-head, .service-foot, .order-head, .row, .worker-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.service-name { font-size: 17px; font-weight: 850; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tag, .status { padding: 4px 9px; border-radius: 999px; background: #F1F3F5; color: var(--muted); font-size: 12px; font-weight: 750; }
.status.pending { background: #FFF7E8; color: #B56A00; }
.status.progress { background: #EAF2FF; color: #1D5FD1; }
.status.success { background: var(--brand-light); color: var(--brand-dark); }
.price { color: var(--brand-dark); font-size: 24px; font-weight: 900; }
.primary { height: 40px; padding: 0 16px; border-radius: 12px; background: var(--brand); color: white; font-weight: 850; }
.ghost { height: 40px; padding: 0 16px; border-radius: 12px; background: white; color: var(--text); border: 1px solid var(--border); font-weight: 800; }

.tiers { display: grid; gap: 10px; }
.tiers article { padding: 14px; }
.tiers b { font-size: 15px; }
.tiers span { display: inline-flex; margin-top: 8px; padding: 4px 9px; border-radius: 999px; background: #FFF7E8; color: #B56A00; font-size: 12px; font-weight: 800; }

.cover { height: 210px; margin: -18px -16px 0; position: relative; background: #17212B; }
.cover img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.cover-info { position: absolute; left: 16px; right: 16px; bottom: 18px; color: white; }
.cover-info h1 { margin: 8px 0; font-size: 27px; }
.card { padding: 14px; margin-top: 12px; }
.card h3 { margin: 0 0 10px; font-size: 17px; }
.check-list { display: grid; gap: 9px; }
.check-list div::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--brand); }
.warn .check-list div::before { background: var(--orange); }
.bottom-action { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 12px 0 0; background: linear-gradient(transparent, var(--bg) 22%); }

.form-row { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 30px; height: 30px; border-radius: 10px; background: #F1F3F5; font-weight: 900; }
textarea { width: 100%; min-height: 88px; padding: 12px; border-radius: 14px; border: 0; background: #F6F7F8; resize: none; }

.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 72px;
  background: white;
  border-top: 1px solid var(--border);
}
.tabbar button { background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; }
.tabbar button.active { color: var(--brand); }
.tabbar .i { display: block; margin: 0 auto 4px; }

.i { position: relative; display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-radius: 6px; color: var(--brand); vertical-align: middle; box-sizing: border-box; }
.i.search { border-radius: 50%; }
.i.search::after { content: ''; position: absolute; right: -7px; bottom: -4px; width: 9px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.i.pin { border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.i.pin::after { content: ''; position: absolute; left: 5px; top: 5px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.i.shield { border-radius: 10px 10px 6px 6px; }
.i::before { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: currentColor; transform: translateY(-50%); border-radius: 2px; }
.i.home { transform: rotate(45deg); border-radius: 5px; }
.i.home::before { transform: translateY(-50%) rotate(-45deg); }
.i.list { border-radius: 4px; }
.i.list::before { left: 3px; right: 3px; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
.i.user { border-radius: 50%; }
.i.user::after { content: ''; position: absolute; left: -4px; right: -4px; bottom: -8px; height: 9px; border: 2px solid currentColor; border-bottom: 0; border-radius: 10px 10px 0 0; }
.i.clean { border-radius: 4px 4px 8px 8px; }
.i.clean::after { content: ''; position: absolute; left: 4px; top: -7px; width: 8px; height: 5px; border: 2px solid currentColor; border-bottom: 0; border-radius: 8px 8px 0 0; }
.i.spark { transform: rotate(45deg); border-radius: 4px; color: var(--orange); }
.i.spark::after { content: ''; position: absolute; left: 50%; top: -6px; width: 2px; height: 26px; background: currentColor; transform: translateX(-50%); border-radius: 2px; }
.i.hospital { color: var(--blue); }
.i.hospital::after { content: ''; position: absolute; left: 50%; top: 3px; width: 2px; height: 9px; background: currentColor; transform: translateX(-50%); border-radius: 2px; }
.i.care { color: #B58A00; border-radius: 10px 10px 6px 6px; }
.i.care::after { content: ''; position: absolute; left: 5px; bottom: -5px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); border-radius: 0 0 3px 0; }
.i.washer { border-radius: 5px; }
.i.washer::after { content: ''; position: absolute; left: 4px; top: 4px; width: 6px; height: 6px; border: 2px solid currentColor; border-radius: 50%; }
.i.tool { color: var(--danger); border-radius: 50%; }
.i.tool::after { content: ''; position: absolute; right: -5px; bottom: -4px; width: 10px; height: 3px; border-radius: 999px; background: currentColor; transform: rotate(-45deg); }
.i.grid { border: 0; }
.i.grid::before { left: 0; top: 0; width: 7px; height: 7px; border-radius: 3px; transform: none; box-shadow: 11px 0 0 currentColor, 0 11px 0 currentColor, 11px 11px 0 currentColor; }

@media (max-width: 520px) {
  .app { padding: 0; }
  .phone { width: 100vw; height: 100vh; border-radius: 0; }
}
