:root {
  color-scheme: light;
  --page: #eef1f4;
  --app-bg: #f6f6f6;
  --card: #ffffff;
  --ink: #20272b;
  --muted: #6f777e;
  --line: #e4e6e8;
  --orange: #ff7d4d;
  --orange-2: #ff9a75;
  --blue: #2686d9;
  --green: #11886f;
  --danger: #c64036;
  --shadow: 0 5px 16px rgba(31, 36, 40, 0.12);
  --soft-shadow: 0 2px 10px rgba(31, 36, 40, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(circle at top, #ffffff 0, var(--page) 52%);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.phone-app {
  position: relative;
  width: min(100vw, 390px);
  height: min(920px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid #d9dde0;
  border-radius: 26px;
  background: var(--app-bg);
  box-shadow: 0 28px 80px rgba(23, 31, 38, 0.18);
}

.resident-header {
  min-height: 180px;
  padding: 20px 14px 88px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #ff9e7f 0%, #ff7554 55%, #ff6c61 100%);
}

.profile-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 11px;
}

.avatar-button,
.bell-button {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #667482;
  box-shadow: var(--soft-shadow);
}

.avatar-button {
  width: 58px;
  height: 58px;
  background: #9bb1c8;
  color: #ffffff;
  font-size: 24px;
}

.bell-button {
  position: relative;
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.bell-button b {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: #ff7a1c;
  color: #ffffff;
  font-size: 10px;
}

.resident-name {
  min-width: 0;
}

.resident-name span,
.resident-name strong,
.resident-address {
  display: block;
}

.resident-name span {
  margin-bottom: 2px;
  color: #4e4f54;
  font-size: 16px;
}

.resident-name strong {
  color: #1f2529;
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.quick-panel {
  position: absolute;
  z-index: 3;
  top: 100px;
  left: 14px;
  right: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-height: 110px;
  border-radius: 8px;
  background: var(--card);
  padding: 14px 8px 10px;
  box-shadow: var(--shadow);
}

.quick-item,
.module-tile {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-width: 0;
  color: #4d545a;
  background: transparent;
  text-align: center;
  font-size: 13px;
}

.quick-icon,
.module-icon,
.action-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  background: #f3f4f5;
  color: #ff7d31;
  font-size: 22px;
  font-weight: 800;
}

.quick-item span:last-child,
.module-tile span:last-child {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-scroll {
  position: absolute;
  inset: 180px 0 72px;
  overflow-y: auto;
  padding: 14px 14px 24px;
  scroll-behavior: smooth;
}

.app-scroll::-webkit-scrollbar,
.screen-body::-webkit-scrollbar {
  width: 0;
}

.location-card,
.ai-search-card,
.home-section,
.feed-card,
.nearby-card,
.screen-card,
.post-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--soft-shadow);
}

.location-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  padding: 13px 15px;
}

.location-card > div {
  min-width: 0;
}

.location-card strong,
.location-card span {
  display: block;
}

.location-card strong {
  margin-bottom: 6px;
  font-size: 17px;
}

.location-card span,
.feed-meta,
.nearby-card span,
.screen-card small,
.comment-row span {
  color: var(--muted);
  font-size: 13px;
}

.accent-pill,
.primary-button,
.secondary-button,
.search-row button,
.comment-form button {
  min-height: 36px;
  border-radius: 999px;
  padding: 8px 13px;
  color: #ffffff;
  background: var(--orange);
  font-weight: 800;
  white-space: nowrap;
}

.location-card .accent-pill {
  flex: 0 0 auto;
  max-width: 94px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-search-card {
  margin-top: 12px;
  padding: 11px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
}

.search-row button {
  width: 48px;
  padding: 0;
}

.search-row input,
.post-form input,
.post-form textarea,
.service-form input,
.service-form select,
.service-form textarea,
.comment-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

.ai-result {
  display: none;
  margin-top: 10px;
  border-radius: 8px;
  background: #f2fbf8;
  color: #285b51;
  padding: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.ai-result.active {
  display: block;
}

.banner-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: 10px;
  overflow-x: auto;
  margin: 13px -14px 0;
  padding: 0 14px 3px;
}

.banner-card {
  min-height: 86px;
  border-radius: 8px;
  padding: 15px;
  color: #ffffff;
  box-shadow: var(--soft-shadow);
}

.blue-banner {
  background: linear-gradient(135deg, #1c85df, #77c6ff);
}

.green-banner {
  background: linear-gradient(135deg, #0d876d, #63c0a6);
}

.banner-card span,
.banner-card strong,
.banner-card small {
  display: block;
}

.banner-card span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.banner-card strong {
  margin-top: 7px;
  font-size: 18px;
  line-height: 1.15;
}

.banner-card small {
  margin-top: 8px;
  opacity: 0.9;
}

.home-section {
  margin-top: 15px;
  padding: 14px 10px 12px;
}

.section-head,
.card-head,
.worker-head,
.booking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-head {
  padding: 0 5px 12px;
}

.section-head h2,
.screen-top strong {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.section-head h2 {
  min-width: 0;
}

.section-head button,
.text-button {
  flex: 0 0 auto;
  color: var(--orange);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

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

.module-tile[disabled] {
  opacity: 0.58;
}

.nearby-list,
.feed-list,
.worker-list,
.booking-list,
.comment-list {
  display: grid;
  gap: 10px;
}

.nearby-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.nearby-card strong,
.nearby-card span {
  display: block;
}

.nearby-card strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.action-icon {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.feed-card {
  padding: 12px;
}

.card-head {
  align-items: flex-start;
}

.feed-author {
  display: flex;
  gap: 9px;
  min-width: 0;
}

.feed-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #9bb1c8;
  font-size: 13px;
  font-weight: 800;
}

.feed-author strong,
.feed-author span {
  display: block;
}

.feed-author strong {
  font-size: 14px;
}

.feed-content {
  margin: 11px 0 10px;
  color: #31383d;
  font-size: 14px;
  line-height: 1.45;
}

.feed-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.feed-actions button {
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.comment-list {
  margin-top: 10px;
}

.comment-row {
  border-radius: 8px;
  background: #f7f8f9;
  padding: 8px 9px;
  font-size: 13px;
}

.comment-row strong {
  display: block;
  margin-bottom: 3px;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 7px;
  margin-top: 9px;
}

.screen-panel {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--app-bg);
  transform: translateX(105%);
  transition: transform 0.25s ease;
}

.screen-panel.active {
  transform: translateX(0);
}

.screen-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 74px;
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.back-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #f1f2f3;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.screen-top span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.screen-body {
  overflow-y: auto;
  padding: 14px 14px 92px;
}

.screen-card,
.post-card {
  margin-bottom: 12px;
  padding: 13px;
}

.screen-card h3,
.post-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.screen-card p,
.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.service-form,
.post-form {
  display: grid;
  gap: 10px;
}

.service-form textarea,
.post-form textarea {
  min-height: 92px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.primary-button,
.secondary-button {
  width: 100%;
  border-radius: 8px;
}

.secondary-button {
  color: var(--green);
  border: 1px solid #cfe4df;
  background: #eef9f5;
}

.worker-card,
.booking-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 11px;
}

.worker-head,
.booking-head {
  align-items: flex-start;
}

.worker-head strong,
.booking-head strong,
.worker-head span,
.booking-head span {
  display: block;
}

.worker-head span,
.booking-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #f1f5f4;
  color: #3f5c56;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.score-pill {
  color: #8a4a00;
  background: #fff0dc;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 18px;
  text-align: center;
  font-size: 14px;
}

.bottom-nav {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 14px;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 70px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  padding-right: 14px;
}

.bottom-item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  color: #7e8790;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.bottom-item span {
  font-size: 22px;
  line-height: 1;
}

.bottom-item.active {
  color: #20272b;
}

.post-fab span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--orange);
}

@media (max-width: 560px) {
  .app-stage {
    display: block;
    padding: 0;
    background: var(--app-bg);
  }

  .phone-app {
    width: min(100vw, 390px);
    height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 360px) {
  .module-grid,
  .quick-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-panel {
    min-height: 150px;
  }

  .app-scroll {
    inset-block-start: 220px;
  }
}






/* Phase 2 resident features */
.zone-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.zone-tabs button {
  min-height: 36px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--orange);
  border: 1px solid var(--line);
  font-weight: 800;
}

.group-card .primary-button,
.group-card .secondary-button {
  margin-top: 12px;
}

.mini-map {
  position: relative;
  height: 240px;
  margin-bottom: 12px;
  border: 1px solid #d9e4e8;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.54) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(0deg, rgba(255,255,255,.54) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(135deg, #dff4ef, #eff8ff 52%, #fff7e8);
  box-shadow: var(--soft-shadow);
}

.home-pin,
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: var(--soft-shadow);
  font-size: 12px;
  font-weight: 900;
}

.home-pin {
  background: #20272b;
  color: #ffffff;
  padding: 0 7px;
}

.map-pin {
  background: var(--orange);
  color: #ffffff;
}

.map-service-list {
  margin-top: 10px;
}

.account-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
  box-shadow: var(--soft-shadow);
}

.account-card h3,
.account-card p {
  margin: 0;
}

.account-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.account-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #9bb1c8;
  color: #ffffff;
  font-weight: 900;
  font-size: 24px;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 12px;
  border-radius: 8px;
  background: var(--orange);
  color: #ffffff;
  padding: 8px 12px;
  font-weight: 800;
  text-decoration: none;
}

/* Phase 3 commerce features */
.voucher-card,
.payment-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
  box-shadow: var(--soft-shadow);
}

.voucher-card strong,
.voucher-card span,
.voucher-card code,
.payment-card strong,
.payment-card span,
.payment-card em {
  display: block;
}

.voucher-card span,
.payment-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.voucher-card code {
  width: fit-content;
  border-radius: 8px;
  background: #fff3e8;
  color: #b34f13;
  padding: 7px 9px;
  font-weight: 900;
}

