:root {
  --brand-blue: #1A73E8;
  --brand-blue-soft: #E8F1FC;
  --filter-chip-bg: #FDECEC;
  --filter-chip-text: #C62828;
  --filter-chip-border: #F5C2C2;
  --bg: #FFFFFF;
  --bg-muted: #F5F5F5;
  --border: #E6E6E6;
  --text: #1A1A1A;
  --text-secondary: #757575;
  --success: #2E7D32;
  --danger: #E53935;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --header-h: 52px;
  --bottom-nav-h: 64px;
  --shadow-sheet: 0 -4px 24px rgba(0,0,0,.12);
  --chat-header: #5288C1;
  --chat-bg: #AFCDE8;
  --chat-bubble-out: #D6EBFF;
  --chat-bubble-in: #FFFFFF;
  --page-pad: 16px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: "Vazirmatn", sans-serif;
  background: #E8E8E8;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }
img { max-width: 100%; display: block; }

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: calc(var(--bottom-nav-h) + 8px);
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px var(--page-pad);
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.header-search .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}
.header-search .search-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-muted);
  padding: 0 40px 0 12px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.header-search .search-input:focus {
  border-color: var(--brand-blue);
  background: #fff;
}
.location-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  max-width: 110px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.location-btn #locationLabel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page { padding: 12px var(--page-pad) 24px; }
.home-page { padding-top: 12px; }

.cat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
}
.cat-btn.selected {
  border-color: var(--brand-blue);
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}
.cat-btn.selected svg { stroke: var(--brand-blue); }

.filter-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.all-filters-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.chips-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--filter-chip-bg);
  color: var(--filter-chip-text);
  border: 1px solid var(--filter-chip-border);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.chip-x { font-size: 14px; line-height: 1; }

.ad-list { display: flex; flex-direction: column; }
.ad-card {
  display: flex;
  flex-direction: row;
  direction: rtl;
  align-items: stretch;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #EEE;
  min-height: 136px;
  color: inherit;
  text-decoration: none;
}
.ad-card-img-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  align-self: center;
}
.ad-card-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-muted);
  display: block;
}
.ad-card-img.placeholder,
.gallery-img.placeholder {
  background: linear-gradient(135deg, #d0d7e2, #aeb8c6);
}
.photo-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  padding: 2px 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.ad-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  direction: rtl;
  text-align: right;
  padding: 2px 0;
}

.ad-card-promo {
  color: #D14757;
  font-size: 12px;
  font-weight: 400;
}
.featured-badge {
  align-self: flex-start;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-size: 11px;
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  margin-bottom: 4px;
}
.ad-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}
.ad-card-sub {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-card-price {
  margin: 4px 0 0;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-secondary);
}
.ad-card-meta {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.ad-card-loc {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fab-top {
  position: fixed;
  left: max(16px, calc(50% - 240px + 16px));
  bottom: calc(var(--bottom-nav-h) + 16px);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--brand-blue);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 40;
  box-shadow: 0 4px 12px rgba(26,115,232,.35);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--bottom-nav-h);
  background: #fff;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 60;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: #9E9E9E;
}
.nav-item.active { color: var(--brand-blue); }

