
:root {
  --theme: #621fd0;
  --theme-dark: #4d16a6;
  --secondary: #17b60f;
  --background: #f6f8f9;
  --white: #ffffff;
  --text: #494949;
  --grey: #9d9d9d;
  --light-grey: #bfbfbf;
  --border: #ececec;
  --danger: #c0392b;
  --shadow: 0 5px 10px 1px rgba(0,0,0,.09);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--background); color: var(--text); font-family: 'Lato', sans-serif; }
button, input, select, textarea { font-family: 'Lato', sans-serif; }
.hidden { display: none !important; }
.app-shell { max-width: 1180px; margin: 0 auto; position: relative; background: var(--background); }
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: var(--theme); color: var(--white);
  position: sticky; top: 0; z-index: 20; min-height: 52px;
}
.icon-btn, .ghost-btn {
  border: 0; background: transparent; color: var(--white); border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 20px;
}
.menu-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.22); z-index: 35;
}
.menu-trigger {
  width: 34px; min-width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; margin-left: 0; margin-right: 2px; line-height: 1; font-size: 22px;
}
.brand-block { min-width: 0; }
.brand-title-row { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.08); padding: 3px; }
.brand-title { font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 700; line-height: 1.1; }
.brand-sub { font-size: 11px; opacity: .9; }
.session-box { margin-left: auto; font-size: 12px; color: rgba(255,255,255,.92); }
.content { padding: 14px; }
.template-banner {
  position: relative;
  border-radius: 0;
  overflow: visible;
  min-height: 0;
  margin-bottom: 10px;
  box-shadow: none;
  background: transparent;
}
.banner-image,
.banner-overlay { display: none; }
.banner-content { position: relative; z-index: 1; color: var(--white); padding: 0; max-width: none; }
.template-banner h1 { margin: 0 0 6px; font-family: 'Montserrat', sans-serif; font-size: 21px; font-weight: 600; }
.template-banner p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.35; }
.banner-search {
  background: var(--white);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  min-height: 42px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.banner-search img { width: 16px; height: 16px; opacity: .65; }
.banner-search input { border: 0; outline: 0; padding: 0; background: transparent; color: var(--text); font-size: 14px; }
.home-menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.home-menu-item {
  background: var(--white); border: 0; border-radius: 5px; box-shadow: var(--shadow); color: var(--text); padding: 13px 5px 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 88px;
}
.home-menu-item img { width: 24px; max-width: 24px; }
.home-menu-item span { font-size: 12px; font-weight: 400; }

.home-shortcut-card { grid-column: 1 / -1; }
.home-main-head { align-items: center; }
.home-main-head h3 { margin-bottom: 0; }
.home-service-filters { margin-top: 10px; }
.sub-head { margin-top: 12px; }
#homeServicePanel .row-actions { margin-top: 8px; }
#homeServicePanel .section-action-btn { min-width: 130px; }
.card-grid { display: grid; gap: 12px; }
.two-up { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card, .item-row {
  background: var(--white); border: 0; border-radius: 5px; box-shadow: var(--shadow); padding: 14px;
}
.card h3 { margin: 0 0 12px; font-family: 'Montserrat', sans-serif; font-size: 17px; font-weight: 600; color: var(--text); }
.form-grid { display: grid; gap: 10px; }
input, select, textarea {
  width: 100%; border: 1px solid #dedede; border-radius: 4px; padding: 11px 12px; font-size: 14px; background: var(--white); color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--light-grey); }
button {
  width: 100%; border: 0; border-radius: 4px; padding: 11px 12px; background: var(--theme); color: var(--white); font-size: 15px; font-weight: 400; letter-spacing: .4px; cursor: pointer;
}
button:hover { background: var(--theme-dark); }
.inline-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.inline-check input { width: auto; }
.hint, .seed-box, .small { font-size: 12px; color: var(--grey); line-height: 1.45; }
.seed-box { margin-top: 12px; }
.template-tabbar {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; background: var(--white); border-radius: 5px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px;
}
.template-tabbar .tab {
  background: var(--white); color: var(--text); border-radius: 0; border-top: 3px solid transparent; border-right: 1px solid #f0f0f0; padding: 10px 6px 8px; font-size: 11px; text-transform: uppercase;
}
.template-tabbar .tab:last-child { border-right: 0; }
.template-tabbar .tab.active { border-top-color: var(--theme); background: #fff; color: var(--text); }
.list-stack { display: grid; gap: 10px; }
.item-row h4 { margin: 0 0 6px; font-size: 15px; font-family: 'Montserrat', sans-serif; }
.star-line { color: #ff9d00; font-size: 16px; margin: 5px 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.row-actions button, .status-btn {
  width: auto;
  min-width: 0;
  padding: 4px 2px;
  font-size: 12px;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  border: 0;
  letter-spacing: 0;
  font-weight: 400;
}
.row-actions button:hover, .status-btn:hover {
  background: transparent;
  color: var(--theme);
}
.action-lite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}
.status-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
}
.status-btn {
  text-transform: none;
}

.message-layout { align-items: start; }
.message-thread { min-height: 260px; max-height: 420px; overflow: auto; display: grid; gap: 8px; padding: 8px; background: #f9fafc; border: 1px solid var(--border); border-radius: 5px; }
.msg { padding: 10px 12px; border-radius: 10px; max-width: 80%; font-size: 14px; }
.msg.self { background: rgba(98,31,208,.12); margin-left: auto; }
.msg.other { background: var(--white); }
.msg-meta { display: block; color: var(--grey); font-size: 11px; margin-top: 4px; }
.message-form { display: grid; grid-template-columns: 120px 1fr 90px; gap: 8px; margin-top: 10px; }
.side-menu {
  position: fixed; top: 0; left: 0; bottom: 0; width: 258px; background: var(--white); box-shadow: 0 10px 30px rgba(0,0,0,.15); z-index: 40; padding: 12px;
}
.side-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.side-header h2 { font-family: 'Montserrat', sans-serif; font-size: 17px; margin: 0; color: var(--theme); }
.menu-group { display: grid; gap: 2px; }
.menu-group button {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  width: 100%;
  padding: 8px 2px;
  font-size: 12px;
  line-height: 1.2;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  justify-content: flex-start;
}
.menu-group button:hover { background: transparent; color: var(--theme); }
.danger-btn { background: var(--danger); margin-top: 10px; }
.alert { padding: 12px 14px; border-radius: 4px; margin-bottom: 10px; font-size: 14px; }
.alert.success { background: #e8fff0; color: #146c2e; border: 1px solid #b7efc6; }
.alert.error { background: #fff1f0; color: #8f1d14; border: 1px solid #f4c7c3; }
@media (max-width: 900px) {
  .template-tabbar { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 780px) {
  .home-menu-grid { grid-template-columns: repeat(3, 1fr); }
  .message-form { grid-template-columns: 1fr; }
  .template-banner { min-height: 0; }
  .template-banner h1 { font-size: 18px; }
  .content { padding: 12px; }
  .topbar { padding: 8px 10px 8px 6px; gap: 8px; }
  .menu-trigger { width: 32px; min-width: 32px; height: 32px; font-size: 21px; }
}



/* Bottom nav always visible */
.content { padding-bottom: 92px; }
.template-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 22;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  background: var(--white);
  box-shadow: 0 -4px 14px rgba(0,0,0,.08);
  border-top: 1px solid #ededed;
}
.template-bottom-nav .nav-item {
  background: var(--white);
  color: var(--text);
  border: 0;
  border-top: 2px solid transparent;
  border-right: 1px solid #f0f0f0;
  padding: 7px 2px 8px;
  min-height: 58px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 0;
}
.template-bottom-nav .nav-item:last-child { border-right: 0; }
.template-bottom-nav .nav-item.active { border-top-color: var(--theme); color: var(--theme); }
.nav-icon { font-size: 16px; line-height: 1; }
.nav-label { font-size: 10px; line-height: 1.1; text-transform: none; }

.menu-icon {
  width: 16px;
  min-width: 16px;
  text-align: center;
  font-size: 13px;
  line-height: 1;
  color: inherit;
}

@media (max-width: 780px) {
  .content { padding-bottom: 86px; }
  .template-bottom-nav .nav-item { min-height: 56px; padding-top: 6px; }
  .nav-label { font-size: 9px; }
}


.small { font-size: 12px; line-height: 1.35; }
.section-label { font-size: 12px; color: var(--grey); margin-top: 2px; }
.settings-note { background: #faf9fd; border: 1px solid var(--border); border-radius: 4px; padding: 10px 11px; display: grid; gap: 6px; }
.two-col-span { grid-column: 1 / -1; }
.inline-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.inline-check input { width: auto; margin: 0; }
.list-stack { display: grid; gap: 10px; }
.alert { border-radius: 4px; padding: 10px 12px; margin-bottom: 10px; box-shadow: var(--shadow); font-size: 13px; }
.alert.success { background: #eaf8e9; color: #216d1c; }
.alert.error { background: #fdecea; color: #8f2d23; }
.star-line { color: #f0b300; }
@media (max-width: 760px) {
  .two-col-span { grid-column: auto; }
}

#serviceCancelBtn{background:#fff;color:#621fd0;border:1px solid #621fd0;}


.convo-topline { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.convo-topline h4 { margin: 0; }
.convo-time { white-space: nowrap; text-align: right; }
.convo-subtitle { margin-top: 3px; }
.convo-preview { margin-top: 6px; }
#chatMeta { margin-bottom: 8px; }


.review-ready { color: #146c2e; margin-top: 6px; }
.review-done { color: var(--theme); margin-top: 6px; }


.listing-image-strip, .listing-photo-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.listing-image-strip img, .listing-photo-chip img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}
.listing-photo-chip {
  position: relative;
}
.listing-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  padding: 0;
}


.convo-topline { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.convo-topline-right { display:flex; align-items:center; gap:8px; }
.convo-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--theme);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.section-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom: 8px; }
.section-head h3 { margin: 0; }
.section-action-btn { width: auto; min-width: 140px; padding: 8px 12px; font-size: 12px; }
@media (max-width: 780px) {
  .section-head { align-items:flex-start; flex-direction:column; }
}


.verify-grid { display: grid; gap: 10px; }
.verify-box { border: 1px solid rgba(0,0,0,.08); border-radius: 12px; padding: 10px; }
.verification-status { margin-bottom: 6px; }


.readonly-context { display:grid; grid-template-columns:1fr; gap:10px; }
.readonly-box { border:1px solid rgba(0,0,0,.08); border-radius:12px; padding:10px 12px; background:#fafafa; }
@media (min-width: 700px) { .readonly-context { grid-template-columns:1fr 1fr; } }


.single-focus { grid-template-columns: minmax(0, 1fr); }
.single-focus .card:not(.hidden) { max-width: 100%; }
.page-note {
  margin: 6px 0 12px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  background: #faf9fd;
  border-radius: 4px;
  font-size: 12px;
  color: var(--grey);
  line-height: 1.45;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin: 0 0 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(98,31,208,.08);
  color: var(--theme);
  font-size: 11px;
  font-weight: 600;
}


.request-filters, .compact-filters { display:grid; grid-template-columns:1fr 1fr auto; gap:10px; align-items:end; margin:12px 0 14px; }
.ghost-inline{ background:transparent; border:1px solid #ddd; color:#54463b; padding:10px 12px; border-radius:12px; }
@media (max-width:700px){ .request-filters, .compact-filters{ grid-template-columns:1fr; } }

select { min-height: 42px; }


.home-emphasis-title { font-size: 1.35rem; line-height: 1.2; }
.home-need-help-copy { font-size: 0.95rem; }

.home-marketplace-copy { font-size: 0.95rem; }


.home-route { gap: 14px; }
.home-overview-card { grid-column: 1 / -1; padding: 16px 16px 14px; }
.home-overview-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.home-overview-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--theme); font-weight: 700; margin-bottom: 4px; }
.home-overview-title { margin: 0 0 8px; font-family: 'Montserrat', sans-serif; font-size: 18px; line-height: 1.2; }
.home-overview-copy { margin: 0; font-size: 13px; color: var(--text); line-height: 1.5; }
.home-overview-note { border: 1px solid var(--border); background: #faf9fd; border-radius: 4px; padding: 10px 11px; font-size: 12px; color: var(--grey); line-height: 1.45; }
.home-directory-card { grid-column: 1 / -1; }
.home-directory-copy, .home-service-copy, .home-marketplace-copy, .home-need-help-copy { margin: 0 0 8px; }
.home-shortcut-card { border-top: 2px solid rgba(98,31,208,.10); }
.home-main-head { margin-bottom: 6px; }
.home-main-head .section-action-btn { min-width: 150px; }
.home-shortcut-card .sub-head h4 { margin: 0; font-size: 13px; }
#route-home .list-stack { gap: 8px; }
@media (max-width: 820px) { .home-overview-grid { grid-template-columns: 1fr; } }

/* 2C-2: Make important action controls visible as real buttons without changing layout */
#serviceSubmitBtn,
#requestSubmitBtn {
  width: auto;
  min-width: 150px;
  padding: 10px 14px;
  border-radius: 7px;
  background: var(--theme);
  color: var(--white);
  border: 1px solid var(--theme);
  box-shadow: 0 4px 10px rgba(98,31,208,.18);
  font-weight: 600;
}

#serviceSubmitBtn:hover,
#requestSubmitBtn:hover {
  background: var(--theme-dark);
  color: var(--white);
}

.row-actions .claim-action-btn {
  width: auto;
  min-width: 126px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e9f8ec;
  color: #146c2e;
  border: 1px solid #b8ebc1;
  box-shadow: 0 4px 9px rgba(20,108,46,.10);
  font-weight: 600;
  justify-content: center;
}

.row-actions .claim-action-btn:hover {
  background: #d9f1df;
  color: #0f5724;
}

.row-actions .chat-action-btn {
  width: auto;
  min-width: 112px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2451a6;
  border: 1px solid #c8d9ff;
  box-shadow: 0 4px 9px rgba(36,81,166,.10);
  font-weight: 600;
  justify-content: center;
}

.row-actions .chat-action-btn:hover {
  background: #e0ebff;
  color: #1e4388;
}

.row-actions .approve-action-btn {
  width: auto;
  min-width: 132px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7e6;
  color: #8a5200;
  border: 1px solid #ffd98a;
  box-shadow: 0 4px 9px rgba(138,82,0,.10);
  font-weight: 600;
  justify-content: center;
}

.row-actions .approve-action-btn:hover {
  background: #ffefc7;
  color: #6b3f00;
}

.status-wrap .request-cancel-reason {
  width: auto;
  min-width: 180px;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #f2c3c3;
  background: #fff8f8;
  color: #7c2626;
  font-size: 12px;
}

.status-wrap .cancel-action-btn {
  background: #fff1f1;
  color: #a12a2a;
  border: 1px solid #f1b4b4;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
}

.status-wrap .cancel-action-btn:hover {
  background: #ffe3e3;
  color: #7d1c1c;
}

.message-notice-bar {
  border: 1px solid rgba(98, 31, 208, .22);
  background: rgba(98, 31, 208, .07);
  border-radius: 12px;
  padding: 10px;
  margin: 0 0 12px;
}
.message-notice-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--theme);
  margin-bottom: 8px;
}
.message-notice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.message-notice-item {
  width: auto;
  min-width: 180px;
  text-align: left;
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(98, 31, 208, .20);
  background: var(--white);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(16,24,40,.06);
}
.message-notice-item strong,
.message-notice-item span {
  display: block;
}
.message-notice-item span {
  color: var(--grey);
  font-size: 12px;
  margin-top: 2px;
}
.message-notice-item:hover {
  border-color: var(--theme);
  color: var(--theme);
}
.inline-unread {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--theme);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.has-unread {
  font-weight: 800 !important;
}
.request-message-from {
  display: inline-flex;
  align-items: center;
  color: var(--theme);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 0;
}

/* 2C-5: Compact mobile action buttons — styling only, no logic changes */
.row-actions {
  gap: 5px;
  margin-top: 8px;
}

.row-actions .action-lite,
.status-wrap .status-btn,
.row-actions .request-edit,
.row-actions .request-delete,
.row-actions .service-edit,
.row-actions .service-delete,
.row-actions .listing-edit,
.row-actions .listing-delete,
.row-actions .request-rate {
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.row-actions .request-edit,
.row-actions .service-edit,
.row-actions .listing-edit,
.row-actions .request-rate {
  background: #f4efff;
  color: var(--theme);
  border: 1px solid rgba(98,31,208,.22);
}

.row-actions .request-edit:hover,
.row-actions .service-edit:hover,
.row-actions .listing-edit:hover,
.row-actions .request-rate:hover {
  background: #ece3ff;
  color: var(--theme-dark);
}

.row-actions .request-delete,
.row-actions .service-delete,
.row-actions .listing-delete,
.status-wrap .cancel-action-btn {
  background: #fff1f1;
  color: #a12a2a;
  border: 1px solid #f1b4b4;
}

.row-actions .request-delete:hover,
.row-actions .service-delete:hover,
.row-actions .listing-delete:hover,
.status-wrap .cancel-action-btn:hover {
  background: #ffe3e3;
  color: #7d1c1c;
}

.row-actions .claim-action-btn,
.row-actions .approve-action-btn,
.status-wrap .green-action-btn {
  min-width: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e9f8ec;
  color: #146c2e;
  border: 1px solid #b8ebc1;
  box-shadow: none;
}

.row-actions .claim-action-btn:hover,
.row-actions .approve-action-btn:hover,
.status-wrap .green-action-btn:hover {
  background: #d9f1df;
  color: #0f5724;
}

.row-actions .chat-action-btn {
  min-width: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2451a6;
  border: 1px solid #c8d9ff;
  box-shadow: none;
}

.row-actions .chat-action-btn:hover {
  background: #e0ebff;
  color: #1e4388;
}

.status-wrap {
  gap: 5px;
  margin-top: 7px;
  align-items: center;
}

.status-wrap .request-cancel-reason {
  min-width: 0;
  width: auto;
  max-width: 180px;
  height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.provider-chat-actions {
  gap: 5px;
}

.request-message-from,
.inline-unread {
  font-size: 10px;
}

/* 2C-Final-B/C: ApisHub custom modal system for warnings, confirmations, and admin inputs. */
.app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(22, 20, 35, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 14px calc(28px + env(safe-area-inset-bottom));
}

.app-modal-card {
  width: min(92vw, 390px);
  max-height: calc(100vh - 44px - env(safe-area-inset-bottom));
  overflow-y: auto;
  position: relative;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(38, 28, 70, 0.28);
  border: 1px solid rgba(121, 87, 185, 0.18);
  padding: 18px 16px 14px;
  text-align: left;
}

.app-modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #ddd7e8;
  background: #f7f4fb;
  color: #5f5870;
  font-size: 18px;
  line-height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-modal-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0eafa;
  color: #6f42c1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 8px;
}

.app-modal-warning .app-modal-icon { background: #fff4de; color: #9a6500; }
.app-modal-danger .app-modal-icon { background: #ffe8e8; color: #a12a2a; }

.app-modal-card h3 {
  margin: 0 34px 8px 0;
  font-size: 18px;
  color: #2f2940;
}

.app-modal-message {
  color: #5b536b;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
}

.app-modal-input-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #4f4563;
  margin: 8px 0 5px;
}

.app-modal-input {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid #d7cfe6;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
}

.app-modal-input:focus {
  border-color: #8c65d3;
  box-shadow: 0 0 0 3px rgba(140, 101, 211, 0.13);
}

.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.app-modal-btn {
  min-width: 0;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  box-shadow: none;
}

.app-modal-confirm {
  background: #e9f8ec;
  color: #146c2e;
  border-color: #b8ebc1;
}

.app-modal-cancel {
  background: #f7f4fb;
  color: #5f5870;
  border-color: #ddd7e8;
}

.app-modal-danger .app-modal-confirm {
  background: #fff1f1;
  color: #a12a2a;
  border-color: #f1b4b4;
}

@media (max-width: 420px) {
  .app-modal-card { width: 94vw; padding: 16px 14px 13px; }
  .app-modal-actions { flex-wrap: wrap; }
  .app-modal-btn { padding: 7px 11px; }
}

/* 2C-Final-A: compact action polish and cancellation select height match. */
.status-wrap .request-cancel-reason {
  min-height: 28px !important;
  height: 28px;
  padding: 3px 8px;
  line-height: 1.15;
  flex: 0 1 auto;
}

#listingSubmitBtn,
#serviceSubmitBtn,
#requestSubmitBtn {
  width: auto;
  min-width: 0;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
}

#serviceCancelBtn,
#requestCancelBtn,
#listingCancelBtn {
  width: auto;
  min-width: 0;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.15;
  font-weight: 700;
  background: #fff1f1;
  color: #a12a2a;
  border: 1px solid #f1b4b4;
}

.row-actions .home-service-open,
.row-actions .home-need-help-open,
.row-actions .home-marketplace-open,
.row-actions .admin-email,
.row-actions .admin-pass,
.row-actions .admin-review,
.row-actions .admin-verify-email,
.row-actions .admin-verify-phone {
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  background: #f4efff;
  color: var(--theme);
  border: 1px solid rgba(98,31,208,.22);
}

.row-actions .home-service-request,
.row-actions .service-request,
.row-actions .home-need-help-create,
.row-actions .admin-block[data-block="false"] {
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  background: #e9f8ec;
  color: #146c2e;
  border: 1px solid #b8ebc1;
}

.row-actions .home-marketplace-chat,
.row-actions .listing-open-chat {
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  background: #eef4ff;
  color: #2451a6;
  border: 1px solid #c8d9ff;
}

.row-actions .admin-block[data-block="true"] {
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  background: #fff1f1;
  color: #a12a2a;
  border: 1px solid #f1b4b4;
}


/* 2D-A/2D-B: Advanced search panels — compact mobile-first filter UI */
.service-search-panel,
.request-search-panel,
.marketplace-search-panel {
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(98,31,208,.035);
}
.services-advanced-filters,
.requests-advanced-filters,
.marketplace-advanced-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 8px 0 8px;
}
.filter-check {
  min-height: 42px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.filter-count {
  align-self: center;
  color: var(--theme);
  font-weight: 700;
}
@media (max-width:700px){
  .services-advanced-filters, .requests-advanced-filters, .marketplace-advanced-filters { grid-template-columns: 1fr; }
}

/* 2D-A-2: Match text-style links and form save actions to compact ApisHub action-button theme. */
.ghost-inline,
.section-action-btn,
#openServiceFormBtn,
#openRequestFormBtn,
#openListingFormBtn,
#homeServiceToggleBtn,
#homeNeedHelpToggleBtn,
#homeMarketplaceToggleBtn,
#homeServiceApplyBtn,
#homeNeedHelpApplyBtn,
#homeMarketplaceApplyBtn,
#serviceFilterApplyBtn,
#requestsFilterClearBtn,
#serviceFilterClearBtn,
#homeServiceClearBtn,
#homeNeedHelpClearBtn,
#homeMarketplaceClearBtn,
#homeServiceOpenRouteBtn,
#homeNeedHelpOpenRouteBtn,
#homeMarketplaceOpenRouteBtn,
#homeNeedHelpCreateBtn,
#listingSubmitBtn,
#serviceSubmitBtn,
#requestSubmitBtn,
#listingCancelBtn,
#serviceCancelBtn,
#requestCancelBtn {
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

#listingSubmitBtn,
#serviceSubmitBtn,
#requestSubmitBtn,
.section-action-btn,
#openServiceFormBtn,
#openRequestFormBtn,
#openListingFormBtn,
#homeServiceToggleBtn,
#homeNeedHelpToggleBtn,
#homeMarketplaceToggleBtn,
#homeServiceApplyBtn,
#homeNeedHelpApplyBtn,
#homeMarketplaceApplyBtn,
#serviceFilterApplyBtn {
  background: #f4efff;
  color: var(--theme);
  border: 1px solid rgba(98,31,208,.22);
}

#listingSubmitBtn:hover,
#serviceSubmitBtn:hover,
#requestSubmitBtn:hover,
.section-action-btn:hover,
#openServiceFormBtn:hover,
#openRequestFormBtn:hover,
#openListingFormBtn:hover,
#homeServiceToggleBtn:hover,
#homeNeedHelpToggleBtn:hover,
#homeMarketplaceToggleBtn:hover,
#homeServiceApplyBtn:hover,
#homeNeedHelpApplyBtn:hover,
#homeMarketplaceApplyBtn:hover,
#serviceFilterApplyBtn:hover {
  background: #ece3ff;
  color: var(--theme-dark);
}

.ghost-inline,
#requestsFilterClearBtn,
#serviceFilterClearBtn,
#homeServiceClearBtn,
#homeNeedHelpClearBtn,
#homeMarketplaceClearBtn,
#homeServiceOpenRouteBtn,
#homeNeedHelpOpenRouteBtn,
#homeMarketplaceOpenRouteBtn {
  background: #fbf9ff;
  color: #5f5870;
  border: 1px solid #ddd7e8;
}

.ghost-inline:hover,
#requestsFilterClearBtn:hover,
#serviceFilterClearBtn:hover,
#homeServiceClearBtn:hover,
#homeNeedHelpClearBtn:hover,
#homeMarketplaceClearBtn:hover,
#homeServiceOpenRouteBtn:hover,
#homeNeedHelpOpenRouteBtn:hover,
#homeMarketplaceOpenRouteBtn:hover {
  background: #f2ecfb;
  color: var(--theme);
}

#homeNeedHelpCreateBtn {
  background: #e9f8ec;
  color: #146c2e;
  border: 1px solid #b8ebc1;
}

