/*
 * 悦邻川社区账本 design system
 * Visual method: unslop by @heydamir, CC BY 4.0.
 */

:root {
  --teal: #23675b;
  --deep: #1d302c;
  --teal-soft: #dbe8e3;
  --orange: #c96246;
  --orange-soft: #f5e7e1;
  --mint: #91b6a8;
  --mint-soft: #eaf1ed;
  --cream: #eceee9;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f6f1;
  --text: #1d2d29;
  --muted: #6f7874;
  --line: rgba(29, 45, 41, 0.11);
  --shadow: 0 8px 24px rgba(29, 45, 41, 0.06);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  background: var(--cream);
}

body {
  position: relative;
  background: var(--cream);
  color: var(--text);
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Microsoft YaHei", sans-serif;
}

.backend-footer {
  position: absolute;
  right: 32px;
  bottom: 12px;
  z-index: 1;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.backend-footer a {
  color: inherit;
  text-decoration: none;
}

.backend-footer a:hover {
  color: var(--teal);
}

button,
a,
input,
select,
textarea {
  transition:
    color 160ms var(--ease),
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    opacity 160ms var(--ease),
    transform 120ms var(--ease);
}

button:active,
.button-primary:active,
.button-outline:active,
.primary-button:active,
.outline-button:active {
  transform: scale(0.98);
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* App shell */
.shell {
  grid-template-columns: 248px minmax(0, 1fr);
  background: var(--cream);
}

.sidebar {
  padding: 20px 14px;
  background: var(--deep);
}

.brand {
  gap: 10px;
  padding: 4px 8px 22px;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.brand strong {
  font-size: 16px;
  font-weight: 600;
}

.brand span,
.side-label {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.side-label {
  margin: 22px 10px 8px;
  letter-spacing: 0;
}

.side-nav {
  gap: 2px;
}

.side-nav button {
  position: relative;
  min-height: 36px;
  gap: 9px;
  border-radius: 8px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 400;
}

.side-nav button.active {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.side-nav button.active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--orange);
  content: "";
}

.side-nav i {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: none;
  overflow: hidden;
  background: currentColor;
  font-size: 0;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.side-nav [data-page="overview"] i,
.side-nav [data-page="dashboard"] i {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5'%3E%3Cpath d='m4 11 8-7 8 7v9H4v-9Z'/%3E%3C/svg%3E");
}

.side-nav [data-page="properties"] i,
.side-nav [data-page="projects"] i {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5'%3E%3Cpath d='M5 20V7l7-4 7 4v13M9 20v-6h6v6'/%3E%3C/svg%3E");
}

.side-nav [data-page="merchants"] i,
.side-nav [data-page="customers"] i,
.side-nav [data-page="owner-relations"] i,
.side-nav [data-page="households"] i {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3.5 19a5.5 5.5 0 0 1 11 0M16 9h5M16 13h5M16 17h3'/%3E%3C/svg%3E");
}

.side-nav [data-page="review"] i,
.side-nav [data-page="campaigns"] i,
.side-nav [data-page="cards"] i,
.side-nav [data-page="products"] i,
.side-nav [data-page="orders"] i,
.side-nav [data-page="collection"] i {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5'%3E%3Cpath d='M5 4h14v16H5zM8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E");
}

.side-nav [data-page="fund"] i {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5'%3E%3Cpath d='M5 19V9M12 19V5M19 19v-7'/%3E%3C/svg%3E");
}

.side-nav [data-page="wechat"] i,
.side-nav [data-page="aftersales"] i,
.side-nav [data-page="services"] i {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5'%3E%3Cpath d='M4 5h16v14H4zM4 9h16M8 13h3M8 16h6'/%3E%3C/svg%3E");
}

.side-foot {
  right: 14px;
  bottom: 18px;
  left: 14px;
}

.side-foot a,
.side-foot button {
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 10px;
  font-weight: 400;
}

.workspace {
  padding: 24px 32px 48px;
  background: var(--cream);
}

.topbar {
  min-height: 42px;
  margin-bottom: 20px;
}

.project-switch {
  gap: 10px;
  border: 0;
  border-radius: 0;
  padding: 4px 0;
  background: transparent;
}

.project-switch .dot {
  width: 7px;
  height: 7px;
  background: #278567;
}

.project-switch strong {
  font-size: 12px;
  font-weight: 500;
}

.project-switch span {
  font-size: 10px;
}

.top-actions {
  gap: 8px;
}

.demo-badge {
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.operator {
  font-size: 11px;
}

.operator-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--deep);
  font-size: 10px;
  font-weight: 500;
}

.page-head {
  margin-bottom: 22px;
}

.page-head h1 {
  margin-bottom: 7px;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0;
}

.page-head p {
  max-width: 760px;
  font-size: 12px;
  line-height: 1.65;
}

.button-primary,
.checkout-button,
.primary-button,
.button-outline,
.outline-button,
.button-ghost,
.button-danger,
.login-submit {
  min-height: 36px;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 500;
}

.button-primary,
.checkout-button,
.primary-button,
.login-submit {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.button-outline {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.outline-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.button-ghost {
  background: var(--surface-soft);
  color: var(--teal);
}

.button-danger {
  background: var(--orange-soft);
  color: #9a3e2b;
}

.kpi-grid {
  grid-template-columns: 1.15fr 0.85fr 0.9fr 1.2fr;
  gap: 12px;
  margin-bottom: 14px;
}

.kpi {
  border-radius: 12px;
  padding: 17px 18px;
  background: var(--surface);
  box-shadow: none;
}

.kpi:nth-child(2) {
  background: #f7f5ef;
}

.kpi span {
  font-size: 10px;
}

.kpi strong {
  margin: 9px 0 7px;
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.kpi small {
  color: var(--muted);
  font-size: 9px;
}

.panel-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.72fr);
  gap: 12px;
}

.panel {
  border-radius: 14px;
  padding: 18px;
  background: var(--surface);
  box-shadow: none;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head h2 {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.panel-head p {
  font-size: 9px;
  line-height: 1.55;
}

.progress-list,
.activity-list {
  gap: 12px;
}

.progress-head {
  font-size: 10px;
}

.track {
  height: 5px;
  border-radius: 3px;
  background: #e9ece9;
}

.activity-item {
  grid-template-columns: 7px 1fr auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-item::before {
  width: 6px;
  height: 6px;
  margin-top: 5px;
}

.activity-item span {
  font-size: 9px;
}

.filter-bar input,
.filter-bar select {
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11px;
}

.table-wrap {
  border-radius: 12px;
}

table {
  font-size: 11px;
}

th,
td {
  padding: 12px;
}

th {
  background: #f6f4ee;
  font-size: 10px;
  font-weight: 500;
}

.status {
  padding: 0;
  background: transparent;
  color: var(--positive, #28785e);
  font-size: 10px;
  font-weight: 500;
}

.status::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  vertical-align: 1px;
}

.status.available::before {
  background: #d0963d;
}

.status.revoked {
  background: transparent;
  color: #b64d36;
}

.status.frozen {
  background: transparent;
  color: var(--muted);
}

/* Login scenes */
.property-login,
.merchant-login {
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.72fr);
  background: var(--cream);
}

.login-visual {
  padding: clamp(48px, 7vw, 88px);
  background: var(--deep);
}

.login-visual::after {
  display: none;
}

.login-visual > img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

.login-visual > span {
  margin: 32px 0 14px;
  color: var(--teal-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.login-visual h1 {
  max-width: 610px;
  margin-bottom: 22px;
  font-size: clamp(38px, 4.6vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.login-visual p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  line-height: 1.8;
}

.login-flow {
  gap: 8px;
  margin-top: 38px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.login-flow span {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.login-flow i {
  color: rgba(255, 255, 255, 0.34);
}

.login-card {
  max-width: 460px;
  padding: 48px 52px;
}

.login-card > img {
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  border-radius: 10px;
}

.login-card h2 {
  margin-bottom: 7px;
  font-size: 28px;
  font-weight: 500;
}

.login-card > p {
  margin-bottom: 26px;
  font-size: 11px;
}

.login-card .field {
  margin-bottom: 12px;
}

.login-card .field label {
  font-size: 10px;
}

.login-card .field input {
  min-height: 42px;
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--surface);
}

.login-card .auth-step .phone-mask {
  min-height: 44px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.login-submit {
  border-radius: 8px;
  padding: 11px;
  font-size: 11px;
}

.login-activate {
  margin-top: 12px;
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface-soft);
  color: var(--teal);
  font-size: 10px;
  font-weight: 500;
}

.admin-login {
  background: var(--cream) !important;
}

.admin-login-card {
  border-radius: 16px !important;
  box-shadow: 0 16px 42px rgba(24, 49, 48, 0.08) !important;
}

.admin-login-card h1 {
  font-weight: 500 !important;
}

/* Owner H5 */
.stage {
  width: min(1240px, calc(100% - 48px));
  grid-template-columns: minmax(0, 390px) minmax(400px, 1fr);
  gap: 56px;
}

.intro-brand {
  gap: 12px;
  margin-bottom: 30px;
}

.intro-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.intro-brand strong {
  font-size: 20px;
  font-weight: 600;
}

.intro-brand span {
  font-size: 11px;
}

.intro h1 {
  max-width: 520px;
  margin-bottom: 18px;
  font-size: clamp(40px, 4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.intro p {
  font-size: 14px;
  line-height: 1.8;
}

.intro-points {
  gap: 8px 16px;
}

.intro-points span {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--ink-2, var(--muted));
  font-size: 11px;
  font-weight: 400;
}

.intro-points span::before {
  margin-right: 7px;
  color: var(--orange);
  content: "·";
}

.admin-link {
  margin-top: 26px;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 500;
}

.phone {
  min-height: 820px;
  border: 6px solid var(--deep);
  border-radius: 40px;
  background: #fbf9f4;
  box-shadow: 0 20px 48px rgba(24, 49, 48, 0.14);
}

.phone::before {
  width: 92px;
  height: 22px;
  background: var(--deep);
}

.app-header {
  padding: 34px 18px 22px;
  background: #fbf9f4;
}

.mini-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.mini-brand strong {
  font-size: 15px;
  font-weight: 600;
}

.mini-brand span {
  font-size: 9px;
}

.header-action {
  border-radius: 9px;
  background: var(--surface);
  box-shadow: none;
}

.admin-pill {
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  font-size: 9px;
  font-weight: 500;
}

.app-scroll {
  padding: 0 16px 100px;
}

.benefit-card {
  min-height: 172px;
  padding: 22px;
  border-radius: 16px;
  background: var(--deep);
  box-shadow: none;
}

.benefit-card::after,
.benefit-card::before,
.campaign-orbit {
  display: none;
}

.benefit-card .label {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.benefit-card .amount {
  margin-top: 9px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 40px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.benefit-card .amount small {
  font-size: 15px;
}

.benefit-meta {
  margin-top: 20px;
  font-size: 10px;
}

.benefit-meta button {
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 500;
}

.section-head {
  margin: 24px 0 12px;
}

.section-head h2 {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}

.section-head button,
.link-button {
  font-size: 10px;
}

.quick-grid {
  gap: 8px;
}

.quick-item {
  border-radius: 11px;
  padding: 13px 5px 11px;
}

.quick-item img {
  width: 38px;
  height: 38px;
}

.quick-item span {
  font-size: 10px;
  font-weight: 500;
}

.campaign-card {
  grid-template-columns: 1fr;
  margin-top: 16px;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid rgba(222, 98, 66, 0.18);
}

.campaign-card h3 {
  font-size: 15px;
  font-weight: 600;
}

.campaign-card p {
  font-size: 10px;
}

.campaign-card button {
  border-radius: 7px;
  padding: 8px 11px;
  font-size: 10px;
  font-weight: 500;
}

.product-scroll {
  grid-auto-columns: 148px;
  gap: 10px;
}

.product-card {
  border-radius: 12px;
}

.product-art {
  height: 108px;
  background: #f1ece2;
  font-size: 18px;
}

.product-mark {
  display: flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(24, 49, 48, 0.1);
  border-radius: 12px;
  background: var(--surface);
  color: var(--teal);
  font-size: 18px;
  font-weight: 500;
}

.product-copy {
  padding: 11px;
}

.product-copy h3 {
  font-size: 12px;
  font-weight: 500;
}

.price {
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.add-button {
  width: 27px;
  height: 27px;
  border-radius: 8px;
}

.order-icon,
.cart-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mint-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 500;
}

.community-fund-card {
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
}

.community-fund-card .profile-metrics view {
  border-radius: 10px;
  background: var(--surface-soft);
}

.app-nav {
  border-top-color: var(--line);
  background: rgba(255, 254, 251, 0.98);
  box-shadow: none;
}

/* Portal */
.portal {
  width: min(1240px, calc(100% - 48px));
  padding: 46px 0 58px;
}

.portal-head {
  gap: 14px;
  margin-bottom: 32px;
}

.portal-head img {
  width: 54px;
  height: 54px;
  border-radius: 12px;
}

.portal-head h1 {
  font-size: 30px;
  font-weight: 500;
}

.portal-head p {
  font-size: 12px;
}

.portal-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.end-card {
  grid-column: span 6;
  min-height: 310px;
  border-radius: 14px;
  padding: 24px;
  background: var(--surface);
  box-shadow: none;
}

.end-card:nth-child(1) {
  grid-column: span 7;
}

.end-card:nth-child(2) {
  grid-column: span 5;
}

.end-card:nth-child(3) {
  grid-column: span 5;
}

.end-card:nth-child(4) {
  grid-column: span 7;
}

.end-card::after {
  display: none;
}

.end-number {
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
  font-weight: 400;
}

.end-icon {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 24px 0 18px;
  border-radius: 10px;
  background: var(--mint-soft);
  color: var(--teal);
  font-size: 0;
}

.end-icon::before {
  position: absolute;
  inset: 11px;
  background: var(--teal);
  content: "";
  -webkit-mask: var(--portal-icon) center / contain no-repeat;
  mask: var(--portal-icon) center / contain no-repeat;
}

.end-card:nth-child(1) .end-icon {
  --portal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317645d' stroke-width='1.5'%3E%3Cpath d='m4 11 8-7 8 7v9H4v-9Z'/%3E%3C/svg%3E");
}

.end-card:nth-child(2) .end-icon {
  --portal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317645d' stroke-width='1.5'%3E%3Cpath d='M5 20V7l7-4 7 4v13M9 20v-6h6v6'/%3E%3C/svg%3E");
}

.end-card:nth-child(3) .end-icon {
  --portal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317645d' stroke-width='1.5'%3E%3Cpath d='M5 5h14v14H5zM8 9h8M8 13h5'/%3E%3C/svg%3E");
}

.end-card:nth-child(4) .end-icon {
  --portal-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317645d' stroke-width='1.5'%3E%3Cpath d='M4 5h16v14H4zM8 9h3M8 13h3M15 9v6M12 15h6'/%3E%3C/svg%3E");
}

.end-card h2 {
  font-size: 22px;
  font-weight: 500;
}

.end-card p {
  max-width: 360px;
  margin-bottom: 16px;
  font-size: 11px;
}

.end-card li {
  margin: 6px 0;
  font-size: 10px;
}

.end-card li::before {
  content: "—";
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.back-note {
  margin-top: 22px;
  font-size: 10px;
}

/* Chart */
.chart {
  height: 220px;
  align-items: flex-end;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.bar,
.bar.mint {
  border-radius: 4px 4px 0 0;
  background: #c7d1cd;
}

.bar.orange {
  background: var(--orange);
}

.bar span {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 9px;
  font-weight: 400;
}

.metric-strip div,
.queue-row,
.merchant-panel,
.form-section,
.inline-form,
.project-card {
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
}

.merchant-panel h2,
.project-card-head h2 {
  font-size: 17px;
  font-weight: 600;
}

.project-city {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
}

.property-banner {
  border-radius: 14px;
  background: var(--deep);
}

.property-banner a {
  border-radius: 8px;
  font-weight: 500;
}

.template-download-row {
  border-radius: 12px;
  background: var(--surface);
}

.template-download-row a {
  border-radius: 8px;
  font-weight: 500;
}

@keyframes ledger-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page:not([hidden]),
.view:not([hidden]) {
  animation: ledger-enter 360ms var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1100px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .phone {
    width: min(430px, 100%);
    margin: 0 auto;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .workspace {
    padding: 20px 18px 40px;
  }

  .backend-footer {
    right: 18px;
  }

  .panel-grid,
  .collection-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 34px 24px 48px;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .end-card,
  .end-card:nth-child(n) {
    grid-column: auto;
  }
}

/* Option C: service-first owner experience */
.owner-h5 {
  --teal: #23675b;
  --deep: #1d302c;
  --orange: #2d6b61;
  --orange-soft: #e8efeb;
  --attention: #b85f45;
  --mint: #91b6a8;
  --mint-soft: #eaf1ed;
  --cream: #eceee9;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f6f1;
  background: #eceee9;
}

.owner-h5 .stage {
  width: min(1180px, calc(100% - 48px));
  gap: 48px;
}

.owner-h5 .intro h1 {
  color: #1d302c;
}

.owner-h5 .intro-points span {
  color: #536a63;
}

.owner-h5 .intro-points span::before {
  color: #23675b;
}

.owner-h5 .admin-link,
.owner-h5 .checkout-button,
.owner-h5 .primary-button {
  border-color: #23675b;
  background: #23675b;
  color: #ffffff;
}

.owner-h5 .phone {
  border-color: #1d302c;
  background: #f6f7f3;
}

.owner-h5 .phone::before {
  background: #1d302c;
}

.owner-h5 .app-header {
  background: #f6f7f3;
}

.owner-h5 .benefit-card {
  background: #1d302c;
}

.owner-h5 .quick-item {
  border-color: rgba(23, 67, 61, 0.11);
  background: #ffffff;
}

.owner-h5 .campaign-card {
  border-color: rgba(35, 103, 91, 0.14);
  background: #e8efeb;
}

.owner-h5 .campaign-card h3,
.owner-h5 .section-head h2,
.owner-h5 .page-title {
  color: #1d302c;
}

.owner-h5 .campaign-card button {
  background: #23675b;
}

.owner-h5 .service-card,
.owner-h5 .product-card,
.owner-h5 .order-card,
.owner-h5 .settings-list,
.owner-h5 .summary {
  background: #ffffff;
}

.owner-h5 .service-card {
  border-color: rgba(29, 45, 41, 0.11);
}

.owner-h5 .service-card b,
.owner-h5 .price,
.owner-h5 .cart-line p {
  color: #1d302c;
}

.owner-h5 .service-card button,
.owner-h5 .cart-fab {
  background: #23675b;
}

.owner-h5 .product-art {
  background: #eaf1ed;
}

.owner-h5 .product-card:nth-child(2) .product-art {
  background: #e2ebe7;
}

.owner-h5 .product-card:nth-child(3) .product-art {
  background: #f0ece2;
}

.owner-h5 .profile-card {
  background: #1d302c;
}

.owner-h5 .community-fund-card {
  background: #ffffff;
}

.owner-h5 .bottom-nav {
  border-color: rgba(29, 45, 41, 0.12);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: none;
}

.owner-h5 .nav-item.active {
  color: #23675b;
}

.owner-h5 .cart-dot,
.owner-h5 .product-art small {
  background: #23675b;
}

/* Community service desk: final shared refinement */
body {
  background: var(--cream);
  color: var(--text);
  font-size: 14px;
}

::selection {
  background: var(--teal-soft);
  color: var(--deep);
}

.shell,
.workspace {
  background: var(--cream);
}

.workspace {
  padding: 24px 32px 40px;
}

.topbar {
  min-height: 48px;
  margin-bottom: 16px;
}

.project-switch {
  min-height: 32px;
}

.project-switch strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.project-switch span,
.demo-badge {
  font-size: 10px;
}

.page-head {
  margin: 16px 0 18px;
}

.page-head h1 {
  color: var(--text);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.page-head p {
  color: var(--muted);
  font-size: 12px;
}

.button-primary,
.checkout-button,
.primary-button,
.button-outline,
.outline-button,
.button-ghost,
.button-danger,
.login-submit {
  min-height: 38px;
  border-radius: 9px;
  font-size: 12px;
}

.button-primary:hover,
.checkout-button:hover,
.primary-button:hover,
.login-submit:hover {
  background: var(--deep);
  border-color: var(--deep);
}

.button-outline:hover,
.outline-button:hover {
  border-color: rgba(35, 103, 91, 0.28);
  background: var(--surface-soft);
}

.kpi-grid {
  gap: 14px;
  margin-bottom: 16px;
}

.kpi,
.panel,
.mini-table,
.table-wrap,
.project-card,
.merchant-panel,
.form-section,
.inline-form,
.queue-row,
.metric-strip div {
  border: 1px solid var(--line);
  border-radius: 14px;
  background-image: none;
  box-shadow: none;
}

.kpi {
  min-height: 106px;
  padding: 18px;
}

.kpi span {
  color: var(--muted);
  font-size: 11px;
}

.kpi strong {
  margin: 16px 0 8px;
  color: var(--text);
  font-size: 28px;
}

.kpi small {
  color: var(--muted);
  font-size: 10px;
}

.panel {
  min-height: 250px;
  padding: 20px;
}

.panel-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.panel-head p {
  color: var(--muted);
  font-size: 10px;
}

.panel-head a,
.link-button,
.section-head button {
  color: var(--teal);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}

.activity-item {
  padding: 12px 0;
}

.activity-item::before {
  background: var(--orange);
}

.track {
  height: 6px;
}

.filter-bar {
  gap: 10px;
}

.filter-bar input,
.filter-bar select,
.field input,
.field select,
.field textarea {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}

.table-wrap {
  overflow: hidden;
}

table {
  font-size: 11px;
}

th,
td {
  padding: 13px 12px;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

tbody tr:hover {
  background: rgba(35, 103, 91, 0.035);
}

.status {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--teal);
  font-size: 10px;
  font-weight: 500;
}

.project-card,
.template-download-row,
.property-banner,
.merchant-panel,
.form-section,
.inline-form,
.queue-row,
.metric-strip div {
  box-shadow: none;
}

.property-banner {
  border: 0;
  border-radius: 14px;
  background: var(--deep);
}

.template-download-row {
  border: 1px solid var(--line);
  background: var(--surface);
}

.login-visual {
  background: var(--deep);
}

.login-visual::after {
  display: none;
}

.login-visual h1 {
  max-width: 600px;
  font-size: clamp(38px, 4.2vw, 50px);
  font-weight: 500;
}

.login-card {
  padding-top: 40px;
}

.admin-login-card {
  border-color: var(--line) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(29, 45, 41, 0.06) !important;
}

.portal {
  width: min(1220px, calc(100% - 56px));
  padding-top: 40px;
}

.portal-head h1 {
  color: var(--text);
  font-size: 28px;
  font-weight: 500;
}

.portal-head p {
  color: var(--muted);
  font-size: 12px;
}

.portal-grid {
  gap: 16px;
}

.end-card {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  background: var(--surface);
}

.end-card:hover {
  border-color: rgba(35, 103, 91, 0.28);
  transform: translateY(-2px);
}

.end-icon {
  background: var(--surface-soft);
}

.end-card h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 500;
}

.end-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.end-card li {
  color: var(--text);
  font-size: 11px;
  line-height: 1.65;
}

/* Owner surface refinements shared with the mini program */
.owner-h5 .stage {
  gap: 52px;
}

.owner-h5 .intro h1 {
  max-width: 500px;
  font-size: clamp(40px, 3.8vw, 50px);
}

.owner-h5 .intro p {
  max-width: 500px;
  color: var(--muted);
}

.owner-h5 .phone {
  border-width: 5px;
  border-radius: 34px;
  box-shadow: 0 18px 48px rgba(29, 45, 41, 0.12);
}

.owner-h5 .benefit-card {
  min-height: 164px;
  padding: 22px;
  border-radius: 14px;
}

.owner-h5 .benefit-card .amount {
  font-size: 38px;
}

.owner-h5 .quick-grid {
  gap: 8px;
  margin-top: 14px;
}

.owner-h5 .quick-item {
  min-height: 82px;
  padding: 12px 5px 10px;
  border-radius: 10px;
}

.owner-h5 .quick-item img {
  width: 36px;
  height: 36px;
}

.owner-h5 .quick-item span {
  font-size: 10px;
}

.owner-h5 .campaign-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.owner-h5 .section-head {
  margin: 22px 0 10px;
}

.owner-h5 .section-head h2 {
  font-size: 16px;
  font-weight: 500;
}

.owner-h5 .service-card,
.owner-h5 .product-card,
.owner-h5 .order-card,
.owner-h5 .settings-list,
.owner-h5 .summary,
.owner-h5 .profile-card,
.owner-h5 .community-fund-card {
  border-radius: 12px;
}

.owner-h5 .service-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
}

.owner-h5 .product-art {
  background-image: none;
}

.owner-h5 .chip {
  border-radius: 7px;
  padding: 8px 12px;
}

.owner-h5 .add-button {
  border-radius: 8px;
}

.owner-h5 .cart-fab {
  border-radius: 10px;
  box-shadow: none;
}

.owner-h5 .settings-row {
  min-height: 56px;
}

.owner-h5 .bottom-nav {
  box-shadow: none;
}

.owner-h5 .bottom-nav .nav-item--active {
  color: var(--teal);
}

/* Shared backend table pagination */
.table-pager {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 11px 14px 11px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.table-pager-summary {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.table-pager-summary strong {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.table-pager-controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.table-pager-button {
  display: inline-flex;
  min-width: 92px;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.table-pager-button:hover:not(:disabled) {
  border-color: rgba(35, 103, 91, 0.28);
  background: var(--surface-soft);
  color: var(--teal);
}

.table-pager-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.table-pager-arrow {
  color: var(--teal);
  font-size: 15px;
  line-height: 1;
}

.table-pager-button:disabled .table-pager-arrow {
  color: inherit;
}

.table-pager-position {
  display: inline-flex;
  min-width: 54px;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.table-pager-position strong {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 640px) {
  .table-pager {
    align-items: stretch;
    flex-direction: column;
  }

  .table-pager-controls {
    justify-content: space-between;
  }

  .table-pager-button {
    min-width: 96px;
  }
}

/* Platform catalog management */
.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 14px;
}

.review-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  background: var(--surface-soft);
}

.review-tab {
  min-width: 92px;
  height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.review-tab:hover {
  color: var(--text);
}

.review-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(29, 45, 41, 0.05);
}

.review-filters {
  display: flex;
  min-width: min(100%, 440px);
  align-items: center;
  gap: 8px;
}

.review-filters input,
.review-filters select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
}

.review-filters input {
  min-width: 0;
  flex: 1;
}

.review-panel {
  margin-top: 0;
}

.review-panel .table-wrap {
  overflow-x: auto;
}

.review-row-actions {
  flex-wrap: nowrap;
}

.review-row-actions .button-primary,
.review-row-actions .button-outline,
.review-row-actions .button-danger {
  min-height: 32px;
  padding: 6px 10px;
  white-space: nowrap;
}

.review-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.review-detail-grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: var(--surface-soft);
}

.review-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.review-detail-grid strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .review-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .review-filters {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .review-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .review-tab {
    min-width: 0;
    padding: 0 8px;
  }

  .review-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .review-detail-grid {
    grid-template-columns: 1fr;
  }
}
