/* =========================================================
   MojGeometar.com — dizajn sistem v2
   Bordo · crvena · bela  |  "Geodetska preciznost"
   ========================================================= */
:root {
  --bordo: #14213d;
  --bordo-2: #1d2f55;
  --red: #e63946;
  --red-2: #c62a37;
  --brand: #14213d;
  --brand-600: #0f1a31;
  --brand-700: #14213d;
  --brand-50: #edf1f8;
  --brand-100: #d6dfee;
  --ink: #0d1526;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e1e6ef;
  --line-2: #cfd6e2;
  --bg: #f5f7fb;
  --paper: #ffffff;
  --card: #ffffff;
  --accent: #e63946;
  --accent-50: #fdecee;
  --danger: #e63946;
  --danger-50: #fdecee;
  --info: #1f4e8c;
  --info-50: #ecf2fa;
  --ok: #1d7a46;
  --ok-50: #e8f5ed;
  --gold: #b88a2e;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 0 rgba(13, 21, 38, .04), 0 2px 10px rgba(13, 21, 38, .05);
  --shadow-lg: 0 24px 60px -12px rgba(10, 20, 45, .28);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body.lock { overflow: hidden; }
a { color: var(--red-2); text-decoration: none; }
a:hover { color: var(--bordo); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .45em; line-height: 1.15; letter-spacing: -.015em; }
h1, h2 { font-family: var(--display); font-weight: 700; }
h1 { font-size: clamp(30px, 5vw, 62px); letter-spacing: -.03em; line-height: 1.04; }
h2 { font-size: clamp(22px, 2.7vw, 34px); letter-spacing: -.025em; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); }
svg.lucide { width: 18px; height: 18px; stroke-width: 1.9; flex-shrink: 0; }

