/* NearBridge design tokens and components.
   Colours come from the final logo (Founder-approved, 2026-10-29): brand blue #0070FC + navy #02163A.
   Full scales and usage rules: BRAND_GUIDE.md. Change colours here (tokens), never in components. */

/* ---------- Fonts: Mukta Vaani (Gujarati) + Mukta (Devanagari, Latin), OFL, self-hosted ---------- */
@font-face { font-family: "NB Sans"; src: url(/static/fonts/mukta-vaani-gujarati-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839; }
@font-face { font-family: "NB Sans"; src: url(/static/fonts/mukta-vaani-gujarati-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0A80-0AFF, U+200C-200D, U+20B9, U+25CC, U+A830-A839; }
@font-face { font-family: "NB Sans"; src: url(/static/fonts/mukta-devanagari-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "NB Sans"; src: url(/static/fonts/mukta-devanagari-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "NB Sans"; src: url(/static/fonts/mukta-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "NB Sans"; src: url(/static/fonts/mukta-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens. Light mode only at launch. Ratios are against white. ---------- */
:root {
  /* Brand scales (tints of the logo colours; 500 = the logo itself). */
  --blue-50: #F0F6FF;  --blue-100: #DBEBFF; --blue-200: #B8D7FE; --blue-300: #85BAFE; --blue-400: #4295FD;
  --blue-500: #0070FC; /* logo blue, 4.45:1 — fills, icons, large text only */
  --blue-600: #0061DC; /* 5.6:1 */ --blue-700: #0151B9; /* 7.3:1 */ --blue-800: #013D90; --blue-900: #022B68;
  --navy-50: #F0F1F3;  --navy-100: #DCDEE3; --navy-200: #B8BEC8; --navy-300: #868FA0; --navy-400: #44536D;
  --navy-500: #02163A; /* logo navy, 17.8:1 */

  /* Roles (components use only these). */
  --ink: var(--navy-500);
  --ink-muted: var(--navy-400);   /* 7.8:1 — no pale grey text anywhere */
  --page: #FFFFFF;
  --page-alt: #F4F7FC;            /* wells, hover, search field */
  --shadow-lg: 0 10px 28px rgba(2, 22, 58, .12);
  --max: 1200px;
  --surface: #FFFFFF;
  --border: #DCE3EE;
  --brand: var(--blue-500);       /* logo colour: icons, active marks, focus */
  --primary: var(--blue-600);     /* buttons with white text */
  --primary-dark: var(--blue-700);/* links and blue text */
  --primary-tint: var(--blue-50);
  --strong: var(--navy-500);      /* navy fills: proof stamp, dark bands */
  --success: #0B7A41;             /* "verified" ticks, 5.4:1 */
  --success-tint: #E7F5EE;
  --sos: #C81E1E;                 /* reserved for emergency only */
  --sos-tint: #FDECEC;

  --font: "NB Sans", "Noto Sans Gujarati", "Noto Sans Devanagari", system-ui, sans-serif;
  --text-base: 16px;
  --leading: 1.5;
  --radius: 14px;
  --tap: 48px;
  --tap-primary: 56px;
}
/* Gujarati and Devanagari need larger size and more line-height (tall matras). */
html[lang="gu"], html[lang="hi"] { --text-base: 17px; --leading: 1.65; }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: var(--text-base); line-height: var(--leading);
}
body.has-bottom-nav { padding-bottom: 80px; }
a { color: var(--primary-dark); }
h1, h2 { line-height: 1.3; font-weight: 600; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: middle; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px 16px; }
@media (min-width: 1024px) { .container { padding: 0 24px 24px; } }
.page-title { font-size: 1.5rem; margin: 4px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title { font-size: 1.15rem; margin: 24px 0 10px; }

/* ---------- Header: one row on desktop; logo + actions, then search, on phones ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); box-shadow: 0 1px 0 var(--border); }
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 8px 16px 10px;
  display: grid; align-items: center; gap: 8px 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand loc actions" "search search search";
}
.brand { grid-area: brand; display: flex; align-items: center; min-height: var(--tap); }
.brand-logo { height: 26px; width: auto; display: block; }
.loc {
  grid-area: loc; justify-self: start; min-width: 0; display: inline-flex; align-items: center; gap: 4px;
  min-height: var(--tap); padding: 0 4px; color: var(--ink); text-decoration: none;
}
.loc > .icon { color: var(--brand); width: 20px; height: 20px; }
.loc span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.loc small { font-size: 0.7rem; color: var(--ink-muted); }
.loc b { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc .icon:last-child { width: 16px; height: 16px; color: var(--ink-muted); }
/* Open picker: the same button closes it. */
.loc.is-open { background: var(--blue-50); border-radius: 10px; padding: 0 8px; }
.search-form {
  grid-area: search; display: flex; align-items: center; gap: 8px; min-width: 0;
  height: 48px; padding: 0 4px 0 14px; border-radius: 12px; background: var(--page-alt); border: 1px solid var(--border);
}
.search-form:focus-within { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--blue-100); }
.search-form > .icon { color: var(--ink-muted); }
.search-form input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font: inherit; color: var(--ink); }
.search-form input::placeholder { color: var(--navy-300); }
.search-form button {
  height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: var(--primary); color: #fff;
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.header-actions { grid-area: actions; display: flex; align-items: center; gap: 4px; }
.lang-menu { position: relative; }
.lang-menu summary, .sign-in {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 10px;
  border-radius: 10px; color: var(--ink); font-size: 0.9rem; font-weight: 600; text-decoration: none; cursor: pointer; list-style: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .sign-in:hover { background: var(--page-alt); }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; margin: 0; padding: 6px; list-style: none; min-width: 150px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.lang-menu li > * { display: flex; align-items: center; min-height: var(--tap); padding: 0 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-menu li > a:hover { background: var(--page-alt); }
.lang-menu .is-current { background: var(--primary-tint); color: var(--primary-dark); font-weight: 600; }
.sign-in span, .lang-current, .post-btn { display: none; }
.post-btn {
  align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap;
}
@media (min-width: 1024px) {
  .header-inner { grid-template-columns: auto 200px minmax(0, 1fr) auto; grid-template-areas: "brand loc search actions"; gap: 20px; padding: 12px 24px; }
  .brand-logo { height: 30px; }
  .sign-in span, .lang-current { display: inline; }
  .post-btn { display: inline-flex; margin-left: 6px; }
}

/* ---------- Home ---------- */
.trust-row {
  list-style: none; margin: 0 -16px; padding: 10px 16px; display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none;
  background: var(--primary-tint); font-size: 0.8rem; font-weight: 600; color: var(--primary-dark); white-space: nowrap;
}
.trust-row li { display: inline-flex; align-items: center; gap: 5px; }
.trust-row .icon { width: 16px; height: 16px; color: var(--brand); }
.home-title { font-size: 1.3rem; margin: 20px 0 12px; }

/* Categories: borderless tinted tiles, 5 per row (OLX / Urban Company pattern). */
.module-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 6px; }
.module-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); text-align: center; }
.module-icon {
  position: relative; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 64px; aspect-ratio: 1;
  border-radius: 18px; background: var(--tile, var(--blue-50)); color: var(--tile-ink, var(--brand)); transition: transform .15s ease;
}
.module-tile:hover .module-icon { transform: translateY(-2px); }
.module-icon .icon { width: 28px; height: 28px; stroke-width: 1.75; }
.module-label { font-size: 0.78rem; font-weight: 600; line-height: 1.25; }
.module-tile--jobs { --tile: #E8F1FF; --tile-ink: #0061DC; }
.module-tile--rentals { --tile: #E6F6EE; --tile-ink: #0B7A41; }
.module-tile--transport { --tile: #FFF3E0; --tile-ink: #B45309; }
.module-tile--services { --tile: #F1ECFE; --tile-ink: #6D3FD8; }
.module-tile--directory { --tile: #E6F4F8; --tile-ink: #0B6E8A; }
.module-tile--offers { --tile: #FFF0F3; --tile-ink: #C2185B; }
.module-tile--classifieds { --tile: #EEF1F6; --tile-ink: #02163A; }
.module-tile--askLocal { --tile: #E8F1FF; --tile-ink: #0151B9; }
.module-tile--emergency { --tile: #FDECEC; --tile-ink: #C81E1E; }
.module-tile--emergency .module-label { color: var(--sos); }
.module-tile--post { --tile: var(--surface); --tile-ink: var(--brand); }
.module-tile--post .module-icon { border: 1.5px dashed var(--blue-300); }
.tile-badge {
  position: absolute; top: -6px; right: -6px; padding: 0 5px; border-radius: 6px; border: 2px solid var(--surface);
  background: var(--brand); color: #fff; font-size: 0.6rem; font-weight: 600; line-height: 1.5;
}
.tile-badge--sos { background: var(--sos); }

/* Spotlight banners: swipe on phones, row of 4 on desktop. */
.spotlight { margin-top: 24px; }
.spotlight-row {
  list-style: none; margin: 0 -16px; padding: 0 16px 4px; display: grid; grid-auto-flow: column; grid-auto-columns: 84%;
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.spotlight-row > li { scroll-snap-align: start; }
.banner {
  position: relative; display: flex; justify-content: space-between; gap: 8px; height: 100%; min-height: 148px; padding: 18px;
  border-radius: 18px; overflow: hidden; color: #fff; text-decoration: none; background: var(--bn);
}
.banner--rooms { --bn: linear-gradient(135deg, #0070FC 0%, #0151B9 100%); }
.banner--jobs { --bn: linear-gradient(135deg, #02163A 0%, #013D90 100%); }
.banner--sos { --bn: linear-gradient(135deg, #C81E1E 0%, #8F1414 100%); }
.banner--sell { --bn: linear-gradient(135deg, #0B7A41 0%, #075A30 100%); }
.banner-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; max-width: 72%; }
.banner-text b { font-size: 1.15rem; line-height: 1.3; }
.banner-text > span { font-size: 0.85rem; opacity: .9; }
.banner-cta {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px;
  border-radius: 8px; background: #fff; color: var(--ink); font-size: 0.85rem; font-weight: 600; opacity: 1 !important;
}
.banner-cta .icon { width: 16px; height: 16px; }
.banner-art {
  position: absolute; right: -18px; bottom: -18px; width: 120px; height: 120px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .14);
}
.banner-art .icon { width: 54px; height: 54px; stroke-width: 1.5; opacity: .95; }

/* Sections */
.home-section { margin-top: 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 1.2rem; }
.see-all { display: inline-flex; align-items: center; gap: 2px; flex: none; font-size: 0.9rem; font-weight: 600; color: var(--primary-dark); text-decoration: none; }
.see-all .icon { width: 18px; height: 18px; }
.section-empty { margin: 0; padding: 16px; border-radius: var(--radius); background: var(--page-alt); color: var(--ink-muted); }

/* Item cards: thumbnail on top, price first (OLX / NoBroker pattern). */
.grid-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.scroll-cards {
  list-style: none; margin: 0 -16px; padding: 0 16px 6px; display: grid; grid-auto-flow: column; grid-auto-columns: 70%;
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.scroll-cards > li { scroll-snap-align: start; }
.grid-cards > li, .scroll-cards > li { min-width: 0; }
.item-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: box-shadow .15s ease, transform .15s ease;
}
.item-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.thumb {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10;
  background: var(--th, var(--blue-50)); color: var(--th-ink, var(--brand));
}
.thumb > .icon { width: 36px; height: 36px; stroke-width: 1.5; opacity: .9; }
.thumb--property { --th: #E6F6EE; --th-ink: #0B7A41; }
.thumb--vehicles { --th: #FFF3E0; --th-ink: #B45309; }
.thumb--business_machinery { --th: #EEF1F6; --th-ink: #02163A; }
.thumb--services_repair { --th: #F1ECFE; --th-ink: #6D3FD8; }
.thumb--tours_travels { --th: #E6F4F8; --th-ink: #0B6E8A; }
.thumb--shop { --th: #E6F4F8; --th-ink: #0B6E8A; }
.thumb-tag {
  position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 3px; max-width: calc(100% - 16px);
  padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: var(--ink);
  font-size: 0.7rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb-tag .icon { width: 13px; height: 13px; color: var(--success); }
.thumb-tag--green { color: var(--success); }
.item-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; min-width: 0; }
.item-price { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.item-price small { font-size: 0.75rem; font-weight: 400; color: var(--ink-muted); }
.item-title {
  font-size: 0.9rem; line-height: 1.35; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-loc, .item-meta {
  display: flex; align-items: center; gap: 3px; font-size: 0.78rem; color: var(--ink-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-loc .icon, .item-meta .icon { width: 13px; height: 13px; flex: none; }
.item-meta--row { justify-content: space-between; }
.rating { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--ink); font-size: 0.8rem; }
.rating .icon { width: 13px; height: 13px; color: #E8A100; fill: #E8A100; }

/* Row list: jobs, emergency helpers. */
.row-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.row-list > li + li { border-top: 1px solid var(--border); }
.row-item { display: flex; align-items: center; gap: 12px; padding: 14px; text-decoration: none; color: var(--ink); }
.row-item:hover { background: var(--page-alt); }
.row-item > .icon { color: var(--navy-300); flex: none; }
.row-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--blue-50); color: var(--brand); }
.row-icon--sos { background: var(--sos-tint); color: var(--sos); }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-body .item-title { -webkit-line-clamp: 1; font-weight: 600; }
.row-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.row-foot .item-price { font-size: 0.9rem; color: var(--success); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; }
.pill--red { background: var(--sos-tint); color: var(--sos); }

.business-cta {
  margin-top: 36px; padding: 22px; border-radius: 18px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
  background: linear-gradient(120deg, #02163A 0%, #013D90 100%); color: #fff;
}
.business-cta h2 { margin: 0 0 4px; font-size: 1.2rem; }
.business-cta p { margin: 0; color: var(--navy-100); }

@media (min-width: 720px) {
  .module-grid { grid-template-columns: repeat(10, 1fr); }
  .grid-cards { grid-template-columns: repeat(3, 1fr); }
  .thumb { aspect-ratio: 2 / 1; }
  .scroll-cards { grid-auto-columns: 40%; }
  .spotlight-row { grid-auto-columns: 46%; }
}
@media (min-width: 1024px) {
  .trust-row { margin: 0; justify-content: center; border-radius: 0 0 14px 14px; }
  .home-title { font-size: 1.6rem; margin-top: 28px; }
  .module-icon { max-width: 76px; border-radius: 22px; }
  .module-label { font-size: 0.9rem; }
  .spotlight-row, .scroll-cards { margin: 0; padding: 0; overflow: visible; grid-auto-flow: row; grid-auto-columns: auto; }
  .spotlight-row { grid-template-columns: repeat(4, 1fr); }
  .scroll-cards, .grid-cards { grid-template-columns: repeat(4, 1fr); }
  .grid-cards { grid-template-columns: repeat(3, 1fr); }
  .row-list { display: grid; grid-template-columns: 1fr 1fr; }
  .row-list > li + li { border-top: 0; }
  .row-list > li { border-bottom: 1px solid var(--border); }
  .row-list > li:nth-child(odd) { border-right: 1px solid var(--border); }
  .business-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 32px; }
  .section-head h2 { font-size: 1.4rem; }
}

/* ---------- Phones and tablets: zero-confusion layer (desktop unchanged) ----------
   Rules from low-literacy / first-time-user research: every icon has a word, every
   tappable thing looks tappable, nothing important hides in a swipe, big type. */
.action-label, .module-hint, .intent, .how, .section-more, .item-cta, .help-card, .home-hint, .section-icon { display: none; }
@media (max-width: 1023px) {
  /* Header: icons always carry a word. */
  .lang-menu summary, .sign-in { flex-direction: column; gap: 0; min-width: 52px; padding: 2px 6px; line-height: 1.1; }
  .lang-current { display: none; }
  .sign-in .action-label, .lang-menu .action-label { display: block; font-size: 0.68rem; font-weight: 600; color: var(--ink-muted); }
  /* Trust promises wrap instead of hiding off-screen. */
  .trust-row { flex-wrap: wrap; justify-content: center; gap: 6px 14px; white-space: normal; }

  /* Two big doors: "I need something" / "I want to give or sell". */
  .intent { display: block; margin-top: 18px; }
  .intent h2 { margin: 0 0 10px; font-size: 1.15rem; }
  .intent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .intent-card {
    display: flex; flex-direction: column; gap: 4px; min-height: 132px; padding: 14px; border-radius: 16px;
    text-decoration: none; color: var(--ink); border: 2px solid transparent;
  }
  .intent-card b { font-size: 1.02rem; line-height: 1.3; }
  .intent-card > span:last-child { font-size: 0.8rem; color: var(--ink-muted); line-height: 1.35; }
  .intent-card--find { background: var(--blue-50); border-color: var(--blue-200); }
  .intent-card--give { background: var(--success-tint); border-color: #BFE6D0; }
  .intent-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 12px; color: #fff; }
  .intent-card--find .intent-icon { background: var(--brand); }
  .intent-card--give .intent-icon { background: var(--success); }

  .home-title { margin: 26px 0 2px; font-size: 1.15rem; }
  .home-hint { display: block; margin: 0 0 12px; font-size: 0.85rem; color: var(--ink-muted); }

  /* Categories: 3 big boxes per row, name + what it is for. */
  .module-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .module-tile {
    padding: 12px 6px 10px; gap: 4px; border-radius: 16px; background: var(--surface);
    border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(2, 22, 58, .05); min-height: 128px;
  }
  .module-icon { max-width: 52px; border-radius: 14px; }
  .module-icon .icon { width: 26px; height: 26px; }
  .module-label { font-size: 0.95rem; }
  .module-hint { display: block; font-size: 0.72rem; line-height: 1.3; color: var(--ink-muted); }
  .module-tile--emergency { border-color: #F5B5B5; background: #FFF7F7; }
  .module-tile--post { border-style: dashed; border-color: var(--blue-300); }
  .module-tile--post .module-icon { border: 0; background: var(--blue-50); }

  /* How it works: three numbered steps. */
  .how { display: block; margin-top: 22px; padding: 16px; border-radius: 16px; background: var(--page-alt); }
  .how h2 { margin: 0 0 12px; font-size: 1.05rem; }
  .how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
  .how li { display: flex; align-items: center; gap: 12px; }
  .how li > span:last-child { display: flex; flex-direction: column; font-size: 0.82rem; color: var(--ink-muted); line-height: 1.35; }
  .how li b { font-size: 0.98rem; color: var(--ink); }
  .how-num {
    flex: none; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--brand); color: #fff; font-weight: 600;
  }

  /* Swipe banners are skipped by most users (carousel research): hide on phones. */
  .spotlight { display: none; }

  /* Sections: icon + title, content stacked (no hidden swipe), one big "see all" button. */
  .section-head h2 { display: flex; align-items: center; gap: 8px; font-size: 1.12rem; }
  .section-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--blue-50); color: var(--brand); flex: none; }
  .section-icon .icon { width: 18px; height: 18px; }
  .see-all { display: none; }
  .scroll-cards { margin: 0; padding: 0; overflow: visible; grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, 1fr); }
  .item-title { font-size: 0.92rem; }
  .item-cta { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; font-size: 0.82rem; font-weight: 600; color: var(--primary-dark); }
  .item-cta .icon { width: 16px; height: 16px; }
  .section-more {
    display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 12px; min-height: 48px;
    border-radius: 12px; border: 1.5px solid var(--blue-200); background: var(--surface);
    color: var(--primary-dark); font-weight: 600; text-decoration: none;
  }
  .section-more .icon { width: 18px; height: 18px; }

  /* "Confused? We'll help" — always one tap away at the end. */
  .help-card {
    display: flex; align-items: center; gap: 12px; margin-top: 32px; padding: 16px; border-radius: 16px;
    background: var(--success-tint); color: var(--ink); text-decoration: none;
  }
  .help-card > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; font-size: 0.85rem; color: var(--ink-muted); }
  .help-card b { font-size: 1rem; color: var(--ink); }
  .help-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--success); color: #fff; flex: none; }

  /* Bigger, clearer bottom bar labels. */
  .bottom-nav-item { font-size: 0.78rem; }
  .bottom-nav-item.is-active { background: var(--blue-50); }
}

/* ---------- Buttons, empty states ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 18px;
  border-radius: 12px; border: 2px solid var(--primary); color: var(--primary-dark); background: var(--surface);
  font-weight: 600; text-decoration: none;
}
.button--primary { background: var(--primary); color: #fff; min-height: var(--tap-primary); }
.button--light { background: #fff; border-color: #fff; color: var(--strong); flex: none; }
.button .icon { width: 18px; height: 18px; }
.empty-state {
  background: var(--primary-tint); border: 1px dashed var(--blue-300); border-radius: var(--radius); padding: 16px;
}
.empty-state p { margin: 0 0 12px; color: var(--ink); }
.empty-state--page { background: var(--surface); border-style: solid; border-color: var(--border); margin-top: 20px; }
.emergency { padding-top: 16px; }

/* ---------- Emergency ---------- */
.emergency .page-title { color: var(--sos); }
.emergency-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.emergency-call {
  display: flex; flex-direction: column; gap: 2px; min-height: var(--tap-primary); padding: 12px 16px;
  border-radius: var(--radius); border: 2px solid var(--sos); background: var(--surface); color: var(--ink); text-decoration: none;
}
.emergency-call--primary { background: var(--sos); color: #fff; }
.emergency-number { display: flex; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 600; }
.emergency-label { font-size: 0.95rem; }

/* ---------- Bottom navigation (phones and tablets only) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); box-shadow: 0 -1px 0 var(--border), 0 -4px 16px rgba(2, 22, 58, .06);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 60px; font-size: 0.72rem; font-weight: 600; color: var(--ink-muted); text-decoration: none;
}
.bottom-nav-item .icon { width: 22px; height: 22px; stroke-width: 1.9; }
.bottom-nav-item.is-active { color: var(--brand); }
.bottom-nav-item--post .icon {
  width: 40px; height: 40px; padding: 8px; margin-top: -18px; border-radius: 50%;
  background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(0, 112, 252, .35);
}
@media (min-width: 1024px) {
  .bottom-nav { display: none; }
  body.has-bottom-nav { padding-bottom: 0; }
}

/* ---------- Footer ---------- */
.site-footer { margin-top: 48px; background: var(--strong); color: var(--navy-100); font-size: 0.9rem; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 32px 16px 8px; display: grid; gap: 28px; }
.footer-brand p { margin: 12px 0 0; line-height: 1.6; }
.footer-safety { display: flex; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); font-size: 0.82rem; }
.footer-safety .icon { color: #FFC24B; flex: none; }
.footer-safety b { color: #FFC24B; }
.footer-col h2 { margin: 0 0 10px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; }
.footer-col h2 ~ h2 { margin-top: 20px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-col a { display: inline-flex; align-items: center; min-height: 36px; color: var(--navy-100); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col:first-of-type ul { grid-template-columns: 1fr 1fr; }
.footer-bottom { max-width: var(--max); margin: 0 auto; padding: 16px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 0.8rem; color: var(--navy-200); }
@media (min-width: 1024px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; padding: 48px 24px 16px; gap: 48px; }
  .footer-bottom { padding: 16px 24px; }
}
.picker-footer { text-align: center; color: var(--ink-muted); padding: 24px 16px; font-size: 0.9rem; }

/* ---------- Language picker (first visit) ---------- */
.picker { max-width: 420px; margin: 8vh auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.picker-logo { width: 240px; height: auto; }
.picker-title { font-size: 1.1rem; font-weight: 600; margin: 20px 0 14px; }
.picker-options { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 10px; }
.picker-option {
  display: flex; align-items: center; justify-content: center; min-height: 64px; font-size: 1.35rem; font-weight: 600;
  border-radius: var(--radius); border: 2px solid var(--border); background: var(--surface); color: var(--ink); text-decoration: none;
}
.picker-option.is-suggested { border-color: var(--primary); background: var(--primary-tint); }
.picker-hint { color: var(--ink-muted); font-size: 0.95rem; }


/* ---------- Module list + detail pages (same tokens and cards as home; phone-first) ---------- */
.button--ghost { border-color: var(--blue-200); }
.button--big { width: 100%; min-height: var(--tap-primary); background: var(--primary); border-color: var(--primary); color: #fff; font-size: 1.05rem; }
.button--big .icon { width: 22px; height: 22px; }
.button--danger { background: var(--sos); border-color: var(--sos); color: #fff; }
button.button { font: inherit; font-weight: 600; cursor: pointer; }
.pill--blue { background: var(--blue-50); color: var(--primary-dark); }
.pill--green { background: var(--success-tint); color: var(--success); }
.pill .icon { width: 12px; height: 12px; vertical-align: -2px; }
.thumb--jobs { --th: #E8F1FF; --th-ink: #0061DC; }
.thumb--rentals { --th: #E6F6EE; --th-ink: #0B7A41; }
.thumb--transport { --th: #FFF3E0; --th-ink: #B45309; }
.thumb--services { --th: #F1ECFE; --th-ink: #6D3FD8; }
.thumb--directory { --th: #E6F4F8; --th-ink: #0B6E8A; }
.thumb--offers { --th: #FFF0F3; --th-ink: #C2185B; }
.thumb--classifieds { --th: #EEF1F6; --th-ink: #02163A; }
.thumb--emergency { --th: #FDECEC; --th-ink: #C81E1E; }
.thumb--askLocal { --th: #E8F1FF; --th-ink: #0151B9; }

.crumbs { margin: 12px 0 4px; }
.crumbs a { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; font-weight: 600; text-decoration: none; }
.crumbs .icon { width: 18px; height: 18px; }

.list-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; margin: 4px 0 14px; }
.list-icon .module-icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: var(--tile); color: var(--tile-ink); }
.list-head h1 { margin: 0; font-size: 1.45rem; }
.list-head p { margin: 0; color: var(--ink-muted); font-size: 0.9rem; }
.list-post { grid-column: 1 / -1; }

.list-tools { display: grid; gap: 10px; margin-bottom: 10px;  grid-template-columns: minmax(0, 1fr); }
.list-search { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; min-height: 52px; border: 1.5px solid var(--blue-200); border-radius: 14px; background: var(--surface); }
.list-search > .icon { color: var(--navy-400); flex: none; }
.list-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); min-height: 48px; }
.list-search button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }

.filters { border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); }
.filters-toggle { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px; font-weight: 600; cursor: pointer; list-style: none; }
.filters-toggle::-webkit-details-marker { display: none; }
.filters-toggle > span { flex: 1; }
.filters-toggle .icon { color: var(--brand); }
.filters[open] .filters-toggle > .icon:last-child { transform: rotate(180deg); }
.filters-body { display: grid; gap: 12px; padding: 12px 14px 16px; border-top: 1px solid var(--border); }
.field { display: grid; gap: 4px; }
.field-label { font-weight: 600; font-size: 0.92rem; }
.field select, .field input, .field textarea {
  width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1.5px solid var(--navy-200); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit;
}
.field select:focus, .field input:focus, .field textarea:focus { border-color: var(--brand); outline: 3px solid var(--blue-100); }
.list-search:focus-within { border-color: var(--brand); }
.near-btn { justify-content: flex-start; }
.filters-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.chips { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--blue-50); color: var(--primary-dark); font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.chip .icon { width: 16px; height: 16px; }
.result-count { margin: 6px 0 10px; font-weight: 600; color: var(--ink-muted); }
.list-grid { margin-bottom: 8px; }

.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 18px 0; }
.pager > :last-child { justify-self: end; }
.pager-info { font-size: 0.88rem; color: var(--ink-muted); }

.empty-results { text-align: center; padding: 28px 16px; border: 1px dashed var(--blue-300); border-radius: var(--radius); background: var(--primary-tint); }
.empty-icon { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--brand); }
.empty-results h2 { margin: 10px 0 4px; font-size: 1.15rem; }
.empty-results p { margin: 0 0 14px; color: var(--ink-muted); }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.notice { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.notice .icon { flex: none; }
.notice--ok { background: var(--success-tint); color: var(--success); }
.notice--warn { background: #FFF6E5; color: #8A4B00; }
.notice--error { background: var(--sos-tint); color: var(--sos); }

.detail-head { display: flex; gap: 14px; align-items: flex-start; margin: 8px 0 14px; }
.detail-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 16px; background: var(--th); color: var(--th-ink); }
.detail-icon .icon { width: 30px; height: 30px; }
.detail-head-text { min-width: 0; }
.detail-kicker { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--ink-muted); }
.detail-head h1 { margin: 2px 0 4px; font-size: 1.35rem; overflow-wrap: anywhere; }
.detail-place { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--ink-muted); font-size: 0.92rem; }
.detail-place .icon { width: 16px; height: 16px; flex: none; }
.detail-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.detail-price { font-size: 1.2rem; color: var(--success); }

.detail-actions { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--page-alt); }
.action-note { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.84rem; color: var(--ink-muted); }
.action-note .icon { width: 15px; height: 15px; flex: none; color: var(--success); }
.action-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.action-row form { display: contents; }
.action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 0.85rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.action-btn .icon { color: var(--brand); }

.facts ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.facts li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.facts small { color: var(--ink-muted); font-size: 0.78rem; }
.facts b { font-size: 0.95rem; overflow-wrap: anywhere; }
.fact-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--blue-50); color: var(--brand); }
.fact-icon .icon { width: 18px; height: 18px; }
.detail-text h2 { margin: 22px 0 6px; font-size: 1.1rem; }
.detail-text p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

.claim-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; padding: 16px; border-radius: 16px; background: var(--blue-50); }
.claim-card > span:nth-child(2) { flex: 1; min-width: 180px; display: flex; flex-direction: column; font-size: 0.88rem; color: var(--ink-muted); }
.claim-card b { color: var(--ink); font-size: 1rem; }
.claim-card .help-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; flex: none; }

.safety-tip { display: flex; gap: 10px; margin-top: 20px; padding: 14px; border-radius: 14px; background: #FFF6E5; color: #6B3A00; }
.safety-tip > .icon { flex: none; color: #B45309; }
.safety-tip p { margin: 2px 0 0; font-size: 0.9rem; }

.report { margin-top: 14px; border: 1px solid var(--border); border-radius: 14px; }
.report summary { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px; font-weight: 600; cursor: pointer; list-style: none; color: var(--ink-muted); }
.report summary::-webkit-details-marker { display: none; }
.report summary > span { flex: 1; }
.report form { display: grid; gap: 12px; padding: 0 14px 16px; }
.report fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.report legend { font-weight: 600; margin-bottom: 4px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 12px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; }
.radio input { width: 20px; height: 20px; accent-color: var(--primary); }
.radio:has(input:checked) { border-color: var(--brand); background: var(--blue-50); }

/* Phones: the main action stays one thumb away, above the bottom bar. */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 64px; z-index: 20; padding: 8px 16px; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--border); }
body:has(.sticky-cta) { padding-bottom: 150px; }
.sticky-cta.is-hidden { visibility: hidden; }
/* On module pages the page's own search box replaces the header one (one search box, no confusion). */
@media (max-width: 1023px) { body.page-module .header-inner .search-form { display: none; } }
@media (min-width: 720px) {
  .list-grid { grid-template-columns: repeat(3, 1fr); }
  .facts ul { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .list-head { grid-template-columns: auto 1fr auto; }
  .list-post { grid-column: auto; }
  .filters { border: 0; background: transparent; }
  .filters-toggle { display: none; }
  .filters-body { grid-template-columns: repeat(4, 1fr); align-items: end; border: 1.5px solid var(--border); border-radius: 14px; padding: 16px; background: var(--surface); }
  .filters:not([open]) > .filters-body { display: grid; }
  .filters::details-content { content-visibility: visible; display: block; }
  .filters-actions { grid-column: span 2; }
  .list-grid { grid-template-columns: repeat(4, 1fr); }
  .detail { max-width: 860px; }
  .sticky-cta { display: none; }
  body:has(.sticky-cta) { padding-bottom: 0; }
}

/* ---------- Sign-in, account, forms, chat, Ask Local ---------- */
.auth { max-width: 460px; margin: 24px auto; text-align: center; }
.auth-icon { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 50%; background: var(--blue-50); color: var(--brand); }
.auth-icon .icon { width: 30px; height: 30px; }
.auth h1 { margin: 12px 0 4px; font-size: 1.4rem; }
.auth-sub { margin: 0 0 18px; color: var(--ink-muted); }
.google-box { display: flex; justify-content: center; min-height: 48px; margin: 8px 0 18px; }
.auth-points { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; text-align: left; }
.auth-points li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--page-alt); font-size: 0.92rem; }
.auth-points .icon { flex: none; color: var(--success); }
.dev-login { display: grid; gap: 10px; text-align: left; padding: 14px; border: 2px dashed #E3A008; border-radius: 14px; background: #FFFBEB; margin-bottom: 16px; }
.dev-login p { margin: 0; font-size: 0.9rem; }
.auth-legal { font-size: 0.82rem; color: var(--ink-muted); }
.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); }

.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 1.3rem; font-weight: 600; }
.avatar--small { width: 40px; height: 40px; font-size: 1rem; }
.account-head { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; }
.account-head h1 { margin: 0; font-size: 1.3rem; }
.account-head a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; }
.account-head a .icon { width: 16px; height: 16px; }
.account-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.account-tiles a { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 84px; padding: 14px; border: 1.5px solid var(--border); border-radius: 14px; color: var(--ink); text-decoration: none; }
.account-tiles a > .icon { color: var(--brand); }
.account-tiles small { color: var(--ink-muted); }
.account-tiles .pill { position: absolute; top: 12px; right: 12px; }
.my-post { display: grid; gap: 10px; padding: 14px; }
.my-post-main { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.my-post-main small { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--ink-muted); }
.my-post-main small .icon { width: 14px; height: 14px; }
.my-post-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.my-post-actions form { display: contents; }
.my-post-actions .action-btn { min-height: 52px; font-size: 0.78rem; }
.action-btn--danger, .action-btn--danger .icon { color: var(--sos); }
.status { font-weight: 600; }
.status--active { color: var(--success); }
.status--pending, .status--closed { color: #8A4B00; }
.status--hidden { color: var(--sos); }
.sign-out { margin: 24px 0; }

.post-title { margin-top: 18px; }
.post-hint { display: block; }
.post-grid .module-label { font-size: 0.92rem; }
.post-points { margin-top: 18px; }
@media (min-width: 1024px) { .post-hint, .post-grid .module-hint { display: block; } }

.form-card { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); margin: 8px 0 20px; }
.form-group { display: grid; gap: 12px; margin: 0; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--border); }
.form-group legend { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 1.05rem; font-weight: 600; }
.step { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 0.9rem; }
.field-help { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 0.82rem; color: var(--ink-muted); }
.field-help .icon { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--success); }
.has-error select, .has-error input, .has-error textarea { border-color: var(--sos); }
.field-error { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--sos); }
.field-error .icon { width: 16px; height: 16px; }
.photo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.photo-list li { display: grid; gap: 6px; }
.photo-list img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.photo-pick { position: relative; display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 14px; border: 2px dashed var(--blue-300); border-radius: 14px; background: var(--blue-50); cursor: pointer; }
.photo-pick > .icon { width: 30px; height: 30px; color: var(--brand); flex: none; }
.photo-pick span { display: flex; flex-direction: column; }
.photo-pick small { color: var(--ink-muted); }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-manage h2 { font-size: 1.05rem; }
.danger-zone { margin-bottom: 24px; }
.danger-zone form p { margin: 0; }

.chat-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; }
.chat-head h1 { margin: 0; font-size: 1.2rem; }
.chat-head a { font-size: 0.88rem; }
.share-box { display: grid; gap: 8px; margin-bottom: 12px; padding: 12px; border-radius: 14px; background: var(--page-alt); }
.messages { list-style: none; margin: 0; padding: 12px 0; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.msg { max-width: 82%; align-self: flex-start; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--page-alt); border: 1px solid var(--border); }
.msg--mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--blue-50); border-color: var(--blue-200); }
.msg p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.msg time { display: block; font-size: 0.72rem; color: var(--ink-muted); text-align: right; }
.msg-kind { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--primary-dark); }
.msg-kind .icon { width: 14px; height: 14px; }
.msg-empty { align-self: center; color: var(--ink-muted); font-size: 0.9rem; text-align: center; }
.chat-form { position: sticky; bottom: 72px; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 0; background: var(--page); }
.chat-form textarea { min-height: 52px; padding: 10px 12px; border: 1.5px solid var(--navy-200); border-radius: 12px; font: inherit; resize: vertical; }
.chat-form .button { min-height: 52px; }
.chat-extras { margin-top: 8px; }
.chat-extras form { display: grid; gap: 10px; }
.chat-last { -webkit-line-clamp: 1; }

.replies { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.replies li { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }
.replies p { margin: 2px 0; white-space: pre-line; overflow-wrap: anywhere; }
.replies small { color: var(--ink-muted); }
.owner-bar { margin-top: 14px; }
@media (min-width: 1024px) {
  .account-tiles { grid-template-columns: repeat(5, 1fr); }
  .form-card, .chat-form, .messages, .share-box { max-width: 760px; }
  .chat-form { bottom: 0; }
}

/* Photos: cover on cards; on the detail page a simple stacked gallery (no hidden swipe). */
.thumb { position: relative; overflow: hidden; }
.thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.gallery li:first-child { grid-column: 1 / -1; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--page-alt); }
.gallery li:first-child img { aspect-ratio: 16 / 10; }
.gallery-count { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 0.85rem; color: var(--ink-muted); }
.gallery-count .icon { width: 16px; height: 16px; }

/* ---------- Emergency/SOS, trip, fare, poster, search, area, info pages, admin ---------- */
.help-card--always, .section-more--always { display: flex; }
.help-card--always { align-items: center; gap: 12px; margin-top: 20px; padding: 16px; border-radius: 16px; background: var(--success-tint); color: var(--ink); text-decoration: none; }
.help-card--always > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; font-size: 0.85rem; color: var(--ink-muted); }
.help-card--always b { font-size: 1rem; color: var(--ink); }
.help-card--always .help-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--success); color: #fff; flex: none; }
.help-icon--sos { background: var(--sos) !important; }
.section-more--always { align-items: center; justify-content: center; gap: 4px; margin-top: 12px; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--blue-200); color: var(--primary-dark); font-weight: 600; text-decoration: none; }
.install-btn { width: 100%; margin-top: 20px; }
.install-btn[hidden] { display: none; }
/* Install page steps; install links disappear once the app runs installed. */
.install-steps { display: grid; gap: 10px; margin: 0; padding: 0 14px 14px; list-style: none; }
.install-steps li { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); }
.install-steps .row-icon { flex: none; }
.install-ways[hidden], .notice[hidden] { display: none; }
.install-ways summary span { display: inline-flex; align-items: center; gap: 8px; }
@media (display-mode: standalone) { .hide-installed { display: none; } }

.sos-card { margin-top: 20px; border-color: #F5B5B5; }
.sos-card h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--sos); font-size: 1.15rem; }
.sos-form { display: grid; gap: 12px; }
.sos-kinds { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sos-kinds legend { margin-bottom: 6px; }

.claim-steps { margin: 12px 0 16px; padding-left: 22px; display: grid; gap: 6px; }

.fare-result { margin: 4px 0 20px; padding: 18px; border-radius: 16px; background: var(--blue-50); text-align: center; }
.fare-result p { margin: 0 0 6px; }
.fare-amount { font-size: 1.8rem; font-weight: 600; color: var(--success); }
.fare-result .field-help { justify-content: center; }

.area-list { list-style: none; margin: 12px 0 24px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.area-btn { width: 100%; display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.area-btn .icon { color: var(--brand); flex: none; }
.area-btn.is-current { border-color: var(--brand); background: var(--blue-50); }

.site-notice { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 16px; background: #FFF6E5; color: #6B3A00; font-weight: 600; font-size: 0.9rem; }
.site-notice .icon { flex: none; }

.info-page { max-width: 760px; }
.info-page > p { margin: 0 0 12px; }
.info-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.faq { display: grid; gap: 8px; margin-bottom: 16px; }
.faq .report { margin: 0; }
.faq .report summary { color: var(--ink); }
.faq-a { margin: 0; padding: 0 14px 14px; color: var(--ink-muted); }
.info-page a .icon { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
.contact-form { display: grid; gap: 12px; }
#contact h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.15rem; }

/* Printable job poster (A4). */
.poster-page { background: #fff; padding: 16px; }
.poster-tip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: center; }
.poster { max-width: 680px; margin: 0 auto; padding: 32px; border: 6px solid var(--brand); border-radius: 24px; text-align: center; }
.poster-kicker { margin: 18px 0 0; font-size: 1.4rem; font-weight: 600; color: var(--brand); letter-spacing: .04em; }
.poster h1 { margin: 6px 0; font-size: 2.2rem; }
.poster-company { margin: 0; font-size: 1.3rem; }
.poster-salary { margin: 12px 0; font-size: 1.8rem; font-weight: 600; color: var(--success); }
.poster-place { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 0 0 16px; font-size: 1.2rem; }
.poster-qr svg { width: 260px; height: 260px; }
.poster-scan { margin: 8px auto; max-width: 420px; font-size: 1.15rem; font-weight: 600; }
.poster-url { margin: 0; color: var(--ink-muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.poster-foot { margin: 16px 0 0; font-weight: 600; }
@media print {
  .no-print { display: none; }
  .poster-page { padding: 0; }
  .poster { border-width: 4px; }
}

/* Admin (internal tool). */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.admin-nav a { padding: 6px 12px; border-radius: 999px; background: var(--blue-50); font-weight: 600; text-decoration: none; font-size: 0.88rem; }
.admin-stats { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.admin-stats a { display: flex; flex-direction: column; padding: 14px; border: 1.5px solid var(--border); border-radius: 14px; color: var(--ink); text-decoration: none; font-size: 0.88rem; }
.admin-stats b { font-size: 1.6rem; color: var(--brand); }
.admin-grid { display: grid; gap: 18px; }
.admin-grid h2 { font-size: 1.05rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 20px; }
.admin-table th, .admin-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.admin-table small { color: var(--ink-muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-actions .button { min-height: 36px; padding: 0 10px; font-size: 0.82rem; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.admin-filter input, .admin-filter select { min-height: 44px; padding: 0 10px; border: 1.5px solid var(--navy-200); border-radius: 10px; font: inherit; }
@media (min-width: 1024px) {
  .admin-stats { grid-template-columns: repeat(7, 1fr); }
  .admin-grid { grid-template-columns: repeat(3, 1fr); }
  .area-list { grid-template-columns: repeat(4, 1fr); }
  .sos-kinds { grid-template-columns: repeat(3, 1fr); }
}

.tool-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.tool-links a { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 12px; border-radius: 12px; background: var(--blue-50); color: var(--primary-dark); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.tool-links--sos a { background: var(--sos-tint); color: var(--sos); }
.tool-links .icon { flex: none; }

/* "Nearest first" location card on list pages. */
.near-ask { display: flex; gap: 12px; margin: 0 0 12px; padding: 14px; border: 1.5px solid var(--blue-200); border-radius: 16px; background: var(--blue-50); }
.near-ask[hidden] { display: none; }
.near-ask-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; }
.near-ask-text { min-width: 0; }
.near-ask-text b { font-size: 1.02rem; }
.near-ask-text p { margin: 2px 0 10px; font-size: 0.88rem; color: var(--ink-muted); }
.near-ask-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.near-ask-text small { display: flex; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--ink-muted); }
.near-ask-text small .icon { width: 13px; height: 13px; color: var(--success); flex: none; }

.error-page { margin-top: 24px; }
.error-page h1 { margin: 10px 0 4px; font-size: 1.2rem; }

/* Admin extras */
.admin-user-actions { margin: 0 0 18px; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border: 1.5px dashed var(--blue-300); border-radius: 12px; background: var(--blue-50); }
.admin-bar b { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.admin-bar .button { min-height: 38px; padding: 0 12px; font-size: 0.85rem; }
.admin-inline { min-height: 36px; flex-direction: row; gap: 4px; margin-top: 6px; padding: 0 10px; }
.catalog-list { display: grid; gap: 8px; margin-bottom: 24px; }
.catalog-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.catalog-row--new { border-style: dashed; border-color: var(--blue-300); }
.catalog-row input, .catalog-row select { min-height: 42px; padding: 0 8px; border: 1.5px solid var(--navy-200); border-radius: 10px; font: inherit; min-width: 0; }
.catalog-icon { display: flex; align-items: center; color: var(--brand); }
@media (min-width: 1024px) {
  .catalog-row { grid-template-columns: 32px repeat(3, 1fr) 150px 70px 70px auto; }
  .catalog-row:not(:has(.catalog-icon)) { grid-template-columns: repeat(3, 1fr) 110px 110px auto; }
  .catalog-row.option-row { grid-template-columns: repeat(3, 1fr) 80px 110px auto; }
}

/* Dropdown lists and Team (permissions) pages */
.lists-link { margin-bottom: 20px; border: 1px solid var(--border); border-radius: 12px; }
.option-row.is-off input:not([type=checkbox]) { color: var(--ink-muted); text-decoration: line-through; }
.perm-grid, .role-pick { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; }
.perm-grid legend, .role-pick legend { font-weight: 700; margin-bottom: 4px; }
.perm-grid .check { align-items: flex-start; padding: 6px 0; }
.perm-grid .check span { display: flex; flex-direction: column; }
.perm-grid .check small { font-weight: 400; color: var(--ink-muted); }
.role-pick { grid-auto-flow: column; justify-content: start; gap: 20px; }
.team-add:has([name=role][value=member]:checked) .perm-grid { display: none; }
.team-list { display: grid; gap: 12px; }
.team-person form { margin-top: 12px; }
.team-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-head .row-body { flex: 1; min-width: 160px; }
@media (min-width: 1024px) { .perm-grid { grid-template-columns: repeat(2, 1fr); column-gap: 24px; } }

/* ---------- Admin panel frame (separate look from the public site) ---------- */
.admin-header { position: sticky; top: 0; z-index: 30; background: var(--navy-500); color: #fff; }
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: var(--max); margin: 0 auto; padding: 10px 16px; }
.admin-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.admin-badge { padding: 2px 8px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.admin-header-actions { display: flex; align-items: center; gap: 6px; }
.admin-header-actions form { margin: 0; }
.admin-site-btn, .admin-out-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; font: inherit; font-size: 0.88rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.admin-site-btn { background: #fff; color: var(--navy-500); border-color: #fff; }
.admin-site-btn .icon, .admin-out-btn .icon { width: 18px; height: 18px; }
.admin-out-btn span { display: none; }
.admin-page .container { max-width: var(--max); }
@media (max-width: 1023px) { .admin-side { display: none; } }
.admin-shell { display: grid; gap: 14px; padding-top: 14px; }
.admin-main { min-width: 0; }
.admin-main .page-title { margin-top: 0; }
.admin-main .admin-table { display: block; overflow-x: auto; }
.admin-bottom .bottom-nav-item.is-active { color: var(--brand); }
@media (min-width: 1024px) {
  .admin-out-btn span { display: inline; }
  .admin-main .admin-table { display: table; }
}
.admin-link .icon { color: var(--brand); }

.admin-site-btn { white-space: nowrap; }
.admin-site-btn .long { display: none; }
@media (min-width: 1024px) {
  .admin-site-btn .long { display: inline; }
  .admin-site-btn .short { display: none; }
}

/* Admin header on phones: role is shown under the name, so the badge hides and the actions fit one line. */
.admin-lang summary { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1.5px solid rgba(255, 255, 255, .35); color: #fff; font-weight: 600; font-size: 0.85rem; cursor: pointer; list-style: none; }
.admin-lang summary::-webkit-details-marker { display: none; }
.admin-lang summary .icon { width: 18px; height: 18px; }
.admin-lang ul { right: 0; color: var(--ink); }
@media (max-width: 1023px) {
  .admin-badge { display: none; }
  .admin-brand img { width: 96px; height: auto; }
  .admin-header-actions { gap: 4px; }
  .admin-site-btn, .admin-out-btn { padding: 0 10px; }
}

/* ---------- Admin "control room" dashboard ---------- */
.cr-section { margin: 0 0 20px; }
.cr-h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.05rem; }
.cr-h2 .icon { width: 20px; height: 20px; color: var(--brand); }
.cr-card { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.cr-empty { margin: 0; color: var(--ink-muted); font-size: 0.9rem; }


.cr-change { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 0.8rem; font-weight: 600; color: var(--ink-muted); }
.cr-change.is-up { color: var(--success); }
.cr-change.is-down { color: #B45309; }
.cr-change small { font-weight: 400; color: var(--ink-muted); }
.cr-spark { width: 100%; height: 40px; margin-top: 6px; overflow: visible; }
.cr-spark-area { fill: var(--blue-50); }
.cr-spark-line { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cr-spark-dot { fill: var(--brand); stroke: #fff; stroke-width: 2; }

.cr-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cr-bars a { display: grid; grid-template-columns: minmax(0, 40%) 1fr auto; align-items: center; gap: 10px; min-height: 36px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.cr-bars a:hover { background: var(--page-alt); }
.cr-bar-label { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.88rem; }
.cr-bar-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-bar-label .icon { flex: none; width: 16px; height: 16px; color: var(--brand); }
.cr-bar-track { height: 10px; border-radius: 999px; background: var(--page-alt); overflow: hidden; }
.cr-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.cr-bar-n { font-size: 0.85rem; min-width: 2.5em; text-align: right; }

.cr-feed { list-style: none; margin: 0; padding: 0; }
.cr-feed li + li { border-top: 1px solid var(--border); }
.cr-feed a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 0; color: var(--ink); text-decoration: none; }
.cr-feed-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-50); color: var(--brand); }
.cr-feed-icon .icon { width: 16px; height: 16px; }
.cr-feed-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.cr-feed small { color: var(--ink-muted); font-size: 0.78rem; white-space: nowrap; }

.cr-cols { display: grid; gap: 0; }
@media (min-width: 720px) { .cr-cols { grid-template-columns: 1fr 1fr; gap: 16px; } }

/* Dashboard head, headline numbers, "Needs you now" and the visits chart */
.cr-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.cr-head h1 { margin: 0; font-size: 1.5rem; }
.cr-date { margin: 0; color: var(--ink-muted); font-size: 0.85rem; }
.cr-range { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.cr-range a { min-height: 34px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.cr-range a.is-active { background: var(--brand); color: #fff; }
.cr-kpis { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
/* Phones: numbers two by two, and the waiting-work card first across the full width (work before charts). */
@media (max-width: 1023px) {
  .cr-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cr-kpis .cr-kpi:last-child { order: -1; grid-column: 1 / -1; }
  .cr-kpi { padding: 12px; }
  .cr-kpi b { font-size: 1.35rem; }
}
.cr-kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); min-width: 0; }
.cr-kpi-label { display: flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 0.82rem; font-weight: 600; }
.cr-kpi-label .icon { width: 16px; height: 16px; color: var(--brand); }
.cr-kpi b { font-size: 1.6rem; line-height: 1.15; }
.cr-kpi small { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; color: var(--ink-muted); font-size: 0.8rem; }
.cr-kpi.is-work { border-color: #F2C46D; }
.cr-kpi.is-work small { color: #92400E; }
.cr-kpi.is-sos { border-color: var(--sos); background: var(--sos-tint); }
.cr-kpi.is-sos small, .cr-kpi.is-sos .cr-kpi-label .icon { color: var(--sos); font-weight: 600; }
.cr-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 0 16px; }
.cr-h2 small { margin-left: auto; color: var(--ink-muted); font-size: 0.8rem; font-weight: 600; }
.cr-queue-list { list-style: none; margin: 0; padding: 0; }
.cr-q { --tone: var(--brand); --tone-bg: var(--blue-50); display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.cr-q + .cr-q { border-top: 1px solid var(--border); }
.cr-q--sos { --tone: var(--sos); --tone-bg: var(--sos-tint); }
.cr-q--warn { --tone: #B45309; --tone-bg: #FFF6E5; }
.cr-q-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--tone-bg); color: var(--tone); }
.cr-q-icon .icon { width: 18px; height: 18px; }
.cr-q-text { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.cr-q-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.92rem; }
.cr-q-text small { color: var(--ink-muted); font-size: 0.78rem; }
.cr-q--sos .cr-q-text small { color: var(--sos); font-weight: 600; }
.cr-q form { margin: 0; }
.button--small { min-height: 36px; padding: 0 12px; font-size: 0.85rem; }
.cr-clear { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px; border-radius: 12px; background: var(--success-tint); color: var(--success); font-weight: 600; }
.cr-chart-n { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; }
.cr-chart-n b { font-size: 1.5rem; }
.cr-big { width: 100%; height: 160px; overflow: visible; }
.cr-axis { display: flex; justify-content: space-between; margin: 4px 0 0; color: var(--ink-muted); font-size: 0.75rem; }
@media (min-width: 1024px) { .cr-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }

/* ---------- Profile strength: ring, site-wide nudge and the My profile page ---------- */
.pn-ring { --p: 0; --s: 44px; flex: none; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--blue-100) 0); }
.pn-ring b { width: calc(var(--s) - 10px); height: calc(var(--s) - 10px); border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 0.72rem; color: var(--primary-dark); }
.pn-ring--big { --s: 64px; }
.pn-ring--big b { font-size: 0.95rem; }
.profile-nudge { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 10px 10px 10px 12px; border: 1px solid var(--blue-200); border-radius: 14px; background: var(--blue-50); }
.pn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.pn-text b { font-size: 0.92rem; }
.pn-text span { display: flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 0.82rem; }
.pn-text .icon { width: 15px; height: 15px; color: var(--brand); flex: none; }
.profile-nudge form { margin: 0; }
.pn-close { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-muted); cursor: pointer; }
.pn-close:hover { background: var(--blue-100); }
@media (max-width: 559px) { .pn-cta { display: none; } }

.pf-welcome { margin: 8px 0 16px; padding: 18px; border-radius: 16px; background: var(--navy-500); color: #fff; }
.pf-welcome h1 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1.3rem; }
.pf-welcome h1 .icon { color: #FFD27A; }
.pf-welcome p { margin: 0 0 12px; opacity: .9; }
.pf-welcome .button { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.pf-layout { display: grid; gap: 16px; margin-bottom: 16px; }
.pf-card { display: block; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); margin-bottom: 12px; }
.pf-card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.02rem; }
.pf-card-title .icon { color: var(--brand); width: 20px; height: 20px; }
.pf-card .field + .field { margin-top: 12px; }
.pf-head { display: flex; align-items: center; gap: 14px; }
.pf-avatar { width: 60px; height: 60px; font-size: 1.5rem; }
.pf-who { min-width: 0; }
.pf-who h2 { margin: 0; font-size: 1.15rem; }
.pf-email { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 0.88rem; }
.pf-email .icon { width: 16px; height: 16px; color: var(--success); flex: none; }
.pf-email span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-who small { color: var(--ink-muted); font-size: 0.78rem; }
.pf-strength-top { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.pf-strength-top h2 { margin: 0; font-size: 1.02rem; }
.pf-strength-top p { margin: 2px 0 0; color: var(--ink-muted); font-size: 0.85rem; }
.pf-steps { list-style: none; margin: 0; padding: 0; }
.pf-steps li + li { border-top: 1px solid var(--border); }
.pf-step { display: flex; align-items: center; gap: 10px; padding: 10px 2px; color: var(--ink); text-decoration: none; }
.pf-step > .icon:first-child { flex: none; width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--blue-50); color: var(--brand); }
.pf-step > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pf-step b { font-size: 0.9rem; }
.pf-step small { color: var(--ink-muted); font-size: 0.78rem; }
.pf-steps li.is-done .pf-step > .icon:first-child { background: var(--success-tint); color: var(--success); }
.pf-steps li.is-done b { color: var(--ink-muted); }
a.pf-step:hover b { color: var(--brand); }
.pf-two { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 560px) { .pf-two { grid-template-columns: 1fr 1fr; } .pf-two .field + .field { margin-top: 0; } }
.pf-form textarea, .pf-form input, .pf-form select { width: 100%; }
.pf-save { position: sticky; bottom: calc(var(--bottom-nav-h, 64px) + 8px); z-index: 5; padding: 8px 0; }
.pf-save .button { width: 100%; box-shadow: 0 6px 18px rgba(2, 22, 58, .15); }
/* First sign-in on a phone: the three required fields come first, the strength card after. */
@media (max-width: 1023px) { .pf-layout.is-setup .pf-side { order: 2; } }
.pf-card-sub { margin: -6px 0 12px; color: var(--ink-muted); font-size: 0.86rem; }
.pf-req { color: var(--sos); font-style: normal; font-weight: 700; }
.pf-steps .pf-req { font-size: 0.72rem; font-weight: 600; margin-left: 4px; }
.pf-opt { color: var(--ink-muted); font-weight: 400; font-size: 0.8rem; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--sos); box-shadow: 0 0 0 3px rgba(198, 40, 40, .12); }
.pf-phone { display: flex; align-items: stretch; }
.pf-phone > span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border); border-right: 0; border-radius: 10px 0 0 10px; background: var(--blue-50); color: var(--ink-muted); font-weight: 600; }
.pf-phone input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.pf-types { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .pf-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pf-type { position: relative; display: block; cursor: pointer; }
.pf-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-type-box { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); }
.pf-type-box > .icon:first-child { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--blue-50); color: var(--brand); }
.pf-type-box > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pf-type-box b { font-size: 0.92rem; }
.pf-type-box small { color: var(--ink-muted); font-size: 0.78rem; }
.pf-type-box > .icon:last-child { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; border: 1.5px solid var(--border); color: transparent; }
.pf-type input:checked + .pf-type-box { border-color: var(--brand); background: var(--blue-50); }
.pf-type input:checked + .pf-type-box > .icon:last-child { background: var(--brand); border-color: var(--brand); color: #fff; }
.pf-type input:focus-visible + .pf-type-box { outline: 3px solid var(--blue-200); outline-offset: 2px; }
.pf-sec { margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--border); }
.pf-sec + .pf-sec { margin-top: 14px; }
.pf-sec legend { display: flex; align-items: center; gap: 8px; padding: 0; font-weight: 700; font-size: 0.95rem; }
.pf-sec legend .icon { width: 18px; height: 18px; color: var(--brand); }
.pf-sec .field, .pf-sec .pf-two { margin-top: 10px; }
.pf-sec-note { display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 0.88rem; }
.pf-sec-note .icon { flex: none; width: 18px; height: 18px; color: var(--brand); }
.pf-details-empty { display: none; }
/* Only the groups for the ticked types are shown (browsers without :has() show all of them). */
@supports selector(:has(*)) {
  .pf-form .pf-sec { display: none; }
  .pf-form .pf-sec:first-of-type, .pf-form .pf-sec { border-top: 0; padding-top: 0; }
  .pf-details:has(.pf-sec) .pf-details-empty { display: block; }
  .pf-form:has(input[value="seeker"]:checked) .pf-sec[data-type="seeker"] { display: block; }
  .pf-form:has(input[value="business"]:checked) .pf-sec[data-type="business"] { display: block; }
  .pf-form:has(input[value="service"]:checked) .pf-sec[data-type="service"] { display: block; }
  .pf-form:has(input[value="property"]:checked) .pf-sec[data-type="property"] { display: block; }
  .pf-form:has(input[value="vehicle"]:checked) .pf-sec[data-type="vehicle"] { display: block; }
  .pf-form:has(input[value="customer"]:checked) .pf-sec[data-type="customer"] { display: block; }
  .pf-form:has(.pf-type input:checked) .pf-details-empty { display: none; }
  .pf-form:has(input[value="property"]:checked) .pf-sec-note[data-type="property"],
  .pf-form:has(input[value="customer"]:checked) .pf-sec-note[data-type="customer"] { display: flex; }
}
.pf-mini { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; border-color: var(--blue-200); background: var(--blue-50); }
.pf-mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pf-mini-text small { color: var(--ink-muted); }
@media (min-width: 1024px) {
  .pf-layout { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
  .pf-side { position: sticky; top: 90px; }
  .pf-save { position: static; }
  .pf-save .button { width: auto; box-shadow: none; }
}

/* ---------- Admin management pages (Users, Team, Categories, Cities, Lists): one look for all ---------- */
.ap-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 0 0 16px; }
.ap-head-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--blue-50); color: var(--brand); }
.ap-head-text { flex: 1; min-width: 200px; }
.ap-head-text h1 { margin: 0; font-size: 1.4rem; line-height: 1.2; }
.ap-head-text p { margin: 2px 0 0; color: var(--ink-muted); font-size: 0.88rem; }
.ap-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin: 0 0 16px; }
.ap-card-title { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 16px; font-size: 1rem; border-bottom: 1px solid var(--border); }
.ap-card-title .icon { width: 18px; height: 18px; color: var(--brand); }
.ap-section-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 8px; }
.ap-section-head h2 { margin: 0; font-size: 1rem; }

/* Numbers that are also filters */
.ap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0 0 14px; }
.ap-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.ap-stat b { font-size: 1.3rem; line-height: 1.1; }
.ap-stat span { color: var(--ink-muted); font-size: 0.8rem; font-weight: 600; }
a.ap-stat:hover { border-color: var(--blue-300); }
.ap-stat.is-active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.ap-stat.is-active span { color: var(--brand); }
.ap-stat--plain { background: var(--page-alt); }

/* Search + filters */
.ap-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.ap-toolbar select { min-height: 44px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; }
.ap-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.ap-search:focus-within { border-color: var(--brand); }
.ap-search .icon { width: 18px; height: 18px; color: var(--ink-muted); }
.ap-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; }

/* Data table; on phones every row becomes a small card with labels */
.ap-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ap-table th { text-align: left; padding: 10px 14px; background: var(--page-alt); color: var(--ink-muted); font-size: 0.78rem; font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ap-table th:first-child { border-top-left-radius: 14px; }
.ap-table th:last-child { border-top-right-radius: 14px; }
.ap-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ap-table tr:last-child td { border-bottom: 0; }
.ap-table tbody tr:hover { background: #FAFCFF; }
.ap-num { text-align: right; font-variant-numeric: tabular-nums; }
.ap-row-act { text-align: right; width: 1%; white-space: nowrap; }
@media (max-width: 1023px) {
  .ap-table thead { display: none; }
  .ap-table, .ap-table tbody, .ap-table tr, .ap-table td { display: block; }
  .ap-table tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .ap-table tr:last-child { border-bottom: 0; }
  .ap-table td { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; border: 0; text-align: right; }
  .ap-table td[data-label]::before { content: attr(data-label); color: var(--ink-muted); font-size: 0.8rem; text-align: left; }
  .ap-table td:first-child { padding-bottom: 8px; justify-content: flex-start; text-align: left; }
  .ap-table td.ap-wide { display: none; }
  .ap-row-act { width: auto; }
  /* The filter numbers slide sideways instead of filling the first screen. */
  .ap-stats { display: flex; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .ap-stat { flex: none; min-width: 104px; padding: 10px 12px; }
  .ap-stat b { font-size: 1.1rem; }
}

/* People: avatar, name and email */
.ap-person { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.ap-person > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ap-person b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-person small { color: var(--ink-muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ap-person:hover b { color: var(--brand); }
.ap-avatar { --s: 36px; flex: none; width: var(--s); height: var(--s); border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--blue-50); color: var(--primary-dark); font-weight: 700; font-size: calc(var(--s) * .42); }
.ap-tile { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--blue-50); color: var(--brand); }
.ap-tile .icon { width: 18px; height: 18px; }

/* Role badges and status dots */
.ap-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--page-alt); color: var(--ink); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.ap-badge .icon { width: 13px; height: 13px; }
.ap-badge--blue { background: var(--blue-50); color: var(--primary-dark); }
.ap-badge--navy { background: var(--navy-500); color: #fff; }
.ap-status { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.ap-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ap-status--green { color: var(--success); }
.ap-status--red { color: var(--sos); }
.ap-status--amber { color: #B45309; }

/* Chips: sections an admin may open; and chip navigation (services, lists) */
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ap-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--blue-50); color: var(--primary-dark); font-size: 0.75rem; font-weight: 600; white-space: nowrap; text-decoration: none; }
.ap-chip--all { background: var(--navy-500); color: #fff; }
.ap-chip--none { background: #FFF6E5; color: #92400E; }
.ap-chips--nav { margin: 0 0 14px; }
.ap-chips--nav .ap-chip { min-height: 36px; padding: 0 14px; font-size: 0.85rem; background: var(--surface); border: 1px solid var(--border); color: var(--ink); }
.ap-chips--nav .ap-chip b { color: var(--ink-muted); font-weight: 600; }
.ap-chips--nav .ap-chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.ap-chips--nav .ap-chip.is-active b { color: #fff; }

/* Tabs (Categories | Cities | Dropdown lists) */
.ap-tabs { display: flex; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.ap-tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--ink-muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.ap-tabs a .icon { width: 18px; height: 18px; }
.ap-tabs a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* Rows that open in place to edit (Team, Categories, Cities, Lists) */
.ap-rows-head { display: none; }
.ap-row + .ap-row { border-top: 1px solid var(--border); }
.ap-row > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 12px 16px; }
.ap-row > summary::-webkit-details-marker { display: none; }
.ap-row > summary:hover { background: #FAFCFF; }
.ap-row[open] > summary { background: var(--page-alt); }
.ap-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-langs { flex-direction: column; align-items: flex-start; gap: 0; font-size: 0.85rem; }
.ap-langs span + span { color: var(--ink-muted); }
.ap-row-edit { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-size: 0.85rem; font-weight: 600; }
.ap-row-edit .icon { width: 16px; height: 16px; }
.ap-row-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); background: var(--page-alt); }
.ap-row-body form { margin: 12px 0 0; }
.ap-row-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ap-row-foot form { margin: 0; }
.ap-row.is-off .ap-person b { color: var(--ink-muted); text-decoration: line-through; }
@media (max-width: 1023px) {
  /* Phones: name and the edit pencil on the first line, the details small on the second. */
  .ap-row > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .ap-row > summary .ap-person { flex: 1 1 calc(100% - 48px); }
  .ap-row > summary > :not(.ap-person):not(.ap-row-edit) { order: 3; font-size: 0.8rem; }
  .ap-row > summary .ap-langs { flex-direction: row; gap: 8px; padding-left: 46px; }
  .ap-row > summary > .ap-num { display: none; }
  .ap-row-edit { order: 2; }
  .ap-row-edit span { display: none; }
}
@media (min-width: 1024px) {
  .ap-rows-head { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) 110px 120px 140px; gap: 12px; padding: 10px 16px; background: var(--page-alt); color: var(--ink-muted); font-size: 0.78rem; font-weight: 600; border-bottom: 1px solid var(--border); border-radius: 14px 14px 0 0; }
  .ap-rows-head + .ap-row { border-top: 0; }
  .ap-row > summary { grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr) 110px 120px 140px; }
  .ap-row-edit { justify-self: end; }
  .ap-rows:not(:has(.ap-rows-head)) .ap-row > summary { grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 2fr) 170px; }
}

/* "+ Add" panels */
.ap-drawer { overflow: hidden; }
.ap-drawer-head { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px; font-weight: 700; color: var(--brand); }
.ap-drawer-head::-webkit-details-marker { display: none; }
.ap-drawer-head span { flex: 1; }
.ap-drawer[open] .ap-drawer-head { border-bottom: 1px solid var(--border); }
.ap-drawer[open] .ap-drawer-head .icon:last-child { transform: rotate(180deg); }
.ap-drawer > form { padding: 14px 16px 16px; }
.ap-drawer:not([open]) { display: none; }
.ap-drawer:target, .ap-drawer[open] { display: block; }
.ap-fields { display: grid; gap: 10px; margin: 0 0 12px; }
@media (min-width: 720px) { .ap-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ap-fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ap-fields input, .ap-fields select { min-height: 44px; padding: 0 10px; border: 1.5px solid var(--navy-200); border-radius: 10px; font: inherit; background: var(--surface); width: 100%; }

/* User profile */
.ap-profile { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px; }
.ap-profile-text { flex: 1; min-width: 220px; }
.ap-profile-text h1 { margin: 0; font-size: 1.4rem; }
.ap-profile-text p { margin: 2px 0 0; color: var(--ink-muted); font-size: 0.88rem; }
.ap-profile-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px !important; }
.ap-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-profile-actions form { margin: 0; }
.ap-facts { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.ap-facts li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ap-facts span { color: var(--ink-muted); font-size: 0.78rem; font-weight: 600; }
.ap-facts b { font-size: 1.05rem; }
.ap-facts li.is-warn { border-color: #F2C46D; }
.ap-cols { display: grid; gap: 0 16px; }
.ap-cols > *, .ap-card-body { min-width: 0; }
/* Wide tables scroll inside their card instead of pushing the page sideways. */
.ap-card:has(> .ap-table) { overflow-x: auto; }
@media (min-width: 1024px) { .ap-cols { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }
.ap-list { list-style: none; margin: 0; padding: 0; }
.ap-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; }
.ap-list li + li { border-top: 1px solid var(--border); }
.ap-list a, .ap-list li > span:first-child { display: flex; flex-direction: column; min-width: 0; color: var(--ink); text-decoration: none; }
.ap-list b { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-list small { color: var(--ink-muted); font-size: 0.78rem; }
.ap-list a:hover b { color: var(--brand); }
.ap-list-empty { color: var(--ink-muted); font-size: 0.88rem; }

.ap-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--ink-muted); font-size: 0.85rem; }
.ap-pager span { margin-right: auto; }
.ap-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 16px; text-align: center; color: var(--ink-muted); }
.ap-empty .icon { width: 32px; height: 32px; color: var(--navy-300); }
.ap-empty b { color: var(--ink); }

/* Work lists (Reports, SOS and messages, Team chats, Claims, Questions) and the rest of the admin pages */
.ap-items .ap-item + .ap-item { border-top: 1px solid var(--border); }
.ap-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; }
.ap-item--sos { background: #FFF8F8; }
.ap-item-main { flex: 1; min-width: 0; }
.ap-item-main p { margin: 0; }
.ap-item-title { font-weight: 700; font-size: 0.95rem; }
.ap-item-title a { color: var(--ink); text-decoration: none; }
.ap-item-title a:hover { color: var(--brand); }
.ap-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px !important; color: var(--ink-muted); font-size: 0.8rem; }
.ap-item-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.ap-item-meta .icon { width: 14px; height: 14px; }
.ap-item-note { margin-top: 6px !important; padding: 8px 10px; border-radius: 8px; background: var(--page-alt); color: var(--ink); font-size: 0.88rem; white-space: pre-line; }
.ap-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ap-acts form { margin: 0; }
@media (min-width: 1024px) { .ap-table .ap-acts { flex-wrap: nowrap; } }
.ap-tile--amber { background: #FFF6E5; color: #B45309; }
.ap-tile--red { background: var(--sos-tint); color: var(--sos); }
.ap-badge--amber { background: #FFF6E5; color: #92400E; }
.ap-badge--red { background: var(--sos-tint); color: var(--sos); }
.ap-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0 46px; }
.ap-tags:empty { display: none; }
.ap-tab-n { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--page-alt); color: var(--ink-muted); font-size: 0.75rem; line-height: 20px; text-align: center; }
.ap-tabs a.is-active .ap-tab-n { background: var(--blue-50); color: var(--brand); }
.ap-tab-n.is-hot { background: #FFF6E5; color: #92400E; }
.ap-tab-n.is-sos { background: var(--sos); color: #fff; }
.ap-when { white-space: nowrap; color: var(--ink-muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.ap-code { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--blue-50); color: var(--primary-dark); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.8rem; }
.ap-muted { color: var(--ink-muted); }
.ap-card-body { padding: 14px 16px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ap-card-body p { margin: 0; }
.ap-card-body > .button { justify-self: start; }
.ap-card-body textarea { width: 100%; padding: 10px; border: 1.5px solid var(--navy-200); border-radius: 10px; font: inherit; }
.ap-preview { display: grid; gap: 6px; font-size: 0.8rem; color: var(--ink-muted); font-weight: 600; }
.ap-preview .site-notice { border-radius: 10px; }
.ap-sample { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--navy-500); color: #DBEBFF; font-size: 0.75rem; overflow-x: auto; white-space: pre; }
.ap-file { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border: 1.5px dashed var(--blue-300); border-radius: 12px; color: var(--brand); font-weight: 600; cursor: pointer; }
.ap-file input { flex: 1; min-width: 0; font: inherit; color: var(--ink); }
@media (max-width: 1023px) {
  .ap-item { flex-wrap: wrap; }
  .ap-item .ap-acts { width: 100%; justify-content: flex-start; padding-left: 48px; }
  .ap-tags { margin-left: 0; }
  .ap-table .ap-acts { justify-content: flex-start; }
}

/* ---------- Admin console frame on laptops and desktops ---------- */
.admin-topbar, .side-brand, .side-nav, .side-who { display: none; }
@media (min-width: 1024px) {
  .admin-page { background: var(--page-alt); }
  .admin-page .admin-header { display: none; }
  .admin-page main.container { max-width: none; margin: 0; padding: 0; }
  .admin-shell { grid-template-columns: 248px minmax(0, 1fr); gap: 0; padding: 0; min-height: 100vh; }
  .admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 18px 12px; background: var(--navy-500); color: #fff; }
  .side-brand { display: flex; align-items: center; gap: 8px; padding: 0 8px 14px; text-decoration: none; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-group { margin: 14px 10px 4px; color: rgba(255, 255, 255, .55); font-size: 0.72rem; font-weight: 600; letter-spacing: .04em; }
  .side-nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 10px; color: rgba(255, 255, 255, .82); text-decoration: none; font-size: 0.9rem; }
  .side-nav a .icon { width: 18px; height: 18px; flex: none; }
  .side-nav a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .side-nav a.is-active { background: var(--brand); color: #fff; font-weight: 600; }
  .side-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, .18); color: #fff; font-size: 0.75rem; display: inline-flex; align-items: center; justify-content: center; }
  .side-count.is-sos { background: var(--sos); }
  .side-who { display: flex; align-items: center; gap: 8px; margin: auto 0 0; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 0.85rem; }
  .side-who .icon { color: #85B7EB; flex: none; }
  .side-who span { display: flex; flex-direction: column; min-width: 0; }
  .side-who small { color: rgba(255, 255, 255, .6); }
  .admin-main { padding: 0 32px 40px; }
  .admin-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; margin: 0 -32px 20px; padding: 12px 32px; background: var(--page-alt); border-bottom: 1px solid var(--border); }
  .top-search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
  .top-search:focus-within { border-color: var(--brand); }
  .top-search .icon { color: var(--ink-muted); width: 18px; height: 18px; }
  .top-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; }
  .top-menu { position: relative; }
  .top-menu:first-of-type { margin-left: auto; }
  .top-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 0.88rem; }
  .top-menu summary::-webkit-details-marker { display: none; }
  .top-menu summary .icon { width: 18px; height: 18px; }
  .top-add { background: var(--brand) !important; border-color: var(--brand) !important; color: #fff; }
  .top-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--navy-500); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
  .top-menu ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(2, 22, 58, .14); }
  .top-menu li a, .top-menu li button, .top-menu li span { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 0.9rem; text-decoration: none; cursor: pointer; text-align: left; }
  .top-menu li a:hover, .top-menu li button:hover { background: var(--page-alt); }
  .top-menu li .icon { width: 18px; height: 18px; color: var(--brand); }
  .top-menu li form { margin: 0; }
  .top-menu .is-current { font-weight: 700; }
  .admin-search-phone { display: none; }
  /* Tables and lists sit on white cards on the grey console background. */
  .admin-main .admin-table { border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
  .admin-main .admin-table th { background: var(--page-alt); font-size: 0.8rem; color: var(--ink-muted); }
  .admin-main .admin-table th, .admin-main .admin-table td { padding: 12px 14px; }
  .admin-main .admin-table tr:last-child td { border-bottom: 0; }
  .admin-main .row-list { background: var(--surface); border-radius: 12px; }
  .admin-main .page-title { font-size: 1.5rem; }
}

/* ---------- Two GUIs: phone vs laptop/desktop ----------
   Phones (< 1024px): one column, bottom bar, fold-out filters, chat button pinned above the bar.
   Laptops/desktops (>= 1024px): service bar under the header, filters in a left column,
   post pages split into details + a right-hand action card, forms and chats in a centred column. */
.module-bar { display: none; }
.side-price { display: none; }
.detail-side { display: grid; gap: 12px; }
.detail-side .safety-tip { margin-top: 0; }

@media (min-width: 1024px) {
  /* Service bar: every module one click away. */
  .module-bar { display: block; border-top: 1px solid var(--border); }
  .module-bar ul { list-style: none; max-width: var(--max); margin: 0 auto; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .module-bar-link {
    position: relative; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
    color: var(--ink-muted); font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  }
  .module-bar-link .icon { width: 18px; height: 18px; color: var(--navy-300); }
  .module-bar-link:hover { color: var(--ink); }
  .module-bar-link:hover .icon, .module-bar-link.is-active .icon { color: var(--brand); }
  .module-bar-link.is-active { color: var(--primary-dark); }
  .module-bar-link.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
  .module-bar-link--sos, .module-bar-link--sos .icon { color: var(--sos); }

  /* List pages: filters left (sticky), results right. */
  .list-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; align-items: start; }
  .list-side .filters-body { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .list-side .filters-actions { grid-column: auto; grid-template-columns: 1fr; gap: 8px; }
  .list-side .list-search { padding-left: 12px; }
  .list-side .list-search button { padding: 0 12px; }
  .list-side .field-label { font-size: 0.85rem; }
  .list-main .result-count { margin-top: 0; }
  .list-main .list-grid { grid-template-columns: repeat(3, 1fr); }
  .list-main .row-list { grid-template-columns: 1fr; }
  .list-main .row-list > li:nth-child(odd) { border-right: 0; }
  .list-main .row-list > li:last-child { border-bottom: 0; }

  /* Post page: details left, action card right that stays in view. */
  .detail { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 36px; align-items: start; }
  .detail > * { grid-column: 1; }
  .detail > .detail-side { grid-column: 2; grid-row: 1 / span 40; position: sticky; top: 132px; margin-top: 8px; }
  .detail .gallery { margin-top: 8px; }
  .detail-actions { padding: 18px; background: var(--surface); border: 1.5px solid var(--border); box-shadow: 0 8px 24px rgba(2, 22, 58, .06); }
  .side-price { display: block; margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--success); }
  .detail-head h1 { font-size: 1.7rem; }
  .facts ul { grid-template-columns: repeat(3, 1fr); }

  /* Forms, chats and reading pages: a centred column instead of a stretched phone screen. */
  .container--narrow { max-width: 820px; }
  .container--narrow .form-card, .container--narrow .chat-form, .container--narrow .messages, .container--narrow .share-box { max-width: none; }

  /* "What do you want to post?": big cards, three per row, icon beside the words. */
  .post-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .post-grid .module-tile { align-items: center; text-align: left; height: 100%; padding: 16px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); }
  .post-grid .module-tile:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(2, 22, 58, .07); }
  .post-grid .module-icon { flex: none; width: 56px; max-width: 56px; }
  .post-grid .module-label { font-size: 1rem; font-weight: 600; }
  .post-grid .module-tile { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px; }
  .post-grid .module-icon { grid-row: 1 / span 2; }
  .post-grid .module-hint { font-size: 0.85rem; color: var(--ink-muted); }

  /* Account: tiles in a row, posts and saved items side by side. */
  .container--medium { max-width: 1000px; }
  .account-head { margin-top: 28px; }
  .account-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}
@media (min-width: 1280px) {
  .list-main .list-grid { grid-template-columns: repeat(4, 1fr); }
  .list-layout { grid-template-columns: 300px minmax(0, 1fr); }
}

/* ---------- Phone = app: inner pages get an app bar, no website header/footer ---------- */
.app-bar { display: none; }
@media (max-width: 1023px) {
  body.app-inner .site-header, body.app-inner .site-footer, body.app-inner .crumbs { display: none; }
  body.app-inner .app-bar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px; min-height: 56px; padding: 4px 6px;
    background: var(--surface); box-shadow: 0 1px 0 var(--border);
  }
  .app-back, .app-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
  .app-back:active, .app-icon:active { background: var(--page-alt); }
  .app-back .icon { width: 26px; height: 26px; }
  .app-icon .icon { width: 22px; height: 22px; }
  .app-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .app-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.08rem; }
  .app-title a { display: inline-flex; align-items: center; gap: 2px; align-self: flex-start; font-size: 0.78rem; font-weight: 600; color: var(--ink-muted); text-decoration: none; }
  .app-title a .icon { width: 13px; height: 13px; color: var(--brand); }
  body.app-inner .container { padding-top: 6px; }
  .app-back[hidden] { display: none; }
  .app-back[hidden] + .app-title { padding-left: 12px; }
  /* The app bar already names the list, so the big heading would repeat it. */
  body.app-inner .list-head { grid-template-columns: 1fr; margin-top: 8px; }
  body.app-inner .list-head .list-icon { display: none; }
  body.app-inner .list-head-text, body.app-inner .page-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 1024px) { .app-menu { display: none; } }

/* ---------- Admin on phones: no menu block on top; the bottom "Menu" tab opens the full list ---------- */
.admin-menu-group h2 { margin: 18px 0 8px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); }
.admin-menu-group .row-item { min-height: 56px; }
.menu-count { flex: none; min-width: 26px; height: 26px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #B45309; color: #fff; font-size: 0.8rem; font-weight: 700; }
@media (max-width: 1023px) {
  /* Website header: the Admin button lives on the Account tab on phones, so area + language + account fit. */
  .site-header .admin-link { display: none; }
}
/* Area name never pushes into the header buttons: it shortens with "…" instead. */
.loc { max-width: 100%; }
.loc span { overflow: hidden; }
@media (max-width: 380px) { .header-inner { gap: 8px 4px; } .brand-logo { height: 22px; } .sign-in, .lang-menu summary { min-width: 46px; padding: 2px 4px; } }

/* Unread chat count on "Chats" (bottom bar on phones, header on laptops). */
.bottom-nav-item, .chat-link { position: relative; }
.nav-badge {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--sos); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 18px; text-align: center;
}
.chat-link .nav-badge { position: static; margin-left: 2px; }
/* Phones and tablets have "Chats" in the bottom bar already. */
@media (max-width: 1023px) { .chat-link { display: none; } }
