:root {
  --blue: #ff7a1a;
  --blue-dark: #d95f00;
  --blue-soft: #fff0e6;
  --paper: #fff7f0;
  --card: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #f0dfd2;
  --green: #0f9f6e;
  --red: #d92d20;
  --orange: #ff7a1a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--blue);
  font-size: 22px;
  font-weight: 850;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.site-header nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-header nav a:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.app-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.hero-main {
  min-height: 280px;
  padding: clamp(24px, 5vw, 44px);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(24, 119, 242, 0.96), rgba(15, 94, 199, 0.9)),
    url("/ui-assets/images/guide-tour.svg");
  background-position: center right;
  background-repeat: no-repeat;
  background-size: contain;
}

.hero-main h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-main p {
  max-width: 560px;
  margin: 18px 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.panel,
.card,
.form-card,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.panel {
  padding: 20px;
}

.panel h2,
.section-title h2,
.form-card h1 {
  margin: 0 0 12px;
  color: var(--blue);
  letter-spacing: 0;
}

.metric-grid {
  display: grid;
  gap: 10px;
}

.metric {
  padding: 16px;
  border-radius: 8px;
  background: var(--blue-soft);
}

.metric strong {
  display: block;
  color: var(--blue);
  font-size: 28px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 12px;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.card h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 18px;
  line-height: 1.35;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 750;
}

.status.pending,
.status.pending_confirm {
  color: var(--orange);
  background: #fff4e5;
}

.status.approved,
.status.booked,
.status.in_service,
.status.completed {
  color: var(--green);
  background: #e7f8f0;
}

.status.rejected,
.status.offline,
.status.closed,
.status.cancelled {
  color: var(--red);
  background: #fee4e2;
}

.price {
  color: var(--blue);
  font-size: 20px;
  font-weight: 850;
}

.btn,
.btn-secondary,
.btn-danger,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
}

.btn {
  color: #fff;
  background: var(--blue);
}

.btn:hover {
  background: var(--blue-dark);
}

.btn-secondary {
  color: var(--blue);
  background: var(--blue-soft);
}

.btn-danger {
  color: #fff;
  background: var(--red);
}

.btn-ghost {
  color: var(--muted);
  background: transparent;
}

.form-card {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

#register-form > .btn-secondary {
  margin-top: 10px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.radio-row input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checkbox-line input {
  width: auto;
  min-height: auto;
}

.checkbox-line.full {
  grid-column: 1 / -1;
}

.text-button {
  display: inline;
  min-height: auto;
  padding: 0;
  color: var(--blue);
  background: transparent;
  font-weight: 850;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.42);
}

.privacy-modal {
  width: min(520px, 100%);
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(17, 24, 39, 0.22);
}

.privacy-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.privacy-modal h2 {
  margin: 0;
  color: var(--blue);
}

.admin-modal-backdrop {
  z-index: 220;
  padding: 24px;
  place-items: center;
}

.admin-modal {
  width: min(720px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.18);
}

.admin-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-modal h2,
.admin-modal p {
  margin: 0;
}

.admin-modal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-modal-form .full {
  grid-column: 1 / -1;
}

.admin-modal-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.image-manager-field {
  gap: 10px;
}

.admin-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.admin-image-item {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  font-weight: 750;
}

.admin-image-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: var(--orange-100);
}

.admin-image-item span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-detail-modal {
  width: min(900px, calc(100vw - 48px));
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.admin-detail-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.admin-detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-detail-grid dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  align-items: start;
}

.detail-main,
.order-panel {
  width: 100%;
}

.order-panel {
  position: sticky;
  top: 84px;
}

.order-card {
  display: block;
  align-content: start;
  overflow: hidden;
}

.order-card-summary {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  min-height: 176px;
}

.order-card .card-body {
  gap: 8px;
}

.order-card .action-row {
  margin-top: 2px;
}

.order-card .action-row:empty {
  display: none;
}

.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.order-review-summary {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7f0;
  color: var(--muted);
  font-size: 13px;
}

.order-review-summary strong {
  color: var(--ink);
}

.order-review-summary span {
  color: var(--orange-700);
  font-weight: 800;
}

.review-item,
.review-form {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.review-item:first-child {
  border-top: 0;
}

.order-card > .review-form {
  margin: 0 16px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf6;
}

.review-form-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.review-form-title strong {
  color: var(--ink);
  font-size: 16px;
}

.review-form-title span {
  color: var(--muted);
  font-size: 12px;
}

.review-form-grid {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) minmax(0, 1fr);
  gap: 10px;
}