.payment-card em {
  width: fit-content;
  border-radius: 999px;
  background: #edf7f3;
  color: var(--green);
  padding: 5px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.screen-card.is-read {
  opacity: .72;
}





/* Reference-inspired mobile redesign */
:root {
  --app-bg: #f7f8fb;
  --card: #ffffff;
  --ink: #151b25;
  --muted: #647081;
  --line: #edf0f5;
  --orange: #ff7a12;
  --orange-2: #ff9d18;
  --blue: #1597f4;
  --green: #10a36f;
  --purple: #7d2cff;
  --shadow: 0 12px 28px rgba(25, 38, 56, .14);
  --soft-shadow: 0 6px 18px rgba(25, 38, 56, .10);
}

body {
  background: #eef1f6;
}

.phone-app {
  width: min(100%, 430px);
  max-width: 430px;
  border: 0;
  border-radius: 28px;
  background: var(--app-bg);
  box-shadow: 0 28px 88px rgba(12, 25, 38, .2);
}

.resident-header {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  padding: 18px 18px 92px;
  background:
    linear-gradient(180deg, rgba(255, 196, 91, .78), rgba(255, 112, 68, .18) 48%, rgba(12, 151, 190, .55) 78%, rgba(0, 116, 169, .85)),
    linear-gradient(135deg, #ffe28a 0%, #ff935d 45%, #2cb8d8 100%);
}

.resident-header::before {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 118px;
  background:
    radial-gradient(ellipse at 24% 58%, #fff4bf 0 10px, transparent 11px),
    linear-gradient(90deg, transparent 0 9%, #ffffff 9% 10%, transparent 10% 15%, #e8402d 15% 18%, transparent 18% 28%, #f6df85 28% 36%, transparent 36% 48%, #0ea47d 48% 52%, transparent 52% 62%, #2484d5 62% 74%, transparent 74%),
    linear-gradient(180deg, transparent 0 46%, #236c74 47% 54%, #0a8fb8 55% 100%);
  opacity: .72;
  clip-path: polygon(0 54%, 10% 42%, 18% 45%, 24% 34%, 34% 45%, 44% 30%, 54% 44%, 66% 35%, 80% 45%, 100% 31%, 100% 100%, 0 100%);
}

.resident-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  background: linear-gradient(180deg, rgba(3, 129, 173, .2), rgba(0, 104, 156, .74));
}

.profile-row {
  position: relative;
  z-index: 2;
  grid-template-columns: 58px minmax(0, 1fr) 52px;
}

.avatar-button,
.bell-button {
  border: 2px solid rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 6px 14px rgba(13, 38, 66, .18);
}

.avatar-button {
  color: #2f4052;
  background: linear-gradient(180deg, #eaf5ff, #8fb2cf);
}

.bell-button {
  color: #ff8a00;
}

.bell-button b {
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(180deg, #ff4f24, #ff8a00);
}

.resident-name span {
  color: rgba(27, 39, 50, .8);
  font-size: 14px;
}

.resident-name strong {
  color: #132033;
  font-size: 21px;
  font-weight: 900;
}

.resident-address {
  margin-top: 4px;
  color: rgba(25, 38, 54, .62);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-panel {
  top: 128px;
  left: 16px;
  right: 16px;
  min-height: 105px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 20px 20px 8px 8px;
  background: rgba(255, 255, 255, .96);
  padding: 13px 8px 9px;
  box-shadow: 0 10px 24px rgba(23, 41, 62, .16);
}

.quick-item,
.module-tile {
  gap: 7px;
  color: #2f3742;
  font-size: 12px;
  font-weight: 750;
}

.quick-icon,
.module-icon {
  width: 52px;
  height: 52px;
  border: 1px solid #f2f4f7;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f4f6fb);
  color: #ff6900;
  box-shadow: 0 5px 12px rgba(45, 67, 90, .16), inset 0 1px 0 #fff;
  font-size: 25px;
}

.quick-lightning { color: #ffbf00; }
.quick-building { color: #ff6e00; }
.quick-diamond { color: #6138ff; }
.quick-dots { color: #27be24; }

.app-scroll {
  inset: 222px 0 70px;
  padding: 0 16px 28px;
}

.location-card,
.ai-search-card,
.home-section,
.feed-card,
.nearby-card,
.screen-card,
.post-card,
.worker-card,
.booking-card,
.voucher-card,
.payment-card {
  border: 1px solid rgba(228, 233, 242, .92);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 7px 18px rgba(25, 38, 56, .10);
}

.location-card {
  min-height: 68px;
  border-radius: 0 0 20px 20px;
  padding: 12px 14px;
  transform: translateY(-1px);
}

.location-card strong {
  color: #182231;
  font-size: 19px;
  font-weight: 900;
}

.location-card span {
  color: #677589;
  font-size: 12px;
}

.accent-pill,
.primary-button,
.search-row button,
.comment-form button {
  background: linear-gradient(180deg, #ffad18, #ff6417);
  box-shadow: 0 5px 12px rgba(255, 111, 17, .26), inset 0 1px 0 rgba(255,255,255,.45);
}

.location-card .accent-pill {
  min-width: 104px;
  max-width: 112px;
  min-height: 42px;
  border-radius: 18px;
  font-size: 15px;
}

.ai-search-card {
  margin-top: 12px;
  border-radius: 18px;
  padding: 10px;
}

.search-row {
  grid-template-columns: minmax(0, 1fr) 62px;
}

.search-row input,
.post-form input,
.post-form textarea,
.service-form input,
.service-form select,
.service-form textarea,
.comment-form input {
  border-radius: 10px;
  background: #fbfcff;
  border-color: #e6ebf3;
  color: #1e2735;
}

.search-row button {
  width: 62px;
  border-radius: 16px;
  background: linear-gradient(135deg, #d944ff, #2f70ff);
  font-size: 0;
}

.search-row button::before {
  content: "AI✦";
  font-size: 18px;
}

.banner-rail {
  display: block;
  margin: 12px 0 0;
  padding: 0 0 8px;
}

.banner-carousel {
  display: grid;
  gap: 8px;
}

.banner-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 126px;
  overflow: hidden;
  border-radius: 16px;
  padding: 16px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 24px rgba(18, 71, 127, .2);
}

.banner-card::after {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 52px;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.2));
}

.banner-card.has-image {
  background-size: cover;
  background-position: center;
}

.banner-card.has-image::after { content: ""; }

.blue-banner {
  background:
    linear-gradient(135deg, rgba(0,96,210,.95), rgba(65,182,255,.84)),
    radial-gradient(circle at 72% 18%, rgba(255,255,255,.45), transparent 34%);
}

.blue-banner::after { content: "🚙"; }

.green-banner {
  background: linear-gradient(135deg, #008f5d, #0bc982);
}

.green-banner::after { content: "🎁"; }

.banner-card span,
.banner-card strong,
.banner-card small {
  position: relative;
  z-index: 1;
  display: block;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,.18);
}

.banner-card strong {
  max-width: 76%;
  font-size: 18px;
  line-height: 1.12;
  font-weight: 900;
}

.banner-card small {
  max-width: 78%;
  font-size: 12px;
  line-height: 1.35;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 12px;
}

.banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cbd6df;
  padding: 0;
}

.banner-dot.active {
  width: 18px;
  background: linear-gradient(90deg, #ff9a18, #ff5f18);
}

.home-section {
  margin-top: 14px;
  border-radius: 18px;
  padding: 14px 11px 13px;
}

.section-head {
  padding: 0 4px 12px;
}

.section-head h2,
.screen-top strong {
  color: #172232;
  font-size: 19px;
  font-weight: 900;
}

.section-head button,
.text-button {
  color: #ff6a16;
  font-weight: 900;
}

.module-grid {
  gap: 14px 6px;
}

.module-icon {
  width: 50px;
  height: 50px;
  font-size: 24px;
}

.nearby-card {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  padding: 9px 10px;
  box-shadow: none;
}

.action-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f4f7fb);
  box-shadow: inset 0 1px 0 #fff, 0 4px 10px rgba(30, 58, 91, .14);
}

.nearby-card strong {
  font-size: 13px;
  font-weight: 900;
}

.text-button {
  font-size: 18px;
}

.bottom-nav {
  left: 0;
  right: 0;
  min-height: 68px;
  border: 1px solid rgba(228, 233, 242, .92);
  border-radius: 22px 22px 0 0;
  background: rgba(255,255,255,.97);
  box-shadow: 0 -7px 22px rgba(25, 38, 56, .12);
  padding: 3px 0 0;
}

.bottom-item {
  color: #657385;
  font-size: 11px;
  font-weight: 850;
}

.bottom-item span {
  color: #647286;
  font-size: 25px;
}

.bottom-item.active,
.bottom-item.active span {
  color: #ff6a16;
}

.post-fab span {
  width: 46px;
  height: 46px;
  margin-top: -18px;
  border: 4px solid #fff;
  background: linear-gradient(180deg, #ffac20, #ff6317);
  box-shadow: 0 8px 16px rgba(255, 107, 20, .32);
  font-size: 28px;
}

.screen-panel {
  background:
    radial-gradient(circle at 82% 5%, rgba(40, 173, 255, .26), transparent 28%),
    linear-gradient(180deg, #eaf8ff 0, #f8fbff 156px, #f8f9fc 100%);
}

.screen-top {
  min-height: 76px;
  padding: 13px 14px 9px;
  background: transparent;
  box-shadow: none;
}

.back-button {
  width: 46px;
  height: 46px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(27, 48, 72, .13);
  font-size: 30px;
}

.screen-top span {
  color: #314158;
  font-size: 11px;
  letter-spacing: .02em;
}

.screen-top strong {
  font-size: 23px;
}

.screen-body {
  padding: 8px 10px 92px;
}

.workforce-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(229, 235, 246, .9);
  border-radius: 14px;
  background: rgba(255,255,255,.95);
  padding: 14px 12px;
  box-shadow: 0 9px 18px rgba(28, 55, 84, .1);
}

.workforce-hero-card h3,
.workforce-hero-card p {
  margin: 0;
}

.workforce-hero-card h3 {
  font-size: 16px;
  font-weight: 900;
}

.workforce-hero-card p {
  margin-top: 7px;
  color: #5f6d7e;
  font-size: 12px;
  line-height: 1.45;
}

.workforce-house,
.workforce-robot {
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #dff1ff, #f2f7ff);
  box-shadow: inset 0 1px 0 #fff, 0 8px 14px rgba(47, 117, 191, .12);
  font-size: 38px;
}

.workforce-house {
  width: 74px;
  height: 74px;
}

.workforce-robot {
  width: 54px;
  height: 54px;
  align-self: start;
  margin-top: 2px;
  border-radius: 50%;
  font-size: 29px;
}

.workforce-form {
  gap: 10px;
  margin-bottom: 11px;
  border: 1px solid rgba(229, 235, 246, .9);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  padding: 10px;
  box-shadow: 0 7px 16px rgba(28, 55, 84, .08);
}

.job-prompt-wrap {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  min-height: 74px;
  border: 1px solid #e8edf7;
  border-radius: 10px;
  background: #f4f8ff;
  padding: 10px;
}

.job-prompt-wrap > span,
.select-chip > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f2eaff, #bba6ff);
  box-shadow: inset 0 1px 0 #fff;
  font-size: 23px;
}

.job-prompt-wrap textarea {
  min-height: 54px;
  border: 0;
  background: transparent;
  padding: 0;
  color: #1b2534;
  line-height: 1.45;
  resize: none;
}

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

.select-chip {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #e8edf7;
  border-radius: 9px;
  background: #fff;
  padding: 5px 9px;
}

.select-chip > span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef7ff;
  color: #1686e5;
  font-size: 17px;
}

.select-chip select,
.select-chip input {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 750;
}

.ai-match-button,
.booking-gradient {
  min-height: 44px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ff9e18, #ff5615);
  font-size: 16px;
}

.ai-draft-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  border: 1px solid #eceff7;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  padding: 12px;
  box-shadow: 0 7px 16px rgba(28, 55, 84, .08);
}

.ai-draft-card strong,
.ai-draft-card span {
  display: block;
}

.ai-draft-card strong {
  color: #1b2534;
  font-size: 15px;
}

.ai-draft-card span {
  margin-top: 5px;
  color: #667486;
  font-size: 12px;
}

.ai-draft-card b {
  border-radius: 9px;
  background: linear-gradient(135deg, #8e58ff, #4d6dff);
  color: #fff;
  padding: 5px 9px;
  font-size: 11px;
}

.muted-draft {
  opacity: .86;
}

.premium-worker-card {
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 7px 16px rgba(28, 55, 84, .09);
}

.worker-profile {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.worker-avatar-photo {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #dff2ff, #0c5383);
  border: 3px solid #fff;
  box-shadow: 0 7px 14px rgba(18, 51, 86, .18);
  font-size: 33px;
}

.worker-avatar-photo::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #21d35e;
}

.worker-avatar-photo i {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffc23a, #df7b00);
  box-shadow: 0 3px 8px rgba(151, 92, 0, .22);
}

.worker-avatar-photo i::before {
  content: "★";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
}

.worker-head strong {
  color: #1b2534;
  font-size: 16px;
  font-weight: 900;
}

.score-badge {
  flex: 0 0 auto;
  border-radius: 9px;
  background: #ecfff3;
  color: #0e9a52;
  padding: 7px 9px;
  font-size: 14px;
  font-weight: 900;
}

.worker-trust-row {
  margin-left: 68px;
  margin-top: -6px;
}

.trust-pill {
  background: #effaf2;
  color: #129452;
}

.rating-pill {
  background: #fff8e8;
  color: #a76b00;
}

.skill-pill {
  background: #edf6ff;
  color: #1974c8;
}

.booking-gradient {
  margin-top: 12px;
}

@media (max-width: 560px) {
  .phone-app {
    width: 100vw;
    max-width: none;
  }
}

@media (max-width: 360px) {
  .quick-panel,
  .module-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quick-icon,
  .module-icon {
    width: 44px;
    height: 44px;
    font-size: 21px;
  }

  .quick-item,
  .module-tile {
    font-size: 11px;
  }
}

/* Strong 3D icon treatment requested from reference screens */
.quick-icon,
.module-icon,
.action-icon,
.job-prompt-wrap > span,
.select-chip > span,
.workforce-house,
.workforce-robot {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.92);
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.98) 0 16%, rgba(255,255,255,.55) 17% 32%, transparent 33%),
    linear-gradient(145deg, #ffffff 0%, #f6f9ff 46%, #e7edf8 100%);
  box-shadow:
    0 11px 18px rgba(25, 43, 65, .20),
    0 3px 6px rgba(25, 43, 65, .12),
    inset 0 2px 2px rgba(255,255,255,.95),
    inset 0 -5px 9px rgba(57, 80, 112, .10);
  text-shadow:
    0 1px 0 #ffffff,
    0 3px 4px rgba(0,0,0,.20),
    0 8px 10px rgba(20, 45, 80, .18);
  transform: translateZ(0);
}

.quick-icon::before,
.module-icon::before,
.action-icon::before,
.job-prompt-wrap > span::before,
.select-chip > span::before,
.workforce-house::before,
.workforce-robot::before {
  content: "";
  position: absolute;
  inset: 5px 7px auto 7px;
  height: 35%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,0));
  z-index: -1;
  pointer-events: none;
}

.quick-icon::after,
.module-icon::after,
.action-icon::after,
.job-prompt-wrap > span::after,
.select-chip > span::after,
.workforce-house::after,
.workforce-robot::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -8px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(25, 43, 65, .28), rgba(25, 43, 65, 0) 70%);
  z-index: -2;
  filter: blur(1px);
  pointer-events: none;
}

.quick-icon,
.module-icon {
  color: #ff6d00;
  font-size: 25px;
  filter: saturate(1.2) contrast(1.06);
}

.quick-icon.quick-lightning {
  color: #ffb300;
  text-shadow: 0 1px 0 #fff8c9, 0 3px 4px rgba(188, 104, 0, .32), 0 8px 12px rgba(255, 150, 0, .22);
}

.quick-icon.quick-building {
  color: #ff6d00;
  text-shadow: 0 1px 0 #fff1df, 0 3px 4px rgba(176, 72, 0, .28), 0 8px 12px rgba(255, 110, 0, .22);
}

.quick-icon.quick-diamond {
  color: #533cff;
  text-shadow: 0 1px 0 #eeeaff, 0 3px 4px rgba(52, 34, 180, .28), 0 8px 12px rgba(70, 60, 255, .22);
}

.quick-icon.quick-dots {
  color: #21c63a;
  text-shadow: 0 1px 0 #e7ffe9, 0 3px 4px rgba(0, 122, 28, .26), 0 8px 12px rgba(20, 210, 70, .22);
}

.module-icon:nth-child(n),
.action-icon {
  border-radius: 16px;
}

.module-tile:nth-child(1) .module-icon,
.module-tile:nth-child(5) .module-icon,
.module-tile:nth-child(9) .module-icon {
  color: #ff6b00;
}

.module-tile:nth-child(2) .module-icon,
.module-tile:nth-child(6) .module-icon,
.module-tile:nth-child(10) .module-icon {
  color: #0984e8;
}

.module-tile:nth-child(3) .module-icon,
.module-tile:nth-child(7) .module-icon,
.module-tile:nth-child(11) .module-icon {
  color: #ff4d2f;
}

.module-tile:nth-child(4) .module-icon,
.module-tile:nth-child(8) .module-icon,
.module-tile:nth-child(12) .module-icon {
  color: #25ba37;
}

.quick-item:active .quick-icon,
.module-tile:active .module-icon,
.bottom-item:active span {
  transform: translateY(2px) scale(.97);
  box-shadow:
    0 5px 9px rgba(25, 43, 65, .18),
    inset 0 2px 4px rgba(57, 80, 112, .13);
}

.bottom-item span {
  display: grid;
  width: 33px;
  height: 31px;
  place-items: center;
  margin-bottom: 1px;
  border-radius: 11px;
  text-shadow: 0 1px 0 #fff, 0 3px 5px rgba(28, 45, 66, .22);
  filter: drop-shadow(0 4px 5px rgba(25, 43, 65, .16));
}

.bottom-item.active span {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,241,231,.92));
  box-shadow: 0 6px 12px rgba(255, 107, 20, .16), inset 0 1px 0 #fff;
}