#homeNeedHelpCreateBtn:hover {
  background: #d9f1df;
  color: #0f5724;
}

.form-grid .row-actions {
  align-items: center;
}

/* 2D-A-3: Account/Profile/Login/Logout compact button theme polish. */
#registerForm button[type="submit"],
#loginForm button[type="submit"],
#profileForm button[type="submit"],
#settingsForm button[type="submit"],
#sendEmailCodeBtn,
#confirmEmailCodeBtn,
#sendPhoneCodeBtn,
#confirmPhoneCodeBtn,
#logoutBtn,
#messageForm button[type="submit"],
#reviewForm button[type="submit"] {
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

#registerForm button[type="submit"],
#profileForm button[type="submit"],
#settingsForm button[type="submit"],
#confirmEmailCodeBtn,
#confirmPhoneCodeBtn,
#reviewForm button[type="submit"] {
  background: #f4efff;
  color: var(--theme);
  border: 1px solid rgba(98,31,208,.22);
}

#registerForm button[type="submit"]:hover,
#profileForm button[type="submit"]:hover,
#settingsForm button[type="submit"]:hover,
#confirmEmailCodeBtn:hover,
#confirmPhoneCodeBtn:hover,
#reviewForm button[type="submit"]:hover {
  background: #ece3ff;
  color: var(--theme-dark);
}

