/* nosisve — dark marketplace inspired by pik.ba / olx.ba */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #0a0a0c;
  --bg-elevated: #121218;
  --bg-card: #16161e;
  --bg-card-hover: #1e1e28;
  --bg-input: #0e0e14;
  --border: #2a2a36;
  --border-soft: #22222c;
  --text: #eef1f5;
  --text-muted: #9aa3b2;
  --text-dim: #6b7585;
  --accent: #00d8ff;
  --accent-hover: #4ae4ff;
  --accent-dim: rgba(0, 216, 255, 0.16);
  --accent-soft: #0a3a45;
  --danger: #e85d5d;
  --warn: #e8a54b;
  --shop: #3d8bfd;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --header-h: 56px;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --font-display: "Outfit", "IBM Plex Sans", sans-serif;
  --max: 1440px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(0, 216, 255, 0.1), transparent 55%),
    radial-gradient(900px 400px at 90% 0%, rgba(0, 160, 220, 0.06), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Top nav ───────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(14, 17, 22, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  transition: opacity 0.15s ease;
}

.brand:hover {
  opacity: 0.9;
}

.brand-logo {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

@media (max-width: 720px) {
  .brand-logo {
    height: 32px;
    max-width: 110px;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: var(--bg-elevated);
}

.btn-outline:hover {
  border-color: var(--text-dim);
  background: var(--bg-card);
}

.btn-primary {
  background: var(--accent);
  color: #041018;
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-soft {
  background: var(--accent-dim);
  color: var(--accent-hover);
  border-color: transparent;
}

.btn-soft:hover {
  background: rgba(0, 216, 255, 0.28);
}

.btn-wide {
  width: 100%;
}

.btn-lg {
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
}

.user-chip {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  max-width: 200px;
}

.user-chip.is-visible {
  display: inline-flex;
}

.user-chip img,
.user-chip .avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-hover);
  flex-shrink: 0;
}

.user-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-size: 13px;
}

/* ── Search shell ──────────────────────────────────────────── */

.search-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 20px 8px;
}

.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-field {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-field svg {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-field input::placeholder {
  color: var(--text-dim);
}

.search-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  color: var(--danger);
  border-color: rgba(232, 93, 93, 0.4);
  background: rgba(232, 93, 93, 0.08);
}

/* ── Filters ───────────────────────────────────────────────── */

.filters-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 20px 12px;
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip,
.sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-chip:hover,
.sort-chip:hover,
.filter-chip.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.filter-chip svg,
.sort-chip svg {
  opacity: 0.7;
}

.filter-dd {
  position: relative;
  display: inline-flex;
}

.filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: min(280px, 80vw);
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-popover[hidden] {
  display: none !important;
}

.filter-popover select,
.filter-popover input {
  height: 40px;
  width: 100%;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

.filter-popover select:focus,
.filter-popover input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.filter-chip.is-open,
.filter-chip.has-value {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.filter-chip.is-open svg {
  transform: rotate(180deg);
}

.toggle-map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.toggle-map .switch {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #2a3340;
  position: relative;
}

.toggle-map .switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c5ccd6;
  transition: transform 0.15s ease;
}

.filters-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 600;
}

.tag button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.75;
}

.tag button:hover {
  opacity: 1;
}

.sort-group {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* ── Notify banner ─────────────────────────────────────────── */

.notify-banner {
  max-width: var(--max);
  margin: 0 auto 16px;
  padding: 0 20px;
}

.notify-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #141820, #0f1c22);
  border: 1px solid #1e3340;
}

.notify-inner svg {
  flex-shrink: 0;
  color: var(--accent-hover);
}

.notify-inner p {
  margin: 0;
  color: var(--text-muted);
  flex: 1;
}

.notify-inner strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Results ───────────────────────────────────────────────── */

.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 48px;
}

.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 28px 0 8px;
  flex-wrap: wrap;
}

.pagination[hidden] {
  display: none;
}