.post-fab span {
  text-shadow: 0 1px 0 rgba(255,255,255,.44), 0 3px 6px rgba(125, 53, 0, .32);
  box-shadow:
    0 10px 18px rgba(255, 107, 20, .38),
    inset 0 2px 2px rgba(255,255,255,.52),
    inset 0 -5px 9px rgba(151, 64, 0, .22);
}

.workforce-house,
.workforce-robot {
  filter: saturate(1.18) drop-shadow(0 7px 10px rgba(37, 96, 154, .16));
}

.worker-avatar-photo {
  box-shadow:
    0 10px 16px rgba(18, 51, 86, .24),
    inset 0 2px 3px rgba(255,255,255,.42),
    inset 0 -8px 12px rgba(0, 34, 70, .26);
  text-shadow: 0 2px 4px rgba(0,0,0,.25);
}

.worker-avatar-photo i {
  box-shadow:
    0 5px 9px rgba(151, 92, 0, .32),
    inset 0 1px 1px rgba(255,255,255,.56),
    inset 0 -3px 5px rgba(118, 67, 0, .22);
}

/* Premium AI color pass for reference-like icons */
.quick-icon,
.module-icon,
.action-icon,
.job-prompt-wrap > span,
.select-chip > span,
.workforce-house,
.workforce-robot {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.58) 14% 30%, transparent 31%),
    linear-gradient(145deg, #ffffff 0%, #f8fbff 48%, #e7edf8 100%);
  color: var(--icon-main, #ff7a12);
  box-shadow:
    0 13px 20px rgba(var(--icon-shadow-rgb, 40, 74, 116), .20),
    0 5px 10px rgba(var(--icon-shadow-rgb, 40, 74, 116), .12),
    inset 0 2px 2px rgba(255,255,255,.95),
    inset 0 -6px 10px rgba(var(--icon-shadow-rgb, 40, 74, 116), .12);
  text-shadow:
    0 1px 0 rgba(255,255,255,.92),
    0 3px 4px rgba(var(--icon-shadow-rgb, 40, 74, 116), .30),
    0 9px 14px rgba(var(--icon-glow-rgb, 255, 122, 18), .28);
}

.quick-icon::before,
.module-icon::before,
.action-icon::before,
.job-prompt-wrap > span::before,
.select-chip > span::before,
.workforce-house::before,
.workforce-robot::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,0)),
    radial-gradient(circle at 75% 12%, rgba(var(--icon-glow-rgb, 255, 122, 18), .25), transparent 42%);
}