.review-form-grid .full {
  min-width: 0;
}

.review-form textarea {
  min-height: 84px;
  resize: vertical;
}

.review-submit {
  justify-self: end;
  width: min(180px, 100%);
}

.review-item strong {
  color: var(--orange);
}

.admin-layout {
  display: grid;
  gap: 18px;
}

.table-panel {
  overflow: hidden;
}

.table-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.table-panel h2 {
  margin: 0;
  color: var(--blue);
  font-size: 19px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.full-button {
  width: 100%;
  margin-bottom: 14px;
}

.message-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.message-list,
.message-room {
  width: 100%;
}

.message-thread {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
}

.message-thread.active,
.message-thread:hover {
  background: var(--blue-soft);
}

.message-thread span,
.message-thread small {
  color: var(--muted);
}

.message-stream {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.message-bubble {
  width: min(78%, 520px);
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
}

.message-bubble.mine {
  justify-self: end;
  color: #fff;
  background: var(--blue);
}

.message-bubble span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 750;
  opacity: 0.78;
}

.message-bubble p {
  margin: 0;
  line-height: 1.6;
}

.message-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.message-compose textarea {
  min-height: 72px;
}

.empty {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 16px;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.22);
}

.small-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .split,
  .detail-layout,
  .message-layout {
    grid-template-columns: 1fr;
  }

  .message-compose {
    grid-template-columns: 1fr;
  }

  .order-panel {
    position: static;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

/* Phase 2 UI refresh: warm mobile H5 style matching the latest orange design. */
:root {
  --orange-900: #7a3000;
  --orange-700: #d95f00;
  --orange-500: #ff7a1a;
  --orange-300: #ffbd85;
  --orange-100: #fff0e6;
  --cream: #fff8f3;
  --paper: #fff7f0;
  --card: #ffffff;
  --ink: #101828;
  --muted: #746d66;
  --line: #f0dfd2;
  --blue: var(--orange-700);
  --blue-dark: var(--orange-900);
  --blue-soft: var(--orange-100);
  --icon-gray: brightness(0) saturate(100%) invert(46%) sepia(9%) saturate(501%) hue-rotate(343deg) brightness(91%) contrast(85%);
  --icon-orange: brightness(0) saturate(100%) invert(54%) sepia(93%) saturate(2015%) hue-rotate(348deg) brightness(103%) contrast(102%);
  --shadow-soft: 0 18px 48px rgba(255, 122, 26, 0.16);
  --shadow-card: 0 12px 30px rgba(255, 122, 26, 0.11);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 122, 26, 0.2), transparent 34%),
    linear-gradient(180deg, #fff8f3 0%, #fff3ea 58%, #f8f2ec 100%);
}

.site-header {
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 12px 18px;
  border-bottom: 0;
  background: rgba(255, 248, 241, 0.86);
  box-shadow: 0 10px 28px rgba(255, 122, 26, 0.07);
}

.brand {
  color: var(--ink);
  font-size: 20px;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-700));
}

.site-header nav {
  gap: 4px;
}