.page-btn {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-status {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.results-count {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1400px) {
  .listing-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    display: none;
  }

  .search-row .btn-lg {
    display: none;
  }
}

@media (max-width: 420px) {
  .listing-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Listing card ──────────────────────────────────────────── */

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  animation: card-in 0.35s ease both;
  cursor: pointer;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: #344054;
  transform: translateY(-2px);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #0a0d12;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.photo-count {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.shop-ribbon {
  position: absolute;
  top: 10px;
  right: -28px;
  width: 110px;
  text-align: center;
  padding: 4px 0;
  background: var(--shop);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  transform: rotate(35deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.card-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-badge {
  align-self: flex-start;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
}

.card-badge.hitno {
  background: rgba(232, 93, 93, 0.18);
  color: #ff8f8f;
}

.card-badge.shop {
  background: rgba(61, 139, 253, 0.18);
  color: #7eb6ff;
}

.card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12px;
}

.card-specs span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border-soft);
}

.card-time {
  color: var(--text-dim);
  font-size: 11px;
}

.card-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

/* ── Auth pages ────────────────────────────────────────────── */

.auth-wrap {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-card .lede {
  margin: 0 0 20px;
  color: var(--text-muted);
  line-height: 1.45;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
}

.tab {
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.google-btn {
  width: 100%;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: #1f1f1f;
  font-weight: 600;
}

.google-btn:hover {
  background: #f3f3f3;
  transform: translateY(-1px);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.auth-form.is-visible {
  display: flex;
}

.auth-form label,
.profile-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-form input,
.profile-form input {
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  outline: none;
  color: var(--text);
}

.auth-form input:focus,
.profile-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(232, 93, 93, 0.12);
  color: #ff9b9b;
  font-size: 13px;
}

.fine {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ── Profile ───────────────────────────────────────────────── */

.profile-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.profile-card {
  padding: 28px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.profile-card h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.03em;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-hover);
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-wrap-wide {
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

@media (max-width: 860px) {
  .profile-wrap-wide {
    grid-template-columns: 1fr;
  }
}

.moj-trx {
  padding: 18px;
  border-radius: 16px;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.moj-trx-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
}

.moj-trx-user {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-weight: 600;
}

.moj-trx-section {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-dim);
}

.moj-trx-tabs {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.moj-trx-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft, var(--bg));
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.moj-trx-tab.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.moj-trx-tab strong {
  margin-left: auto;
  color: var(--accent-hover);
}

.moj-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 800;
}

.my-listings {
  display: grid;
  gap: 10px;
}

.my-listing-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg);
}

.my-listing-media {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft, #1a1f24);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-size: 11px;
}

.my-listing-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-listing-body a {
  color: var(--text);
  text-decoration: none;
}

.my-listing-body p {
  margin: 4px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.my-listing-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.my-listing-badge.on {
  background: color-mix(in srgb, #22c55e 18%, transparent);
  color: #4ade80;
}

.my-listing-badge.off {
  background: color-mix(in srgb, var(--text-dim) 18%, transparent);
  color: var(--text-muted);
}

.my-listing-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.my-listing-actions .btn {
  color: inherit;
}

#my-listings-empty {
  color: var(--text-muted);
  margin: 0;
}

/* ── Publish ───────────────────────────────────────────────── */

.publish-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.publish-gate,
.publish-card {
  padding: 28px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.publish-gate {
  text-align: center;
}

.publish-gate h1,
.publish-card h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.publish-gate p,
.publish-card .lede {
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.45;
}

.publish-gate-actions,
.publish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.publish-actions {
  justify-content: flex-start;
  margin-top: 8px;
}

.publish-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.publish-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.publish-form input,
.publish-form select,
.publish-form textarea {
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  outline: none;
  color: var(--text);
}

.publish-form textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  min-height: 110px;
  font-family: inherit;
}

.publish-form input:focus,
.publish-form select:focus,
.publish-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.publish-form input:disabled {
  opacity: 0.45;
}

.publish-form .hint {
  font-weight: 400;
  color: var(--text-dim);
}

.price-row {
  display: flex;
  align-items: end;
  gap: 12px;
}

.price-field {
  flex: 1;
}

.check-pill {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
}

.check-pill input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.photo-label input[type="file"] {
  height: auto;
  padding: 10px;
  cursor: pointer;
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.photo-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: #0a0a0c;
}

/* ── Nekretnine publish wizard ─────────────────────────────── */

.publish-page--wide {
  max-width: 1100px;
}

.realty-wizard {
  padding-bottom: 48px;
}

.realty-wizard-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.realty-wizard-head h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.realty-wizard-head .lede {
  margin: 0;
  color: var(--text-muted);
}

.realty-progress {
  min-width: 220px;
  text-align: right;
}

.realty-progress span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.realty-progress-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--border-soft);
  overflow: hidden;
}

