/* =========================================================
   Meni (mobilni), single stranice, forme, zajednica, paneli
   ========================================================= */

/* ---------- Glavni meni: Forum brojač ---------- */
.nav-count { background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; padding: 1px 6px; border-radius: 3px; margin-left: 4px; line-height: 1.5; }

/* ---------- Hamburger ---------- */
.menu-btn { width: 46px; height: 46px; border: 0; border-radius: 4px; background: var(--bordo); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 0; }
.menu-btn span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: .25s; }
.menu-btn span:nth-child(2) { width: 14px; margin-left: 6px; }
@media (max-width: 1140px) { .menu-btn { display: inline-flex; } }

/* ---------- Offcanvas v2 ---------- */
.offcanvas { width: min(420px, 100vw); background: var(--bg); box-shadow: -30px 0 60px rgba(8, 14, 30, .25); }
.oc-head { background: var(--bordo); border-bottom: 0; padding: 16px 18px; }
.oc-head .logo-text { color: #fff; }
.oc-head .logo-text b { color: #ff8095; }
.oc-head .logo-mark { background: #fff; color: var(--red); }
.oc-close { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; border-radius: 4px; display: grid; place-items: center; cursor: pointer; }
.oc-body { padding: 0 0 18px; }
.oc-user { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--bordo); color: #fff; border-top: 1px solid rgba(255,255,255,.1); }
.oc-user:hover { color: #fff; }
.oc-user > div { flex: 1; min-width: 0; }
.oc-user b { display: block; font-size: 15px; }
.oc-user span { font-size: 12.5px; color: #c3cde0; }
.oc-user .avatar { border-color: rgba(255,255,255,.3); }
.oc-search { margin: 16px 18px 6px; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 14px; height: 50px; color: var(--muted); }
.oc-search input { border: 0; outline: 0; font: inherit; font-size: 15px; flex: 1; min-width: 0; background: transparent; }
.oc-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 18px; }
.oc-tiles a { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px 14px; color: var(--ink); display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden; }
.oc-tiles a::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); transform: scaleY(0); transition: .2s; }
.oc-tiles a:active::after, .oc-tiles a:hover::after { transform: scaleY(1); }
.oc-tiles svg.lucide { width: 26px; height: 26px; color: var(--red); stroke-width: 1.6; margin-bottom: 8px; }
.oc-tiles b { font-size: 15px; }
.oc-tiles span { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.oc-group { margin: 8px 18px 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 0 16px; }
.oc-group > :last-child, .oc-group > :last-child summary { border-bottom: 0; }
.oc-link, .oc-acc summary { font-size: 15px; padding: 15px 0; min-height: 52px; }
.oc-link .chev { margin-left: auto; color: var(--muted); width: 16px; }
.oc-sub { padding: 0 0 10px 30px; }
.oc-sub a { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14.5px; }
.oc-sub a span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.oc-script { display: flex; align-items: center; justify-content: space-between; margin: 16px 18px 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.oc-script .script-toggle { background: #e1e6ef; }
.oc-script .script-toggle button { color: var(--ink-2); padding: 6px 14px; }
.oc-script .script-toggle button.active { background: var(--bordo); color: #fff; }
.oc-foot { background: #fff; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }

/* ---------- Donja navigacija (mobilni) ---------- */
.tabbar { display: none; }
@media (max-width: 860px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1400; background: #fff; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(8, 14, 30, .08); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 0; }
  .tabbar a svg.lucide { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--red); }
  .tabbar .tab-plus { align-self: center; justify-self: center; width: 52px; height: 52px; border-radius: 50%; background: var(--red); color: #fff; justify-content: center; margin-top: -26px; box-shadow: 0 8px 20px rgba(230, 57, 70, .45); border: 4px solid #fff; padding: 0; }
  .tabbar .tab-plus svg.lucide { width: 24px; height: 24px; }
  body { padding-bottom: 72px; }
  body.demo .demo-bar { bottom: 84px; }
  .topbar .container { justify-content: flex-end; }
}

/* ---------- Single: zajedničko ---------- */
.crumbs-light a { color: var(--muted); }
.single-title { font-size: clamp(22px, 2.6vw, 32px); letter-spacing: -.025em; margin-bottom: 10px; }
.sub-h { font-size: 13px; font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 26px 0 12px; font-weight: 600; }
.specs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.specs > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs > div:nth-child(odd) { border-right: 1px solid var(--line); }
.specs > div:nth-last-child(-n+2) { border-bottom: 0; }
.specs span { color: var(--muted); }
.specs b { text-align: right; }
.single-actions { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.sticky-side { position: sticky; top: 100px; }

/* galerija oglasa */
.gallery-main { overflow: hidden; }
.g-stage { aspect-ratio: 16/10; background: #0b1426 center/cover; position: relative; transition: background-image .2s; }
.g-badge { position: absolute; top: 16px; left: 16px; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); }
.g-nav:hover { background: #fff; color: var(--red); }
.g-nav.prev { left: 16px; } .g-nav.next { right: 16px; }
.g-count { position: absolute; bottom: 14px; right: 16px; background: rgba(8, 14, 30, .7); color: #fff; font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 3px; }
.g-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 8px; }
.g-thumbs button { aspect-ratio: 4/3; border: 2px solid transparent; border-radius: 4px; background: center/cover; cursor: pointer; padding: 0; opacity: .65; }
.g-thumbs button.active { border-color: var(--red); opacity: 1; }
.price-box { border-top: 4px solid var(--red); }
.big-price { font-family: var(--display); font-size: 38px; color: var(--bordo); letter-spacing: -.03em; line-height: 1.1; margin: 4px 0; }
.seller { display: flex; gap: 14px; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); }
.seller b { display: flex; align-items: center; gap: 4px; font-size: 14.5px; }
.seller-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.seller-stats div { padding: 12px; text-align: center; border-right: 1px solid var(--line); }
.seller-stats div:last-child { border-right: 0; }
.seller-stats b { display: block; font-family: var(--mono); color: var(--bordo); }
.seller-stats span { font-size: 12px; color: var(--muted); }

/* posao: ponude */
.offer { display: flex; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.offer:last-child { border-bottom: 0; }
.offer b { display: flex; align-items: center; gap: 4px; }
.offer-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.offer-side .price { font-size: 18px; }
.file-chip { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; background: #f8f9fc; }
.file-chip svg.lucide { width: 15px; color: var(--red); }

/* ---------- Forme ---------- */
.form-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 32px 0 64px; align-items: start; }
.steps-nav { position: sticky; top: 100px; display: grid; gap: 4px; }
.steps-nav a { display: flex; gap: 12px; padding: 12px; border-radius: 6px; color: var(--ink); align-items: center; }
.steps-nav a span { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--muted); flex-shrink: 0; }
.steps-nav a b { display: block; font-size: 14px; }
.steps-nav a small { color: var(--muted); font-size: 12px; }
.steps-nav a.active { background: #fff; box-shadow: var(--shadow); }
.steps-nav a.active span { border-color: var(--red); color: var(--red); }
.steps-nav a.done span { background: var(--bordo); border-color: var(--bordo); color: #fff; }
.form-sec { scroll-margin-top: 100px; }
.fs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.fs-head span { font-family: var(--mono); color: var(--red); font-weight: 600; font-size: 13px; }
.fs-head h3 { margin: 0; font-size: 18px; }
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pick-grid label { border: 1.5px solid var(--line); border-radius: 6px; padding: 16px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; font-weight: 600; text-align: left; transition: .15s; }
.pick-grid label svg.lucide { width: 24px; height: 24px; color: var(--red); stroke-width: 1.6; }
.pick-grid input { display: none; }
.pick-grid label:has(input:checked) { border-color: var(--red); background: var(--brand-50); color: var(--bordo); }
.form-submit { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: 6px; position: sticky; bottom: 12px; box-shadow: var(--shadow-lg); z-index: 5; }
.upload-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.up-item, .up-add { aspect-ratio: 1; border-radius: 6px; position: relative; background: center/cover; }
.up-main { position: absolute; left: 6px; bottom: 6px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 3px; }
.up-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); display: grid; place-items: center; cursor: pointer; }
.up-x svg.lucide { width: 14px; height: 14px; }
.up-add { border: 2px dashed var(--brand-100); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--red); font-size: 13px; font-weight: 700; cursor: pointer; background: #fbfcfe; }
.boost { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1.5px solid var(--line); border-radius: 6px; margin-top: 10px; cursor: pointer; }
.boost input { accent-color: var(--red); }
.boost div { flex: 1; }
.boost b { display: block; font-size: 14px; }
.boost span { font-size: 12.5px; color: var(--muted); }
.boost em { font-style: normal; font-size: 11px; font-family: var(--mono); color: var(--red); }
.boost:has(input:checked) { border-color: var(--red); background: var(--brand-50); }
.boost:has(input:disabled) { opacity: .6; cursor: default; }
.tips { margin: 8px 0 12px; padding-left: 18px; color: var(--ink-2); display: grid; gap: 4px; }
.pw-meter { height: 4px; background: var(--line); border-radius: 4px; margin: 8px 0 4px; overflow: hidden; }
.pw-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), #f59e0b); }

/* ---------- Prijava (stranica) ---------- */
.auth-page { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 116px); }
.auth-photo { position: relative; background: var(--bordo) url("https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Total_station_construction_set-out_at_sunset.jpg/960px-Total_station_construction_set-out_at_sunset.jpg") center/cover; display: flex; align-items: flex-end; color: #fff; }
.auth-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 33, 61,.35), rgba(8, 14, 30,.92)); }
.auth-photo-inner { position: relative; padding: 56px; max-width: 560px; }
.auth-photo h2 { color: #fff; font-size: clamp(26px, 3vw, 38px); }
.auth-quote { margin-top: 28px; padding-left: 18px; border-left: 3px solid var(--red); font-size: 16px; color: #e2e8f2; }
.auth-quote span { display: block; font-size: 13px; color: #9fabc2; margin-top: 8px; }
.auth-form { display: grid; place-items: center; padding: 48px 24px; background: #fff; }
.auth-box { width: min(440px, 100%); }

/* ---------- Zajednica ---------- */
.comm-hero { background: var(--bordo); color: #fff; padding: 64px 0 56px; position: relative; overflow: hidden; }
.comm-hero::after { content: ""; position: absolute; inset: 0; background: url("https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Surveyor_on_site.jpg/1920px-Surveyor_on_site.jpg") center/cover; opacity: .18; mix-blend-mode: luminosity; }
.comm-hero .container { position: relative; z-index: 1; }
.comm-hero h1 { color: #fff; font-size: clamp(30px, 4.4vw, 52px); }
.comm-hero p { color: #c3cde0; font-size: 18px; }
.comm-stats { display: flex; gap: 0; margin-top: 32px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.18); }
.comm-stats div { padding: 20px 36px 0 0; margin-right: 36px; }
.comm-stats b { display: block; font-family: var(--display); font-size: 28px; letter-spacing: -.03em; }
.comm-stats span { font-size: 13px; color: #c3cde0; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.event { display: flex; gap: 16px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.event > div:nth-child(2) { flex: 1; min-width: 0; }
.ev-date { width: 58px; text-align: center; border: 1.5px solid var(--red); border-radius: 6px; padding: 6px 0; flex-shrink: 0; }
.ev-date b { display: block; font-family: var(--display); font-size: 22px; color: var(--bordo); line-height: 1.1; }
.ev-date span { font-family: var(--mono); font-size: 10.5px; color: var(--red); letter-spacing: .1em; }
.leader { display: flex; gap: 12px; align-items: center; padding: 12px 22px; border-bottom: 1px solid var(--line); }
.leader:last-child { border-bottom: 0; }
.leader b { display: block; font-size: 14px; }
.leader span:not(.avatar):not(.lead-n) { font-size: 12.5px; color: var(--muted); }
.lead-n { font-family: var(--mono); color: var(--red); font-weight: 600; font-size: 13px; width: 20px; }
.avatars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ---------- Vest ---------- */
.article-hero { position: relative; background: var(--bordo) center/cover; color: #fff; padding: 120px 0 56px; }
.article-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 14, 30,.45), rgba(8, 14, 30,.92)); }
.article-hero .container { position: relative; }
.article-hero .crumbs, .article-hero .crumbs a { color: #c3cde0; }
.article-hero h1 { color: #fff; font-size: clamp(26px, 3.8vw, 46px); max-width: 920px; margin-top: 12px; }
.article-layout { display: grid; grid-template-columns: 56px 1fr 300px; gap: 40px; padding: 48px 0 72px; align-items: start; }
.share-rail { position: sticky; top: 110px; display: grid; gap: 8px; }
.prose { font-size: 17px; line-height: 1.75; max-width: 720px; }
.prose .lede { font-size: 20px; line-height: 1.6; color: var(--ink); font-weight: 500; }
.prose h2 { font-size: 24px; margin-top: 36px; }
.prose ul { padding-left: 20px; }
.prose blockquote { margin: 28px 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--red); font-family: var(--display); font-size: 22px; line-height: 1.35; color: var(--bordo); }
.ad-tall { min-height: 520px; }

/* ---------- Admin: korisnik ---------- */
.admin-user-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; border-top: 4px solid var(--red); }
.timeline { padding: 10px 22px 16px; }
.timeline > div { position: relative; padding: 10px 0 10px 24px; font-size: 14px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline > div span { display: block; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.tl-dot { position: absolute; left: -7px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--bordo); border: 2px solid #fff; }
.tl-dot.warn { background: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .form-layout { grid-template-columns: 1fr; }
  .steps-nav { position: static; grid-template-columns: repeat(4, 1fr); }
  .steps-nav a small { display: none; }
  .article-layout { grid-template-columns: 1fr; }
  .share-rail { position: static; display: flex; }
  .sticky-side { position: static; }
  .pick-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-photo { min-height: 220px; }
  .auth-photo-inner { padding: 28px 22px; }
  .auth-quote { display: none; }
  .specs { grid-template-columns: 1fr; }
  .specs > div:nth-child(odd) { border-right: 0; }
  .specs > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .pick-grid { grid-template-columns: 1fr 1fr; }
  .upload-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-nav { grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .steps-nav a { flex-direction: column; text-align: center; gap: 4px; padding: 8px 4px; }
  .steps-nav a b { font-size: 11.5px; }
  .offer { flex-wrap: wrap; }
  .offer-side { flex-direction: row; width: 100%; justify-content: flex-end; align-items: center; }
  .offer-side .price { margin-right: auto; }
  .form-submit { position: static; }
  .g-thumbs { grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 4px; }
  .comm-stats div { padding-right: 0; margin-right: 28px; }
  .article-hero { padding: 72px 0 40px; }
}
