:root {
  color-scheme: light;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  --app-bg: #f4f6f8;
  --surface: #ffffff;
  --surface-strong: #eef5f2;
  --ink: #1a2328;
  --muted: #6b7a82;
  --border: #e2e8ec;
  --green: #0d6e5c;
  --green-light: #e8f5f1;
  --blue: #2563eb;
  --amber: #d97706;
  --coral: #dc4f3f;
  --teal: #0d9488;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(15, 35, 45, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 35, 45, 0.12);
  --nav-h: 64px;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--app-bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
}

.approval-pending-banner:not([hidden]) {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 12px 10px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  background: #fffbeb;
  color: #92400e;
}

.approval-pending-copy strong {
  display: block;
  margin-bottom: 4px;
}

.approval-pending-copy p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.brand-mark,
.contact-initial,
.service-icon,
.post-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  font-weight: 800;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), #14a085);
  font-size: 0.85rem;
}

.brand-greeting {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.settings-nav-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--green);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.settings-nav-btn svg {
  width: 20px;
  height: 20px;
}

.admin-dash-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
}

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

.promo-btn {
  min-height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
}

.settings-profile-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(23, 107, 91, 0.08), rgba(20, 160, 133, 0.06));
  cursor: pointer;
  text-align: left;
}

.settings-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-light);
  color: var(--green);
  font-weight: 800;
  flex-shrink: 0;
}

.settings-profile-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.settings-profile-copy strong {
  font-size: 1rem;
}

.settings-profile-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

.settings-chevron {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.settings-list {
  display: grid;
  gap: 8px;
}

.settings-row {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 750;
  cursor: pointer;
}

.item-admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.event-card,
.update-item {
  position: relative;
}

.modal-post {
  display: flex;
  flex-direction: column;
  max-height: 94dvh;
}

.post-modal-category-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fff7ed 0%, var(--app-bg) 100%);
  border-bottom: 1px solid var(--border);
}

.category-field {
  display: grid;
  gap: 6px;
}

.field-label-text em {
  color: #c2410c;
  font-style: normal;
  font-weight: 700;
}

.modal-body-post {
  overflow: auto;
}

.edit-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.compact-edit-list {
  display: grid;
  gap: 0;
  margin-bottom: 12px;
}

.admin-only-section.visible .metric-row {
  display: grid;
}

.avatar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--green-light);
  background: var(--green-light);
  color: var(--green);
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
}

.page-header {
  margin-bottom: 4px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.install-btn,
.icon-btn,
.primary-btn,
.secondary-btn,
.mini-btn,
.nav-btn,
.chip,
.text-btn {
  min-height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
}

.install-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--green);
  border: 1px solid var(--border);
}

.install-btn {
  flex-shrink: 0;
  min-width: 42px;
  height: 42px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.install-btn[hidden] {
  display: none !important;
}

.install-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 380px) {
  .install-btn span {
    display: none;
  }

  .install-btn {
    width: 42px;
    padding: 0;
  }
}

.icon-btn {
  width: 42px;
  padding: 0;
}

.content {
  flex: 1;
  padding: 16px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 20px;
}

.hero-block,
.market-header {
  display: grid;
  gap: 10px;
}

.market-header {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.12;
}

h1 {
  font-size: 1.9rem;
}

h2 {
  font-size: 1.18rem;
}

.hero-copy,
.empty-state p,
.detail-copy {
  margin: 0;
  color: var(--muted);
}

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

.metric-card,
.contact-card,
.service-card,
.update-item,
.event-card,
.post-card,
.fund-card,
.discussion-card,
.compact-item,
.nearby-card,
.business-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  min-width: 0;
  padding: 12px 8px;
  text-align: center;
  box-shadow: none;
  background: var(--surface);
}

.metric-icon {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.metric-card strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
}