.realty-progress-fill {
  height: 100%;
  width: 20%;
  background: var(--accent);
  transition: width 0.25s ease;
}

.realty-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .realty-layout {
    grid-template-columns: 1fr;
  }

  .realty-preview {
    order: -1;
  }
}

.realty-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.realty-step {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.realty-step-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.realty-step-toggle small {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.realty-step-toggle strong {
  font-family: var(--font-display);
  font-size: 16px;
}

.realty-step:not(.open) .realty-step-toggle {
  opacity: 0.72;
}

.realty-step.open .realty-step-toggle {
  border-bottom: 1px solid var(--border-soft);
}

.realty-step .chev {
  color: var(--text-dim);
  transition: transform 0.2s;
}

.realty-step.open .chev {
  transform: rotate(180deg);
}

.realty-step-body {
  display: none;
  padding: 18px;
}

.realty-step.open .realty-step-body {
  display: block;
}

.realty-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 560px) {
  .realty-cat-grid {
    grid-template-columns: 1fr;
  }
}

.realty-cat-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.realty-cat-btn:hover,
.realty-cat-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.realty-cat-btn .cat-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.realty-cat-btn .cat-ico svg {
  width: 22px;
  height: 22px;
}

.realty-cat-btn.active .cat-ico {
  color: var(--accent);
}

.realty-dropzone .drop-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--text-muted);
}

.realty-cat-btn .cat-label {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.realty-cat-btn .cat-arrow {
  color: var(--text-dim);
  font-size: 18px;
}

.chip-field {
  margin-bottom: 16px;
}

.chip-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chip {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.choice-chip:hover {
  border-color: var(--accent);
}

.choice-chip.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-hover);
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  position: relative;
}

.field-block input,
.field-block select,
.field-block textarea {
  height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

.field-block textarea {
  height: auto;
  min-height: 140px;
  padding: 12px;
  resize: vertical;
  font-family: inherit;
}

.field-block input:focus,
.field-block select:focus,
.field-block textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.char-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 11px;
  color: var(--text-dim);
}

.char-count.inline {
  position: static;
  float: right;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.realty-subhead {
  margin: 8px 0 14px;
  font-family: var(--font-display);
  font-size: 15px;
}

.realty-nav {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.addr-search-row {
  display: flex;
  gap: 8px;
}

.addr-search-row input {
  flex: 1;
}

.btn-block {
  width: 100%;
  margin: 10px 0;
}

.realty-map-note {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent-hover);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.realty-map {
  height: 360px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-input);
  margin-top: 8px;
  z-index: 1;
}

  .realty-map.gmaps-ready,
.listing-map.gmaps-ready {
  background: #121218;
}

/* Places autocomplete dropdown above wizard chrome */
.pac-container {
  z-index: 10000 !important;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  font-family: inherit;
}

.map-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin: 10px 0 0;
  line-height: 1.4;
}

.price-input-wrap {
  display: flex;
  align-items: stretch;
}

.price-input-wrap input {
  flex: 1;
  border-radius: 8px 0 0 8px;
}

.price-unit {
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-ui {
  width: 42px;
  height: 24px;
  border-radius: 99px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s;
}

.toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.toggle-row input:checked + .toggle-ui {
  background: var(--accent);
}

.toggle-row input:checked + .toggle-ui::after {
  transform: translateX(18px);
}

.amenity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  margin-bottom: 18px;
}

@media (max-width: 560px) {
  .amenity-grid {
    grid-template-columns: 1fr;
  }
}

.realty-photo-banner {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent-hover);
  font-size: 13px;
  margin-bottom: 14px;
}

.realty-dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.realty-dropzone.dragover,
.realty-dropzone:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.realty-dropzone .muted {
  color: var(--text-dim);
  font-size: 13px;
  margin: 4px 0 14px;
}

.photo-thumb {
  position: relative;
}

.photo-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.realty-preview {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.realty-preview h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.preview-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
}

.preview-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #121218, #1a2228);
  display: grid;
  place-items: center;
  position: relative;
}

.preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-placeholder {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--text-dim);
  opacity: 0.5;
}

.preview-body {
  padding: 12px;
}

.preview-body h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.7em;
}