.site-header nav a {
  min-height: 32px;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.site-header nav a:hover {
  color: var(--orange-900);
  background: var(--orange-100);
}

.app-shell {
  width: min(430px, 100%);
  min-height: calc(100vh - 64px);
  padding: 16px 16px 96px;
  background: var(--paper);
}

.hero {
  grid-template-columns: 1fr;
  gap: 14px;
}

.hero-main {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  border-radius: 0 0 32px 32px;
  color: var(--white, #fff);
  background:
    linear-gradient(180deg, rgba(36, 24, 12, 0.02) 28%, rgba(42, 29, 18, 0.76) 100%),
    url("/ui-assets/images/orange-hero.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: var(--shadow-soft);
}

.hero-main .eyebrow {
  width: fit-content;
  margin-bottom: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-main h1 {
  max-width: 360px;
  font-size: 36px;
  line-height: 1.08;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.hero-main p {
  margin: 12px 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.7;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
}

.hero-actions .btn-secondary:last-child {
  grid-column: 1 / -1;
}

.panel,
.card,
.form-card,
.table-panel {
  border-color: var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.panel {
  padding: 18px;
}

.service-filter-panel {
  margin-bottom: 18px;
}

.favorite-service-list {
  margin-top: 18px;
}

.panel h2,
.section-title h2,
.form-card h1,
.table-panel h2 {
  color: var(--ink);
}

.metric {
  border-radius: 18px;
  color: var(--orange-900);
  background: var(--orange-100);
}

.metric strong {
  color: var(--orange-700);
}

.section-title {
  margin: 26px 2px 12px;
}

.section-title h2 {
  font-size: 22px;
}

.grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.card {
  overflow: hidden;
  gap: 0;
  padding: 0;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.card h3 {
  color: var(--ink);
  font-size: 18px;
}

.card p {
  color: var(--muted);
  font-size: 13px;
}

.card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--orange-100);
}

.service-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  min-height: 164px;
}

.service-card.compact {
  grid-template-columns: 1fr;
  min-height: 0;
}

.service-card .card-cover {
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.service-card .card-body {
  min-width: 0;
}

.need-card {
  padding: 16px;
}

.tag,
.status {
  color: var(--orange-900);
  background: var(--orange-100);
}

.status.approved,
.status.booked,
.status.in_service,
.status.completed {
  color: #117044;
  background: #e9f8ee;
}

.price {
  color: var(--orange-700);
}

.btn,
.btn-secondary,
.btn-danger,
.btn-ghost {
  border-radius: 999px;
  min-height: 44px;
}

.btn {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-700), var(--orange-500));
  box-shadow: 0 14px 26px rgba(255, 122, 26, 0.24);
}

.btn:hover {
  background: linear-gradient(135deg, var(--orange-900), var(--orange-700));
}

.btn-secondary {
  color: var(--orange-900);
  background: var(--orange-100);
}

.toolbar {
  grid-template-columns: 1fr;
  padding: 4px;
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: 16px;
  background: #fffdfa;
}

.form-card {
  width: 100%;
  padding: 18px;
}

.form-grid {
  grid-template-columns: 1fr;
}

.split,
.detail-layout,
.message-layout {
  grid-template-columns: 1fr;
}

.detail-main {
  padding: 0;
  overflow: hidden;
}

.detail-cover {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: cover;
  background: var(--orange-100);
}

.detail-card {
  position: relative;
  display: grid;
  gap: 14px;
  margin-top: -34px;
  padding: 22px 18px 20px;
  border-radius: 32px 32px 0 0;
  background: var(--card);
}

.detail-back-button {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 12px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.16);
  font-size: 24px;
  font-weight: 850;
}

.detail-main h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
}

.detail-main > p,
.detail-card > p {
  color: var(--muted);
  line-height: 1.75;
}

.order-panel {
  position: sticky;
  bottom: 0;
  top: auto;
  z-index: 10;
  justify-self: center;
  width: min(100%, 430px);
  margin: 0 auto -96px;
  max-width: 100%;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -14px 38px rgba(255, 122, 26, 0.16);
}

.order-panel h1 {
  display: none;
}

.order-panel form[hidden],
.order-panel [hidden] {
  display: none;
}

.order-panel:not(.expanded) {
  display: grid;
  align-content: center;
  min-height: 164px;
}

.order-panel.expanded {
  padding-top: 14px;
}

.full-button,
.order-panel .btn,
.order-panel .btn-secondary {
  width: 100%;
}

#booking-toggle {
  width: min(360px, 100%);
  justify-self: center;
  justify-content: center;
  text-align: center;
}

.booking-actions {
  display: grid;
  gap: 10px;
}

.booking-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.booking-form-header strong {
  color: var(--ink);
  font-size: 16px;
}

#consult-form .btn[type="submit"] {
  margin-top: 12px;
}

.booking-close {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--orange-900);
  background: var(--orange-100);
  font-size: 13px;
  font-weight: 850;
}

.review-item {
  border-color: var(--line);
}

.review-item strong {
  color: var(--orange-700);
}

.message-stream {
  border-color: var(--line);
  border-radius: 20px;
  background: #fffaf4;
}

.message-bubble.mine {
  background: linear-gradient(135deg, var(--orange-700), var(--orange-500));
}

.table-panel {
  border-radius: 20px;
}

th {
  background: #fff9f1;
}

.toast {
  right: 50%;
  bottom: 22px;
  transform: translateX(50%);
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.92);
}