.quick-icon.quick-lightning,
.module-tile:nth-child(1) .module-icon,
.module-tile:nth-child(5) .module-icon {
  --icon-main: #ff8a00;
  --icon-shadow-rgb: 202, 93, 0;
  --icon-glow-rgb: 255, 169, 30;
}

.quick-icon.quick-building,
.module-tile:nth-child(6) .module-icon,
.module-tile:nth-child(10) .module-icon {
  --icon-main: #0688ff;
  --icon-shadow-rgb: 0, 96, 190;
  --icon-glow-rgb: 0, 154, 255;
}

.quick-icon.quick-diamond,
.module-tile:nth-child(7) .module-icon,
.module-tile:nth-child(13) .module-icon,
.workforce-robot,
.job-prompt-wrap > span {
  --icon-main: #7048ff;
  --icon-shadow-rgb: 72, 45, 196;
  --icon-glow-rgb: 130, 80, 255;
}

.quick-icon.quick-dots,
.module-tile:nth-child(4) .module-icon,
.module-tile:nth-child(14) .module-icon,
.module-tile:nth-child(15) .module-icon {
  --icon-main: #15b84f;
  --icon-shadow-rgb: 0, 128, 58;
  --icon-glow-rgb: 54, 220, 102;
}

.module-tile:nth-child(2) .module-icon,
.module-tile:nth-child(9) .module-icon,
.module-tile:nth-child(12) .module-icon {
  --icon-main: #1188e8;
  --icon-shadow-rgb: 0, 95, 180;
  --icon-glow-rgb: 62, 174, 255;
}

.module-tile:nth-child(3) .module-icon,
.module-tile:nth-child(11) .module-icon,
.module-tile:nth-child(16) .module-icon {
  --icon-main: #ff4f36;
  --icon-shadow-rgb: 190, 54, 36;
  --icon-glow-rgb: 255, 96, 72;
}

.module-tile:nth-child(8) .module-icon,
.workforce-house,
.action-icon {
  --icon-main: #ff9a00;
  --icon-shadow-rgb: 201, 96, 0;
  --icon-glow-rgb: 255, 183, 34;
}

.module-tile:nth-child(1) .module-icon {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.62) 14% 30%, transparent 31%),
    linear-gradient(145deg, #fff8e9 0%, #fff 42%, #ffe7c6 100%);
}

.module-tile:nth-child(2) .module-icon,
.quick-icon.quick-building {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.62) 14% 30%, transparent 31%),
    linear-gradient(145deg, #eff8ff 0%, #fff 42%, #dcefff 100%);
}

.module-tile:nth-child(3) .module-icon,
.module-tile:nth-child(7) .module-icon {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.62) 14% 30%, transparent 31%),
    linear-gradient(145deg, #fff1f1 0%, #fff 42%, #ffe0dd 100%);
}

.module-tile:nth-child(4) .module-icon,
.quick-icon.quick-dots {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.62) 14% 30%, transparent 31%),
    linear-gradient(145deg, #eefdf3 0%, #fff 42%, #d9f8e4 100%);
}

.quick-icon.quick-diamond,
.workforce-robot,
.job-prompt-wrap > span {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.62) 14% 30%, transparent 31%),
    linear-gradient(145deg, #f3efff 0%, #ffffff 42%, #e5ddff 100%);
}

.search-row button {
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.64), transparent 25%),
    linear-gradient(135deg, #b935ff 0%, #624cff 48%, #0aa7ff 100%);
  box-shadow:
    0 8px 18px rgba(99, 76, 255, .34),
    inset 0 1px 0 rgba(255,255,255,.52),
    inset 0 -5px 10px rgba(32, 37, 160, .20);
}

.search-row button::before {
  content: "AI✦";
  letter-spacing: -.02em;
  text-shadow: 0 1px 0 rgba(255,255,255,.28), 0 4px 8px rgba(48, 28, 145, .45);
}

.ai-match-button,
.booking-gradient {
  background:
    radial-gradient(circle at 22% 12%, rgba(255,255,255,.38), transparent 28%),
    linear-gradient(180deg, #ffb21f 0%, #ff7c16 47%, #ff4e12 100%);
  box-shadow:
    0 8px 18px rgba(255, 105, 18, .32),
    inset 0 1px 0 rgba(255,255,255,.48),
    inset 0 -5px 12px rgba(188, 59, 0, .20);
}

.ai-match-button::first-letter {
  color: #fff7bd;
}

.worker-avatar-photo {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.7), transparent 26%),
    linear-gradient(180deg, #dff6ff 0%, #1b88c9 48%, #0b426e 100%);
}

/* Admin-uploaded hero image */
.resident-header.has-custom-hero {
  background-image:
    linear-gradient(180deg, rgba(255, 190, 84, .12), rgba(255, 128, 68, .06) 45%, rgba(0, 105, 150, .24) 100%),
    var(--hero-upload-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.resident-header.has-custom-hero::before {
  opacity: 0;
}

.resident-header.has-custom-hero::after {
  background: linear-gradient(180deg, rgba(0, 123, 170, .05), rgba(0, 92, 143, .38));
}
/* Quick panel removed because modules below already cover these actions */
.quick-panel {
  display: none;
}

.resident-header {
  min-height: 252px;
  padding-bottom: 138px;
}

.app-scroll {
  inset: 224px 0 70px;
  padding: 0 16px 28px;
}

@media (max-width: 360px) {
  .app-scroll {
    inset-block-start: 222px;
    padding-inline: 12px;
  }
}
/* Ocean Park location tabs replacing the old address card */
.location-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid rgba(221, 229, 237, .86);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  padding: 10px;
  box-shadow: 0 10px 24px rgba(22, 38, 58, .12);
}

.location-tab {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 64px;
  border: 1px solid rgba(230, 235, 241, .95);
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
  box-shadow: 0 6px 14px rgba(24, 44, 68, .08);
}

.location-tab.active {
  border-color: rgba(14, 130, 104, .28);
  box-shadow: 0 8px 18px rgba(14, 130, 104, .14);
}

.location-tab-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.38), 0 7px 12px rgba(20, 57, 94, .18);
}

.location-tab-icon.op1 {
  background: linear-gradient(145deg, #1189d2, #0a5aa8);
}

.location-tab-icon.op23 {
  background: linear-gradient(145deg, #1bb46c, #0a7c45);
}

.location-tab-copy {
  min-width: 0;
}

.location-tab-copy strong,
.location-tab-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-tab-copy strong {
  color: #24313e;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.location-tab-copy small {
  margin-top: 4px;
  color: #6d7784;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.1;
}

@media (max-width: 360px) {
  .location-switcher {
    gap: 8px;
    padding: 8px;
  }
  .location-tab {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
  }
  .location-tab-icon {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

.location-access-note {
  margin: -4px 2px 12px;
  border: 1px solid rgba(18, 132, 106, .16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(238, 250, 246, .94));
  color: #275047;
  padding: 9px 11px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  box-shadow: 0 6px 16px rgba(20, 50, 72, .08);
}

.location-access-note.guest-mode,
.zone-access-card.guest-mode {
  border-color: rgba(255, 126, 54, .24);
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255, 245, 235, .96));
  color: #7b421f;
}

.zone-access-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(18, 132, 106, .16);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #effbf7);
  padding: 12px;
  color: #254d45;
  box-shadow: 0 8px 18px rgba(23, 40, 58, .08);
}

.zone-access-card strong {
  font-size: 13px;
  font-weight: 900;
}

.zone-access-card span {
  font-size: 12px;
  line-height: 1.35;
}

button:disabled,
.service-form.is-readonly button:disabled {
  cursor: not-allowed;
  opacity: .62;
  filter: grayscale(.2);
}
  .location-tab-copy strong {
    font-size: 11px;
  }
}
/* Header install app action */
.profile-row {
  grid-template-columns: 58px minmax(0, 1fr) 98px;
  align-items: start;
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 0;
}

.header-actions .bell-button {
  justify-self: end;
}

.install-app-button {
  display: inline-grid;
  grid-template-columns: 18px auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 96px;
  min-height: 39px;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(180deg, #ffbd38 0%, #ff7a13 56%, #ff6410 100%);
  box-shadow:
    0 9px 18px rgba(203, 78, 0, .28),
    inset 0 1px 1px rgba(255,255,255,.48),
    inset 0 -5px 10px rgba(197, 70, 0, .24);
  font-size: 12px;
  line-height: 1;
}

.install-app-button span {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 900;
}

.install-app-button strong {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.install-app-button:active {
  transform: translateY(1px);
}

@media (max-width: 360px) {
  .profile-row {
    grid-template-columns: 52px minmax(0, 1fr) 88px;
    gap: 8px;
  }
  .install-app-button {
    width: 88px;
    min-height: 36px;
    font-size: 11px;
  }
  .install-app-button strong {
    font-size: 11px;
  }
}

/* Account registration split: guest, resident, worker, merchant */
.account-type-grid {
  display: grid;
  gap: 12px;
}

.account-four-grid {
  grid-template-columns: 1fr;
}

.account-type-card {
  display: grid;
  gap: 10px;
}

.account-type-kicker {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: #0d6b55;
  background: #e7f8f0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.merchant-type-card .account-type-kicker {
  color: #965400;
  background: #fff3df;
}

.guest-type-card .account-type-kicker {
  color: #285ea8;
  background: #e8f1ff;
}

.worker-type-card .account-type-kicker {
  color: #7a3f98;
  background: #f6eaff;
}

.account-type-card small {
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
}

.account-type-card textarea {
  min-height: 62px;
  resize: vertical;
}

.compact-account-form {
  gap: 8px;
}

.compact-merchant-list {
  gap: 7px;
}

.mini-status-row {
  border: 1px solid rgba(228, 233, 242, .92);
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
}

.mini-status-row strong,
.mini-status-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-status-row strong {
  color: #1f2c36;
  font-size: 13px;
  font-weight: 900;
}

.mini-status-row span {
  margin-top: 3px;
  color: #687484;
  font-size: 11px;
}
/* Resident account MVP */
.resident-profile-form textarea {
  min-height: 62px;
  resize: vertical;
}

.form-row-split,
.otp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.otp-row {
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: stretch;
}

.otp-row .secondary-button {
  min-height: 44px;
  padding-inline: 10px;
  white-space: nowrap;
}

.form-help {
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
}

.role-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.role-check-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid rgba(228, 233, 242, .96);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  color: #304152;
  font-size: 12px;
  font-weight: 800;
}

.role-check-grid input {
  width: 15px;
  height: 15px;
  accent-color: #0d9f79;
}

@media (max-width: 390px) {
  .form-row-split,
  .otp-row {
    grid-template-columns: 1fr;
  }

  .role-check-grid {
    grid-template-columns: 1fr;
  }
}


.file-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(228, 233, 242, .96);
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  color: #304152;
  font-size: 12px;
  font-weight: 800;
}

