/* SokoCycle — kijani, kijani giza, dhahabu (Outfit) */
@font-face { font-family: 'Outfit'; src: url('../fonts/Outfit-Variable.woff') format('woff'); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --plum: #0B7A55;          /* Kijani — rangi kuu */
  --plum-deep: #0F2A22;     /* Kijani giza */
  --plum-soft: #E6F3EC;
  --plum-line: #CBE3D6;
  --navy: #0F2A22;
  --navy-2: #17402F;
  --ink: #0F2A22;
  --muted: #557066;
  --line: #DCE7E1;
  --bg: #FFFFFF;
  --bg-2: #F1F8F4;           /* Kijani hafifu */
  --amber: #E0A800;
  --gold: #F2B705;           /* Dhahabu — vitufe, mapambo */
  --gold-2: #FFC928;
  --gold-deep: #D9A300;
  --gold-soft: #FFF5D1;
  --good: #0E8A5F;
  --bad: #B3261E;
  --warn-bg: #FFF4E0;
  --r-sm: 8px;
  --r: 14px;
  /* Fonti ya brand: Outfit (inapakiwa kutoka server yako — assets/fonts), na fonti ya mfumo kama akiba */
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-head: var(--font);
  --shadow-1: 0 1px 2px rgba(15,42,34,.06), 0 1px 1px rgba(15,42,34,.04);
  --shadow-2: 0 6px 24px -8px rgba(15,42,34,.18), 0 2px 6px rgba(15,42,34,.06);
  --shadow-3: 0 18px 50px -18px rgba(15,42,34,.35);
  --tabbar: 64px;
  --header: 60px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--bg); min-height: 100vh; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--plum) 55%, white); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }
main { padding-bottom: calc(var(--tabbar) + 24px); }
/* .wrap inaweka padding 0 — main.wrap inahitaji nafasi ya menyu ya chini ili kitu cha mwisho kisifunikwe kwenye simu */
main.wrap { padding-bottom: calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { main.wrap { padding-bottom: 32px; } }
@media (min-width: 900px) { main { padding-bottom: 48px; } }

/* ---------- icons ---------- */
.ic { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -.25em; flex: none; }
.ic svg { width: 100%; height: 100%; display: block; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; cursor: pointer; background: var(--plum); color: #fff;
  transition: background .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--plum-deep); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-navy { background: var(--navy); } .btn-navy:hover { background: var(--navy-2); }
.btn-line { background: #fff; color: var(--plum); border-color: var(--plum-line); }
.btn-line:hover { background: var(--plum-soft); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger { background: #fff; color: var(--bad); border-color: #F0C9C6; } .btn-danger:hover { background: #FDF1F0; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; position: relative; color: var(--ink); }
.icon-btn:hover { background: var(--bg-2); }
.badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--plum); color: #fff;
  font-size: .7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); margin-top: 4px; font-size: .82rem; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; outline: none; transition: border-color .15s; }
.textarea { min-height: 130px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--plum); }
.field.err .input, .field.err .select, .field.err .textarea { border-color: var(--bad); }
.field .err-msg { color: var(--bad); font-size: .82rem; margin-top: 4px; display: block; }
.select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2318203A' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; padding-right: 40px; }
.row { display: flex; gap: 12px; } .row > * { flex: 1; min-width: 0; }
@media (max-width: 520px) { .row.stack-sm { flex-direction: column; gap: 0; } }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--plum); margin-top: 2px; flex: none; }