@media (min-width: 861px) {
  body {
    display: block;
  }

  .site-header,
  .app-shell {
    border-right: 1px solid rgba(238, 227, 216, 0.8);
    border-left: 1px solid rgba(238, 227, 216, 0.8);
  }

  .admin-layout,
  .table-panel {
    width: min(1080px, calc(100vw - 64px));
    margin-right: auto;
    margin-left: auto;
  }

  body:has(.admin-layout) .site-header,
  body:has(.admin-layout) .app-shell {
    width: min(1120px, 100%);
  }

  body:has(.admin-layout) .app-shell {
    background: transparent;
  }
}

@media (max-width: 520px) {
  .site-header {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    top: auto;
    z-index: 30;
    align-items: center;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-radius: 22px 22px 0 0;
  }

  .brand {
    display: none;
  }

  .site-header nav {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    gap: 2px;
  }

  .site-header nav a {
    display: flex;
    min-width: 0;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    font-size: 11px;
    text-align: center;
  }

  .app-shell {
    min-height: 100vh;
    padding-top: 0;
  }

  .hero-main {
    margin: 0 -16px;
    border-radius: 0 0 32px 32px;
  }

  .service-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .card h3 {
    font-size: 16px;
  }

  .detail-cover {
    height: 330px;
  }
}

/* Client shell: real mobile bottom navigation, admin kept separate. */
.client-page .site-header {
  display: none;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -14px 34px rgba(255, 122, 26, 0.14);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 50px;
  align-content: center;
  justify-items: center;
  border-radius: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.bottom-nav a span {
  width: 22px;
  height: 22px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 22px 22px;
  filter: var(--icon-gray);
}

.bottom-nav .nav-icon.home {
  background-image: url("/ui-assets/icons/home.svg");
}

.bottom-nav .nav-icon.grid {
  background-image: url("/ui-assets/icons/grid.svg");
}

.bottom-nav .nav-icon.list {
  background-image: url("/ui-assets/icons/list.svg");
}

.bottom-nav .nav-icon.user {
  background-image: url("/ui-assets/icons/user.svg");
}

.bottom-nav a.active {
  color: var(--orange-900);
  background: var(--orange-100);
}

.bottom-nav a.active span {
  filter: var(--icon-orange);
}

.client-page .app-shell {
  min-height: 100vh;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

.client-page .order-panel {
  margin-bottom: calc(-96px + 84px);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

.category-hero {
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 243, 229, 0.9)),
    url("/ui-assets/images/orange-hero.png");
  background-position: right center;
  background-repeat: no-repeat;
  background-size: 44%;
}

.category-page-header {
  display: grid;
  gap: 14px;
  margin: 0 -2px 16px;
}

.category-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.category-titlebar h1 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
}

.category-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 50px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(255, 122, 26, 0.09);
}

.category-search input[type="search"] {
  min-height: 38px;
  border: 0;
  border-radius: 18px;
  background: transparent;
}

.category-search button {
  min-width: 66px;
  min-height: 38px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-700), var(--orange-500));
  font-weight: 850;
}

.category-mobile-layout {
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
  gap: 12px;
}

.category-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
  position: sticky;
  top: 12px;
}

.category-tabs a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.category-tabs a.active {
  color: var(--orange-900);
  background: var(--orange-100);
}

.category-main {
  min-width: 0;
}

.sub-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.sub-category-grid a {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 8px 18px rgba(255, 122, 26, 0.07);
}

.sub-category-grid a.active {
  color: var(--orange-900);
  background: var(--orange-100);
}

.admin-page {
  background: #f6f7fb;
}

.admin-page .app-shell {
  max-width: none;
}

.admin-page .bottom-nav {
  display: none;
}

.admin-page .admin-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0;
  background: transparent;
}

.admin-workbench {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  align-items: start;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  gap: 18px;
  min-height: 100vh;
  padding: 22px;
  border: 1px solid #e6e8ef;
  border-width: 0 1px 0 0;
  border-radius: 0;
  background: #fff;
}

.admin-sidebar-brand {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f5;
}

.admin-sidebar-brand strong {
  color: var(--ink);
  font-size: 20px;
}

.admin-sidebar-brand span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.admin-menu {
  display: grid;
  gap: 6px;
  align-content: start;
}

.admin-menu a {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 0 12px;
  border-radius: 12px;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
}

.admin-menu a:hover {
  color: var(--orange-900);
  background: var(--orange-100);
}

.admin-menu a.active {
  color: var(--orange-900);
  background: var(--orange-100);
}