.metric-card span:last-child {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.section-block {
  display: grid;
  gap: 12px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.small-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-grid,
.service-grid,
.update-list,
.event-list,
.post-grid,
.discussion-list,
.compact-list,
.nearby-list {
  display: grid;
  gap: 12px;
}

.contact-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.contact-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.contact-initial {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--blue);
}

.contact-card:nth-child(2) .contact-initial {
  background: var(--coral);
}

.contact-card:nth-child(3) .contact-initial {
  background: var(--green);
}

.contact-card:nth-child(4) .contact-initial {
  background: var(--amber);
  color: #3a2b00;
}

.contact-title,
.service-title,
.post-title,
.discussion-title,
.compact-title,
.nearby-title {
  margin: 0;
  font-weight: 800;
}

.contact-meta,
.service-copy,
.update-copy,
.event-meta,
.post-desc,
.post-meta,
.discussion-copy,
.discussion-meta,
.compact-meta,
.nearby-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.button-row,
.contact-actions,
.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.primary-btn,
.secondary-btn,
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  text-decoration: none;
}

.primary-btn {
  background: linear-gradient(135deg, var(--green), #14a085);
  color: #ffffff;
  border-radius: var(--radius-sm);
  border: none;
}

.secondary-btn,
.mini-btn {
  background: #ffffff;
  color: var(--green);
  border: 1px solid var(--border);
}

.mini-btn {
  min-height: 38px;
  font-size: 0.9rem;
}

.wide {
  width: 100%;
}

.update-item,
.event-card,
.service-card,
.post-card,
.fund-card,
.discussion-card {
  padding: 14px;
}

.update-item {
  display: grid;
  grid-template-columns: 4px 1fr;
  gap: 12px;
}

.update-line {
  width: 4px;
  border-radius: 8px;
  background: var(--amber);
}

.update-item:nth-child(2) .update-line {
  background: var(--blue);
}

.update-item:nth-child(3) .update-line {
  background: var(--coral);
}

.update-title,
.event-title {
  margin: 0;
  font-weight: 800;
}

.update-time {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}

.service-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.service-icon,
.post-symbol {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--green);
  font-size: 0.86rem;
}

.service-card:nth-child(2) .service-icon {
  background: var(--blue);
}

.service-card:nth-child(3) .service-icon {
  background: var(--amber);
  color: #3a2b00;
}

.service-card:nth-child(4) .service-icon {
  background: var(--coral);
}

.service-card:nth-child(5) .service-icon {
  background: var(--blue);
}

.service-card:nth-child(6) .service-icon {
  background: var(--amber);
  color: #3a2b00;
}

.service-card:nth-child(7) .service-icon {
  background: var(--green);
}

.nearby-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.nearby-title {
  margin: 0;
}

.route-chip,
.post-policy {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 800;
}

.business-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.business-rule {
  display: grid;
  gap: 2px;
}

.business-rule span {
  color: var(--muted);
  font-size: 0.9rem;
}

.business-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.business-metrics div {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.business-metrics strong,
.business-metrics span {
  display: block;
}

.business-metrics span {
  color: var(--muted);
  font-size: 0.76rem;
}

.fund-card {
  display: grid;
  gap: 12px;
}

.compact-list {
  gap: 8px;
}

.compact-item {
  padding: 10px 12px;
  background: #ffffff;
}

.discussion-card {
  display: grid;
  gap: 4px;
}

.discussion-card-clickable {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.discussion-card-clickable:hover,
.discussion-card-clickable:focus-visible {
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(23, 107, 91, 0.08);
}

.discussion-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.discussion-reply-pill {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--green);
  background: rgba(23, 107, 91, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

.thread-modal-body {
  display: grid;
  gap: 12px;
}

.thread-post {
  margin: 0;
}

.thread-replies-title {
  margin: 0;
  font-size: 0.95rem;
}

.thread-reply-count {
  color: var(--muted);
  font-weight: 700;
}

.thread-replies {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.thread-reply-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafafa;
  display: grid;
  gap: 4px;
}

.thread-reply-copy {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.section-search-field {
  margin: 0 0 10px;
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.quick-filter-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
}

.quick-filter-chip.active {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
}

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

.directory-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.directory-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.directory-initial {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.directory-copy {
  min-width: 0;
}

.directory-name {
  margin: 0;
  font-weight: 800;
}

.directory-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.directory-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.directory-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--green);
  background: rgba(23, 107, 91, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

.discussion-meta,
.compact-meta {
  font-size: 0.82rem;
}

.event-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
}

.event-date {
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--green);
  padding: 9px 8px;
  text-align: center;
  font-weight: 800;
}

.event-date span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.search-row {
  display: grid;
  gap: 10px;
}

.search-field {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
}

.search-field input,
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  outline: 0;
}

.search-field input {
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

input,
select {
  min-height: 46px;
  padding: 0 12px;
}

textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.search-field:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.12);
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.market-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.category-filter-field,
.nearby-filter-field {
  flex: 1 1 auto;
  min-width: 0;
}

.category-filter-field select,
.nearby-filter-field select {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 10px 12px;
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.promo-outline-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.collapse-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.collapse-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.collapse-trigger-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.collapse-trigger .section-title {
  margin: 0;
}

.collapse-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 0.2s ease;
  transform: rotate(-90deg);
}

.collapse-section.is-open .collapse-chevron {
  transform: rotate(0deg);
}

.collapse-panel {
  padding: 0 16px 16px;
}

.collapse-panel[hidden] {
  display: none !important;
}

.settings-row-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}

.settings-row-copy small {
  color: var(--muted);
  font-weight: 600;
}

.admin-metrics-bar {
  margin-bottom: 12px;
}

.event-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.event-pay-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.visitor-host-hint {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  font-size: 0.88rem;
}

.gate-host-preview {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
}

.gate-host-found {
  background: var(--green-light);
  color: var(--green-dark);
}

.gate-host-missing {
  background: #fee2e2;
  color: #991b1b;
}

.visitor-card-actions {
  margin-top: 10px;
}

.event-pay-fields {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--green-light);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--muted);
  border: 1px solid var(--border);
}