/* segmented choice (radio pills) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; }
.pill span, .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.pill input:checked + span, .chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--plum-line); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { height: var(--header); display: flex; align-items: center; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.brand .logo-full { height: 24px; width: auto; }
.brand .logo-mark { width: 28px; height: 28px; border-radius: 8px; }
.brand .wm { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; letter-spacing: -.03em; color: var(--navy); line-height: 1; }
.brand.white .wm { color: #fff; }

.loc-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; font-family: var(--font-head); font-weight: 800; font-size: 1.12rem; cursor: pointer; padding: 6px 8px; border-radius: 10px; max-width: 46vw; }
.loc-btn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-btn:hover { background: var(--bg-2); }
.top-nav { display: none; gap: 4px; margin-left: 8px; }
.top-nav a { padding: 8px 12px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.top-nav a:hover, .top-nav a.on { color: var(--ink); background: var(--bg-2); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.lang-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: .8rem; cursor: pointer; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--plum-soft); color: var(--plum); display: inline-grid; place-items: center; font-weight: 800; font-family: var(--font-head); flex: none; overflow: hidden; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.6rem; }
.avatar.md { width: 48px; height: 48px; font-size: 1.1rem; }
.top .post-btn { display: none; }
@media (min-width: 900px) {
  .top-nav { display: flex; }
  .top .post-btn { display: inline-flex; }
}

/* ---------- bottom tab bar (simu) ---------- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .72rem; font-weight: 600; color: var(--muted); position: relative; }
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a.on { color: var(--navy); }
.tabbar a.on .ic { color: var(--plum); }
.tabbar .plus .ic { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--plum); color: #fff; box-shadow: 0 6px 16px rgba(11,122,85,.35); margin-top: -18px; }
.tabbar .plus { color: var(--plum); }
.tabbar .badge { top: 6px; right: calc(50% - 22px); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ---------- footer ---------- */
.foot { background: var(--navy); color: #B9D3C7; padding: 36px 0 calc(var(--tabbar) + 30px); margin-top: 48px; font-size: .92rem; }
.foot .brand { margin-bottom: 12px; }
.foot a { color: #fff; }
.foot .cols { display: grid; gap: 24px; grid-template-columns: 1fr; }
.foot h4 { color: #fff; margin: 0 0 8px; font-family: var(--font-head); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
@media (min-width: 900px) { .foot { padding-bottom: 36px; } .foot .cols { grid-template-columns: 2fr 1fr 1fr; } }

/* ---------- home feed ---------- */
.searchbar { position: relative; margin: 14px 0 10px; }
.searchbar .input { padding-left: 44px; border-radius: 999px; background: var(--bg-2); border-color: transparent; }
.searchbar .input:focus { background: #fff; border-color: var(--plum); }
.searchbar .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.tabs-type { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.tabs-type button { border: 0; background: none; padding: 12px 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs-type button.on { color: var(--navy); border-color: var(--plum); }
.cat-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.cat-strip::-webkit-scrollbar { display: none; }
.cat-strip .chip .ic { width: 18px; height: 18px; }
.filters { display: flex; gap: 8px; align-items: center; overflow-x: auto; margin-bottom: 6px; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters .select { flex: none; }
.filters .select { width: auto; min-height: 38px; padding: 6px 36px 6px 12px; border-radius: 999px; font-size: .9rem; font-weight: 600; }

.feed { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .feed { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.lrow { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); position: relative; }
.lrow .thumb { width: 112px; height: 112px; border-radius: 12px; overflow: hidden; background: var(--bg-2); flex: none; position: relative; }
.lrow .thumb img { width: 100%; height: 100%; object-fit: cover; }
.lrow .thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--plum); }
.lrow .thumb .ph .ic { width: 40px; height: 40px; opacity: .55; }
.lrow .body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lrow .title { font-size: 1rem; font-weight: 600; margin: 0 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lrow .meta { font-size: .84rem; color: var(--muted); }
.price { font-family: var(--font-head); font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; color: var(--ink); }
.price.free { color: var(--plum); }
.price small { font-family: var(--font); font-weight: 600; font-size: .78rem; color: var(--muted); }
.lrow .counts { margin-top: auto; display: flex; gap: 10px; justify-content: flex-end; font-size: .82rem; color: var(--muted); }
.lrow .counts span { display: inline-flex; align-items: center; gap: 3px; }
.lrow .counts .ic { width: 15px; height: 15px; }
.lrow:hover .title { color: var(--plum); }
.st { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; margin-right: 6px; vertical-align: 1px; }
.st-reserved { background: var(--navy); color: #fff; }
.st-sold { background: #E9E9EE; color: #3E5A50; }
.st-review { background: var(--warn-bg); color: #8A5300; }
.st-hidden { background: #EEE; color: #555; }
.st-service { background: var(--plum-soft); color: var(--plum); }
.st-provider { background: var(--plum); color: #fff; }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .ic { width: 56px; height: 56px; color: var(--plum-line); margin: 0 auto 10px; }
.empty h3 { color: var(--ink); }
.skel { background: linear-gradient(90deg, var(--bg-2), #DCE7E1, var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } * { scroll-behavior: auto !important; } }

.fab { position: fixed; right: 18px; bottom: calc(var(--tabbar) + 18px); z-index: 30; display: none; }

/* ---------- item page ---------- */
.item-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 16px; }
@media (min-width: 900px) { .item-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; } }
.gallery { position: relative; border-radius: var(--r); overflow: hidden; background: var(--bg-2); aspect-ratio: 1 / 1; margin: 0 -16px; border-radius: 0; }
@media (min-width: 640px) { .gallery { margin: 0; border-radius: var(--r); } }
.gallery .slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .slides::-webkit-scrollbar { display: none; }
.gallery .slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; background: #111827; }
.gallery .dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; }
.gallery .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); }
.gallery .dots i.on { background: #fff; }
.gallery .nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.9); }
.gallery .nav.prev { left: 10px; } .gallery .nav.next { right: 10px; }
.gallery .count { position: absolute; top: 12px; right: 12px; background: rgba(15,42,34,.75); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.seller-card { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.seller-card .who { flex: 1; min-width: 0; }
.seller-card .who b { display: block; }
.rating-box { text-align: right; }
.stars { color: var(--amber); letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #D3E2D9; }
.rating-num { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--navy); }
.item-title { font-size: 1.45rem; margin: 18px 0 4px; }
.item-meta { color: var(--muted); font-size: .88rem; }
.item-desc { white-space: pre-wrap; word-wrap: break-word; margin: 16px 0; font-size: 1.02rem; line-height: 1.65; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .94rem; margin: 12px 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; }
.action-bar { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); padding: 12px 0; display: flex; align-items: center; gap: 12px; z-index: 20; }
@media (min-width: 900px) { .action-bar { position: static; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-top: 16px; } }
.action-bar .price { font-size: 1.35rem; flex: 1; }
.fav-btn { border: 1.5px solid var(--line); }
.fav-btn.on { color: var(--plum); border-color: var(--plum-line); background: var(--plum-soft); }
.safety { background: var(--plum-soft); border-radius: var(--r); padding: 14px 16px; font-size: .9rem; margin: 18px 0; }
.safety h3 { font-size: .98rem; color: var(--plum-deep); display: flex; align-items: center; gap: 6px; }
.safety ul { margin: 0; padding-left: 18px; }
.owner-panel { border: 1.5px solid var(--plum-line); border-radius: var(--r); padding: 14px 16px; margin: 16px 0; }
.owner-panel .stats { display: flex; gap: 18px; font-size: .9rem; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.owner-panel .stats b { color: var(--ink); font-family: var(--font-head); font-size: 1.1rem; }
.owner-panel .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 32px 0 6px; }
.section-h a { color: var(--plum); font-weight: 600; font-size: .92rem; }
.notice { border-radius: var(--r-sm); padding: 12px 14px; font-size: .92rem; margin: 12px 0; background: var(--warn-bg); color: #6B4200; }
.notice.info { background: var(--plum-soft); color: var(--plum-deep); }
.notice.bad { background: #FDF1F0; color: var(--bad); }

/* ---------- post form ---------- */
.form-card { padding: 20px 0; }
.photo-grid { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; }
.photo-add, .photo { flex: 0 0 92px; height: 92px; border-radius: 12px; position: relative; }
.photo-add { border: 2px dashed var(--plum-line); display: grid; place-items: center; text-align: center; color: var(--plum); cursor: pointer; font-size: .78rem; font-weight: 700; background: var(--plum-soft); }
.photo-add .ic { width: 26px; height: 26px; margin: 0 auto 2px; }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.photo .x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; border: 2px solid #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.photo .x .ic { width: 14px; height: 14px; }
.photo .cover-tag { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(15,42,34,.8); color: #fff; font-size: .7rem; text-align: center; border-radius: 0 0 12px 12px; padding: 2px; }
.photo .mv { position: absolute; bottom: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); cursor: pointer; display: grid; place-items: center; padding: 0; }
.photo .mv .ic { width: 14px; height: 14px; }
.money-input { position: relative; }
.money-input .input { padding-left: 52px; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.money-input::before { content: 'TSh'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); }
.sticky-submit { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); background: #fff; padding: 12px 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .sticky-submit { bottom: 0; } }

/* ---------- chats ---------- */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr); height: calc(100vh - var(--header) - var(--tabbar)); height: calc(100dvh - var(--header) - var(--tabbar)); }
@media (min-width: 900px) { .chat-layout { grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - var(--header)); border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.chat-list { overflow-y: auto; border-right: 1px solid var(--line); }
.chat-list h1 { font-size: 1.3rem; padding: 16px 16px 6px; margin: 0; }
.citem { display: flex; gap: 12px; padding: 14px 16px; align-items: center; border-bottom: 1px solid var(--line); cursor: pointer; }
.citem:hover, .citem.on { background: var(--bg-2); }
.citem .mid { flex: 1; min-width: 0; }
.citem .mid b { display: block; font-size: .95rem; }
.citem .mid .last { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.citem .mid .sub { color: var(--muted); font-size: .78rem; }
.citem .lthumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--bg-2); flex: none; }
.citem .dot { min-width: 20px; height: 20px; border-radius: 10px; background: var(--plum); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; background: var(--bg-2); }
@media (max-width: 899px) { .chat-layout.open .chat-list { display: none; } .chat-layout:not(.open) .chat-pane { display: none; } }
.chat-head { background: #fff; border-bottom: 1px solid var(--line); padding: 8px 12px; display: flex; align-items: center; gap: 10px; }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-listing { background: #fff; border-bottom: 1px solid var(--line); padding: 8px 12px; display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.chat-listing img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.chat-listing .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 78%; padding: 9px 13px; border-radius: 18px; background: #fff; align-self: flex-start; word-wrap: break-word; white-space: pre-wrap; border: 1px solid var(--line); }
.msg.mine { align-self: flex-end; background: var(--plum); color: #fff; border-color: var(--plum); }
.msg .tm { display: block; font-size: .7rem; opacity: .7; margin-top: 2px; text-align: right; }
.msg.img { padding: 4px; } .msg.img img { border-radius: 14px; max-height: 280px; cursor: zoom-in; }
.msg.flag { border: 2px solid #E9A23B; }
.flag-note { align-self: flex-start; max-width: 85%; font-size: .8rem; color: #6B4200; background: var(--warn-bg); padding: 6px 10px; border-radius: 10px; }
.sys { max-width: 92%; align-self: center; font-size: .8rem; color: var(--muted); background: #fff; border-radius: 999px; padding: 4px 12px; border: 1px solid var(--line); text-align: center; }
.day-sep { align-self: center; font-size: .75rem; color: var(--muted); margin: 8px 0; }
.card-msg { align-self: flex-start; background: #fff; border: 1.5px solid var(--plum-line); border-radius: 16px; padding: 12px 14px; max-width: 290px; width: 100%; }
.card-msg.mine { align-self: flex-end; }
.card-msg .k { font-size: .8rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.card-msg .v { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; color: var(--navy); margin: 2px 0 6px; }
.card-msg .v.place { font-size: 1.05rem; }
.card-msg .acts { display: flex; gap: 8px; margin-top: 8px; }
.card-msg .state { font-size: .82rem; font-weight: 700; }
.quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 0; background: #fff; scrollbar-width: none; }
.quick button { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: .84rem; cursor: pointer; }
.composer { background: #fff; padding: 8px 10px; display: flex; gap: 6px; align-items: flex-end; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 22px; padding: 10px 14px; min-height: 44px; max-height: 120px; outline: none; }
.composer textarea:focus { border-color: var(--plum); }
.composer .send { background: var(--plum); color: #fff; }
.composer .send:hover { background: var(--plum-deep); }
.blocked-bar { background: #fff; padding: 14px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); font-size: .9rem; }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; padding: 20px 0 12px; }
.profile-head h1 { font-size: 1.5rem; margin: 0; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r); margin: 12px 0; }
.trust > div { padding: 12px; text-align: center; border-right: 1px solid var(--line); }
.trust > div:last-child { border-right: 0; }
.trust b { display: block; font-family: var(--font-head); font-size: 1.3rem; color: var(--navy); }
.trust span { font-size: .78rem; color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--plum-soft); color: var(--plum-deep); border-radius: 999px; padding: 4px 12px; font-size: .84rem; font-weight: 600; }
.tag.bad { background: #FDF1F0; color: var(--bad); }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.review .b { flex: 1; min-width: 0; }
.subtabs { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0; scrollbar-width: none; }

/* ---------- account / lists ---------- */
.menu-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.menu-list li + li { border-top: 1px solid var(--line); }
.menu-list a, .menu-list button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 0; text-align: left; cursor: pointer; font-weight: 600; }
.menu-list a:hover, .menu-list button:hover { background: var(--bg-2); }
.menu-list .ic { color: var(--plum); }
.menu-list .end { margin-left: auto; color: var(--muted); font-weight: 500; font-size: .88rem; }
.ulist .urow { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ulist .urow .grow { flex: 1; min-width: 0; }
.notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.notif.unread { background: var(--plum-soft); }
.notif .ic-wrap { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--plum-line); display: grid; place-items: center; color: var(--plum); flex: none; }
.notif b { display: block; }

/* ---------- review page ---------- */
.star-pick { display: flex; gap: 6px; justify-content: center; margin: 12px 0 4px; }
.star-pick button { border: 0; background: none; cursor: pointer; padding: 2px; color: #D3E2D9; }
.star-pick button .ic { width: 44px; height: 44px; }
.star-pick button.on { color: var(--amber); }
.star-label { text-align: center; font-weight: 700; min-height: 1.5em; color: var(--navy); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; }
@media (min-width: 900px) { .auth { grid-template-columns: 1fr 1fr; } }
.auth-side { display: none; background: var(--plum); color: #fff; padding: 48px; position: relative; overflow: hidden; }

.auth-side h2 { font-size: 2.4rem; font-weight: 800; margin-top: 18vh; max-width: 12em; }
.auth-side p { opacity: .85; max-width: 26em; }
.auth-side::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.07); }
@media (min-width: 900px) { .auth-side { display: block; } }
.auth-main { padding: 28px 18px 48px; display: flex; justify-content: center; }
.auth-box { width: 100%; max-width: 420px; }


/* ---------- modal / sheet ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,42,34,.45); z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .overlay { align-items: center; padding: 20px; } }
.sheet { background: #fff; width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
@media (min-width: 640px) { .sheet { border-radius: 20px; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-h h2 { margin: 0; }
.sheet .acts { display: flex; gap: 10px; margin-top: 18px; }
.sheet .acts > * { flex: 1; }
.opt-list { display: grid; gap: 8px; }
.opt-list button { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; }
.opt-list button:hover { border-color: var(--plum); }
.lightbox { position: fixed; inset: 0; background: #07150F; z-index: 90; display: flex; flex-direction: column; animation: lb-in .16s ease-out; }
@keyframes lb-in { from { opacity: 0; transform: scale(.98); } }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 18px; padding-top: max(8px, env(safe-area-inset-top)); color: #fff; }
.lb-bar b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-bar .icon-btn { color: #fff; } .lb-bar .icon-btn:hover { background: rgba(255,255,255,.12); }
.lb-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: zoom-in; padding: 8px; }
.lightbox.zoomed .lb-stage { cursor: grab; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .18s ease-out; user-select: none; -webkit-user-select: none; border-radius: 4px; }
.lightbox.zoomed .lb-stage img { transition: none; }
.lb-hint { color: rgba(255,255,255,.55); text-align: center; font-size: .8rem; padding: 8px 0 max(12px, env(safe-area-inset-bottom)); }
.avatar-zoom { padding: 0; border: 0; background: none; border-radius: 50%; cursor: zoom-in; flex: none; display: inline-flex; line-height: 0; }
.avatar-zoom:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }

/* ---------- toast ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + 16px); z-index: 99; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast { background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: .92rem; box-shadow: 0 8px 24px rgba(15,42,34,.25); max-width: 480px; }
.toast.bad { background: var(--bad); }
.toast.good { background: var(--good); }

/* ---------- admin ---------- */
.admin { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1fr); align-content: start; background: var(--bg-2); }
@media (min-width: 1000px) { .admin { grid-template-columns: 240px minmax(0, 1fr); align-content: stretch; } }
.aside-brand { margin: 4px 8px 20px; }
.tbl .thumb { min-width: 44px; }
.aside { background: var(--navy); color: #B9D3C7; padding: 18px 12px; }

.aside nav { display: flex; gap: 4px; overflow-x: auto; }
.aside nav a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.aside nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.aside nav a.on { background: var(--plum); color: #fff; }
.aside nav a .n { margin-left: auto; background: rgba(255,255,255,.18); border-radius: 999px; font-size: .72rem; padding: 1px 8px; }
@media (min-width: 1000px) {
  .aside { position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
  .aside nav { flex-direction: column; overflow: visible; }
  .aside nav .sep { margin-top: auto; }
}
@media (max-width: 999px) {
  .aside { position: sticky; top: 0; z-index: 30; padding: 8px; display: flex; align-items: center; gap: 6px; }
  .aside-brand { display: none; }
  .aside nav { flex: 1; min-width: 0; }
}
.aside .m-logout { display: none; }
@media (max-width: 999px) { .aside .m-logout { display: inline-grid; flex: none; color: #fff; } }
.admin-main { padding: 20px 16px 60px; min-width: 0; }
@media (min-width: 1000px) { .admin-main { padding: 28px 32px; } }
.admin-main h1 { font-size: 1.6rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 800px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi b { display: block; font-family: var(--font-head); font-size: 1.8rem; color: var(--navy); line-height: 1.1; }
.kpi span { color: var(--muted); font-size: .86rem; }
.kpi em { font-style: normal; color: var(--good); font-size: .8rem; font-weight: 700; }
.kpi.alert b { color: var(--plum); }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: #F4FAF6; }
.tbl .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg-2); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.toolbar .input, .toolbar .select { width: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bars div { flex: 1; background: var(--plum); border-radius: 6px 6px 0 0; min-height: 2px; position: relative; }
.bars div span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--muted); }
.bar-labels { display: flex; gap: 6px; font-size: .68rem; color: var(--muted); }
.bar-labels span { flex: 1; text-align: center; }
.hbar { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: .9rem; }
.hbar .n { width: 120px; flex: none; }
.hbar .b { height: 10px; background: var(--navy); border-radius: 5px; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #C9D9D0; border-radius: 12px; cursor: pointer; transition: .15s; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--plum); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--plum-line); }
.split { display: grid; gap: 16px; }
@media (min-width: 1100px) { .split { grid-template-columns: 1fr 1fr; } }
.chat-log { max-height: 420px; overflow-y: auto; background: var(--bg-2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column-reverse; gap: 6px; }

.show-sm { display: none; }
@media (max-width: 899px) { .hide-sm { display: none; } .show-sm { display: block; } }
#mlist { display: flex; flex-direction: column; gap: 6px; }
.chat-head .who > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabbar a.plus .ic, .tabbar a.plus.on .ic { color: #fff; }

/* menyu ya akaunti */
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.opt-list .opt { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-weight: 600; }
.opt-list .opt:hover { border-color: var(--plum); }
.opt-list .opt .ic, .opt-list button .ic { color: var(--plum); }
.opt-list button { font-weight: 600; }
.opt-list .danger, .opt-list .danger .ic { color: var(--bad); }

/* simu: muonekano wa app — footer haionekani (inaonekana PC/tablet kubwa tu) */
@media (max-width: 899px) { .foot { display: none; } }
.gps-btn { width: 100%; margin-bottom: 14px; border-style: dashed; }

/* =====================================================================
   v4 — muonekano wa premium, logo ndogo, location, video
   ===================================================================== */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; letter-spacing: -.003em; }
h1, h2, h3 { letter-spacing: -.015em; }
h1 { font-weight: 750; }
.price, .rating-num, .brand .wm { letter-spacing: -.02em; }
.btn { box-shadow: var(--shadow-1); transition: transform .12s, box-shadow .15s, background .15s; }
.btn:not(.btn-line):not(.btn-ghost):hover { box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(1px); }
.btn:not(.btn-line):not(.btn-ghost):not(.btn-navy):not(.btn-danger) { background: linear-gradient(180deg, #0E8F63, var(--plum)); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--plum); box-shadow: 0 0 0 4px rgba(11,122,85,.12); }
.top { background: rgba(255,255,255,.88); backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 var(--line); border-bottom: 0; }
.foot .logo-full, .foot .brand .logo-full { height: 22px; }
.auth-brand { margin-bottom: 22px; }
.auth-brand .logo-full { height: 26px; }
.auth-side .brand .logo-full { height: 28px; }
.auth-side { background: radial-gradient(120% 80% at 0% 0%, #0E8F63 0%, var(--plum) 45%, var(--plum-deep) 100%); }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 10px; align-items: center; opacity: .92; font-weight: 500; }
.auth-points svg { width: 20px; height: 20px; flex: none; padding: 7px; box-sizing: content-box; border-radius: 10px; background: rgba(255,255,255,.12); }
.auth-box h1 { margin-top: 4px; }
.aside-brand .logo-full { height: 22px; }
.link { color: var(--plum); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(11,122,85,.3); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--plum); }
.req { color: var(--bad); font-weight: 800; margin-left: 2px; }

/* ---------- location (usajili / kuingia) ---------- */
.geo-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); margin: 14px 0; font-size: .93rem; border: 1px solid var(--line); background: var(--bg-2); }
.geo-card > svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.geo-card.ok { background: #EEF8F2; border-color: #CBE8D7; color: #14502F; }
.geo-card.ok > svg { color: var(--good); }
.geo-card.bad { background: #FDF0EF; border-color: #F3CFCB; color: #7A1A14; }
.geo-card.bad > svg { color: var(--bad); }
.geo-card.wait { background: var(--plum-soft); border-color: var(--plum-line); color: var(--plum-deep); }
.geo-card.wait > svg { color: var(--plum); animation: geo-pulse 1.1s ease-in-out infinite; }
.geo-card .link { color: inherit; }
@keyframes geo-pulse { 50% { transform: translateY(-3px); opacity: .6; } }
.field select:disabled, .select:disabled { background: var(--bg-2); color: var(--ink); opacity: 1; cursor: not-allowed; }

/* ---------- home ---------- */
.hero { display: grid; gap: 10px; margin: 14px 0 6px; }
@media (min-width: 760px) { .hero { grid-template-columns: auto 1fr; align-items: center; } }
.area-pill { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--plum-line); background: linear-gradient(180deg, #fff, var(--plum-soft)); border-radius: 16px; padding: 8px 14px 8px 10px; cursor: pointer; text-align: left; box-shadow: var(--shadow-1); max-width: 100%; min-width: 0; }
.area-pill > svg:first-child { width: 34px; height: 34px; padding: 8px; box-sizing: border-box; border-radius: 10px; background: var(--plum); color: #fff; flex: none; }
.area-pill > svg:last-child { width: 18px; height: 18px; color: var(--muted); flex: none; }
.area-pill span { display: grid; min-width: 0; line-height: 1.2; }
.area-pill small { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.area-pill b { font-size: .98rem; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.area-pill:hover { border-color: var(--plum); }
.seg { display: inline-flex; margin: 0 0 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg:empty { display: none; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: .86rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--navy); box-shadow: var(--shadow-1); }
.feed-card { margin-top: 4px; }
@media (min-width: 760px) { .feed-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 4px 20px; box-shadow: var(--shadow-1); } .feed-card .lrow:last-child { border-bottom: 0; } }
.banner { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; }
.banner > span { flex: 1; min-width: 0; }
.banner > svg { flex: none; }
.lrow { transition: background .15s; }
.lrow .thumb { box-shadow: inset 0 0 0 1px rgba(15,42,34,.06); }
.lrow .thumb .play { position: absolute; left: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(15,42,34,.72); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.lrow .thumb .play svg { width: 13px; height: 13px; margin-left: 2px; }
.chip { transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--plum-line); }

/* ---------- video ya tangazo ---------- */
.video-box { border: 1.5px dashed var(--plum-line); border-radius: var(--r); background: var(--plum-soft); padding: 14px; }
.video-add { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px; border: 0; background: transparent; cursor: pointer; color: var(--plum-deep); text-align: center; }
.video-add svg { width: 36px; height: 36px; padding: 8px; box-sizing: content-box; border-radius: 14px; background: #fff; box-shadow: var(--shadow-1); color: var(--plum); }
.video-add b { font-size: 1rem; }
.video-add small { color: var(--muted); }
.video-ready { display: grid; gap: 10px; }
.video-ready video { width: 100%; max-height: 360px; border-radius: 12px; background: #000; }
.video-ready .vmeta { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.v-progress { height: 8px; border-radius: 999px; background: #fff; overflow: hidden; margin: 10px 0 4px; box-shadow: inset 0 0 0 1px var(--plum-line); }
.v-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--plum), #14A06F); transition: width .2s; }
.gallery .slides video { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; background: #000; scroll-snap-align: center; }
.gallery .vtag { transition: opacity .2s; }
.gallery .vtag.off { opacity: 0; }
#scope { margin-bottom: 8px; }
@media (max-width: 759px) { .home-scope { display: flex; } #scope { width: 100%; } #scope button { flex: 1; } }
.vtag { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 5px; background: rgba(15,42,34,.78); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px); z-index: 2; pointer-events: none; }
.vtag svg { width: 12px; height: 12px; }

/* ---------- kadi na sheet za premium ---------- */
.sheet, .modal-box { box-shadow: var(--shadow-3); }
.safety { border: 1px solid var(--plum-line); }
@media (min-width: 900px) { .action-bar { box-shadow: var(--shadow-2); border-color: transparent; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.action-bar .price { white-space: nowrap; font-size: clamp(1.1rem, 5vw, 1.35rem); }

/* ---------- v7: admin maeneo ---------- */
.loc-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .loc-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.panel-h h3 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.input-sm { min-height: 38px; padding: 7px 12px; font-size: .92rem; }
.loc-list { display: grid; gap: 2px; max-height: 70vh; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.loc-row { display: flex; align-items: center; gap: 8px; padding: 8px 8px; border-radius: 10px; border: 1px solid transparent; }
.loc-row:hover { background: var(--bg-2); }
.loc-row.sel { background: var(--plum-soft); border-color: var(--plum-line); }
.loc-name { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; background: none; border: 0; padding: 0; cursor: default; color: inherit; }
button.loc-name { cursor: pointer; }
.loc-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-row .icon-btn { width: 36px; height: 36px; flex: none; }
.loc-row .icon-btn svg { width: 17px; height: 17px; }
.st-open { background: #E3F4EA; color: var(--good); }
.inline-edit { display: flex; gap: 6px; align-items: center; }
.inline-edit .input { flex: 1; min-width: 0; }

/* ---------- v7: chat inayosomeka vizuri ---------- */
.msgs { gap: 0; padding: 12px 12px 16px; background: var(--bg-2); }
#mlist { gap: 0; }
.msgs > .sys { margin-bottom: 8px; }
.msg { max-width: min(78%, 520px); padding: 8px 12px 6px; border-radius: 18px; line-height: 1.4; box-shadow: 0 1px 1px rgba(15,42,34,.06); border: 0; margin-top: 2px; font-size: .97rem; }
.msg:not(.mine) { background: #fff; color: var(--ink); }
.msg.mine { background: var(--plum); }
/* nafasi kubwa mzungumzaji akibadilika, ndogo ndani ya kikundi */
.msg.g-first, .msg.g-solo { margin-top: 12px; }
.day-sep + .msg, .day-sep + .card-msg { margin-top: 4px; }
.msg:not(.mine).g-first { border-bottom-left-radius: 6px; }
.msg:not(.mine).g-mid { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.msg:not(.mine).g-last { border-top-left-radius: 6px; }
.msg.mine.g-first { border-bottom-right-radius: 6px; }
.msg.mine.g-mid { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.msg.mine.g-last { border-top-right-radius: 6px; }
.msg.g-solo:not(.mine), .msg.g-last:not(.mine) { border-bottom-left-radius: 4px; }
.msg.g-solo.mine, .msg.g-last.mine { border-bottom-right-radius: 4px; }
.msg.g-first .tm, .msg.g-mid .tm { display: none; }
.msg .tm { font-size: .68rem; opacity: .65; margin-top: 1px; }
.msg.mine .tm { opacity: .8; }
.msg.flag { box-shadow: 0 0 0 2px #E9A23B; margin-top: 12px; }
.msg.img { padding: 3px; background: #fff; }
.msg.img.mine { background: var(--plum); }
.msg.img .tm { padding: 2px 8px 3px; }
.card-msg { margin-top: 12px; box-shadow: 0 1px 2px rgba(15,42,34,.06); }
.flag-note { margin-top: 4px; }
#mlist > .sys { margin: 12px auto 0; }
.day-sep { align-self: stretch; display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.day-sep span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.quick { padding: 8px 10px 0; gap: 6px; border-top: 1px solid var(--line); }
.quick button { padding: 5px 12px; font-size: .82rem; display: inline-flex; align-items: center; gap: 5px; }
.quick button.q-act { background: var(--plum-soft); border-color: var(--plum-line); color: var(--plum-deep); font-weight: 700; }
.quick button.q-act svg { width: 15px; height: 15px; }
.composer { border-top: 0; }
.chat-pane { position: relative; }
.to-latest { position: absolute; right: 14px; bottom: 132px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-2); display: grid; place-items: center; cursor: pointer; z-index: 5; color: var(--navy); }
.to-latest .n:not(:empty) { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--plum); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.citem { transition: background .12s; }
.citem .mid b { font-weight: 700; }
.citem:has(.dot) .mid b, .citem:has(.dot) .mid .last { color: var(--ink); font-weight: 800; }
/* Simu: chat ikiwa wazi, menyu ya chini inafichwa — ujumbe unapata nafasi zaidi (kama WhatsApp) */
@media (max-width: 899px) {
  body:has(.chat-layout.open) .tabbar { display: none; }
  body:has(.chat-layout.open) .chat-layout { height: calc(100vh - var(--header)); height: calc(100dvh - var(--header)); }
  body:has(.chat-layout.open) .composer { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}
.icon-btn.danger { color: var(--bad); }
.icon-btn.danger:hover { background: #FDF1F0; }

/* ---------- v8: herufi za wasifu zenye rangi, picha zilizoshindwa ---------- */
.avatar.tone-0 { background: #E6F3EC; color: #0B7A55; }
.avatar.tone-1 { background: #E6EBF7; color: #17402F; }
.avatar.tone-2 { background: #FBEEDD; color: #8A5414; }
.avatar.tone-3 { background: #E3F2EA; color: #1F6B45; }
.avatar.tone-4 { background: #F7E6EE; color: #8A2E55; }
.avatar.tone-5 { background: #E4F1F4; color: #1D5E6E; }
span.avatar { letter-spacing: .02em; box-shadow: inset 0 0 0 1px rgba(15,42,34,.06); }
img.img-failed { background: var(--plum-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A2A6E' stroke-opacity='.45' stroke-width='1.6'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 16-5-5-9 8'/%3E%3C/svg%3E") center / 40% no-repeat; min-height: 40px; }

/* =====================================================================
   v8 — premium zaidi: background laini, kadi, vivuli, viashiria
   ===================================================================== */
:root {
  --plum-bright: #14A06F;
  --grad-plum: linear-gradient(135deg, #14A06F 0%, #0B7A55 55%, #0F2A22 100%);
  --grad-navy: linear-gradient(135deg, #17402F 0%, #0F2A22 100%);
  --surface: #FFFFFF;
  --page: #F4FAF6;
}
body { background: var(--page); }
body::before { content: ''; position: fixed; inset: 0 0 auto 0; height: 340px; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 300px at 15% -60px, rgba(11,122,85,.10), transparent 70%), radial-gradient(700px 260px at 95% -40px, rgba(242,183,5,.10), transparent 70%); }
.top { background: rgba(255,255,255,.82); }
.top-nav a.on { color: var(--plum-deep); background: var(--plum-soft); }
.avatar-btn .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--plum-line); }
.btn:not(.btn-line):not(.btn-ghost):not(.btn-navy):not(.btn-danger) { background: var(--grad-plum); }
.btn-navy { background: var(--grad-navy); }
.post-btn { box-shadow: 0 6px 18px -6px rgba(11,122,85,.55); }

/* salamu juu ya ukurasa wa mwanzo */
.greet { margin: 18px 0 2px; }
.greet h1 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); margin: 0 0 2px; letter-spacing: -.02em; }
.greet p { margin: 0; color: var(--muted); font-size: .95rem; }

/* orodha ya matangazo */
.lrow .thumb { border-radius: 14px; }
.lrow .thumb img { transition: transform .35s ease; }
.lrow:hover .thumb img { transform: scale(1.04); }
.price { color: var(--plum-deep); }
@media (max-width: 759px) { .feed-card { background: #fff; border-radius: 18px; padding: 0 14px; box-shadow: var(--shadow-1); border: 1px solid var(--line); } .feed-card .lrow:last-child { border-bottom: 0; } }
.chip.on { background: var(--grad-navy); border-color: transparent; }
.seg button.on { color: var(--plum-deep); }

/* ukurasa wa tangazo */
.seller-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-1); margin-top: 4px; }
.item-title { font-size: clamp(1.4rem, 3vw, 1.8rem); letter-spacing: -.02em; }
.facts { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.action-bar { background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
@media (min-width: 900px) { .action-bar { background: #fff; } }
.gallery { box-shadow: var(--shadow-2); }
@media (max-width: 899px) { .gallery { box-shadow: none; } }

/* Mimi: wasifu, takwimu na menyu ndani ya kadi */
.profile-head { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.profile-head::after { content: ''; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(11,122,85,.10), transparent 70%); pointer-events: none; }
.profile-head h1 { margin-bottom: 2px; }
.trust { gap: 10px !important; border: 0 !important; background: none !important; }
.trust > div { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-1); padding: 12px 6px !important; }
.trust > div b { background: var(--grad-plum); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.5rem; }
.menu-list { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-1); }
.menu-list li > a, .menu-list li > button { padding-left: 16px !important; padding-right: 16px !important; }
.menu-list li > a .ic, .menu-list li > button .ic { width: 34px; height: 34px; padding: 8px; box-sizing: border-box; border-radius: 10px; background: var(--plum-soft); color: var(--plum); }

/* menyu ya chini: kiashiria cha tabo hai */
.tabbar { background: rgba(255,255,255,.94); backdrop-filter: saturate(160%) blur(12px); box-shadow: 0 -6px 24px -14px rgba(15,42,34,.25); border-top-color: transparent; }
.tabbar a.on::before { content: ''; position: absolute; top: 0; left: 50%; width: 26px; height: 3px; margin-left: -13px; border-radius: 0 0 4px 4px; background: var(--grad-plum); }
.tabbar a.plus::before { display: none; }
.tabbar .plus .ic { background: var(--grad-plum); box-shadow: 0 8px 20px -4px rgba(11,122,85,.55), 0 0 0 4px #fff; }

/* chat */
.msg.mine { background: linear-gradient(160deg, #0E8F63, #0B7A55); }
.chat-head { box-shadow: 0 1px 0 var(--line); border-bottom: 0; }
.citem.on { background: var(--plum-soft); }

/* footer */
.foot { background: var(--grad-navy); }
.video-raw { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 12px; padding: 14px; border: 1px solid var(--line); }
.video-raw > .ic { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: #E3F2EA; color: var(--good); box-sizing: border-box; }
.video-raw b { word-break: break-all; }
.video-err { display: flex; gap: 10px; align-items: flex-start; background: #FDF0EF; border: 1px solid #F3CFCB; color: #7A1A14; border-radius: 12px; padding: 10px 12px; font-size: .88rem; margin-bottom: 10px; }
.video-err .ic { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.opt-tag { color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-weight: 600; }
#img-count.ok { color: var(--good); font-weight: 700; }

/* =====================================================================
   v11 — SokoCycle: kijani #0B7A55, kijani giza #0F2A22, dhahabu #F2B705,
   kijani hafifu #F1F8F4, fonti Outfit (800 vichwa/vitufe, 500 maandishi)
   ===================================================================== */
:root {
  --page: #F4FAF6;
  --grad-gold: linear-gradient(180deg, #FFC928 0%, #F2B705 100%);
  --grad-green: linear-gradient(135deg, #14A06F 0%, #0B7A55 60%, #0A6A4A 100%);
  --grad-dark: radial-gradient(120% 90% at 0% 0%, #17402F 0%, #0F2A22 55%, #0A1F18 100%);
}
body { font-weight: 450; letter-spacing: 0; }
h1, h2, h3, .btn, .price, .brand-name { font-family: var(--font); }
h1 { font-weight: 800; letter-spacing: -.025em; }
h2, h3 { font-weight: 700; letter-spacing: -.015em; }
b, strong { font-weight: 700; }
::selection { background: var(--gold-soft); color: var(--ink); }
body::before { background: radial-gradient(900px 300px at 12% -60px, rgba(11,122,85,.10), transparent 70%), radial-gradient(700px 260px at 95% -40px, rgba(242,183,5,.12), transparent 70%); }

/* Vitufe: dhahabu yenye maandishi ya kijani giza (kama brand sheet) */
.btn { font-weight: 700; letter-spacing: .005em; border-radius: 12px; }
.btn:not(.btn-line):not(.btn-ghost):not(.btn-navy):not(.btn-danger) { background: var(--grad-gold); color: var(--ink); border-color: transparent; box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 6px 16px -8px rgba(217,163,0,.65); }
.btn:not(.btn-line):not(.btn-ghost):not(.btn-navy):not(.btn-danger):hover { background: linear-gradient(180deg, #FFD34D 0%, #F2B705 100%); box-shadow: 0 10px 22px -10px rgba(217,163,0,.8); }
.btn:not(.btn-line):not(.btn-ghost):not(.btn-navy):not(.btn-danger) .ic { color: var(--ink); }
.btn-navy { background: var(--grad-green); color: #fff; }
.btn-navy:hover { background: linear-gradient(135deg, #16AC77, #0B7A55); }
.btn-line { color: var(--plum); border-color: var(--plum-line); background: #fff; }
.btn-line:hover { background: var(--plum-soft); border-color: var(--plum); }
.post-btn { box-shadow: 0 8px 20px -8px rgba(217,163,0,.75); }
.link { color: var(--plum); text-decoration-color: rgba(11,122,85,.35); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--plum); box-shadow: 0 0 0 4px rgba(11,122,85,.14); }
input[type=checkbox], input[type=radio] { accent-color: var(--plum); }

/* Header: nyeupe safi yenye logo kuu; mstari wa dhahabu chini */
.top { background: rgba(255,255,255,.9); box-shadow: 0 1px 0 var(--line), 0 6px 20px -16px rgba(15,42,34,.35); }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, rgba(242,183,5,.85) 20%, rgba(11,122,85,.85) 80%, transparent); opacity: .55; }
.brand .logo-full { height: 30px; }
.brand .logo-mark { width: 32px; height: 32px; border-radius: 0; }
.top-nav a { color: var(--muted); font-weight: 600; }
.top-nav a.on { color: var(--plum); background: var(--plum-soft); }
.lang-btn { border-color: var(--line); color: var(--ink); }
.loc-btn { font-weight: 800; }

/* Kurasa: background ya kijani hafifu, kadi nyeupe */
body { background: var(--page); }
.area-pill { background: linear-gradient(180deg, #fff, var(--plum-soft)); border-color: var(--plum-line); }
.area-pill > svg:first-child { background: var(--grad-green); }
.area-pill small { color: var(--plum); }
.chip.on { background: var(--ink); color: #fff; }
.chip.on .ic { color: var(--gold); }
.tabs-type button.on { color: var(--ink); border-color: var(--gold); }
.price { color: var(--ink); font-weight: 800; }
.lrow:hover { background: rgba(241,248,244,.7); }
.greet h1 { color: var(--ink); }
.greet h1::after { content: ''; display: block; width: 56px; height: 4px; border-radius: 4px; margin-top: 8px; background: linear-gradient(90deg, var(--gold), var(--plum)); }

/* Menyu ya chini */
.tabbar a.on { color: var(--ink); }
.tabbar a.on .ic { color: var(--plum); }
.tabbar a.on::before { background: var(--gold); }
.tabbar .plus .ic { background: var(--grad-gold); color: var(--ink); box-shadow: 0 8px 20px -6px rgba(217,163,0,.7), 0 0 0 4px #fff; }
.tabbar a.plus .ic, .tabbar a.plus.on .ic { color: var(--ink); }
.tabbar .plus { color: var(--ink); }

/* Footer, ukurasa wa kuingia, admin: kijani giza (logo ya background nyeusi) */
.foot { background: var(--grad-dark); color: #A9C9BC; }
.foot .brand .logo-full { height: 28px; }
.foot h4 { color: var(--gold); }
.auth-side { background: var(--grad-dark); }
.auth-side::after { border-color: rgba(242,183,5,.12); }
.auth-side h2 { letter-spacing: -.03em; }
.auth-points svg { background: rgba(242,183,5,.16); color: var(--gold); }
.auth-brand .logo-full { height: 34px; }
.auth-side .brand .logo-full { height: 36px; }
.aside { background: var(--grad-dark); }
.aside-brand .logo-full { height: 26px; }

/* Chat */
.msg.mine { background: var(--grad-green); }
.chat-head { background: #fff; }
.quick button.q-act { background: var(--gold-soft); border-color: #F3DD8A; color: #5A4300; }
.day-sep span { color: var(--plum); }

/* Mimi / wasifu */
.trust > div b { background: linear-gradient(135deg, #0B7A55, #0F2A22); -webkit-background-clip: text; background-clip: text; color: transparent; }
.menu-list li > a .ic, .menu-list li > button .ic { background: var(--plum-soft); color: var(--plum); }
.profile-head::after { background: radial-gradient(circle, rgba(242,183,5,.16), transparent 70%); }
.stars, .star-pick button.on { color: var(--gold); }

/* Herufi za wasifu: tone ya kwanza ni ya brand */
.avatar.tone-0 { background: #E6F3EC; color: #0B7A55; }
.avatar.tone-1 { background: #FFF5D1; color: #6B4F00; }
span.avatar { font-weight: 800; }