.admin-main {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 24px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid #e6e8ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.08);
  backdrop-filter: blur(14px);
}

.admin-topbar h1,
.admin-topbar p {
  margin: 0;
}

.admin-topbar h1 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.admin-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-main .admin-layout,
.admin-main .table-panel,
.admin-main .panel {
  width: 100%;
}

.admin-main .table-panel {
  scroll-margin-top: 112px;
  overflow-x: auto;
}

.admin-intro {
  scroll-margin-top: 112px;
}

.admin-login-shell {
  display: grid;
  min-height: calc(100vh - 80px);
  place-items: center;
}

.admin-login-card {
  max-width: 460px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.admin-form-grid .full {
  grid-column: 1 / -1;
}

.admin-form-grid .btn {
  justify-self: start;
}

@media (min-width: 861px) {
  .bottom-nav {
    right: 50%;
    left: auto;
    transform: translateX(50%);
  }

  .client-page .site-header {
    display: none;
  }

  .client-page .app-shell {
    min-height: 100vh;
  }

  .admin-page .admin-shell {
    width: 100%;
  }

  .admin-page .table-panel,
  .admin-page .admin-layout {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .bottom-nav {
    width: 100%;
  }

  .client-page .app-shell {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .category-mobile-layout {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .admin-workbench {
    grid-template-columns: 1fr;
  }

  .admin-sidebar,
  .admin-topbar {
    position: static;
  }

  .admin-sidebar {
    min-height: 0;
  }

  .admin-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-account-actions {
    width: 100%;
    justify-content: stretch;
  }

  .admin-account-actions a,
  .admin-account-actions button {
    flex: 1 1 140px;
  }
}

/* Discover home structure from the latest UI mockup. */
.discover-page {
  display: grid;
  gap: 16px;
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 0;
}

.city-pill,
.round-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(255, 122, 26, 0.09);
}

.city-pill {
  gap: 7px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.city-pill[aria-expanded="true"] {
  border-color: var(--orange-300);
  background: #fff;
}

.city-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-700), var(--orange-500));
}

.home-city-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(255, 122, 26, 0.12);
}

.home-city-picker[hidden] {
  display: none;
}

.home-city-picker button {
  min-height: 36px;
  border-radius: 999px;
  color: var(--orange-900);
  background: var(--orange-100);
  font-size: 13px;
  font-weight: 850;
}

.home-city-picker button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-700), var(--orange-500));
}

.round-action {
  position: relative;
  width: 40px;
  border-radius: 50%;
}

.round-action::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background: url("/ui-assets/icons/info.svg") center / contain no-repeat;
  filter: var(--icon-orange);
}

.message-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.28);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 52px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(255, 122, 26, 0.09);
}

.home-search input {
  min-height: 40px;
  border: 0;
  border-radius: 18px;
  background: transparent;
}

.home-search button {
  min-width: 72px;
  min-height: 40px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-700), var(--orange-500));
  font-weight: 850;
}

.home-hero-card {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 12px;
  min-height: 230px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 243, 229, 0.92));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.home-hero-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: 0;
}

.home-hero-card p:not(.eyebrow) {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

.home-hero-card img {
  align-self: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(255, 122, 26, 0.11);
}

.home-hero-card .hero-actions {
  display: flex;
  gap: 8px;
}

.home-hero-card .btn,
.home-hero-card .btn-secondary {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.home-city-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.home-city-strip::-webkit-scrollbar {
  display: none;
}

.home-city-strip a {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--orange-900);
  background: var(--orange-100);
  font-size: 13px;
  font-weight: 800;
}

.text-link {
  color: var(--orange-700);
  font-size: 13px;
  font-weight: 850;
}

.quick-category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-category-grid a {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 0;
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 10px 22px rgba(255, 122, 26, 0.08);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.quick-category-grid img {
  width: 48px;
  height: 48px;
}

@media (max-width: 380px) {
  .home-hero-card {
    grid-template-columns: 1fr;
  }

  .home-hero-card img {
    display: none;
  }

  .quick-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Profile page follows the mobile UI personal-center structure. */
.profile-page {
  display: grid;
  gap: 18px;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 8px 0 2px;
}

.profile-avatar {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-700));
  box-shadow: 0 12px 24px rgba(255, 122, 26, 0.2);
  font-size: 24px;
  font-weight: 900;
}

.profile-hero h1 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: 0;
}