.chip.active {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
}

.market-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}

.text-btn {
  min-height: 34px;
  padding: 0 8px;
  background: transparent;
  color: var(--green);
}

.post-card {
  display: grid;
  gap: 12px;
}

.post-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.post-card.service .post-symbol {
  background: var(--blue);
}

.post-card.grocery .post-symbol {
  background: var(--amber);
  color: #3a2b00;
}

.post-card.paint .post-symbol {
  background: #e6a83d;
  color: white;
}

.post-card.civil .post-symbol {
  background: #8b6f47;
  color: white;
}

.post-card.repairs .post-symbol {
  background: #c17d3e;
  color: white;
}

.post-card.car_service .post-symbol,
.post-card.car_wash .post-symbol {
  background: #e74c3c;
  color: white;
}

.post-card.shifting .post-symbol {
  background: #3498db;
  color: white;
}

.post-card.insurance .post-symbol {
  background: #2ecc71;
  color: white;
}

.post-card.legal .post-symbol {
  background: #34495e;
  color: white;
}

.post-card.trusted .post-symbol {
  background: #f39c12;
  color: white;
  font-weight: 900;
  border: 2px solid #d68910;
}

.post-card.maintenance .post-symbol {
  background: #16a085;
  color: white;
}

.post-card.interior .post-symbol,
.post-card.home_decor .post-symbol {
  background: #6d5dfc;
}

.post-card.interior .post-symbol,
.post-card.home_decor .post-symbol {
  background: #6d5dfc;
}

.post-card.plumber .post-symbol,
.post-card.electrician .post-symbol,
.post-card.home_service .post-symbol {
  background: var(--blue);
}

.post-card.maid .post-symbol,
.post-card.beauty .post-symbol,
.post-card.salon .post-symbol,
.post-card.mehandi .post-symbol,
.post-card.event_makeup .post-symbol {
  background: #b35486;
}

.post-card.carpool .post-symbol {
  background: var(--green);
}

.post-card.cloud_kitchen .post-symbol,
.post-card.home_tiffin .post-symbol,
.post-card.catering .post-symbol {
  background: var(--coral);
}

.post-card.tailoring .post-symbol {
  background: #7c5cbf;
}

.post-card.tuition .post-symbol,
.post-card.dance_music .post-symbol {
  background: var(--green);
}

.post-card.promotion .post-symbol {
  background: #202a2d;
}

.post-policy:empty {
  display: none;
}

.post-card.need .post-symbol {
  background: var(--amber);
  color: #3a2b00;
}

.post-card.rent .post-symbol,
.post-card.rent_flat .post-symbol {
  background: var(--coral);
}