#loginForm button[type="submit"],
#sendEmailCodeBtn,
#sendPhoneCodeBtn,
#messageForm button[type="submit"] {
  background: #e9f8ec;
  color: #146c2e;
  border: 1px solid #b8ebc1;
}

#loginForm button[type="submit"]:hover,
#sendEmailCodeBtn:hover,
#sendPhoneCodeBtn:hover,
#messageForm button[type="submit"]:hover {
  background: #d9f1df;
  color: #0f5724;
}

#logoutBtn {
  background: #fff1f1;
  color: #a12a2a;
  border: 1px solid #f1b4b4;
  margin-top: 10px;
}

#logoutBtn:hover {
  background: #ffe3e3;
  color: #7d1c1c;
}

#profileForm,
#settingsForm,
#registerForm,
#loginForm {
  align-items: start;
}

.verify-box .row-actions {
  align-items: center;
}


/* 2D-A-4: Top banner auth buttons and account button size correction. */
.top-auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}
.top-auth-btn,
#quickLoginForm button,
#registerForm button[type="submit"],
#logoutBtn {
  width: auto;
  min-width: 0;
  min-height: 28px;
  height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}
.top-login-btn,
.top-login-submit {
  background: #e9f8ec;
  color: #146c2e;
  border: 1px solid #b8ebc1;
}
.top-login-btn:hover,
.top-login-submit:hover {
  background: #d9f1df;
  color: #0f5724;
}
.top-logout-btn,
#logoutBtn {
  background: #fff1f1;
  color: #a12a2a;
  border: 1px solid #f1b4b4;
}
.top-logout-btn:hover,
#logoutBtn:hover {
  background: #ffe3e3;
  color: #7d1c1c;
}
.top-create-account-btn,
#registerForm button[type="submit"] {
  background: #f4efff;
  color: var(--theme);
  border: 1px solid rgba(98,31,208,.22);
}
.top-create-account-btn:hover,
#registerForm button[type="submit"]:hover {
  background: #ece3ff;
  color: var(--theme-dark);
}
#logoutBtn {
  margin-top: 10px;
}
.quick-login-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30,18,52,.48);
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 82px 14px 24px;
}
.quick-login-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  padding: 18px;
  border-top: 4px solid var(--theme);
}
.quick-login-card h3 {
  margin: 0 34px 8px 0;
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
}
.quick-login-card .app-modal-x {
  color: var(--theme);
  background: #f4efff;
}
.quick-login-actions {
  margin-top: 2px;
}
@media (max-width: 780px) {
  .session-box {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .top-auth-actions {
    gap: 4px;
  }
  .top-auth-btn {
    padding: 5px 8px;
  }
}


/* 2D-A-5: Local Feed and expanded top auth action. */
.top-feed-btn {
  background: #eef6ff;
  color: #185c9b;
  border: 1px solid #bddcff;
}
.top-feed-btn:hover {
  background: #deefff;
  color: #114a80;
}
.local-feed-route .page-note {
  margin-bottom: 12px;
}
.local-feed-form textarea {
  min-height: 92px;
}
.feed-login-hint {
  margin-top: 10px;
  padding: 9px 10px;
  background: #f8f5ff;
  border: 1px solid rgba(98,31,208,.14);
  border-radius: 8px;
}
.local-feed-list {
  margin-top: 8px;
}
.local-feed-post {
  border-left: 3px solid rgba(98,31,208,.22);
}
.feed-post-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.feed-post-topline h4 {
  margin-bottom: 0;
}
.feed-post-body {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
}
@media (max-width: 780px) {
  .top-feed-btn {
    padding: 5px 7px;
  }
}

/* 2D-C-2: Keep advanced search filters collapsed until user opens them. */
.collapsed-advanced-search {
  padding: 8px 10px;
}

.advanced-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.advanced-search-toggle {
  min-width: 130px;
}

.advanced-search-body {
  margin-top: 8px;
}

@media (max-width: 700px) {
  .advanced-search-head {
    align-items: stretch;
  }
  .advanced-search-toggle {
    width: auto;
    min-width: 130px;
  }
  .advanced-search-head .filter-count {
    padding-top: 8px;
  }
}

/* 2D-C-3: Marketplace buyer actions, watchlist counts, and seller approval flow. */
.marketplace-item-row .market-summary {
  margin-top: 4px;
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(98,31,208,.06);
  border: 1px solid rgba(98,31,208,.10);
}
.market-owner-requests {
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  background: #fbf9ff;
  border: 1px solid rgba(98,31,208,.14);
}
.market-owner-request {
  padding: 7px 0;
  border-top: 1px solid rgba(98,31,208,.10);
}
.market-owner-request:first-of-type {
  border-top: 0;
}
.market-owner-actions {
  margin-top: 6px;
}
.market-status-chip,
.market-status-main {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #eef7ef;
  border: 1px solid rgba(29,114,48,.18);
  color: #256b36;
}
.market-status-declined {
  background: #fff0f0;
  color: #a13b3b;
  border-color: rgba(161,59,59,.18);
}
.market-status-pending {
  background: #fff9e8;
  color: #816011;
  border-color: rgba(129,96,17,.18);
}
.listing-buy,
.listing-reserve,
.listing-offer,
.listing-watch,
.listing-action-approve {
  min-height: 30px;
}
.listing-action-decline {
  background: #fff0f0 !important;
  border-color: rgba(161,59,59,.18) !important;
  color: #9d3333 !important;
}
.listing-buy {
  background: #eef8ef !important;
  border-color: rgba(34,139,62,.18) !important;
  color: #256b36 !important;
}
.listing-reserve {
  background: #eef6ff !important;
  border-color: rgba(42,113,190,.18) !important;
  color: #245b92 !important;
}
.listing-offer {
  background: #f5efff !important;
  border-color: rgba(98,31,208,.18) !important;
  color: #5721a8 !important;
}
.listing-watch {
  background: #fff9e8 !important;
  border-color: rgba(129,96,17,.18) !important;
  color: #72540f !important;
}

/* 2D Local Feed moderation polish */
.row-actions .action-danger {
  background: #fff0f0 !important;
  border-color: rgba(161,59,59,.18) !important;
  color: #9d3333 !important;
}
.row-actions .action-warning {
  background: #fff9e8 !important;
  border-color: rgba(129,96,17,.18) !important;
  color: #816011 !important;
}
.row-actions .action-success {
  background: #e9f8ec !important;
  border-color: #b8ebc1 !important;
  color: #146c2e !important;
}
.feed-ad-chip {
  margin-left: 6px;
  margin-bottom: 0;
  background: #e9f8ec;
  border: 1px solid #b8ebc1;
  color: #146c2e;
}
.local-feed-search-panel {
  margin-bottom: 10px;
}


/* 2E-A / 2D-D-5: Notifications + online/local search polish. */
.top-notification-btn {
  background: #fff7d6;
  color: #7a5200;
  border-color: rgba(122, 82, 0, .22);
  min-width: 44px;
}
.top-notification-btn.has-unread {
  background: #ffe59c;
  box-shadow: 0 4px 12px rgba(122,82,0,.16);
}
.nav-badge {
  position: absolute;
  top: 5px;
  right: 12px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  line-height: 17px;
  font-weight: 700;
}
.template-bottom-nav .nav-item { position: relative; }
.notification-row { border-left: 4px solid rgba(98,31,208,.18); }
.notification-row.is-unread { background: #fbf8ff; border-left-color: var(--theme); }
.notification-topline { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.notification-topline h4 { margin:0; }
.notification-body { margin-top: 6px; font-size: 13px; color: var(--text); }
@media (max-width: 520px) {
  .top-notification-btn { min-width: 38px; padding-left: 8px; padding-right: 8px; }
}


/* 2E: Notification polish */
.section-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.section-action-btn.danger-light {
  background: #fff0f0;
  color: #9b1c1c;
  border-color: rgba(155, 28, 28, .18);
}
.notification-label-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.notification-type-chip {
  background: #f2ecff;
  color: var(--theme);
  border-color: rgba(98,31,208,.16);
}
.notification-actions {
  margin-top: 8px;
}
.notification-actions .action-lite {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}
.notification-target-highlight {
  outline: 2px solid rgba(98,31,208,.28);
  box-shadow: 0 0 0 5px rgba(98,31,208,.08);
  transition: box-shadow .2s ease, outline .2s ease;
}
@media (max-width: 520px) {
  .section-head-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .notification-topline {
    flex-direction: column;
    gap: 4px;
  }
}

/* 2F: Marketplace final logic polish. */
.market-buyer-status,
.market-schedule-details {
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(48, 127, 218, .06);
  border: 1px solid rgba(48, 127, 218, .12);
}
.market-buyer-action {
  padding: 7px 0;
  border-top: 1px solid rgba(48, 127, 218, .10);
}
.market-buyer-action:first-of-type {
  border-top: 0;
}
.market-schedule-details {
  background: rgba(29,114,48,.05);
  border-color: rgba(29,114,48,.13);
}
.market-status-sold,
.market-status-declined {
  background: #fff0f0;
  color: #a13b3b;
  border-color: rgba(161,59,59,.18);
}
.market-status-pending,
.market-status-pending-pickup,
.market-status-pending-shipping {
  background: #fff9e8;
  color: #816011;
  border-color: rgba(129,96,17,.18);
}
.market-status-available,
.market-status-approved,
.market-status-reserved,
.market-status-completed {
  background: #eef7ef;
  color: #256b36;
  border-color: rgba(29,114,48,.18);
}
.marketplace-schedule-modal .app-modal-input {
  margin-bottom: 8px;
}
.marketplace-schedule-note {
  min-height: 74px;
  resize: vertical;
}
.listing-status-sold,
.listing-status-available {
  min-height: 30px;
}
.listing-status-sold {
  background: #eef7ef !important;
  border-color: rgba(29,114,48,.18) !important;
  color: #256b36 !important;
}


/* 2G: Local Feed final polish. */
.feed-market-chip {
  margin-left: 6px;
  margin-bottom: 0;
  background: #eef5ff;
  border: 1px solid #c8ddff;
  color: #174f9a;
}
.feed-link-chip,
.feed-reviewed-chip,
.feed-open-report-chip,
.feed-flagged-chip {
  margin-left: 6px;
  margin-bottom: 0;
}
.feed-link-chip {
  background: #f8f5ff;
  border: 1px solid rgba(98,31,208,.18);
  color: #4d2191;
}
.feed-reviewed-chip {
  background: #eef8f0;
  border-color: #c9e9cf;
  color: #217035;
}
.feed-open-report-chip {
  background: #fff7d8;
  border-color: #f0d678;
  color: #6a4a00;
}
.feed-flagged-chip {
  background: #ffe8e8;
  border-color: #ffb8b8;
  color: #9d1f1f;
}
.feed-related-link {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.feed-comments-box {
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(98,31,208,.1);
  border-radius: 10px;
  background: #fbfaff;
}
.feed-comment {
  padding: 7px 0;
  border-top: 1px solid rgba(98,31,208,.08);
}
.feed-comment:first-of-type {
  border-top: 0;
}
.feed-comment-body {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.feed-comment-form {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.feed-comment-form input {
  flex: 1;
  min-width: 0;
}
@media (max-width: 780px) {
  .feed-comment-form {
    flex-direction: column;
    align-items: stretch;
  }
}


/* 2H Services / Requests final review polish */
.empty-state {
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 5px;
  background: #faf9fd;
}
.request-summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0 6px;
}
.request-status-chip {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(98,31,208,.08);
  color: var(--theme);
  font-size: 11px;
  font-weight: 600;
}
.request-status-open { background: rgba(20,145,92,.10); color: #127345; }
.request-status-under-discussion,
.request-status-accepted,
.request-status-in-progress { background: rgba(33,119,215,.10); color: #1f5c9e; }
.request-status-completed { background: rgba(20,145,92,.12); color: #127345; }
.request-status-canceled { background: rgba(218,56,56,.10); color: #a62828; }

/* 2I: production hardening. Keep approved template UI, but protect mobile safe areas and long errors. */
html {
  min-height: 100%;
}
body {
  min-height: 100%;
  padding-bottom: env(safe-area-inset-bottom);
}
#alerts .alert {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.app-modal-card,
.quick-login-card {
  overscroll-behavior: contain;
}
.template-bottom-nav {
  padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width: 420px) {
  .topbar {
    flex-wrap: wrap;
  }
  .session-box {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .top-auth-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .row-actions {
    row-gap: 5px;
  }
}

/* 2I-1: Account page only — match Logout button dimensions to Save settings. */
#route-account #logoutBtn {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 11px 12px;
  border-radius: 999px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}

/* Assigned job notification: responsive for Android WebView and web browsers. */
.assigned-job-notice-item {
  border-left: 4px solid var(--theme);
}
.assigned-job-modal {
  width: min(560px, calc(100vw - 28px));
  max-height: min(82vh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.assigned-job-modal-status {
  display: flex;
  justify-content: center;
  margin: 2px 0 10px;
}
.assigned-job-modal-message {
  text-align: left;
  line-height: 1.55;
}
.assigned-job-description {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.1);
  white-space: pre-wrap;
}
.assigned-job-modal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.assigned-job-modal-actions .app-modal-btn {
  width: 100%;
  min-width: 0;
  white-space: normal;
}
@media (max-width: 620px) {
  .assigned-job-modal {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 28px);
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .assigned-job-modal-actions {
    grid-template-columns: 1fr;
  }
}

/* Version 1 v4: responsive admin management console */
.admin-chat-thread summary {
  cursor: pointer;
  padding: 4px 0;
  overflow-wrap: anywhere;
}
.admin-chat-messages {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.admin-chat-message {
  border: 1px solid var(--line, #d8dee8);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-soft, #f7f9fc);
  overflow-wrap: anywhere;
}
.admin-chat-message button {
  margin-top: 8px;
}
#route-admin .row-actions {
  flex-wrap: wrap;
}
#route-admin .item-row {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  #route-admin.card-grid.two-up {
    grid-template-columns: minmax(0, 1fr);
  }
  #route-admin .two-col-span {
    grid-column: auto;
  }
  #route-admin .row-actions > button {
    flex: 1 1 140px;
    min-height: 42px;
  }
  .admin-chat-thread summary .small {
    display: block;
    margin-top: 4px;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  #route-admin .card {
    scroll-margin-top: 12px;
  }
  .admin-chat-messages {
    max-height: 58vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* v8: Account actions and role-owned activity management. */
#route-account #settingsForm button[type="submit"],
#route-account #logoutBtn {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
#route-account #logoutBtn { margin-top: 12px; }
.manage-activity-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}
.manage-summary-chip {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
  background: #faf9fd;
  text-align: center;
  display: grid;
  gap: 2px;
}
.manage-summary-chip strong { font-size: 18px; color: var(--theme); }
.manage-summary-chip span { font-size: 11px; color: var(--grey); }
.manage-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.manage-activity-section {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.manage-activity-section .section-head { margin-bottom: 8px; }
.manage-activity-section .section-head h4 { margin: 0; font-size: 14px; }
.manage-contacts-section { grid-column: 1 / -1; }
.manage-activity-item { box-shadow: none; border: 1px solid #ececec; padding: 11px; }
.manage-activity-description {
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
@media (max-width: 780px) {
  .manage-activity-grid { grid-template-columns: 1fr; }
  .manage-contacts-section { grid-column: auto; }
  .manage-activity-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .manage-activity-section { padding: 10px; }
  .manage-activity-section .section-head { align-items: flex-start; gap: 8px; }
  .manage-activity-section .section-head .section-action-btn { width: auto; max-width: 52%; white-space: normal; }
}

/* v9: Full Help Needed workflow controls inside Account > Manage My Activity */
.manage-provider-conversations {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border, #e5e7eb);
}
.manage-provider-conversation-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.manage-status-wrap {
  margin-top: 10px;
}
@media (max-width: 640px) {
  .manage-provider-conversation-row,
  .manage-status-wrap {
    align-items: stretch;
  }
  .manage-provider-conversation-row button,
  .manage-status-wrap button,
  .manage-status-wrap select {
    width: 100%;
    max-width: 100%;
  }
}

/* v10 Account Status visual alignment */
.account-status-panel {
  display: grid;
  gap: 12px;
}
.account-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.account-status-item,
.account-status-group {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #faf9fd;
  padding: 11px 12px;
  min-width: 0;
}
.account-status-item {
  display: grid;
  gap: 4px;
}
.account-status-label {
  color: var(--grey);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.account-status-value {
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}
.account-status-break {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.account-status-group {
  display: grid;
  gap: 8px;
}
.account-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.account-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
}
.account-status-chip.is-on {
  border-color: rgba(23,182,15,.28);
  background: rgba(23,182,15,.08);
  color: #23751e;
}
.account-status-chip.is-off {
  color: var(--grey);
  background: #f4f4f4;
}
.account-status-chip.role-chip {
  border-color: rgba(98,31,208,.2);
  background: rgba(98,31,208,.07);
  color: var(--theme);
}
.account-status-rating > div {
  font-size: 13px;
  line-height: 1.4;
}
.account-status-note {
  margin: 0;
  padding: 9px 11px;
  border-left: 3px solid var(--theme);
  background: rgba(98,31,208,.05);
  color: var(--grey);
  font-size: 12px;
  line-height: 1.45;
}
@media (max-width: 620px) {
  .account-status-grid { grid-template-columns: 1fr; }
  .account-status-item,
  .account-status-group { padding: 10px 11px; }
}


/* v11: Back navigation, bottom Account access, and honest language availability. */
.topbar-nav-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.back-trigger { font-size: 21px; font-weight: 700; line-height: 1; }
.language-setting-label { font-size: 12px; font-weight: 700; color: var(--grey); margin-bottom: -3px; }
.language-coming-note { background: #faf9fd; border: 1px solid var(--border); border-radius: 4px; padding: 9px 10px; color: var(--grey); }
#profileLanguage option:disabled { color: #999; }
@media (max-width: 420px) {
  .template-bottom-nav .nav-item { padding-left: 1px; padding-right: 1px; }
  .template-bottom-nav .nav-label { font-size: 8px; }
  .template-bottom-nav .nav-icon { font-size: 15px; }
  .topbar-nav-actions { gap: 2px; }
}

/* v12: Account activity sections as compact expandable menu rows. */
.manage-activity-menu {
  display: grid;
  gap: 8px;
}
.manage-activity-menu .manage-activity-section {
  padding: 0;
  overflow: hidden;
  background: var(--surface, #fff);
}
.manage-activity-menu-row {
  min-height: 48px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #25212d);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.manage-activity-menu-row::-webkit-details-marker { display: none; }
.manage-activity-menu-row::marker { content: ''; }
.manage-activity-menu-row:hover { background: #faf9fd; }
.manage-activity-menu-row:focus-visible {
  outline: 2px solid var(--theme);
  outline-offset: -2px;
}
.manage-menu-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.manage-menu-count {
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0ecf7;
  color: var(--theme);
  font-size: 11px;
  font-weight: 800;
}
.manage-menu-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
  color: var(--grey);
}
.manage-activity-section[open] > .manage-activity-menu-row {
  background: #faf9fd;
  border-bottom: 1px solid var(--border);
}
.manage-activity-section[open] .manage-menu-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}
.manage-activity-panel {
  padding: 12px;
}
.manage-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.manage-panel-actions .section-action-btn {
  width: auto;
  min-height: 36px;
}
@media (max-width: 520px) {
  .manage-activity-menu-row { min-height: 46px; padding: 11px 12px; }
  .manage-activity-panel { padding: 10px; }
  .manage-panel-actions .section-action-btn { width: 100%; }
}


/* Server UI update: password visibility and header-matched bottom navigation. */
.password-field {
  position: relative;
  width: 100%;
}
.password-field input {
  width: 100%;
  padding-right: 62px;
}
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 48px;
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--theme);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.template-bottom-nav {
  background: var(--theme);
  border-top-color: var(--theme-dark);
  padding-top: 2px;
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}
.template-bottom-nav .nav-item {
  background: var(--theme);
  color: var(--white);
  border-right-color: rgba(255,255,255,.16);
  border-top-color: transparent;
  min-height: 50px;
  padding: 8px 2px 3px;
  justify-content: flex-end;
}
.template-bottom-nav .nav-item.active {
  background: var(--theme-dark);
  border-top-color: rgba(255,255,255,.9);
  color: var(--white);
}
.template-bottom-nav .nav-item:hover,
.template-bottom-nav .nav-item:focus-visible {
  background: var(--theme-dark);
  color: var(--white);
}


/* Mobile/WebView header and bottom navigation alignment. */
@media (max-width: 600px) {
  .topbar {
    min-height: 50px;
    flex-wrap: nowrap;
    gap: 5px;
    padding: 6px 6px 6px 4px;
  }
  .topbar-nav-actions {
    gap: 1px;
    flex: 0 0 auto;
  }
  .menu-trigger,
  .back-trigger {
    width: 30px;
    min-width: 30px;
    height: 32px;
    padding: 0;
  }
  .brand-block {
    flex: 0 1 auto;
    min-width: 0;
  }
  .brand-title-row { gap: 5px; }
  .brand-logo {
    width: 29px;
    height: 29px;
    padding: 2px;
  }
  .brand-title {
    font-size: 15px;
    white-space: nowrap;
  }
  .session-box {
    margin-left: auto;
    max-width: 76px;
    padding: 0 2px;
    font-size: 10px;
    font-weight: 700;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .session-box:empty { display: none; }
  .top-auth-actions {
    margin-left: 0;
    gap: 3px;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }
  .top-auth-btn {
    min-height: 27px;
    height: 27px;
    margin: 0;
    padding: 4px 7px;
    font-size: 10px;
    white-space: nowrap;
  }
  .top-notification-btn {
    min-width: 34px;
    padding-left: 6px;
    padding-right: 6px;
  }
  .content { padding-bottom: 68px; }
  .template-bottom-nav {
    min-height: 47px;
    padding-top: 0;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }
  .template-bottom-nav .nav-item {
    min-height: 47px;
    padding: 4px 1px 1px;
    gap: 1px;
    justify-content: flex-end;
  }
  .template-bottom-nav .nav-icon {
    font-size: 15px;
    line-height: 1;
  }
  .template-bottom-nav .nav-label {
    font-size: 8px;
    line-height: 1;
    margin-bottom: 1px;
  }
}

/* Mobile: raise bottom navigation controls for easier viewing and tapping. */
@media (max-width: 600px) {
  .template-bottom-nav .nav-item {
    transform: translateY(-5px);
  }
}


/* Header Create menu */
.top-create-btn {
  border: 1px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.14);
  color: #fff;
  border-radius: 9px;
  padding: 7px 12px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.top-create-btn:hover,
.top-create-btn:focus-visible { background: rgba(255,255,255,.25); }
.brand-title-row { gap: 10px; }

.create-menu-modal { max-width: 470px; }
.create-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}
.create-menu-option {
  min-height: 88px;
  border: 1px solid #d9d7f0;
  border-radius: 12px;
  background: #f8f7ff;
  color: #2d2455;
  padding: 13px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.create-menu-option:hover,
.create-menu-option:focus-visible {
  border-color: #6c57b7;
  background: #eeeaff;
}
.create-menu-option strong { font-size: 15px; }
.create-menu-option span { font-size: 12px; color: #5f5a73; }

@media (max-width: 680px) {
  .brand-title-row { gap: 6px; }
  .brand-title { font-size: 17px; }
  .top-create-btn { padding: 6px 8px; font-size: 12px; border-radius: 8px; }
  .create-menu-grid { grid-template-columns: 1fr; }
  .create-menu-option { min-height: 66px; }
}


/* Homepage search navigation: large, unmistakable action buttons. */
#route-home .home-search-navigation {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
#route-home .home-search-navigation .section-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  padding: 16px 22px;
  border: 3px solid var(--theme-dark);
  border-radius: 12px;
  background: var(--theme);
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .25px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 5px 12px rgba(0,0,0,.24);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
#route-home .home-search-navigation .section-action-btn:hover,
#route-home .home-search-navigation .section-action-btn:focus-visible {
  background: var(--theme-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 7px 16px rgba(0,0,0,.28);
}
#route-home .home-search-navigation .section-action-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0,0,0,.22);
}
@media (max-width: 760px) {
  #route-home .home-search-navigation {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #route-home .home-search-navigation .section-action-btn {
    min-height: 58px;
    font-size: 17px;
  }
}

/* Compact expandable cards: Services, Need Help, and Marketplace */
.compact-expand-card {
  padding: 0;
  overflow: hidden;
}

.compact-card-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.compact-card-toggle:hover,
.compact-card-toggle:focus-visible {
  background: rgba(45, 122, 90, 0.08);
  outline: none;
}

.compact-card-title {
  grid-column: 1;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.compact-card-meta {
  grid-column: 1;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.82;
}

.compact-card-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.compact-expand-card.is-expanded .compact-card-arrow {
  transform: rotate(180deg);
}

.compact-card-details {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(127, 127, 127, 0.2);
}

.compact-card-details > :first-child {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .compact-card-toggle {
    padding: 13px 14px;
  }
  .compact-card-title {
    font-size: 15px;
  }
  .compact-card-details {
    padding: 0 14px 14px;
  }
}