.profile-hero p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-700), var(--orange-500));
  box-shadow: 0 10px 22px rgba(255, 122, 26, 0.18);
}

.profile-settings::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background: url("/ui-assets/icons/settings.svg") center / contain no-repeat;
  filter: brightness(0) invert(1);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.profile-stats a {
  display: grid;
  gap: 4px;
  min-height: 74px;
  align-content: center;
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  transition: background 0.16s ease, transform 0.16s ease;
}

.profile-stats a:active {
  transform: scale(0.98);
}

.profile-stats a:hover,
.profile-stats a:focus-visible {
  outline: none;
  background: var(--orange-100);
}

.profile-stats p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.profile-stats strong {
  color: var(--orange-700);
  font-size: 24px;
}

.profile-section {
  display: grid;
  gap: 10px;
}

.profile-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.profile-actions-grid a {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--orange-900);
  background: #fff;
  box-shadow: 0 10px 22px rgba(255, 122, 26, 0.08);
  font-size: 14px;
  font-weight: 850;
}

.profile-icon {
  width: 20px;
  height: 20px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: var(--icon-orange);
}

.profile-icon.list {
  background-image: url("/ui-assets/icons/list.svg");
}

.profile-icon.bell {
  background-image: url("/ui-assets/icons/bell.svg");
}

.profile-icon.heart {
  background-image: url("/ui-assets/icons/heart.svg");
}

.profile-icon.grid {
  background-image: url("/ui-assets/icons/grid.svg");
}

.profile-order-list {
  display: grid;
  gap: 10px;
}

.profile-order-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.profile-order-card h3 {
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 15px;
}

.profile-order-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-order-card strong {
  color: var(--orange-700);
  white-space: nowrap;
}

.order-page-list {
  grid-template-columns: 1fr;
}

.order-page-list .order-card {
  display: block;
}

.order-page-list .order-card-summary {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
}

.order-page-list .order-card .card-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.order-page-list .order-card .card-body {
  min-width: 0;
  padding: 16px;
}

.order-page-list .order-card h3,
.order-page-list .order-card p {
  overflow-wrap: anywhere;
}

.order-page-list .order-card-footer {
  align-items: center;
}

.order-page-list .order-card-footer .btn-secondary {
  min-width: 104px;
  white-space: nowrap;
}

.orders-hero-panel {
  margin-top: 14px;
}

.order-status-tabs {
  display: flex;
  gap: 8px;
  margin: -2px 0 14px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}

.order-status-tabs::-webkit-scrollbar {
  display: none;
}

.order-status-tabs a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 14px;
  font-weight: 850;
}

.order-status-tabs a.active {
  border-color: var(--orange-300);
  color: var(--orange-900);
  background: var(--orange-100);
}

.clickable-order-card {
  cursor: pointer;
}

.clickable-order-card:focus {
  outline: 3px solid rgba(255, 122, 26, 0.32);
  outline-offset: 2px;
}

.profile-info-panel {
  display: grid;
  gap: 12px;
}

.profile-mini-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
}

#settings-info-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#settings-info-form button {
  grid-column: 1 / -1;
}

.address-picker-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.address-picker-form .checkbox-line,
.address-picker-form button {
  grid-column: 1 / -1;
}

.address-list {
  display: grid;
  gap: 8px;
}

.address-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.address-item span {
  color: var(--muted);
  font-size: 13px;
}