.file-field span {
  color: #667085;
  font-size: 11px;
}

.file-field input[type="file"] {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 11px;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid rgba(13, 159, 121, .2);
  border-radius: 10px;
  background: #f1fbf7;
  padding: 9px 10px;
  color: #304152;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 750;
}

.consent-check input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: #0d9f79;
}
/* Improved Workforce job request form */
.improved-job-form {
  gap: 14px;
  padding: 12px;
  border-color: rgba(216, 226, 240, .96);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,255,.92));
}

.job-field-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.job-field-label {
  color: #1f2a36;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.job-prompt-clear {
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  min-height: 116px;
  border-color: rgba(204, 216, 232, .96);
  background: #f7faff;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 18px rgba(30, 54, 84, .08);
}

.job-prompt-clear textarea {
  min-height: 90px;
  padding-top: 2px;
  font-size: 15px;
  line-height: 1.48;
}

.schedule-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.schedule-option {
  position: relative;
  min-width: 0;
}

.schedule-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.schedule-option span {
  display: grid;
  min-height: 54px;
  place-items: center;
  border: 1px solid rgba(218, 226, 238, .96);
  border-radius: 12px;
  background: #fff;
  color: #263443;
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.08;
  box-shadow: 0 6px 14px rgba(28, 48, 74, .07);
}

.schedule-option small {
  display: block;
  margin-top: 3px;
  color: #738091;
  font-size: 10px;
  font-weight: 650;
}

.schedule-option input:checked + span {
  border-color: rgba(255, 115, 24, .62);
  background: linear-gradient(180deg, #fff8f0, #ffffff);
  color: #d45211;
  box-shadow: 0 8px 18px rgba(255, 112, 28, .16), inset 0 0 0 1px rgba(255, 139, 40, .2);
}

.schedule-option.urgent input:checked + span {
  color: #b63320;
  border-color: rgba(231, 73, 47, .46);
  background: linear-gradient(180deg, #fff2ee, #ffffff);
}

.custom-schedule-fields {
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}

.show-custom-schedule .custom-schedule-fields {
  display: grid;
}

.custom-schedule-fields label,
.job-address-field,
.job-attach-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  border: 1px solid rgba(218, 226, 238, .96);
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
  box-shadow: 0 6px 14px rgba(28, 48, 74, .06);
}

.custom-schedule-fields span,
.job-address-field span {
  color: #6d7785;
  font-size: 10px;
  font-weight: 800;
}

.custom-schedule-fields input,
.custom-schedule-fields select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #1f2b38;
  padding: 0;
  font-size: 12px;
  font-weight: 850;
}

.job-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.job-address-field strong,
.job-attach-field strong {
  overflow: hidden;
  color: #22303d;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-attach-field {
  position: relative;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  cursor: pointer;
}

.job-attach-field > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #eef7ff, #ffffff);
  box-shadow: 0 5px 12px rgba(38, 112, 183, .16);
}

.job-attach-field small {
  grid-column: 2;
  color: #738091;
  font-size: 10px;
  font-weight: 650;
}

.job-attach-field input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

@media (max-width: 360px) {
  .schedule-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .custom-schedule-fields,
  .job-meta-grid {
    grid-template-columns: 1fr;
  }
}
/* Redesigned nearby service recommendation cards */
.nearby-context-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 1px;
  padding: 2px 2px 4px;
  color: #6d7785;
  font-size: 11px;
  line-height: 1.25;
}

.nearby-context-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-context-card strong {
  flex: 0 0 auto;
  color: #0e8a63;
  font-size: 11px;
  font-weight: 900;
}

.nearby-service-card {
  grid-template-columns: 52px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 10px;
  min-height: 88px;
  border-color: rgba(220, 229, 240, .96);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 10px;
  box-shadow: 0 7px 18px rgba(26, 46, 72, .08);
}

.nearby-service-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 21px;
}

.nearby-service-card.service-technical .nearby-service-icon {
  --icon-main: #1478ef;
  --icon-shadow-rgb: 16, 105, 214;
  --icon-glow-rgb: 69, 157, 255;
}

.nearby-service-card.service-moving .nearby-service-icon {
  --icon-main: #ff7a12;
  --icon-shadow-rgb: 214, 92, 8;
  --icon-glow-rgb: 255, 159, 53;
}

.nearby-service-card.service-care .nearby-service-icon {
  --icon-main: #18a777;
  --icon-shadow-rgb: 16, 132, 92;
  --icon-glow-rgb: 43, 199, 142;
}

.nearby-service-card.service-homecare .nearby-service-icon {
  --icon-main: #8758ff;
  --icon-shadow-rgb: 92, 62, 200;
  --icon-glow-rgb: 151, 104, 255;
}

.nearby-service-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.nearby-service-topline {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.nearby-service-topline strong {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #162233;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-status-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eefaf5;
  color: #0f8b66 !important;
  padding: 3px 6px;
  font-size: 9px !important;
  font-weight: 900;
  line-height: 1;
}

.nearby-service-type {
  color: #5f6e7c !important;
  font-size: 11px !important;
  font-weight: 650;
  line-height: 1.2;
}

.nearby-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.nearby-metrics span {
  border-radius: 999px;
  background: #f2f5f9;
  color: #506071 !important;
  padding: 4px 7px;
  font-size: 10px !important;
  font-weight: 850;
  line-height: 1;
}

.nearby-metrics .distance-badge {
  background: #fff2e8;
  color: #e35c12 !important;
}

.nearby-action-button {
  display: grid;
  min-width: 48px;
  min-height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff9a32, #ff5c18);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(255, 103, 23, .25), inset 0 1px 0 rgba(255,255,255,.42);
}

.nearby-empty {
  grid-template-columns: 52px minmax(0, 1fr);
}

@media (max-width: 360px) {
  .nearby-service-card {
    grid-template-columns: 46px minmax(0, 1fr) 50px;
    gap: 8px;
    padding: 9px;
  }
  .nearby-service-icon {
    width: 42px;
    height: 42px;
    font-size: 19px;
  }
  .nearby-metrics span {
    padding-inline: 6px;
  }
}
/* Redesigned resident feed cards */
.feed-context-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 1px;
  padding: 2px 2px 4px;
  color: #6d7785;
  font-size: 11px;
  line-height: 1.25;
}

.feed-context-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-context-card strong {
  flex: 0 0 auto;
  color: #0f7fbd;
  font-size: 11px;
  font-weight: 900;
}

.resident-feed-card {
  border-color: rgba(220, 229, 240, .96);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 12px;
  box-shadow: 0 8px 20px rgba(26, 46, 72, .08);
}

.feed-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.resident-feed-card .feed-author {
  align-items: center;
  gap: 10px;
  width: 100%;
}

.resident-feed-card .feed-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #b8c8da, #8ea8c0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 6px 14px rgba(40, 64, 90, .16);
  font-size: 12px;
  font-weight: 950;
}

.feed-author-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.feed-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.feed-name-row strong {
  min-width: 0;
  overflow: hidden;
  color: #162233;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-type-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.feed-type-badge.resident {
  background: #eef7ff;
  color: #1768b8;
}

.feed-type-badge.question {
  background: #fff3e7;
  color: #df5b13;
}

.feed-type-badge.notice {
  background: #eefaf5;
  color: #0d8b64;
}

.feed-type-badge.market {
  background: #f5efff;
  color: #744be8;
}

.feed-type-badge.event {
  background: #fff0f3;
  color: #c83d64;
}

.resident-feed-card .feed-meta {
  color: #697786;
  font-size: 11px;
  font-weight: 650;
}

.resident-feed-card .feed-content {
  display: -webkit-box;
  margin: 12px 0 11px;
  overflow: hidden;
  color: #1f2c3a;
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.compact-feed-actions {
  display: flex;
  gap: 7px;
  border-top: 1px solid rgba(226, 233, 242, .92);
  padding-top: 9px;
}

.compact-feed-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  border-radius: 999px;
  background: #f4f7fb;
  color: #465668;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.compact-feed-actions button:last-child {
  background: linear-gradient(135deg, #f3efff, #eef7ff);
  color: #6844d8;
}

.compact-comment-list {
  gap: 7px;
  margin-top: 9px;
}

.compact-comment-row {
  border-radius: 12px;
  background: #f6f8fb;
  padding: 8px 10px;
  font-size: 12px;
}

.compact-comment-row strong {
  margin-bottom: 3px;
  color: #1e2b39;
  font-size: 12px;
}

.compact-comment-row span {
  color: #637181;
  font-size: 12px;
  line-height: 1.35;
}

.comment-more-button {
  justify-self: start;
  border-radius: 999px;
  background: transparent;
  color: #ff6a16;
  padding: 3px 2px;
  font-size: 12px;
  font-weight: 900;
}

.compact-comment-form {
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.compact-comment-form input {
  min-height: 42px;
  border-radius: 12px;
  background: #fbfcff;
}

.compact-comment-form button {
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffad18, #ff6417);
  font-size: 13px;
  box-shadow: 0 6px 14px rgba(255, 111, 17, .26), inset 0 1px 0 rgba(255,255,255,.45);
}

@media (max-width: 360px) {
  .resident-feed-card {
    padding: 10px;
  }
  .compact-feed-actions button {
    padding-inline: 8px;
  }
}


/* Avatar identity layer */
.hero-avatar-image,
.hero-profile-avatar,
.account-avatar,
.feed-avatar,
.worker-public-avatar,
.worker-avatar-photo,
.merchant-logo {
  overflow: hidden;
}

.hero-avatar-image img,
.hero-profile-avatar img,
.account-avatar img,
.feed-avatar img,
.worker-public-avatar img,
.worker-avatar-photo img,
.merchant-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.avatar-button .hero-avatar-image,
.avatar-button .hero-profile-avatar {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: inherit;
  font-weight: 950;
}

.profile-avatar-card {
  align-items: flex-start;
}

.avatar-upload-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.avatar-file-field {
  min-height: 48px;
  background: #f8fbff;
}

.avatar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ghost-button {
  min-height: 40px;
  border: 1px solid rgba(205, 218, 232, .95);
  border-radius: 8px;
  background: #fff;
  color: #536579;
  font-weight: 900;
}

.worker-public-avatar,
.merchant-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  font-weight: 950;
}

.merchant-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, #edf7ff, #dbeafe);
  color: #0f5d9e;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88), 0 6px 14px rgba(33, 66, 100, .12);
}

