
/* Layout idea: phone-first catalogue, type tabs + category chips on top, card grid below, sticky "Adaugă un anunț" button. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #385469;
  --text: #696969;
  --muted: #5f7684;
  --line: #c9dde2;
  --brand: #385469;
  --brand-ink: #ffffff;
  --accent: #f39f5f;
  --accent-ink: #3a2410;
  --soft: #eff5f6;
  --teal: #70a6b1;
  --teal-ink: #10303a;
  --gift: #2b7a58;
  --gift-ink: #ffffff;
  --ok: #2b7a58;
  --warn: #9a4f0c;
  --font-display: "Quicksand", "Trebuchet MS", sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14222b; --surface: #1c2f3a; --ink: #e8f0f2; --text: #c4d3da; --muted: #9fb6c0; --line: #2e4655;
    --brand: #70a6b1; --brand-ink: #10202a; --soft: #26394a; --teal: #3d6d79; --teal-ink: #e4f1f3;
    --gift: #5cb98f; --gift-ink: #0f2a1f; --ok: #6cc59b; --warn: #f3b27a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14222b; --surface: #1c2f3a; --ink: #e8f0f2; --text: #c4d3da; --muted: #9fb6c0; --line: #2e4655;
  --brand: #70a6b1; --brand-ink: #10202a; --soft: #26394a; --teal: #3d6d79; --teal-ink: #e4f1f3;
  --gift: #5cb98f; --gift-ink: #0f2a1f; --ok: #6cc59b; --warn: #f3b27a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.5; padding-bottom: 96px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--ink); margin: 0; text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.proto { background: var(--soft); color: var(--ink); border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 500; text-align: center; padding: 8px 16px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand .mark { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: .14em; color: var(--ink); }
.brand .sub { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.hdr-cta { display: none; }
@media (min-width: 700px) { .hdr-cta { display: inline-block; } .fab { display: none; } }
.hero { padding-top: 36px; padding-bottom: 8px; }
.eyebrow { font-weight: 600; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.hero h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.1; margin: 10px 0 14px; }
.lead { font-size: 18px; max-width: 52ch; margin: 0 0 18px; }
.dots { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 0; list-style: none; font-size: 15px; color: var(--ink); }
.dots li::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #70a6b1; margin-right: 9px; }

.controls { display: flex; flex-direction: column; gap: 12px; padding-top: 18px; padding-bottom: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tabs { display: flex; gap: 24px; max-width: 100%; overflow-x: auto; padding: 4px 2px 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; white-space: nowrap; border: 0; background: transparent; padding: 6px 0 14px; font-family: var(--font-body); font-weight: 500; font-size: 16px; color: var(--ink); }
.tabs button[aria-pressed="true"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='6' viewBox='0 0 18 6'%3E%3Cpath d='M0 3 Q4.5 0 9 3 T18 3' fill='none' stroke='%23f39f5f' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-position: left bottom; background-size: 18px 6px; font-weight: 600; }
.search { flex: 1 1 200px; min-width: 0; }
.search input { width: 100%; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip { flex: 0 0 auto; font-family: var(--font-body); border: 1px solid var(--ink); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.count { color: var(--muted); font-size: 14px; padding: 8px 0 2px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; padding: 8px 0 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; min-width: 0; }
.card:hover { border-color: var(--brand); }
.card.done { opacity: .6; }
.tile { position: relative; aspect-ratio: 4 / 3; background: var(--soft); display: grid; place-items: center; color: var(--brand); }
.tile svg { width: 56px; height: 56px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; top: 10px; left: 10px; font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.badge.sale { background: var(--accent); color: var(--accent-ink); }
.badge.loan { background: var(--teal); color: var(--teal-ink); }
.badge.swap { background: var(--brand); color: var(--brand-ink); }
.badge.gift { background: var(--gift); color: var(--gift-ink); }
.badge.want { background: var(--surface); color: var(--ink); border: 1.5px dashed var(--brand); }
.mine { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.body h3 { font-size: 18px; line-height: 1.2; }
.meta { color: var(--muted); font-size: 14px; }
.foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.price { font-family: var(--font-display); font-weight: 600; font-size: 20px; white-space: nowrap; }
.status { font-weight: 700; font-size: 13px; }
.status.ok { color: var(--ok); }
.status.out { color: var(--warn); }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; color: var(--muted); }

.fab { position: fixed; right: 16px; bottom: 16px; z-index: 5; border: 0; background: var(--brand); color: var(--brand-ink); font-family: var(--font-body); font-weight: 600; padding: 14px 24px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

.hdr-btns { display: flex; gap: 10px; }
.fabs { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 5; display: flex; gap: 10px; justify-content: flex-end; }
.fabs .fab { position: static; }
.fab-rec { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }
@media (min-width: 700px) { .fabs { display: none; } }
.badge.rec { background: var(--teal); color: var(--teal-ink); }
.why { margin: 2px 0 0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rblock { display: flex; flex-direction: column; gap: 4px; }
.rblock p { margin: 0; }
.overlay { position: fixed; inset: 0; background: rgba(15, 30, 40, .55); display: none; align-items: flex-end; justify-content: center; z-index: 10; }
.overlay.open { display: flex; }
#propOv { z-index: 12; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92%; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 18px 24px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 700px) { .overlay { align-items: center; } .sheet { border-radius: 20px; } }
.sheet .close { align-self: flex-end; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 14px; font-weight: 700; }
.sheet .tile { border-radius: 14px; overflow: hidden; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 700; }
.note { background: var(--soft); border-radius: 12px; padding: 10px 14px; font-size: 14px; color: var(--muted); }
.primary { border: 0; background: var(--brand); color: var(--brand-ink); font-family: var(--font-body); font-weight: 600; padding: 13px 26px; border-radius: 999px; }
.primary[disabled] { opacity: .55; cursor: default; }
.secondary { border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-family: var(--font-body); font-weight: 600; padding: 11px 22px; border-radius: 999px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.queue { margin: 6px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.pos { background: var(--soft); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.offer { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.swapview { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.swapview .box { background: var(--soft); border-radius: 10px; padding: 8px 10px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.swapview .box small { display: block; color: var(--muted); font-weight: 700; }
.swapview .arrow { font-weight: 800; font-size: 20px; color: var(--brand); }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow > button { flex: 1 1 120px; }

.wa { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.wabtn { border: 0; background: var(--gift); color: var(--gift-ink); font-family: var(--font-body); font-weight: 600; padding: 12px 22px; border-radius: 999px; }
form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; }
label input, label select, label textarea { font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 10px 6px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.hidden { display: none !important; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; z-index: 20; max-width: calc(100% - 32px); font-weight: 600; display: none; }
.toast.show { display: block; }
@media (prefers-reduced-motion: no-preference) { .card { transition: border-color .15s; } }
/* Adăugiri pentru versiunea reală */
.view { display: none; }
.view.on { display: block; }
.boot { padding: 80px 16px; text-align: center; color: var(--muted); }
.auth-wrap { max-width: 440px; margin: 36px auto 0; padding: 0 16px; }
.auth-card { border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); }
.auth-card h2 { font-size: 26px; }
.auth-card p { margin: 0; }
.err { color: var(--warn); font-weight: 600; font-size: 14px; margin: 0; }
.okmsg { color: var(--ok); font-weight: 600; font-size: 14px; margin: 0; }
.linkbtn { border: 0; background: transparent; color: var(--ink); text-decoration: underline; font-family: var(--font-body); font-weight: 500; padding: 4px 0; align-self: flex-start; }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.check input { width: auto; margin-top: 5px; }
.row-item { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.row-item .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.row-item .btnrow { flex: 0 0 auto; flex-wrap: nowrap; }
.row-item .btnrow > button { flex: 0 0 auto; padding: 8px 14px; font-size: 14px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.sub-h { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 18px; margin: 4px 0 0; }
.num { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; text-align: center; }
.userbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.smallbtn { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 6px 14px; font-family: var(--font-body); font-weight: 500; font-size: 14px; }
.legal { max-width: 1040px; margin: 0 auto; padding: 8px 16px 40px; font-size: 13px; color: var(--muted); }
a.wabtn { display: inline-block; text-align: center; text-decoration: none; }
.hidden { display: none !important; }