.settings-page,
.provider-onboarding-page {
  display: grid;
  gap: 14px;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inline-back {
  position: static;
  flex: 0 0 auto;
  margin: 0;
}

.settings-menu {
  display: grid;
  gap: 8px;
}

.settings-menu a,
.settings-menu button {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  font-weight: 850;
}

.settings-content {
  display: grid;
  gap: 12px;
}

.support-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.wechat-qr {
  width: 112px;
  aspect-ratio: 1;
  border: 8px solid #fff;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px 18px, #111 18px 28px, transparent 28px 36px, #111 36px 44px, transparent 44px),
    linear-gradient(#111 10px, transparent 10px 18px, #111 18px 28px, transparent 28px 36px, #111 36px 44px, transparent 44px),
    repeating-linear-gradient(45deg, #111 0 6px, #fff 6px 12px);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.18);
}

.wechat-qr.large {
  width: 148px;
}

.provider-onboarding-hero {
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, rgba(122, 48, 0, 0.94), rgba(255, 122, 26, 0.72));
}

.provider-onboarding-hero h1 {
  margin: 0 0 10px;
}

.provider-onboarding-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.provider-qr-card,
.pricing-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pricing-grid strong {
  display: block;
  color: var(--orange-700);
  font-size: 24px;
}

.provider-entry-banner {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(122, 48, 0, 0.92), rgba(255, 122, 26, 0.7)),
    url("/ui-assets/images/provider-entry-banner.png");
  background-position: right center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 18px 42px rgba(255, 122, 26, 0.22);
}

.provider-entry-banner .eyebrow,
.provider-entry-banner p {
  color: rgba(255, 255, 255, 0.82);
}

.provider-entry-banner h2 {
  max-width: 270px;
  margin: 0 0 8px;
  color: #fff;
  font-size: 22px;
  line-height: 1.24;
}

.provider-entry-banner p:not(.eyebrow) {
  max-width: 280px;
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}

.provider-entry-banner .btn {
  width: fit-content;
  color: var(--orange-900);
  background: #fff;
  box-shadow: none;
}

.favorite-button {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--orange-900);
  background: var(--orange-100);
  font-size: 13px;
  font-weight: 850;
}

.favorite-button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--orange-700), var(--orange-500));
}

.favorite-button.active .profile-icon {
  filter: brightness(0) invert(1);
}

.detail-favorite {
  margin-top: 2px;
}

.service-description-gallery {
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
}

.service-description-gallery img {
  display: block;
  width: 100%;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

/* Client responsive layer: phone-first, then tablet-friendly layouts. */
.client-page .app-shell {
  width: min(100%, 430px);
}

@media (max-width: 520px) {
  .client-page .app-shell {
    width: 100%;
    padding-right: max(16px, env(safe-area-inset-right));
    padding-left: max(16px, env(safe-area-inset-left));
  }

  .client-page .bottom-nav {
    width: 100%;
  }

  .client-page .home-hero-card {
    grid-template-columns: 1fr;
  }

  .client-page .home-hero-card img {
    aspect-ratio: 16 / 9;
  }

  .client-page .profile-mini-form {
    grid-template-columns: 1fr;
  }

  .client-page .review-form-grid {
    grid-template-columns: 1fr;
  }

  .client-page .order-card > .review-form {
    margin: 0 14px 14px;
  }

  .client-page .review-form-title {
    display: grid;
  }

  .client-page .review-submit {
    justify-self: stretch;
    width: 100%;
  }

  .client-page .support-card,
  .client-page .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 521px) {
  .client-page .app-shell {
    width: min(760px, calc(100vw - 32px));
    padding: 22px 22px calc(112px + env(safe-area-inset-bottom));
  }

  .client-page .bottom-nav {
    right: 50%;
    left: auto;
    width: min(760px, calc(100vw - 32px));
    transform: translateX(50%);
  }

  .client-page .hero-main {
    min-height: 360px;
    border-radius: 30px;
  }

  .client-page .grid,
  .client-page .favorite-service-list,
  .client-page .profile-order-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-page .order-page-list {
    grid-template-columns: 1fr;
  }

  .client-page .service-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .client-page .service-card .card-cover {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .client-page .form-card {
    padding: 24px;
  }

  .client-page .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-page .form-grid.single,
  .client-page #login-form .form-grid,
  .client-page #register-form .form-grid,
  .client-page #booking-form .form-grid {
    grid-template-columns: 1fr;
  }

  .client-page .category-mobile-layout {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
  }

  .client-page .sub-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-page .profile-actions-grid,
  .client-page .quick-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 700px) {
  .client-page .detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    align-items: start;
  }

  .client-page .order-panel {
    position: sticky;
    top: 22px;
    bottom: auto;
    width: 100%;
    margin: 0;
    padding: 20px;
    border-radius: 24px;
  }

  .client-page .order-panel h1 {
    display: block;
  }

  .client-page .order-panel:not(.expanded) {
    min-height: 0;
  }

  .client-page .detail-cover {
    height: 390px;
  }
}

@media (min-width: 861px) {
  .client-page .app-shell {
    width: min(960px, calc(100vw - 64px));
    padding-right: 28px;
    padding-left: 28px;
  }

  .client-page .bottom-nav {
    width: min(760px, calc(100vw - 64px));
  }

  .client-page .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  }

  .client-page .grid,
  .client-page .favorite-service-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-page .category-mobile-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}