.preview-badge {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.preview-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.preview-foot strong {
  color: var(--text);
  font-size: 15px;
}

.card-media.no-image {
  display: grid;
  place-items: center;
  color: var(--text-dim);
  background: linear-gradient(145deg, #121218, #1a2228);
}


/* ── Legacy publish placeholder (unused) ───────────────────── */

.publish-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px;
  text-align: center;
}

.publish-wrap h1 {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}

.publish-wrap p {
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Toast ─────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 18px;
  border-radius: 10px;
  background: #253041;
  border: 1px solid var(--border);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 20px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
}

/* ── Listing detail ────────────────────────────────────────── */

.detail-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 20px 64px;
}

.detail-loading {
  color: var(--text-muted);
  padding: 40px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 960px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.back-link:hover {
  color: var(--accent-hover);
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb {
  margin: 0 0 6px;
  color: var(--text-dim);
  font-size: 13px;
}

.detail-main h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.detail-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-price {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.detail-tools {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.detail-gallery {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0a0c;
  border: 1px solid var(--border-soft);
  margin-bottom: 20px;
}

.detail-gallery > img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.detail-gallery.no-image {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  background: var(--bg-elevated);
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.35);
}

.gallery-thumbs .thumb {
  border: 2px solid transparent;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  width: 72px;
  height: 54px;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
}

.gallery-thumbs .thumb.active {
  border-color: var(--accent);
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-count {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  font-size: 12px;
  font-weight: 600;
}

.detail-section {
  padding: 20px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
}

.detail-section h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
}

.attr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin: 0;
}

@media (max-width: 560px) {
  .attr-grid {
    grid-template-columns: 1fr;
  }
}

.attr-grid dt {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0 0 2px;
}

.attr-grid dd {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.detail-desc {
  color: var(--text);
  line-height: 1.6;
  white-space: normal;
}

/* Listing detail — Osobine / Lokacija (dark panels) */
.pik-panel {
  background: var(--bg-card);
  color: var(--text);
  border-radius: 14px;
  padding: 22px 22px 12px;
  margin: 0 0 16px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}

.pik-panel h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-hover);
}

.pik-loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--accent-hover);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pik-loc-chip svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.pik-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

@media (min-width: 720px) {
  .pik-highlight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pik-highlight-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
}

.pik-hi-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.pik-hi-icon svg {
  width: 24px;
  height: 24px;
}

.pik-highlight-card small {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 2px;
}

.pik-highlight-card strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.pik-osobine-head {
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  margin-bottom: 4px;
}

.pik-osobine-head h2 {
  margin-bottom: 8px;
}

.pik-attr-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  margin: 0;
}

@media (max-width: 640px) {
  .pik-attr-list {
    grid-template-columns: 1fr;
  }
}

.pik-attr-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.pik-attr-row dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.pik-attr-row dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.pik-check {
  color: var(--accent);
  font-weight: 700;
}

.pik-loc-lines {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
}

.pik-loc-lines p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.pik-loc-lines span {
  color: var(--text-muted);
  font-size: 14px;
}

.pik-loc-lines strong {
  color: var(--text);
  font-weight: 700;
}

.listing-map {
  width: 100%;
  height: 320px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-input);
}

.pik-location-panel .map-hint {
  color: var(--text-dim);
  margin: 10px 0 12px;
}

.pik-desc {
  color: var(--text);
  padding-bottom: 12px;
}

.seller-card {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 20px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.seller-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.seller-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--font-display);
  overflow: hidden;
  flex-shrink: 0;
}

.seller-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seller-meta {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 12px;
}

.seller-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.phone-reveal {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent-hover);
  font-weight: 700;
  text-align: center;
}

.report-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 12px;
}

.report-link:hover {
  color: var(--danger);
}

/* ── Modal ─────────────────────────────────────────────────── */

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 24px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
}

.modal-card textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  resize: vertical;
  font: inherit;
}

.modal-card label {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

/* ── WhatsApp-style chat ───────────────────────────────────── */

.chat-app {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  height: calc(100vh - var(--header-h));
  max-width: 1200px;
  margin: 0 auto;
  border-left: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
  background: var(--bg);
}

.chat-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg-elevated);
  min-height: 0;
}

.chat-sidebar-head {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border-soft);
}

.chat-sidebar-head h1 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.chat-sidebar-head .lede {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
}

.chat-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.45;
  font-size: 14px;
}

.chat-conv {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  position: relative;
}