.container { width: min(1280px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  height: 44px; padding: 0 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; letter-spacing: .01em;
  transition: background .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; color: var(--ink); background: #fff;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-2); color: #fff; }
.btn-dark { background: var(--bordo); color: #fff; }
.btn-dark:hover { background: #0d173000; background: #0d1730; color: #fff; }
.btn-accent { background: #fff; color: var(--bordo); }
.btn-accent:hover { background: #f1f4fa; color: var(--bordo); }
.btn-outline { border-color: var(--line-2); background: #fff; }
.btn-outline:hover { border-color: var(--bordo); color: var(--bordo); }
.btn-glass { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-glass:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--brand-50); color: var(--bordo); }
.btn-danger { background: var(--danger-50); color: var(--danger); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #fff; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); position: relative;
}
.icon-btn:hover { color: var(--red); border-color: var(--brand-100); }
.dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 3px; font-size: 12px; font-weight: 700; background: var(--brand-50); color: var(--bordo); }
.badge svg.lucide { width: 13px; height: 13px; }
.badge-accent { background: var(--accent-50); color: var(--red-2); }
.badge-info { background: var(--info-50); color: var(--info); }
.badge-ok { background: var(--ok-50); color: var(--ok); }
.badge-danger { background: var(--red); color: #fff; }
.badge-gray { background: #eef1f6; color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 3px; border: 1px solid var(--line-2); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); font-family: inherit; }
.chip.active, .chip:hover { border-color: var(--bordo); color: #fff; background: var(--bordo); }
.verified { color: var(--red); display: inline-flex; }
.verified svg.lucide { width: 20px; height: 20px; fill: var(--red); stroke: #fff; }

/* tehnička oznaka: 01 — NASLOV */
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.eyebrow b { color: var(--ink); font-weight: 700; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 9px; text-transform: uppercase; letter-spacing: .04em; }
.card-head h3 svg.lucide { color: var(--red); }
.section { padding: 88px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 36px; }
.section-head p { margin: 0; color: var(--muted); max-width: 560px; }

/* ---------- Topbar / header ---------- */
.topbar { background: var(--bordo); color: #d5dcea; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 12px; }
.topbar a { color: #d5dcea; }
.topbar a:hover { color: #fff; }
.topbar .row { gap: 20px; }
.topbar .coord { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; opacity: .8; }
.script-toggle { display: inline-flex; background: rgba(0,0,0,.25); border-radius: 3px; padding: 2px; }
.script-toggle button { border: 0; background: transparent; color: #d5dcea; font: inherit; font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 2px; cursor: pointer; }
.script-toggle button.active { background: #fff; color: var(--bordo); }

.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.header > .container { display: flex; align-items: center; height: 78px; gap: 32px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark { width: 42px; height: 42px; background: var(--red); color: #fff; display: grid; place-items: center; position: relative; clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); }
.logo-mark svg.lucide { width: 22px; height: 22px; margin-top: -4px; }
.logo-text { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.03em; line-height: 1; }
.logo-text b { color: var(--red); font-weight: 700; }
.logo-text small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; color: var(--muted); font-weight: 500; margin-top: 5px; text-transform: uppercase; }

/* nav + mega meni */
.nav { display: flex; gap: 2px; flex: 1; height: 100%; }
.nav > .nav-item { position: static; display: flex; align-items: stretch; }
.nav > .nav-item > a { display: flex; align-items: center; gap: 5px; padding: 0 14px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; position: relative; }
.nav > .nav-item > a svg.lucide { width: 15px; height: 15px; transition: transform .2s; }
.nav > .nav-item > a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; background: var(--red); transform: scaleX(0); transition: transform .2s; transform-origin: left; }
.nav > .nav-item:hover > a, .nav > .nav-item > a.active { color: var(--bordo); }
.nav > .nav-item:hover > a::after, .nav > .nav-item > a.active::after { transform: scaleX(1); }
.nav > .nav-item:hover > a svg.lucide { transform: rotate(180deg); }
.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 30px 50px -20px rgba(10, 20, 45, .25); opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: .2s ease; z-index: 999;
}
.nav-item:hover .mega, .nav-item:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega-inner { display: grid; grid-template-columns: 1fr 1fr 1fr 1.3fr; gap: 40px; padding: 36px 0 40px; }
.mega h6 { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.mega-link { display: flex; gap: 12px; padding: 9px 10px; margin: 0 -10px; border-radius: 4px; color: var(--ink); align-items: flex-start; }
.mega-link:hover { background: var(--brand-50); color: var(--bordo); }
.mega-link svg.lucide { color: var(--red); margin-top: 2px; }
.mega-link b { display: block; font-size: 14px; }
.mega-link span { font-size: 12.5px; color: var(--muted); }
.mega-list a { display: flex; justify-content: space-between; padding: 6px 0; color: var(--ink-2); font-size: 14px; border-bottom: 1px dashed var(--line); }
.mega-list a span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.mega-list a:hover { color: var(--red); }
.mega-feature { background: var(--bordo); color: #fff; padding: 24px; border-radius: var(--radius); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: 220px; }
.mega-feature::before { content: ""; position: absolute; inset: 0; background: url("https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Total_station_construction_set-out_at_sunset.jpg/500px-Total_station_construction_set-out_at_sunset.jpg") center/cover; opacity: .35; mix-blend-mode: luminosity; }
.mega-feature > * { position: relative; }
.mega-feature h4 { font-family: var(--display); font-size: 19px; margin-bottom: 6px; }
.mega-feature p { color: #d5dcea; font-size: 13.5px; }

.header-actions { display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-50); color: var(--bordo); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex-shrink: 0; overflow: hidden; border: 1px solid var(--brand-100); }
.avatar.lg { width: 58px; height: 58px; font-size: 18px; }
.avatar.accent { background: var(--bordo); color: #fff; border-color: var(--bordo); }
.avatar.info { background: var(--info-50); color: var(--info); border-color: #d4e1f2; }

/* ---------- Offcanvas ---------- */
.oc-bg { position: fixed; inset: 0; background: rgba(8, 14, 30, .55); z-index: 2500; opacity: 0; visibility: hidden; transition: .25s; backdrop-filter: blur(3px); }
.offcanvas { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw); background: #fff; z-index: 2600; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
.oc-open .oc-bg { opacity: 1; visibility: visible; }
.oc-open .offcanvas { transform: none; }
.oc-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.oc-body { flex: 1; overflow-y: auto; padding: 10px 20px 20px; }
.oc-foot { padding: 16px 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; background: var(--bg); }
.oc-link, .oc-acc summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; font-size: 15.5px; }
.oc-acc summary::-webkit-details-marker { display: none; }
.oc-link svg.lucide, .oc-acc summary svg.lucide { color: var(--red); }
.oc-acc summary .chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
.oc-acc[open] summary .chev { transform: rotate(180deg); }
.oc-sub { padding: 6px 0 10px 30px; border-bottom: 1px solid var(--line); }
.oc-sub a { display: block; padding: 7px 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------- Hero (fotografija + centrirana pretraga) ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--bordo); isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; background: url("https://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Total_station_overlooking_a_residential_development.jpg/1920px-Total_station_overlooking_a_residential_development.jpg") center 62%/cover no-repeat; transform: scale(1.04); animation: heroZoom 24s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1.12); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 14, 30, .72) 0%, rgba(20, 33, 61, .62) 45%, rgba(8, 14, 30, .92) 100%),
    radial-gradient(70% 60% at 50% 40%, rgba(200, 16, 46, .25), transparent 70%); }
.hero::after { /* geodetska mreža */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .16; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 96px 96px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.hero .container { position: relative; padding: 110px 0 150px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero .eyebrow { color: #ffb3bf; justify-content: center; }
.hero .eyebrow::after { content: ""; width: 26px; height: 2px; background: currentColor; }
.hero h1 { max-width: 980px; margin-inline: auto; text-wrap: balance; }
.hero h1 em { font-style: normal; color: #fff; background: linear-gradient(transparent 62%, var(--red) 62%, var(--red) 92%, transparent 92%); padding: 0 .08em; }
.hero p.lead { font-size: 19px; color: #e2e8f2; max-width: 680px; margin: 10px auto 40px; text-wrap: balance; }

.search-wrap { width: min(1000px, 100%); position: relative; }
.search-tabs { display: inline-flex; background: rgba(8, 14, 30, .55); backdrop-filter: blur(8px); padding: 4px; border-radius: 4px 4px 0 0; gap: 2px; }
.search-tabs button { border: 0; background: transparent; color: #d5dcea; font: inherit; font-weight: 700; font-size: 13.5px; padding: 10px 18px; cursor: pointer; border-radius: 3px; display: inline-flex; gap: 7px; align-items: center; }
.search-tabs button.active { background: #fff; color: var(--bordo); }
.search-box {
  background: #fff; border-radius: 0 6px 6px 6px; padding: 8px; display: grid; position: relative;
  grid-template-columns: 1.5fr 1fr 1fr auto; gap: 0; box-shadow: 0 40px 80px -20px rgba(0,0,0,.55); text-align: left;
}
.search-box::before, .search-box::after { /* oznake niveliranja u uglovima */
  content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid #fff; pointer-events: none;
}
.search-box::before { top: -12px; right: -12px; border-left: 0; border-bottom: 0; }
.search-box::after { bottom: -12px; left: -12px; border-right: 0; border-top: 0; }
.field { display: flex; flex-direction: column; justify-content: center; padding: 0 18px; height: 64px; color: var(--muted); position: relative; }
.field .f-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.field .f-label svg.lucide { width: 13px; height: 13px; }
.field + .field { border-left: 1px solid var(--line); }
.field input, .field select { border: 0; outline: 0; font: inherit; font-size: 15.5px; color: var(--ink); width: 100%; background: transparent; min-width: 0; padding: 2px 0 0; font-weight: 500; }
.field select { appearance: none; cursor: pointer; }
.search-box .btn { height: 64px; padding: 0 34px; font-size: 15px; }
.hero-tags { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; color: #c3cde0; font-size: 13px; }
.hero-tags a { color: #fff; border: 1px solid rgba(255,255,255,.3); padding: 5px 12px; border-radius: 3px; font-weight: 600; }
.hero-tags a:hover { background: #fff; color: var(--bordo); }
.hero-coords { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: rgba(255,255,255,.55); padding: 0 32px; pointer-events: none; }

/* traka sa statistikom preko donje ivice hero-a */
.stats-strip { position: relative; z-index: 5; margin-top: -58px; }
.stats-strip .inner { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-strip .s { padding: 26px 28px; border-left: 1px solid var(--line); display: flex; gap: 16px; align-items: center; }
.stats-strip .s:first-child { border-left: 0; }
.stats-strip .s-ic { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--red); color: var(--red); display: grid; place-items: center; flex-shrink: 0; }
.stats-strip b { display: block; font-family: var(--display); font-size: 26px; letter-spacing: -.03em; line-height: 1.1; color: var(--bordo); }
.stats-strip span { font-size: 13px; color: var(--muted); }

/* ---------- Map ---------- */
.map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #e4e9f1; }
.map { height: 560px; width: 100%; z-index: 1; }
.map.sm { height: 280px; }
.map .leaflet-tile-pane { filter: saturate(.75); }
.map-overlay { position: absolute; top: 16px; left: 16px; z-index: 500; display: flex; gap: 6px; flex-wrap: wrap; }
.map-overlay .chip { box-shadow: var(--shadow); }
.map-side { position: absolute; top: 16px; right: 16px; bottom: 16px; width: 320px; z-index: 500; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.map-side-head { padding: 16px 18px; background: var(--bordo); color: #fff; }
.map-side-head b { font-family: var(--display); font-size: 15px; }
.map-side-list { overflow-y: auto; flex: 1; }
.map-side-list a { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--ink); align-items: center; }
.map-side-list a:hover { background: var(--brand-50); }
.map-legend { position: absolute; bottom: 16px; left: 16px; z-index: 500; background: #fff; border-radius: 4px; padding: 8px 12px; font-size: 12px; display: flex; gap: 14px; box-shadow: var(--shadow); }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--bordo); border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.3); display: grid; place-items: center; }
.pin.featured { background: var(--red); width: 36px; height: 36px; }
.pin::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.leaflet-popup-content-wrapper { border-radius: 6px; }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--font); }
.popup-title { font-weight: 800; font-size: 14px; margin-bottom: 2px; }

/* ---------- Geometar card ---------- */
.geo-card { display: flex; gap: 18px; padding: 20px; transition: .2s; position: relative; }
.geo-card:hover { border-color: var(--bordo); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.geo-logo { width: 74px; height: 74px; border-radius: 4px; border: 1px solid var(--line); display: grid; place-items: center; background: #fff; flex-shrink: 0; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--bordo); letter-spacing: -.03em; }
.geo-card h4 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.geo-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.geo-meta span { display: inline-flex; align-items: center; gap: 5px; }
.geo-meta svg.lucide { width: 14px; height: 14px; }
.featured-ribbon { border-top: 3px solid var(--red); }
.featured-ribbon::before { content: "ISTAKNUTO"; position: absolute; top: 14px; right: 16px; color: var(--red); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .14em; }

/* ---------- Lists ---------- */
.list-item { display: flex; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line); align-items: flex-start; transition: background .15s; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: #f9fafc; }
.list-item h4 { margin: 0 0 4px; font-size: 15px; }
.list-item h4 a { color: var(--ink); }
.list-item h4 a:hover { color: var(--red); }
.thumb { width: 64px; height: 64px; border-radius: 4px; background: var(--brand-50); display: grid; place-items: center; color: var(--bordo); flex-shrink: 0; }
.thumb svg.lucide { width: 26px; height: 26px; }
.price { font-weight: 800; color: var(--bordo); white-space: nowrap; }
.meta-line { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.meta-line span { display: inline-flex; align-items: center; gap: 5px; }
.meta-line svg.lucide { width: 14px; height: 14px; }

/* tri kolone na početnoj */
.feed { border-top: 3px solid var(--bordo); }
.feed .card-head { border-bottom: 0; padding-bottom: 6px; }

/* ---------- CTA ---------- */
.cta { border-radius: var(--radius); display: grid; grid-template-columns: 1.3fr 1fr; color: #fff; background: var(--bordo); position: relative; overflow: hidden; min-height: 400px; }
.cta-body { padding: 56px; position: relative; z-index: 1; }
.cta h2 { color: #fff; }
.cta p { color: #d5dcea; font-size: 16.5px; }
.cta .eyebrow { color: #ffb3bf; }
.cta-photo { position: relative; background: 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 30%/cover; }
.cta-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bordo), rgba(20, 33, 61,.15) 45%, rgba(200,16,46,.25)); }
.cta-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.cta-list li { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14.5px; }
.cta-list svg.lucide { color: #ff8095; }
.cta-card { position: absolute; right: 28px; bottom: 28px; background: #fff; color: var(--ink); border-radius: var(--radius); padding: 16px 18px; width: 260px; box-shadow: var(--shadow-lg); }

/* ---------- Tiles ---------- */
.tile { padding: 26px; transition: .2s; color: var(--ink); position: relative; }
.tile:hover { border-color: var(--bordo); color: var(--ink); transform: translateY(-2px); }
.tile-ic { width: 50px; height: 50px; border-radius: 4px; background: var(--brand-50); color: var(--red); display: grid; place-items: center; margin-bottom: 18px; }
.tile-ic svg.lucide { width: 24px; height: 24px; }
.tile p { color: var(--muted); font-size: 14px; margin: 0; }
.tile .num { position: absolute; top: 22px; right: 24px; font-family: var(--mono); font-size: 12px; color: var(--line-2); font-weight: 600; }

/* ---------- Page header ---------- */
.page-head { background: var(--bordo); color: #fff; padding: 40px 0 36px; position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(90deg, transparent, #000); pointer-events: none; }
.page-head .container { position: relative; z-index: 1; }
.page-head h2 { color: #fff; }
.page-head .muted, .page-head p { color: #c3cde0 !important; }
.page-head .crumbs, .page-head .crumbs a { color: #c3cde0; }
.page-head .btn-primary { background: #fff; color: var(--bordo); }
.page-head .chip { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.page-head .chip.active, .page-head .chip:hover { background: #fff; color: var(--bordo); }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 10px; font-family: var(--mono); letter-spacing: .04em; }
.crumbs svg.lucide { width: 14px; height: 14px; }

/* ---------- Layout with sidebar ---------- */
.with-side { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; padding: 32px 0 64px; }
.with-side.right { grid-template-columns: 1fr 350px; }
.filter-group { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: 0; }
.filter-group h5 { margin: 0 0 12px; font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--red); }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; padding: 4px 0; cursor: pointer; color: var(--ink-2); }
.check input { accent-color: var(--red); width: 16px; height: 16px; }
.input, select.input, textarea.input { width: 100%; height: 44px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 0 12px; font: inherit; font-size: 14px; color: var(--ink); background: #fff; outline: 0; transition: .15s; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 100px; }
.input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--brand-50); }
label.lbl { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--ink-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.input-ic { position: relative; }
.input-ic svg.lucide { position: absolute; left: 12px; top: 13px; color: var(--muted); }
.input-ic .input { padding-left: 40px; }

/* ---------- Profil ---------- */
.profile-cover { height: 220px; position: relative; overflow: hidden; background: var(--bordo); }
.profile-cover::before { content: ""; position: absolute; inset: 0; background: url("https://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Total_station_overlooking_a_residential_development.jpg/1920px-Total_station_overlooking_a_residential_development.jpg") center 60%/cover; opacity: .45; mix-blend-mode: luminosity; }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 33, 61,.2), rgba(20, 33, 61,.85)); }
.profile-top { display: flex; gap: 28px; align-items: flex-start; margin-top: -80px; position: relative; z-index: 2; }
.profile-top .profile-title, .profile-top .profile-actions { padding-top: 92px; }
.profile-logo { width: 164px; height: 164px; border-radius: 6px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; place-items: center; flex-shrink: 0; padding: 16px; }
.geonet-logo { font-weight: 900; font-size: 34px; letter-spacing: -.04em; line-height: 1; text-align: center; font-family: var(--font); }
.geonet-logo .g1 { color: #0d8a7a; }
.geonet-logo .g2 { color: #6b7a86; font-weight: 600; }
.geonet-logo small { display: block; font-size: 10px; letter-spacing: .35em; color: #6b7a86; font-weight: 600; margin-top: 6px; }
.profile-title { flex: 1; }
.profile-title h1 { font-size: clamp(22px, 2.6vw, 32px); margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
.profile-actions { display: flex; gap: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 28px 0; overflow-x: auto; }
.tabs a { padding: 13px 16px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tabs a.active, .tabs a:hover { color: var(--bordo); border-color: var(--red); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 32px; }
.info-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line-2); font-size: 14px; }
.info-row span:first-child { color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.info-row span:first-child svg.lucide { width: 15px; height: 15px; color: var(--red); }
.info-row span:last-child { font-weight: 700; text-align: right; }
.lic-list { list-style: none; counter-reset: lic; padding: 0; margin: 0; }
.lic-list li { counter-increment: lic; display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lic-list li::before { content: counter(lic, decimal-leading-zero); font-family: var(--mono); color: var(--red); font-weight: 600; font-size: 13px; flex-shrink: 0; padding-top: 1px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.branch { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.branch .tile-ic { margin: 0; width: 40px; height: 40px; }
.hours { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-weight: 700; font-family: var(--mono); font-size: 13px; }
.hours tr.today td { color: var(--red); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery div { aspect-ratio: 4/3; border-radius: 4px; background: var(--brand-50); display: grid; place-items: center; color: var(--bordo); }

/* ---------- Forum ---------- */
.forum-cat { display: grid; grid-template-columns: 1fr 90px 90px 240px; gap: 16px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.forum-cat:last-child { border-bottom: 0; }
.forum-cat .num { text-align: center; font-weight: 800; font-family: var(--mono); }
.forum-cat .num small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; font-family: var(--font); }
.forum-cat-title { display: flex; gap: 14px; align-items: center; }
.sticky-row { background: #fff8f9; box-shadow: inset 3px 0 0 var(--red); }
.post { display: grid; grid-template-columns: 210px 1fr; border-bottom: 1px solid var(--line); }
.post:last-child { border-bottom: 0; }
.post-author { padding: 22px; background: #f8f9fc; border-right: 1px solid var(--line); text-align: center; font-size: 13px; }
.post-author .avatar { margin: 0 auto 8px; }
.post-author b { display: block; font-size: 14px; }
.post-body { padding: 22px 26px; }
.post-body .meta-line { margin-bottom: 10px; }
.quote { border-left: 3px solid var(--red); background: var(--brand-50); padding: 10px 14px; border-radius: 0 4px 4px 0; font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }

/* ---------- Kalkulatori ---------- */
.calc-result { background: var(--bordo); color: #fff; border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.calc-result div b { display: block; font-size: 20px; font-family: var(--mono); }
.calc-result div span { font-size: 11px; color: #c3cde0; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-family: var(--mono); }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 268px 1fr; min-height: calc(100vh - 116px); }
.dash-side { background: #fff; border-right: 1px solid var(--line); padding: 20px 14px; }
.dash-side.dark { background: #0b1426; border-color: #0b1426; color: #d5dcea; }
.dash-user { display: flex; gap: 10px; align-items: center; padding: 8px 10px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.dash-side.dark .dash-user { border-color: rgba(255,255,255,.08); }
.dash-nav { display: grid; gap: 2px; }
.dash-nav .sep { font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 16px 12px 6px; }
.dash-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 4px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.dash-side.dark .dash-nav a { color: #d5dcea; }
.dash-nav a:hover { background: var(--brand-50); color: var(--bordo); }
.dash-side.dark .dash-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.dash-nav a.active { background: var(--red); color: #fff; }
.dash-nav a .count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 3px; }
.dash-nav a.active .count { background: #fff; color: var(--red); }
.dash-main { padding: 32px; min-width: 0; }
.dash-main > h2 { margin-bottom: 4px; }
.stat { padding: 20px 22px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-ic { width: 38px; height: 38px; border-radius: 4px; display: grid; place-items: center; background: var(--brand-50); color: var(--red); }
.stat b { display: block; font-size: 28px; font-family: var(--display); letter-spacing: -.03em; margin-top: 8px; color: var(--bordo); }
.trend { font-size: 12px; font-weight: 700; color: var(--ok); }
.trend.down { color: var(--danger); }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8f9fc; white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding: 10px 0 0; }
.bars div { flex: 1; background: var(--brand-100); border-radius: 2px 2px 0 0; }
.bars div.hl { background: var(--red); }
.bars-labels { display: flex; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 6px; font-family: var(--mono); }
.bars-labels span { flex: 1; text-align: center; }
.perm-table td:not(:first-child), .perm-table th:not(:first-child) { text-align: center; }
.perm-table input { accent-color: var(--red); width: 17px; height: 17px; }
.folder { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: #fff; }
.folder:hover { border-color: var(--red); }
.folder svg.lucide { width: 30px; height: 30px; color: var(--bordo); fill: var(--brand-100); }
.media-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.media-grid div { aspect-ratio: 1; border-radius: 4px; background: var(--brand-50); display: grid; place-items: center; color: var(--bordo); position: relative; }
.media-grid div small { position: absolute; bottom: 6px; left: 6px; right: 6px; font-size: 10px; background: rgba(255,255,255,.9); border-radius: 3px; padding: 1px 4px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); }
.drop { border: 2px dashed var(--brand-100); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted); background: #fbfcfe; }
.drop svg.lucide { width: 30px; height: 30px; color: var(--red); margin: 0 auto 6px; }

/* Poruke */
.inbox { display: grid; grid-template-columns: 320px 1fr; height: 580px; }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; }
.conv { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.conv.active { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--red); }
.conv .preview { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.chat { display: flex; flex-direction: column; min-width: 0; }
.chat-msgs { flex: 1; padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: #f8f9fc; }
.msg { max-width: 72%; padding: 10px 14px; border-radius: 10px 10px 10px 2px; font-size: 14px; background: #fff; border: 1px solid var(--line); }
.msg.me { align-self: flex-end; background: var(--bordo); color: #fff; border-color: var(--bordo); border-radius: 10px 10px 2px 10px; }
.msg small { display: block; font-size: 11px; opacity: .7; margin-top: 4px; font-family: var(--mono); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.secure-note { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; padding: 8px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.secure-note svg.lucide { width: 14px; height: 14px; color: var(--ok); }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 14, 30, .6); backdrop-filter: blur(4px); z-index: 3000; display: none; place-items: center; padding: 16px; }
.modal-bg.open { display: grid; }
.modal { width: min(880px, 100%); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); position: relative; max-height: 94vh; overflow: hidden; display: grid; grid-template-columns: 1fr 1.1fr; }
.modal-side { background: var(--bordo); color: #fff; padding: 40px 36px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.modal-side::before { content: ""; position: absolute; inset: 0; background: url("https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Total_station_construction_set-out_at_sunset.jpg/500px-Total_station_construction_set-out_at_sunset.jpg") center/cover; opacity: .3; mix-blend-mode: luminosity; }
.modal-side > * { position: relative; }
.modal-side h3 { font-family: var(--display); font-size: 24px; line-height: 1.2; }
.modal-side .logo-text, .modal-side .logo { color: #fff; }
.modal-side .logo-text b { color: #ff8095; }
.modal-main { padding: 36px; overflow-y: auto; max-height: 94vh; }
.modal .close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.google-btn { width: 100%; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0; font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.seg button { border: 0; background: transparent; padding: 12px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.seg button.active { color: var(--bordo); border-color: var(--red); }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.role-pick label { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; font-size: 13px; }
.role-pick label b { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.role-pick input { display: none; }
.role-pick label:has(input:checked) { border-color: var(--red); background: var(--brand-50); color: var(--bordo); }

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); font-size: 14px; }
.alert-danger { background: var(--danger-50); color: #6d0718; }
.alert-info { background: var(--info-50); color: #173a69; }
.alert-ok { background: var(--ok-50); color: #14532d; }
.alert-accent { background: var(--brand-50); color: var(--bordo); }

/* ---------- Footer ---------- */
.footer { background: #0b1426; color: #9fabc2; padding: 72px 0 28px; font-size: 14px; position: relative; }
.footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--red), var(--bordo)); }
.footer h5 { color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 16px; }
.footer a { color: #9fabc2; display: block; padding: 4px 0; }
.footer a:hover { color: #fff; }
.footer .logo, .footer .logo-text { color: #fff; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 48px; padding-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
.footer-bottom a { display: inline; }

/* ---------- Režim prezentacije (ne ide u produkciju) ---------- */
.demo-bar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 1500; background: #0b1426; color: #fff; border-radius: 6px; padding: 6px; display: none; gap: 2px; box-shadow: var(--shadow-lg); max-width: calc(100% - 24px); overflow-x: auto; }
body.demo .demo-bar { display: flex; }
.demo-bar a { color: #d5dcea; font-size: 12px; font-weight: 700; padding: 7px 11px; border-radius: 4px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.demo-bar a svg.lucide { width: 14px; height: 14px; }
.demo-bar a.active, .demo-bar a:hover { background: var(--red); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .with-side, .with-side.right { grid-template-columns: 1fr; }
  .forum-cat { grid-template-columns: 1fr 70px 70px; }
  .forum-cat > :last-child { display: none; }
  .media-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-strip .inner { grid-template-columns: repeat(2, 1fr); }
  .stats-strip .s:nth-child(3) { border-left: 0; }
  .stats-strip .s:nth-child(n+3) { border-top: 1px solid var(--line); }
  .map-side { display: none; }
}
@media (max-width: 860px) {
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero .container { padding: 72px 0 120px; }
  .search-tabs button span { display: none; }
  .search-box { grid-template-columns: 1fr; border-radius: 0 6px 6px 6px; }
  .field + .field { border-left: 0; border-top: 1px solid var(--line); }
  .search-box .btn { height: 54px; margin-top: 6px; }
  .hero-coords { display: none; }
  .cta { grid-template-columns: 1fr; }
  .cta-body { padding: 32px 24px; }
  .cta-photo { min-height: 240px; }
  .cta-list { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
  .dash-side { display: none; }
  .dash-main { padding: 20px 0; width: min(1280px, 100% - 32px); margin-inline: auto; }
  .profile-top { flex-direction: column; align-items: flex-start; }
  .profile-top .profile-title, .profile-top .profile-actions { padding-top: 0; }
  .info-grid, .form-grid { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; }
  .post-author { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; text-align: left; align-items: center; }
  .post-author .avatar { margin: 0; }
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox-list { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); }
  .topbar .hide-sm, .header-actions .hide-sm { display: none; }
  .map { height: 400px; }
  .media-grid { grid-template-columns: repeat(3, 1fr); }
  .modal { grid-template-columns: 1fr; }
  .modal-side { display: none; }
  .modal-main { padding: 28px 22px; }
}
@media (max-width: 540px) {
  .g-4 { grid-template-columns: 1fr; }
  .stats-strip .inner { grid-template-columns: 1fr 1fr; }
  .stats-strip .s { padding: 18px 16px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .stats-strip .s-ic { width: 36px; height: 36px; }
  .stats-strip b { font-size: 21px; }
  .geo-card { flex-direction: column; }
  .forum-cat { grid-template-columns: 1fr; }
  .forum-cat .num { display: none; }
  .header > .container { height: 64px; }
  .logo-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hero-bg { animation: none; } * { transition: none !important; } }