.merchant-service-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

@media (max-width: 420px) {
  .avatar-actions {
    grid-template-columns: 1fr;
  }
}
/* Hero profile avatar fixed sizing hotfix */
.profile-row {
  grid-template-columns: 58px minmax(0, 1fr) 52px;
}

.avatar-button {
  position: relative;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  flex: 0 0 58px;
  border-radius: 50%;
  padding: 0;
}

.avatar-button .hero-profile-avatar {
  position: absolute;
  inset: 0;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(180deg, #eaf5ff, #8fb2cf);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
}

.avatar-button .hero-profile-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

@media (max-width: 380px) {
  .profile-row {
    grid-template-columns: 52px minmax(0, 1fr) 48px;
    gap: 9px;
  }

  .avatar-button {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    flex-basis: 52px;
  }

  .avatar-button .hero-profile-avatar {
    width: 52px;
    height: 52px;
    font-size: 20px;
  }
}


/* Account role selector flow */
.account-auth-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.account-session-pills {
  margin-top: 9px;
}

.account-role-shell {
  display: grid;
  gap: 12px;
}

.account-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.account-panel-head h3 {
  margin: 6px 0 0;
}

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

.account-role-card {
  display: grid;
  min-height: 104px;
  gap: 6px;
  align-content: start;
  border: 1px solid #dde7f1;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: #17211f;
  text-align: left;
  box-shadow: 0 8px 18px rgba(23, 33, 31, .06);
}

.account-role-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef5ff;
  color: #235fa7;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.account-role-card strong {
  font-size: 14px;
  line-height: 1.25;
}

.account-role-card small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.account-role-card.active {
  border-color: #14b58b;
  background: #f0fcf8;
  box-shadow: 0 10px 22px rgba(20, 181, 139, .12);
}

.account-role-card.worker-type-card span {
  color: #7a3f98;
  background: #f6eaff;
}

.account-role-card.merchant-type-card span {
  color: #965400;
  background: #fff3df;
}

.account-role-card.resident-type-card span {
  color: #0d6b55;
  background: #e7f8f0;
}

.account-selected-panel {
  display: grid;
  gap: 12px;
}

.account-choice-empty p {
  margin-bottom: 0;
}

@media (max-width: 380px) {
  .account-auth-actions,
  .account-role-grid {
    grid-template-columns: 1fr;
  }
}

/* Account OS v2: clean base-account and role-upgrade flow */
.account-overview-card {
  align-items: flex-start;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,252,255,.96)),
    radial-gradient(circle at 18% 8%, rgba(43, 154, 255, .14), transparent 34%);
  border-color: rgba(187, 207, 226, .82);
  box-shadow: 0 14px 32px rgba(29, 50, 76, .12);
}

.account-overview-card h3 {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.16;
}

.account-overview-card p {
  max-width: 100%;
  color: #56677b;
  line-height: 1.45;
}

.account-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.account-primary-actions:has(> :nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-primary-actions button {
  min-height: 40px;
  white-space: normal;
}

.account-avatar-tools {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(219, 229, 239, .9);
}

.account-welcome-card,
.account-focus-card,
.account-role-shell {
  border-color: rgba(215, 228, 241, .96);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 12px 26px rgba(23, 37, 56, .08);
}

.account-welcome-card h3,
.account-focus-card h3,
.account-role-shell h3 {
  font-size: 18px;
  line-height: 1.2;
}

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

.account-role-card {
  position: relative;
  min-height: 118px;
  padding: 12px 11px;
  border-color: #dbe7f3;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 20px rgba(26, 47, 72, .08), inset 0 1px 0 rgba(255,255,255,.88);
}

.account-role-card em {
  align-self: end;
  width: fit-content;
  margin-top: 2px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f2f6fb;
  color: #52657a;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.account-role-card.active em {
  background: #dff8ef;
  color: #0b7a5f;
}

.account-selected-panel {
  animation: accountPanelIn .16s ease-out;
}

@keyframes accountPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.account-focus-card .service-form {
  margin-top: 2px;
}

.account-focus-card .form-help,
.account-avatar-tools .form-help {
  line-height: 1.4;
}

@media (max-width: 380px) {
  .account-primary-actions,
  .account-role-grid {
    grid-template-columns: 1fr;
  }

  .account-role-card {
    min-height: 96px;
  }
}
/* Mobile header containment hotfix: keep notification/install actions inside the phone frame. */
.profile-row {
  position: relative;
  grid-template-columns: 58px minmax(0, 1fr);
  padding-right: 90px;
}

.header-actions {
  position: absolute;
  top: 0;
  right: 0;
  width: 84px;
  display: grid;
  justify-items: end;
  gap: 7px;
  z-index: 3;
}

.header-actions .bell-button {
  width: 44px;
  height: 44px;
}

.install-app-button {
  width: 84px;
  min-height: 36px;
  grid-template-columns: 14px minmax(0, auto);
  gap: 4px;
  padding: 0 7px;
  border-radius: 12px;
}

.install-app-button span {
  width: 14px;
  height: 14px;
  font-size: 11px;
}

.install-app-button strong {
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.location-access-note[hidden] {
  display: none !important;
}

@media (max-width: 390px) {
  .resident-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .profile-row {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 9px;
    padding-right: 82px;
  }

  .header-actions {
    width: 78px;
  }

  .install-app-button {
    width: 78px;
    min-height: 34px;
    padding: 0 6px;
  }

  .install-app-button strong {
    max-width: 43px;
    font-size: 10px;
  }
}
/* Feed avatars for posts and comments */
.feed-avatar.has-avatar,
.comment-avatar.has-avatar {
  overflow: hidden;
  background: #eaf1f8;
}

.feed-avatar img,
.comment-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.compact-comment-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.comment-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #c8d7e6, #9fb5ca);
  color: #ffffff;
  font-size: 10px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 4px 10px rgba(40, 64, 90, .14);
}

.comment-body {
  display: grid;
  min-width: 0;
  gap: 3px;
}
/* Announcement notification cards */
.notification-card {
  overflow: hidden;
  padding: 0;
}

.notification-image {
  width: 100%;
  aspect-ratio: 16 / 8;
  background-size: cover;
  background-position: center;
}

.notification-card-body {
  display: grid;
  gap: 7px;
  padding: 13px;
}

.notification-card-body h3,
.notification-detail-card h3 {
  margin: 0;
}

.notification-card-body p,
.notification-detail-card p,
.notification-detail-body {
  color: #465463;
  line-height: 1.45;
}

.notification-card-body small,
.notification-detail-card small {
  color: #7a8794;
  font-size: 12px;
}

.notification-priority {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eef7ff;
  color: #1768b8;
  font-size: 11px;
  font-weight: 900;
}

.notification-priority.important {
  background: #fff4e5;
  color: #d95d12;
}

.notification-priority.urgent {
  background: #ffeceb;
  color: #c92f24;
}

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notification-detail-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}

.notification-detail-card {
  display: grid;
  gap: 10px;
}

.feed-image-grid {
  display: grid;
  gap: 8px;
  margin: 10px 0 4px;
}
.feed-image-grid.single { grid-template-columns: 1fr; }
.feed-image-grid.multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feed-post-image,
.comment-image-thumb {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
}
.feed-post-image img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 10px;
}
.comment-image-thumb {
  display: block;
  width: 92px;
  height: 68px;
  margin-top: 6px;
}
.comment-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.reaction-button.active {
  background: #fff1f2;
  color: #e11d48;
  border-color: rgba(225, 29, 72, .22);
}
.post-compose-tools,
.comment-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.emoji-strip {
  display: flex;
  gap: 4px;
  align-items: center;
}
.emoji-button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}
.post-photo-button,
.comment-photo-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .08);
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}
.post-photo-button input,
.comment-photo-button input { display: none; }
.feed-media-preview { margin-top: 8px; }
.feed-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}
.feed-preview-item img {
  width: 72px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
}
.comment-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: 100%;
}
.comment-body { min-width: 0; }

/* Keep feed comment tools inside the mobile card. */
.compact-comment-form.comment-form {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.compact-comment-form .comment-input-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
}

.compact-comment-form .comment-input-row input {
  min-width: 0;
}

.compact-comment-form .comment-tools {
  width: 100%;
  max-width: 100%;
  justify-content: flex-start;
  overflow: hidden;
}