.chat-conv:hover,
.chat-conv.active {
  background: var(--accent-dim);
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.chat-conv-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-conv-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.chat-conv-top strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-top time {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.chat-conv-listing {
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-conv-preview {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-unread {
  position: absolute;
  right: 10px;
  bottom: 12px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--accent);
  color: #041016;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.chat-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background:
    radial-gradient(ellipse at top, rgba(0, 216, 255, 0.04), transparent 50%),
    var(--bg);
}

.chat-pane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.chat-back {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
}

.chat-peer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-peer strong {
  display: block;
  font-size: 15px;
}

.chat-listing-link {
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
  display: inline-block;
}

.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble-row {
  display: flex;
}

.chat-bubble-row.mine {
  justify-content: flex-end;
}

.chat-bubble-row.theirs {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: min(75%, 420px);
  padding: 10px 12px 6px;
  border-radius: 14px;
  line-height: 1.4;
}

.chat-bubble-row.mine .chat-bubble {
  background: var(--accent-soft);
  border: 1px solid rgba(0, 216, 255, 0.35);
  border-bottom-right-radius: 4px;
}

.chat-bubble-row.theirs .chat-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-bubble p {
  margin: 0;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble time {
  display: block;
  text-align: right;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
}

.chat-composer {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.chat-composer input {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

.chat-composer input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.chat-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

.chat-placeholder h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  color: var(--text);
}

.chat-placeholder p {
  margin: 0;
  max-width: 280px;
  line-height: 1.45;
}

@media (max-width: 800px) {
  .chat-app {
    grid-template-columns: 1fr;
    border: 0;
  }

  .chat-placeholder {
    display: none;
  }

  .chat-pane {
    display: none;
  }

  .chat-app.chat-open .chat-sidebar {
    display: none;
  }

  .chat-app.chat-open .chat-pane {
    display: flex;
  }

  .chat-back {
    display: grid;
    place-items: center;
  }
}

/* legacy inbox leftovers kept for safety */
.messages-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.messages-page h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.msg-row {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.msg-row:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}

.msg-row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
}

.msg-row-top span {
  color: var(--text-dim);
  white-space: nowrap;
}

.msg-row p {
  margin: 0 0 8px;
  color: var(--text-muted);
  line-height: 1.45;
}

.msg-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Vozila search ─────────────────────────────────────────── */

.vozila-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 8px;
}

.vozila-search-card {
  padding: 18px 18px 20px;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: visible;
}

.vozila-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 2px;
  overflow: visible;
}

.vozila-tab {
  flex: 0 0 auto;
  height: auto;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.vozila-tab:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.vozila-tab.active {
  background: var(--accent);
  border-color: transparent;
  color: #041018;
}

.vozila-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vozila-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

@media (max-width: 720px) {
  .vozila-grid {
    grid-template-columns: 1fr;
  }
}

.vozila-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vozila-grid label > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.vozila-grid select,
.vozila-grid input,
.range-pair select,
.range-pair input {
  height: 42px;
  width: 100%;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

.vozila-grid select:focus,
.vozila-grid input:focus,
.range-pair select:focus,
.range-pair input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.range-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vozila-submit {
  width: 100%;
  height: 48px;
  font-size: 15px;
}

.vozila-grid .span-2 {
  grid-column: 1 / -1;
}

.ad-type-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}

.ad-type-btn {
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ad-type-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.search-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

.search-actions .vozila-submit {
  width: 100%;
}

@media (max-width: 640px) {
  .search-actions {
    grid-template-columns: 1fr;
  }
}

.vehicle-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(0, 216, 255, 0.04);
}

.vehicle-fields[hidden] {
  display: none !important;
}

a.filter-chip {
  text-decoration: none;
}

/* ── Categories directory ──────────────────────────────────── */

.categories-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.categories-head {
  margin-bottom: 22px;
}

.categories-head h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.categories-head .lede {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.cat-search {
  position: relative;
  display: block;
  max-width: 420px;
}

.cat-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.cat-search input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

.cat-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1100px) {
  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
}

.cat-card {
  padding: 16px 16px 12px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.cat-card:hover {
  border-color: #3a4658;
  transform: translateY(-1px);
}

.cat-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.cat-card-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.cat-card-head a:hover h2 {
  color: var(--accent-hover);
}

.cat-icon {
  font-size: 20px;
  line-height: 1;
}

.cat-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 320px;
  overflow: auto;
}

.cat-sublist a {
  display: block;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  transition: background 0.12s ease, color 0.12s ease;
}

.cat-sublist a:hover {
  background: var(--accent-dim);
  color: var(--accent-hover);
}