.post-card.sell_flat .post-symbol,
.post-card.sell .post-symbol {
  background: #dbeafe;
  color: #1d4ed8;
}

.post-card.buy_flat .post-symbol,
.post-card.need .post-symbol {
  background: #fef3c7;
  color: #92400e;
}

.flat-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.flat-listing-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: start;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.flat-listing-card:active {
  transform: scale(0.99);
}

.flat-listing-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.flat-badge-sell {
  background: #dbeafe;
  color: #1d4ed8;
}

.flat-badge-rent {
  background: #fee2e2;
  color: #b91c1c;
}

.flat-badge-buy {
  background: #fef3c7;
  color: #92400e;
}

.flat-listing-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.flat-listing-title {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.flat-listing-price {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--green);
}

.flat-listing-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.flat-listing-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flat-post-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.bazaar-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.bazaar-listing-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px 12px;
  align-items: start;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.bazaar-listing-card:active {
  transform: scale(0.99);
}

.bazaar-listing-media {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f3f4f6;
}

.bazaar-listing-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bazaar-listing-symbol {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: var(--coral);
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.bazaar-listing-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.bazaar-listing-badge {
  display: inline-flex;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: #ecfdf5;
  color: #047857;
}

.bazaar-listing-title {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.bazaar-listing-price {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--green);
}

.bazaar-listing-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.bazaar-listing-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-bazaar-gallery {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.post-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.post-gallery-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.post-gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-gallery-tile .image-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
}

.detail-gallery-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.detail-gallery-item {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.detail-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.detail-gallery-item figcaption {
  padding: 6px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.flat-view-all-btn {
  display: block;
  margin-top: 10px;
  text-align: left;
}

.post-card.job .post-symbol {
  background: #5b5f97;
}

.post-card.free .post-symbol {
  background: var(--green);
}

.post-price {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
}

.empty-state {
  padding: 26px 16px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  text-align: center;
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 30;
  width: min(100%, 560px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 52px;
  padding: 4px 2px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.nav-btn svg {
  width: 22px;
  height: 22px;
}

.nav-btn.active {
  background: var(--green-light);
  color: var(--green);
}

.nav-btn.active svg {
  stroke: var(--green);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 0 0;
  background: rgba(22, 25, 24, 0.42);
}

.overlay.open {
  display: flex;
}

.settings-overlay {
  z-index: 80;
}

body.sheet-open,
body.panel-open {
  overflow: hidden;
}

.modal {
  width: min(100%, 560px);
  max-height: 92dvh;
  overflow: auto;
  border-radius: 12px 12px 0 0;
  background: var(--app-bg);
  box-shadow: var(--shadow);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: rgba(247, 244, 238, 0.96);
  border-bottom: 1px solid var(--border);
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
}

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

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 750;
}

.detail-list dd {
  margin: 0;
  font-weight: 800;
}

.link-btn {
  flex: 1 1 130px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));
  z-index: 300;
  display: none;
  width: min(calc(100% - 32px), 460px);
  transform: translateX(-50%);
  border-radius: 8px;
  background: #202a2d;
  color: #ffffff;
  padding: 13px 16px;
  box-shadow: var(--shadow);
  text-align: center;
}

.toast.show {
  display: block;
}

/* Admin Panel Styles */
.fab {
  position: fixed;
  right: max(16px, calc(50% - 260px));
  bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  z-index: 25;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #14a085);
  color: #fff;
  box-shadow: 0 6px 20px rgba(13, 110, 92, 0.4);
  display: grid;
  place-items: center;
  cursor: pointer;
  border: none;
}

.fab[hidden] {
  display: none !important;
}

.fab svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.quick-action:active {
  transform: scale(0.96);
}

.quick-action-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.quick-action-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.quick-action-green { border-color: #b8e6d8; background: #f0faf6; }
.quick-action-blue { border-color: #bfdbfe; background: #eff6ff; }
.quick-action-coral { border-color: #fecaca; background: #fef2f2; }
.quick-action-amber { border-color: #fde68a; background: #fffbeb; }
.quick-action-teal { border-color: #99f6e4; background: #f0fdfa; }
.quick-action-purple { border-color: #ddd6fe; background: #f5f3ff; }

.contact-grid-compact .contact-card {
  padding: 12px;
}

.contact-grid-compact .contact-meta {
  font-size: 0.82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-sm {
  min-height: 36px !important;
  padding: 0 12px !important;
  font-size: 0.85rem !important;
}

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.install-hint-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eff6ff, #f0faf6);
  border: 1px solid var(--border);
}

.install-hint-card strong {
  display: block;
  margin-bottom: 4px;
}

.install-hint-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.sheet {
  position: relative;
  flex-shrink: 0;
  width: min(100%, 560px);
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 70vh;
  overflow-y: auto;
  animation: sheet-slide-up 0.28s ease;
}

@keyframes sheet-slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.sheet-menu {
  max-height: none;
}

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

.sheet-panel-head .close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  color: var(--muted);
}

.sheet-menu-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.settings-menu-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.settings-row-danger strong {
  color: #c0392b;
}

.sheet-profile-panel {
  max-height: 88dvh;
}

.sheet-profile-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sheet-profile-head .sheet-section-title {
  margin: 0;
  flex: 1;
}

.sheet-back {
  padding: 4px 0;
  font-weight: 700;
}

.collapse-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  margin: 0 auto 16px;
}

.sheet-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.sheet-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
}

.sheet-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.sheet-section-title {
  margin: 4px 0 10px;
  font-size: 0.95rem;
  font-weight: 800;
}

.settings-list-in-sheet {
  margin-top: 16px;
}

.settings-list-in-sheet .install-hint-card {
  margin-top: 8px;
}

.profile-edit-form {
  margin: 0 0 16px;
}

.profile-edit-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-edit-form input,
.profile-edit-form select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}

.profile-edit-form .hint-text {
  margin: 0 0 10px;
  font-size: 0.78rem;
}

.profile-edit-form .auth-error {
  margin-bottom: 10px;
}

.profile-edit-form .auth-error.auth-success {
  color: var(--green);
  background: var(--green-light);
  border-color: #b8e6d8;
}

.danger-text {
  color: #c0392b;
}

.admin-post-status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.sheet-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.sheet-btn.danger {
  color: #c0392b;
  border-color: #fecaca;
  background: #fef2f2;
}

.sheet-close {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
}

.admin-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.admin-badge[hidden] {
  display: none !important;
}

.admin-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.admin-toggle[hidden] {
  display: none !important;
}

.admin-toggle.logged-in {
  background: var(--green-light);
  color: var(--green);
  border-color: #b8e6d8;
}

.admin-toggle svg {
  width: 20px;
  height: 20px;
}

.slide-panel,
.admin-panel {
  position: fixed;
  right: -400px;
  top: 0;
  width: min(100%, 380px);
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
  z-index: 85;
  transition: right 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.slide-panel.open,
.admin-panel.open {
  right: 0;
}

.slide-panel-header,
.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-strong);
  position: sticky;
  top: 0;
  z-index: 2;
}

.slide-panel-header h2,
.admin-panel-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.slide-panel-header .close-btn,
.admin-panel-header .close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  color: var(--muted);
}

.slide-panel-body {
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  flex: 1;
}

.profile-panel .sheet-profile {
  margin-bottom: 16px;
}

.profile-panel .profile-edit-form {
  margin-bottom: 12px;
}

.settings-panel .settings-menu-list {
  margin: 0;
}

.login-section {
  padding: 20px;
}

.login-section h3 {
  margin-top: 0;
  color: var(--green);
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--ink);
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
}

.form-group input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 91, 0.1);
}