.compact-comment-form .emoji-strip {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.compact-comment-form .emoji-button,
.compact-comment-form .comment-photo-button {
  flex: 0 0 30px;
}

/* Show quick emojis as plain symbols, not orange action buttons. */
.compact-comment-form .emoji-button {
  min-height: 30px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-size: 21px;
  line-height: 1;
}

.compact-comment-form .emoji-button:hover,
.compact-comment-form .emoji-button:focus-visible {
  background: rgba(255, 245, 230, .72);
  box-shadow: none;
}

/* Compact quick emojis to match the comment field scale. */
.compact-comment-form .emoji-strip {
  gap: 7px;
}

.compact-comment-form .emoji-button {
  width: 24px;
  height: 24px;
  min-height: 24px;
  flex-basis: 24px;
  font-size: 17px;
}

.compact-comment-form .emoji-button:hover,
.compact-comment-form .emoji-button:focus-visible {
  background: transparent;
}

/* Multi-image resident post composer and in-app image viewer. */
.post-compose-preview {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.post-image-count {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.post-image-preview-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-image-preview-grid.count-1 {
  grid-template-columns: 1fr;
}

.post-image-preview-grid.count-3 .post-image-preview-item:first-child {
  grid-column: 1 / -1;
}

.post-image-preview-item {
  position: relative;
  margin: 0;
  min-width: 0;
  aspect-ratio: 1.25;
  border-radius: 12px;
  overflow: hidden;
  background: #eef4fb;
}

.post-image-preview-grid.count-1 .post-image-preview-item {
  aspect-ratio: 16 / 9;
}

.post-image-preview-button,
.comment-preview-image {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.post-image-preview-button img,
.comment-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 999px;
  background: rgba(15, 23, 42, .68);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .24);
}

.feed-image-grid.count-3 .feed-post-image:first-child {
  grid-column: 1 / -1;
}

.feed-image-grid.count-1 {
  grid-template-columns: 1fr;
}

.feed-image-grid.count-2,
.feed-image-grid.count-3,
.feed-image-grid.count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feed-image-grid.count-2 .feed-post-image,
.feed-image-grid.count-3 .feed-post-image,
.feed-image-grid.count-4 .feed-post-image {
  aspect-ratio: 1;
}

.feed-image-grid.count-3 .feed-post-image:first-child {
  aspect-ratio: 16 / 9;
}

.feed-image-grid .feed-post-image img {
  height: 100%;
}

.image-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .86);
  backdrop-filter: blur(8px);
}

.image-viewer-shell {
  position: relative;
  width: min(100%, 720px);
  height: min(86vh, 760px);
  display: grid;
  place-items: center;
}

.image-viewer-shell img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

.image-viewer-close,
.image-viewer-nav {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, .62);
  color: #fff;
  backdrop-filter: blur(8px);
}

.image-viewer-close {
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  font-size: 28px;
}

.image-viewer-nav {
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  font-size: 34px;
}

.image-viewer-nav.prev { left: 0; }
.image-viewer-nav.next { right: 0; }

.image-viewer-count {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .62);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

/* Community VIN group chat */
.community-zone-tabs button.active {
  background: linear-gradient(180deg, #ffad18, #ff6417);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 111, 17, .24);
}

.community-group-header {
  display: grid;
  gap: 5px;
}

.community-group-header span {
  color: #0ea5a4;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.community-group-header h3,
.community-group-header p,
.community-group-header small {
  margin: 0;
}

.community-group-header small {
  color: #64748b;
  line-height: 1.4;
}

.community-chat-list {
  display: grid;
  gap: 10px;
}

.community-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(226, 233, 242, .96);
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
}

.community-message-body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.community-message-body > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.community-message-body strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.community-message-body span {
  color: #94a3b8;
  font-size: 11px;
  white-space: nowrap;
}

.community-message-body p {
  margin: 0;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.community-connect-button {
  justify-self: start;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.community-message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(226, 233, 242, .96);
  border-radius: 16px;
  background: rgba(255,255,255,.96);
}

.community-message-form input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 12px;
  color: #0f172a;
}

.community-message-form button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffad18, #ff6417);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(255, 111, 17, .24);
}

.community-empty {
  text-align: left;
}

/* Community group completion: topics, reports, safe connects */
.community-topic-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.community-topic-strip button,
.community-topic-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eefdf8;
  color: #047857;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.community-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.community-report-button {
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(225, 29, 72, .12);
  border-radius: 999px;
  background: #fff7f7;
  color: #be123c;
  font-size: 11px;
  font-weight: 800;
}

.community-message-form {
  grid-template-columns: minmax(0, 105px) minmax(0, 1fr) 58px;
}

.community-message-form select {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 8px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 380px) {
  .community-message-form {
    grid-template-columns: 1fr 58px;
  }
  .community-message-form select {
    grid-column: 1 / -1;
  }
}

/* Community overview: VIN groups + resident feed */
.community-overview-card {
  display: grid;
  gap: 10px;
}

.community-overview-card h3,
.community-overview-card p {
  margin: 0;
}

.community-zone-grid {
  display: grid;
  gap: 8px;
}

.community-zone-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(14, 165, 164, .18);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fffc, #eefbf7);
  color: #12303a;
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.community-zone-card.is-home {
  border-color: rgba(255, 122, 24, .32);
  background: linear-gradient(180deg, #fffaf2, #f4fbff);
}

.community-zone-card span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #12c4a8, #0d8f78);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 10px 18px rgba(13, 143, 120, .2);
}

.community-zone-card.is-home span {
  background: linear-gradient(145deg, #ffb020, #ff6a18);
  box-shadow: 0 10px 18px rgba(255, 106, 24, .22);
}

.community-zone-card strong,
.community-zone-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-zone-card strong {
  font-size: 14px;
  font-weight: 950;
}

.community-zone-card small {
  grid-column: 2 / 3;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.community-zone-card em {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .82);
  color: #07906f;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.community-feed-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 2px 8px;
}

.community-feed-heading div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.community-feed-heading strong {
  color: #111827;
  font-size: 16px;
  font-weight: 950;
}

.community-feed-heading span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.community-feed-heading .secondary-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
}

.community-feed-list {
  padding-bottom: 10px;
}

@media (max-width: 380px) {
  .community-zone-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .community-zone-card em {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: stretch;
    text-align: center;
  }
}

.community-topic-strip button {
  border: 0;
  cursor: pointer;
}

.community-topic-strip button.active {
  background: linear-gradient(180deg, #12c4a8, #06856f);
  color: #fff;
  box-shadow: 0 8px 16px rgba(6, 133, 111, .2);
}


/* App dialog: custom report modal */
.app-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(6px);
}

.app-dialog {
  width: min(100%, 390px);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fff8f3);
  box-shadow: 0 26px 70px rgba(15, 23, 42, .28), 0 10px 24px rgba(255, 111, 17, .16);
  padding: 18px;
  color: #172033;
}

.app-dialog-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  margin-bottom: 10px;
  background: linear-gradient(145deg, #ffb020, #ff6417);
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 12px 22px rgba(255, 100, 23, .24);
}

.app-dialog h3 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0;
}