.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet-overlay[hidden] { display: none !important; }
.sheet {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: var(--shadow-sheet);
  max-height: 80vh;
  overflow: auto;
  animation: slideUp .2s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
}
.sheet-header h3 { margin: 0; text-align: center; font-size: 16px; }
.sheet-back {
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 8px;
}
.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-item, .sheet-list li > button, .sheet-list .sheet-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: #fff;
  font-size: 15px;
  cursor: pointer;
  text-align: right;
}
.sheet-row.is-all { background: #FAFAFA; }
.sheet-row .chev { margin-right: auto; color: #bbb; }

.page-header {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 0 8px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 40;
}
.page-header.simple {
  grid-template-columns: 1fr;
  padding: 0 var(--page-pad);
}
.page-header h1 { margin: 0; font-size: 16px; text-align: center; }
.icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 8px;
}
.header-spacer { width: 40px; }

.filters-page { padding-bottom: 90px; }
.filter-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.filter-section h2 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}
.seg-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.seg-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-md);
  padding: 10px 6px;
  font-size: 13px;
  cursor: pointer;
}
.seg-btn.full {
  width: 100%;
  margin-top: 8px;
}
.seg-btn.selected {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
}
.seg-btn.filled.selected {
  background: var(--brand-blue);
  color: #fff;
}
.nav-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 4px 0;
  cursor: pointer;
  font-size: 14px;
}
.nav-row-value {
  margin-right: auto;
  color: var(--brand-blue);
  font-size: 13px;
}
.year-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.year-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.year-row select {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  background: #fff;
}
.filters-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid var(--border);
  z-index: 50;
}
.btn-clear {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-apply {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--brand-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.ad-detail-page { padding: 0 0 90px; }
.gallery {
  position: relative;
  height: 280px;
  background: #111;
  overflow: hidden;
  direction: ltr;
}
.gallery-track {
  display: flex;
  height: 100%;
  transition: transform .25s ease;
}
.gallery-img {
  min-width: 100%;
  height: 280px;
  object-fit: cover;
}
.gallery-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}
.g-top-left { display: flex; gap: 8px; }
.g-icon {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.g-icon.active { background: rgba(26,115,232,.85); }
.gallery-bottom {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.g-arrow {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.gallery-dots { display: flex; gap: 6px; }
.gallery-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
}
.gallery-dots span.active { background: #fff; }

.detail-block { padding: 16px; border-bottom: 1px solid var(--border); }
.detail-title { margin: 0 0 6px; font-size: 18px; }
.detail-sub { margin: 0; color: var(--text-secondary); font-size: 13px; }
.warn-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.spec-triple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.spec-col {
  text-align: center;
  padding: 14px 8px;
  border-left: 1px solid var(--border);
}
.spec-col:last-child { border-left: none; }
.spec-emoji { font-size: 18px; margin-bottom: 4px; }
.spec-label { font-size: 11px; color: var(--text-secondary); }
.spec-value { font-size: 14px; font-weight: 700; margin-top: 2px; }
.spec-value.accent { color: #b71c1c; }

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.spec-cell {
  background: #fff;
  display: flex;
  gap: 10px;
  padding: 14px;
  align-items: flex-start;
}

.eval-block, .desc-block {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.eval-block h2, .desc-block h2 {
  margin: 0 0 12px;
  font-size: 15px;
}
.eval-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.eval-row:last-child { border-bottom: none; }
.eval-check {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 12px;
  margin-left: 8px;
}
.eval-right { display: flex; align-items: center; font-size: 14px; }
.eval-left { color: var(--text-secondary); font-size: 13px; }
.desc-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 14px;
}
.desc-text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.more-btn {
  border: none;
  background: transparent;
  color: var(--brand-blue);
  margin-top: 8px;
  cursor: pointer;
  padding: 0;
}

.detail-footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 72px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
  z-index: 50;
}
.price-label { display: block; font-size: 11px; color: var(--text-secondary); }
.price-value { font-size: 15px; }
.detail-actions { display: flex; gap: 8px; }
.btn-call, .btn-chat {
  height: 44px;
  min-width: 96px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-call {
  background: var(--brand-blue);
  color: #fff;
  border: none;
}
.btn-chat {
  background: #fff;
  color: var(--brand-blue);
  border: 1.5px solid var(--brand-blue);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none !important; }
.lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { right: 12px; }
.lb-next { left: 12px; }

.chat-list { list-style: none; margin: 0; padding: 0; }
.chat-row {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar.small { width: 40px; height: 40px; }
.avatar.large { width: 72px; height: 72px; font-size: 28px; margin: 0 auto 12px; }
.chat-row-body { flex: 1; min-width: 0; }
.chat-row-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.chat-time { color: var(--text-secondary); font-size: 12px; }
.chat-preview {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-page { padding-top: 16px; }
.auth-hint { color: var(--text-secondary); font-size: 13px; margin: 0 0 16px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; }
.auth-switch a { color: var(--brand-blue); font-weight: 600; }
.profile-card { text-align: center; padding: 24px 0; }
.profile-card h2 { margin: 8px 0 4px; font-size: 18px; }
.chat-ad-title {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--brand-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fav-row {
  position: relative;
  border-bottom: 1px solid #EEE;
}
.fav-row .ad-card { border-bottom: none; }
.fav-remove {
  position: absolute;
  left: 0;
  top: 12px;
  border: 1px solid var(--filter-chip-border);
  background: var(--filter-chip-bg);
  color: var(--filter-chip-text);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  z-index: 2;
}
.post-form label,
.profile-page .name-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.post-form input,
.post-form select,
.post-form textarea,
.name-edit input {
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.post-form textarea {
  height: auto;
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}
.post-form input:focus-visible,
.post-form select:focus-visible,
.post-form textarea:focus-visible,
.name-edit input:focus-visible {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px var(--brand-blue-soft);
}
.post-form input:disabled,
.post-form select:disabled,
.post-form textarea:disabled,
.post-form input[readonly] {
  background: var(--bg-muted);
  color: var(--text-secondary);
  cursor: default;
}
.post-form input.is-invalid,
.post-form select.is-invalid,
.post-form textarea.is-invalid {
  border-color: var(--danger);
}
.post-form .btn-apply,
.post-footer .btn-apply {
  width: 100%;
  flex: 1;
}
.btn-apply:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.post-page {
  padding-bottom: calc(var(--bottom-nav-h) + 88px);
}
.post-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.post-section:last-of-type {
  border-bottom: none;
}
.post-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.post-section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.post-section-meta {
  font-size: 12px;
  color: var(--text-secondary);
}
.post-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.post-photo-add,
.post-photo-tile {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  position: relative;
  flex-shrink: 0;
}
.post-photo-add {
  border: 1.5px dashed var(--border);
  background: var(--bg-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  font-family: inherit;
}
.post-photo-add:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
}
.post-photo-add[hidden] {
  display: none !important;
}
.post-photo-tile {
  overflow: hidden;
  background: #eee;
}
.post-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-photo-remove {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.post-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.post-price-wrap[hidden] {
  display: none !important;
}
.post-footer {
  position: fixed;
  bottom: var(--bottom-nav-h);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid var(--border);
  z-index: 50;
}
.post-footer .form-error {
  margin: 0;
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin: 0 0 10px;
}
.btn-secondary {
  border: 1px solid var(--brand-blue);
  background: #fff;
  color: var(--brand-blue);
  border-radius: var(--radius-md);
  height: 40px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}
.empty-state {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 40px 16px;
  margin: 0;
  line-height: 1.7;
}
.auth-brand {
  text-align: center;
  margin-bottom: 20px;
}
.auth-brand-name {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-blue);
}
.auth-page .auth-hint {
  text-align: center;
}
.uid-line {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  direction: ltr;
  unicode-bidi: plaintext;
}
.btn-logout {
  display: block;
  width: 100%;
  margin: 16px 0 24px;
  padding: 14px;
  border: 1px solid rgba(229, 57, 53, 0.35);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-logout:hover {
  background: #FFF5F5;
}
.profile-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}
.profile-link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
}
.profile-ads h2 {
  font-size: 15px;
  margin: 8px 0 12px;
}
.full-width { width: 100%; margin: 16px 0 24px; text-align: center; }
.safety-list {
  margin: 0;
  padding: 0 0 0 18px;
  line-height: 2;
  font-size: 14px;
  color: var(--text);
}

.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 24px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26,26,26,.9);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  z-index: 300;
  max-width: 90%;
}
.toast[hidden] { display: none !important; }

.app-shell:has(.chat-room),
.app-shell:has(.ad-detail-page),
.app-shell:has(.filters-page) {
  padding-bottom: 0;
}