.hint-text {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
}

.admin-panel {
  font-size: 0.9rem;
}

.admin-panel-header h2 {
  font-size: 1.05rem;
  font-weight: 800;
}

.admin-dashboard {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.admin-actions {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-section {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.admin-section h3,
.admin-panel .section-header h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--green);
}

.admin-panel .hint-text {
  font-size: 0.76rem;
  line-height: 1.45;
  margin: 0 0 8px;
}

.admin-panel .admin-metrics-bar {
  margin-bottom: 10px;
}

.admin-panel .metric-row {
  gap: 6px;
}

.admin-panel .metric-card {
  padding: 8px 4px;
}

.admin-panel .metric-icon {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.admin-panel .metric-card strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.admin-panel .metric-card span:last-child {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
}

.admin-panel .secondary-btn,
.admin-panel .primary-btn {
  min-height: 36px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 10px;
}

.admin-panel .admin-content-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.admin-panel .compact-item {
  padding: 8px 10px;
  font-size: 0.82rem;
}

.admin-panel .compact-item strong {
  font-size: 0.86rem;
}

.admin-panel .pending-post-card {
  padding: 10px;
  font-size: 0.82rem;
}

.admin-panel .post-approval-header strong {
  font-size: 0.86rem;
}

.admin-panel .post-approval-details {
  font-size: 0.78rem;
}

.admin-panel .commissions-table {
  font-size: 0.76rem;
}

.admin-panel .commissions-table th,
.admin-panel .commissions-table td {
  padding: 8px 5px;
}

.admin-panel .login-section {
  padding: 14px 16px;
}

.admin-panel .login-section h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.admin-panel .form-group label {
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.admin-panel .form-group input {
  padding: 8px 10px;
  font-size: 0.88rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.section-header h3 {
  margin: 0;
  flex: 1;
}

.pending-posts-list {
  display: grid;
  gap: 12px;
}

.pending-post-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--app-bg);
}

.post-approval-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.post-approval-header strong {
  flex: 1;
  font-size: 0.95rem;
  color: var(--ink);
}

.post-category-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface-strong);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.post-approval-details {
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.post-approval-details p {
  margin: 4px 0;
  color: var(--muted);
}

.post-approval-details p:first-child {
  color: var(--ink);
  font-weight: 600;
}

.post-price-info {
  color: var(--green);
  font-weight: 600;
}

.fee-paid-info {
  color: var(--green-dark);
  font-weight: 700;
}

.fee-unpaid-info {
  color: #b45309;
  font-weight: 700;
}

.promotion-fee-notice {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.promotion-fee-notice p {
  margin: 0;
}

.promotion-fee-notice p + p {
  margin-top: 6px;
}

.detail-lead-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

.detail-lead-message {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.detail-lead-message textarea {
  resize: vertical;
  min-height: 64px;
}

.lead-action-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.leads-table td {
  vertical-align: middle;
}

.commission-info {
  background: rgba(23, 107, 91, 0.08);
  padding: 6px 8px;
  border-radius: 4px;
  color: var(--green);
  font-weight: 600;
}

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

.approval-actions button {
  font-size: 0.85rem;
  padding: 8px 12px;
}

.approval-actions button:nth-child(3) {
  grid-column: 1 / -1;
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 12px;
}

.commissions-table {
  width: 100%;
  font-size: 0.85rem;
  border-collapse: collapse;
}

.commissions-table thead {
  background: var(--surface-strong);
  border-bottom: 2px solid var(--border);
}

.commissions-table th {
  padding: 10px 6px;
  text-align: left;
  font-weight: 600;
  color: var(--green);
}

.commissions-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

.commissions-table tbody tr:hover {
  background: var(--app-bg);
}

.wide {
  width: 100%;
}

/* Admin-only content */
.admin-only-section {
  display: none;
}

.admin-only-section.visible {
  display: block;
}

/* Auth gate */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(15, 35, 45, 0.5);
  overflow-y: auto;
}

.auth-gate[hidden] {
  display: none !important;
}

.auth-card {
  width: min(100%, 480px);
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-height: 96dvh;
  overflow-y: auto;
}

.auth-hero {
  padding: 32px 24px 24px;
  background: linear-gradient(160deg, var(--green) 0%, #14a085 100%);
  color: #fff;
  text-align: center;
}

.auth-hero .auth-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

.auth-body {
  padding: 20px 24px calc(24px + env(safe-area-inset-bottom));
}

.auth-logo {
  margin: 0 auto 12px;
  background: rgba(255, 255, 255, 0.2) !important;
}

.auth-title {
  text-align: center;
  font-size: 1.35rem;
  margin: 0 0 6px;
  color: #fff;
}

.auth-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.auth-error {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.auth-success {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #047857 !important;
}

.auth-error[hidden] {
  display: none !important;
}

.auth-hint {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.auth-form-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
}

.auth-link-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
  padding: 8px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tab {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--app-bg);
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.auth-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-form input,
.auth-form select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}

.password-field {
  position: relative;
  display: block;
  margin-top: 4px;
}

.password-field input {
  width: 100%;
  margin-top: 0;
  padding-right: 44px;
}

/* Hide browser built-in reveal (Edge/Chrome) — we provide our own toggle */
.password-field input[type="password"]::-ms-reveal,
.password-field input[type="password"]::-ms-clear {
  display: none;
}

.password-field input[type="password"]::-webkit-credentials-auto-fill-button,
.password-field input[type="password"]::-webkit-strong-password-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
  width: 0;
  height: 0;
}

.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.password-toggle:hover {
  color: var(--green);
  background: var(--green-light);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  grid-area: 1 / 1;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.visible .icon-eye {
  display: none;
}

.password-toggle.visible .icon-eye-off {
  display: block;
}

.form-group .password-field {
  margin-top: 6px;
}

.pending-approval {
  text-align: center;
  padding: 20px 0 8px;
}

.pending-approval[hidden] {
  display: none !important;
}

.pending-approval h2 {
  font-size: 1.15rem;
  margin: 8px 0;
}

.pending-approval p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.pending-icon {
  font-size: 2.5rem;
}

.pending-approval.rejected .pending-icon {
  color: #c0392b;
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.badge-count:empty {
  display: none;
}

.profile-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 1rem;
  cursor: pointer;
}

.app-shell.locked {
  display: none;
}

@media (min-width: 520px) {
  .contact-grid,
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 1.62rem;
  }

  .metric-row {
    grid-template-columns: repeat(4, minmax(88px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .market-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

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

/* Hood-style marketplace & optional listing photos */
.hood-panel {
  padding: 16px;
  border-radius: calc(var(--radius) + 2px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.market-hero {
  margin-bottom: 12px;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green) 0%, #12856f 55%, #0d9488 100%);
  color: #fff;
}

.market-hero .page-title,
.market-hero .page-subtitle {
  color: #fff;
}

.market-hero .page-subtitle {
  opacity: 0.92;
}

.listing-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.listing-rail-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.listing-rail-card {
  flex: 0 0 168px;
  scroll-snap-align: start;
  display: grid;
  gap: 8px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
}

.listing-rail-copy {
  padding: 0 10px 10px;
}

.listing-rail-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-rail-price {
  margin: 4px 0 0;
  color: var(--green);
  font-weight: 800;
  font-size: 0.86rem;
}

.listing-rail-meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

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

.post-card.hood-listing {
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.post-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, var(--green-light), #dbeafe);
  overflow: hidden;
}

.post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-media-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 900;
  color: rgba(13, 110, 92, 0.35);
}

.post-cat-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-body {
  padding: 10px 12px 0;
}

.post-card.hood-listing .post-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card.hood-listing .post-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card.hood-listing .post-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.post-card.hood-listing .post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 12px;
}

.post-card.hood-listing .post-price {
  color: var(--green);
  font-weight: 800;
  font-size: 0.88rem;
}

.post-image-picker {
  margin-top: 10px;
}

.image-upload-btn {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.image-upload-btn em {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

.image-upload-icon {
  font-size: 1.1rem;
}

.post-image-preview {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.post-image-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.image-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.detail-body {
  padding-top: 0;
}

.detail-image-wrap {
  margin: -16px -16px 12px;
  max-height: 280px;
  overflow: hidden;
  background: var(--green-light);
}

.detail-image-wrap img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.post-media.rail {
  aspect-ratio: 16 / 11;
  border-radius: var(--radius) var(--radius) 0 0;
}

.service-card-list {
  display: grid;
  gap: 10px;
}

.service-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.service-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.status-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--green);
}

.status-pill.status-pending {
  background: #fef3c7;
  color: #b45309;
}

.status-pill.status-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.service-card-meta,
.service-card-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.subsection-title {
  margin: 16px 0 8px;
  font-size: 0.92rem;
  font-weight: 800;
}

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

.amenity-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fff, var(--green-light));
  text-align: left;
  cursor: pointer;
}

.amenity-icon {
  font-size: 1.6rem;
}

.amenity-hours {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