.app-dialog p {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.report-reason-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.report-reason-grid button {
  min-height: 34px;
  border: 1px solid #fee2d3;
  border-radius: 999px;
  background: #fff;
  color: #9a4a1d;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.report-reason-grid button.active {
  border-color: rgba(255, 100, 23, .44);
  background: linear-gradient(180deg, #fff4e7, #ffe6d3);
  color: #a33d10;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.report-dialog-form {
  display: grid;
  gap: 8px;
}

.report-dialog-form label {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.report-dialog-form textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid #ffd2b6;
  border-radius: 14px;
  background: #fff;
  padding: 11px 12px;
  color: #172033;
  font: inherit;
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .03);
}

.report-dialog-form textarea:focus {
  border-color: #ff7a18;
  box-shadow: 0 0 0 4px rgba(255, 122, 24, .14);
}

.report-dialog-status {
  min-height: 18px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.report-dialog-status.success { color: #047857; }
.report-dialog-status.error { color: #be123c; }

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.app-dialog-actions button {
  min-width: 86px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.dialog-cancel-button {
  background: #ffe9dc;
  color: #9a4a1d;
}

.dialog-submit-button {
  background: linear-gradient(180deg, #ffad18, #ff6417);
  color: #fff;
  box-shadow: 0 12px 22px rgba(255, 100, 23, .22);
}

.dialog-submit-button:disabled {
  opacity: .68;
  cursor: wait;
}

@media (max-width: 380px) {
  .app-dialog { padding: 16px; }
  .report-reason-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* PWA + responsive shell: keep the existing mobile layout, make it fit real devices. */
html {
  min-height: 100%;
  min-height: 100dvh;
  background: #eef1f6;
}

body {
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

.app-stage {
  min-height: 100dvh;
  padding: clamp(10px, 2.4vw, 22px);
}

.phone-app {
  width: min(100%, 430px);
  height: min(932px, calc(100dvh - clamp(20px, 4.8vw, 44px)));
  min-height: min(720px, 100dvh);
  contain: layout paint;
}

.app-scroll,
.screen-body {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.bottom-nav {
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}

.install-app-button.is-install-ready {
  box-shadow: 0 8px 18px rgba(255, 122, 18, .22), inset 0 1px 0 rgba(255,255,255,.8);
}

.install-help-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

@media (display-mode: standalone) {
  body { background: var(--app-bg); }
  .app-stage { display: block; padding: 0; }
  .phone-app {
    width: 100dvw;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .resident-header { padding-top: max(18px, env(safe-area-inset-top)); }
  .app-scroll { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .app-stage { display: block; padding: 0; }
  .phone-app {
    width: 100dvw;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .resident-header { padding-top: max(18px, env(safe-area-inset-top)); }
  .bottom-nav { min-height: calc(68px + env(safe-area-inset-bottom)); }
}

@media (min-width: 561px) and (max-height: 760px) {
  .phone-app { height: calc(100dvh - 20px); }
  .resident-header { min-height: 232px; padding-bottom: 122px; }
  .app-scroll { inset-block-start: 206px; }
}

@media (max-width: 340px) {
  .resident-name strong { font-size: 17px; }
  .resident-address { max-width: 150px; }
  .bottom-item { font-size: 10px; }
  .bottom-item span { width: 30px; height: 29px; font-size: 21px; }
}

/* Hide install CTA after this device has installed/opened the PWA. */
html.pwa-installed .install-app-button,
html.pwa-install-hidden .install-app-button,
.install-app-button[hidden] {
  display: none !important;
}

/* Platform install buttons: Android prompt + iPhone guide. */
.header-actions {
  gap: 5px;
}

.install-app-button.install-ios-button,
.install-app-button.install-android-button {
  width: 84px;
}

.install-ios-button {
  background: linear-gradient(180deg, #ffffff, #f2f6ff);
  color: #1656a8;
}

.ios-install-guide h3 {
  margin-bottom: 10px;
}

.ios-install-steps {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.ios-install-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid rgba(229, 235, 246, .95);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  padding: 10px;
}

.ios-install-steps span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff9d18, #ff6417);
  color: #fff;
  font-weight: 950;
}

.ios-install-steps p {
  margin: 0;
  line-height: 1.42;
}

.full-width {
  width: 100%;
}

@media (max-width: 390px) {
  .install-app-button.install-ios-button,
  .install-app-button.install-android-button {
    width: 78px;
  }
}

/* Desktop web app shell: sidebar + dashboard + utility panel. Mobile remains unchanged. */
.desktop-sidebar,
.desktop-utility,
.desktop-overview,
.desktop-module-grid {
  display: none;
}

@media (min-width: 1100px) {
  :root {
    --desktop-sidebar: 268px;
    --desktop-utility: 360px;
    --desktop-gap: 18px;
  }

  html,
  body {
    background: #edf2f6;
  }

  body {
    min-width: 1100px;
  }

  .app-stage {
    display: block;
    min-height: 100dvh;
    padding: 0;
    background:
      radial-gradient(circle at 18% 0%, rgba(255, 122, 18, .12), transparent 32%),
      radial-gradient(circle at 86% 4%, rgba(38, 134, 217, .14), transparent 30%),
      linear-gradient(180deg, #f7fafc 0%, #edf2f6 100%);
  }

  .phone-app {
    display: grid;
    grid-template-columns: var(--desktop-sidebar) minmax(0, 1fr) var(--desktop-utility);
    grid-template-rows: auto minmax(0, 1fr);
    gap: var(--desktop-gap);
    width: 100%;
    max-width: none;
    height: 100dvh;
    min-height: 760px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    contain: none;
    padding: 18px;
  }

  .desktop-sidebar,
  .desktop-utility {
    display: flex;
    min-height: 0;
  }

  .desktop-sidebar {
    grid-column: 1;
    grid-row: 1 / 3;
    flex-direction: column;
    gap: 16px;
    border: 1px solid rgba(218, 226, 234, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .86);
    padding: 18px;
    box-shadow: 0 24px 60px rgba(28, 39, 54, .08);
    backdrop-filter: blur(14px);
  }

  .desktop-brand {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 58px;
  }

  .desktop-brand > span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(145deg, #ff8f22, #ff5f18);
    color: #fff;
    font-weight: 950;
    box-shadow: 0 14px 28px rgba(255, 103, 22, .24);
  }

  .desktop-brand strong,
  .desktop-brand small,
  .desktop-sidebar-card span,
  .desktop-sidebar-card strong,
  .desktop-sidebar-card p,
  .desktop-kicker,
  .desktop-utility-head strong,
  .desktop-user-card strong,
  .desktop-user-card p {
    display: block;
  }

  .desktop-brand strong {
    font-size: 16px;
    line-height: 1.18;
  }

  .desktop-brand small,
  .desktop-kicker,
  .desktop-sidebar-card p,
  .desktop-user-card p {
    color: #6b7785;
    font-size: 12px;
    line-height: 1.45;
  }

  .desktop-menu {
    display: grid;
    gap: 6px;
  }

  .desktop-menu button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 44px;
    border-radius: 12px;
    background: transparent;
    color: #43505f;
    padding: 7px 10px;
    text-align: left;
    font-weight: 800;
  }

  .desktop-menu button span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: #f2f5f8;
    color: #ff6b18;
    font-size: 17px;
  }

  .desktop-menu button.active,
  .desktop-menu button:hover {
    background: #fff3ea;
    color: #121a24;
  }

  .desktop-menu button.active span,
  .desktop-menu button:hover span {
    background: linear-gradient(145deg, #ff9d24, #ff6417);
    color: #fff;
  }

  .desktop-sidebar-card,
  .desktop-utility-card,
  .desktop-overview article {
    border: 1px solid rgba(218, 226, 234, .95);
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 14px 34px rgba(28, 39, 54, .07);
  }

  .desktop-sidebar-card {
    margin-top: auto;
    padding: 16px;
    background:
      linear-gradient(145deg, rgba(255, 128, 31, .11), rgba(38, 134, 217, .08)),
      #fff;
  }

  .desktop-sidebar-card span {
    margin-bottom: 6px;
    color: #ff6b18;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
  }

  .desktop-sidebar-card strong {
    margin-bottom: 8px;
    font-size: 17px;
  }

  .desktop-sidebar-card button,
  .desktop-utility-head button,
  .desktop-zone-actions button {
    min-height: 34px;
    border-radius: 999px;
    background: #fff3ea;
    color: #ff6417;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 950;
  }

  .resident-header {
    grid-column: 2;
    grid-row: 1;
    min-height: 248px;
    border-radius: 22px;
    overflow: hidden;
    padding: 24px 26px 132px;
    box-shadow: 0 24px 60px rgba(24, 41, 61, .13);
  }

  .profile-row {
    grid-template-columns: 66px minmax(0, 1fr) auto;
    gap: 14px;
  }

  .avatar-button {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }

  .resident-name strong {
    max-width: 620px;
    font-size: clamp(26px, 2vw, 34px);
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .install-app-button.install-ios-button,
  .install-app-button.install-android-button {
    width: auto;
    min-width: 126px;
    height: 40px;
    border-radius: 999px;
    grid-auto-flow: column;
    grid-template-columns: 24px auto;
    padding: 0 12px;
  }

  .install-app-button strong {
    display: inline;
    font-size: 12px;
    white-space: nowrap;
  }

  .app-scroll {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 16px;
    min-height: 0;
    padding: 0 2px 18px;
    overflow-y: auto;
  }

  .location-switcher {
    position: relative;
    z-index: 4;
    width: min(620px, calc(100% - 44px));
    margin: -86px auto 0;
  }

  .location-access-note {
    margin-top: -4px;
  }

  .ai-search-card {
    padding: 14px;
  }

  .search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
  }

  .banner-rail {
    width: 100%;
  }

  .banner-card {
    min-height: 210px;
    border-radius: 18px;
    padding: 28px;
  }

  .banner-card strong {
    max-width: 720px;
    font-size: clamp(26px, 2.4vw, 38px);
  }

  .desktop-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .desktop-overview article {
    padding: 16px;
  }

  .desktop-overview span,
  .desktop-overview small {
    display: block;
    color: #6f7d89;
    font-size: 12px;
  }

  .desktop-overview strong {
    display: block;
    margin: 6px 0 2px;
    color: #111b27;
    font-size: 26px;
    line-height: 1;
  }

  .home-section {
    border-radius: 18px;
    padding: 18px;
  }

  .section-head h2 {
    font-size: 21px;
  }

  #moduleGrid {
    display: none;
  }

  .desktop-module-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(86px, 1fr));
    gap: 12px;
  }

  .desktop-module-grid .module-tile {
    min-height: 112px;
    border: 1px solid #edf1f5;
    border-radius: 16px;
    background: #fff;
    padding: 12px 8px;
  }

  .desktop-module-grid .module-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(28, 39, 54, .1);
  }

  .nearby-list,
  .feed-list {
    display: grid;
    gap: 12px;
  }

  .nearby-service-card {
    grid-template-columns: 54px minmax(0, 1fr) auto;
  }

  .desktop-utility {
    grid-column: 3;
    grid-row: 1 / 3;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
  }

  .desktop-utility-card {
    padding: 16px;
  }

  .desktop-utility-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .desktop-utility-head strong,
  .desktop-user-card strong {
    color: #121a24;
    font-size: 17px;
  }

  .desktop-zone-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }

  .desktop-zone-actions button.active {
    background: linear-gradient(145deg, #ff9d24, #ff6417);
    color: #fff;
  }

  .desktop-notification-list,
  .desktop-nearby-list,
  .desktop-feed-list {
    display: grid;
    gap: 10px;
  }

  .desktop-notification-item,
  .desktop-mini-item {
    display: grid;
    gap: 6px;
    border: 1px solid #edf1f5;
    border-radius: 14px;
    background: #fbfcfe;
    padding: 12px;
  }

  .desktop-notification-item strong,
  .desktop-mini-item strong {
    color: #152131;
    font-size: 14px;
    line-height: 1.25;
  }

  .desktop-notification-item p,
  .desktop-mini-item span,
  .desktop-mini-item p {
    margin: 0;
    color: #667482;
    font-size: 12px;
    line-height: 1.45;
  }

  .desktop-notification-item button,
  .desktop-mini-item button {
    justify-self: start;
    min-height: 30px;
    border-radius: 999px;
    background: #eef6ff;
    color: #226bad;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
  }

  .notification-badge {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    margin-left: 4px;
    border-radius: 999px;
    background: #ff6417;
    color: #fff;
    font-size: 10px;
  }

  .bottom-nav {
    display: none;
  }

  .screen-panel {
    position: fixed;
    inset: 24px 24px 24px calc(var(--desktop-sidebar) + 42px);
    z-index: 50;
    width: auto;
    max-width: none;
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .22);
  }

  .screen-body {
    padding: 18px;
  }
}

@media (min-width: 1440px) {
  .desktop-module-grid {
    grid-template-columns: repeat(8, minmax(92px, 1fr));
  }

  .phone-app {
    grid-template-columns: 286px minmax(0, 1fr) 390px;
  }
}

/* Desktop banner height fix: keep carousel in normal layout so following cards cannot cover it. */
@media (min-width: 1100px) {
  .banner-rail {
    display: block;
    width: 100%;
    min-height: calc(clamp(210px, 19vw, 300px) + 34px);
    margin: 0;
    padding: 0 0 22px;
    overflow: visible;
  }

  .banner-carousel {
    display: grid;
    min-height: calc(clamp(210px, 19vw, 300px) + 22px);
    gap: 10px;
    overflow: visible;
  }

  .banner-card {
    height: clamp(210px, 19vw, 300px);
    min-height: 0;
    aspect-ratio: auto;
  }
}

/* Desktop action panel visibility fix: active screens must stay in the viewport. */
@media (min-width: 1100px) {
  .screen-panel {
    transform: translateX(calc(100% + 48px));
    pointer-events: none;
  }

  .screen-panel.active {
    transform: none !important;
    pointer-events: auto;
  }
}

/* Desktop cleanup: hide summary stat cards under the banner. */
@media (min-width: 1100px) {
  .desktop-overview {
    display: none !important;
  }
}
