/* =========================================================
   Paneli na telefonu: meni + kartice (oglasi, poslovi, sačuvani, teme)
   ========================================================= */

/* ---------- Meni panela: hamburger + traka koja se skroluje ---------- */
.dash-mbar { display: none; }
@media (max-width: 860px) {
  .dash-mbar { display: flex; gap: 8px; align-items: center; margin: 0 0 20px; position: sticky; top: 64px; z-index: 50; background: var(--bg); padding: 10px 0; }
  .dash-mmenu { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; border: 0; background: var(--bordo); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 14px rgba(20,33,61,.25); }
  .dash-mmenu svg.lucide { width: 22px; height: 22px; }
  .dash-mscroll { position: relative; flex: 1; min-width: 0; }
  .dash-mscroll::before, .dash-mscroll::after { content: ""; position: absolute; top: 0; bottom: 0; width: 34px; pointer-events: none; z-index: 1; transition: opacity .2s; }
  .dash-mscroll::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
  .dash-mscroll::after { right: 0; width: 56px; background: linear-gradient(270deg, var(--bg) 40%, transparent); }
  .dash-mscroll.at-start::before, .dash-mscroll.at-end::after { opacity: 0; }
  .dash-mhint { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); z-index: 2; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; color: var(--bordo); pointer-events: none; animation: nudge 1.6s ease-in-out infinite; transition: opacity .2s; }
  .dash-mhint svg.lucide { width: 16px; height: 16px; }
  .dash-mscroll.at-end .dash-mhint { opacity: 0; }
  @keyframes nudge { 50% { transform: translate(4px, -50%); } }
  .dash-mbar .dash-mnav { display: flex; gap: 6px; overflow-x: auto; margin: 0; padding: 2px 40px 2px 0; scrollbar-width: none; scroll-snap-type: x proximity; }
  .dash-mbar .dash-mnav::-webkit-scrollbar { display: none; }
  .dash-mbar .dash-mnav a { scroll-snap-align: start; flex-shrink: 0; height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border-radius: 30px; border: 1px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 700; color: var(--ink-2); }
  .dash-mbar .dash-mnav a svg.lucide { width: 17px; height: 17px; }
  .dash-mbar .dash-mnav a b { min-width: 20px; height: 20px; border-radius: 20px; background: var(--red); color: #fff; font-size: 11.5px; display: grid; place-items: center; padding: 0 5px; }
  .dash-mbar .dash-mnav a.active { background: var(--bordo); border-color: var(--bordo); color: #fff; }
  .dash-main > .dash-mnav { display: none !important; }
}

/* donji panel sa svim delovima panela */
.dash-sheet { position: fixed; inset: 0; z-index: 2800; visibility: hidden; }
.dash-sheet.open { visibility: visible; }
.ds-bg { position: absolute; inset: 0; background: rgba(8,14,30,.5); opacity: 0; transition: opacity .25s; }
.dash-sheet.open .ds-bg { opacity: 1; }
.ds-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; max-height: 86dvh; background: #fff; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
.dash-sheet.open .ds-panel { transform: none; }
.ds-grab { width: 44px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 10px auto 0; }
.ds-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px 12px; }
.ds-head b { font-family: var(--display); font-size: 20px; }
.ds-x { width: 42px; height: 42px; border-radius: 50%; border: 0; background: #eef1f6; display: grid; place-items: center; cursor: pointer; }
.ds-body { overflow-y: auto; padding: 0 16px 20px; }
.ds-body h6 { margin: 18px 4px 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-grid:empty { display: none; }
.ds-grid a { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fbfcfe; color: var(--ink); font-weight: 700; font-size: 14.5px; line-height: 1.3; min-height: 86px; }
.ds-grid a svg.lucide { width: 22px; height: 22px; color: var(--bordo); }
.ds-grid a b { position: absolute; top: 12px; right: 12px; min-width: 22px; height: 22px; border-radius: 22px; background: var(--red); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 6px; }
.ds-grid a.active { background: var(--bordo); border-color: var(--bordo); color: #fff; }
.ds-grid a.active svg.lucide { color: #fff; }
.ds-grid a.danger { color: var(--red-2); }
.ds-grid a.danger svg.lucide { color: var(--red); }

/* ---------- Filter tabovi (pilule) ---------- */
.chip-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; scrollbar-width: none; }
.chip-tabs::-webkit-scrollbar { display: none; }
.chip-tabs button { flex-shrink: 0; height: 42px; padding: 0 16px; border-radius: 30px; border: 1px solid var(--line-2); background: #fff; font: inherit; font-weight: 700; font-size: 14.5px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chip-tabs button b { font-size: 12px; min-width: 22px; height: 22px; border-radius: 22px; background: #eef1f6; color: var(--ink-2); display: grid; place-items: center; padding: 0 6px; }
.chip-tabs button.active { background: var(--bordo); color: #fff; border-color: var(--bordo); }
.chip-tabs button.active b { background: rgba(255,255,255,.18); color: #fff; }
article[hidden] { display: none !important; }
.removing { opacity: 0; transform: scale(.97); transition: .3s; }

/* status oznaka (zajednička) */
.myad-st { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 30px; font-size: 13px; font-weight: 700; white-space: nowrap; background: #fff; }
.myad-st i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-ok { color: var(--ok); background: var(--ok-50); }
.st-wait { color: #9a5b00; background: #fff4e0; }
.st-off { color: var(--muted); background: #eef1f6; }
.st-info { color: var(--info); background: var(--info-50); }

/* ---------- Moji oglasi ---------- */
.ad-summary { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; }
.ad-summary div { padding: 14px 16px; border-left: 1px solid var(--line); }
.ad-summary div:first-child { border-left: 0; }
.ad-summary b { display: block; font-family: var(--display); font-size: 22px; color: var(--bordo); }
.ad-summary span { font-size: 13.5px; color: var(--muted); }
.myad-list, .myjob-list, .mytopic-list, .saved-list { display: grid; gap: 14px; }
.myad { display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-areas: "img body" "img acts"; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: .3s; }
.myad-img { grid-area: img; position: relative; background: #e6eaf2 center/cover; min-height: 170px; }
.myad-img .myad-st { position: absolute; top: 10px; left: 10px; box-shadow: var(--shadow); }
.myad-ph { position: absolute; bottom: 10px; left: 10px; display: inline-flex; gap: 5px; align-items: center; height: 26px; padding: 0 9px; border-radius: 30px; background: rgba(8,14,30,.7); color: #fff; font-size: 12.5px; font-weight: 700; }
.myad-ph svg.lucide { width: 14px; height: 14px; }
.myad-body { grid-area: body; padding: 16px 18px 12px; min-width: 0; }
.myad-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.myad-cat { font-size: 13px; color: var(--muted); font-weight: 600; }
.myad h4 { margin: 2px 0 0; font-size: 17px; line-height: 1.35; }
.myad h4 a { color: var(--ink); }
.myad-price { font-family: var(--display); font-size: 18px; color: var(--bordo); white-space: nowrap; }
.myad-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 12px; font-size: 14px; color: var(--muted); }
.myad-stats span { display: inline-flex; align-items: center; gap: 6px; }
.myad-stats b { color: var(--ink); }
.myad-stats svg.lucide { width: 16px; height: 16px; }
.myad-exp { background: #f5f7fb; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.me-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.me-row span { display: inline-flex; align-items: center; gap: 7px; }
.me-row svg.lucide { width: 16px; height: 16px; color: var(--bordo); }
.me-date { color: var(--muted); font-weight: 500; }
.me-bar { height: 6px; border-radius: 6px; background: #e1e6ef; margin-top: 8px; overflow: hidden; }
.me-bar i { display: block; height: 100%; border-radius: 6px; background: var(--ok); }
.myad-exp.is-soon { background: #fff4e0; color: #7a4a00; }
.myad-exp.is-soon .me-bar i { background: #f59e0b; }
.myad-exp.is-soon svg.lucide { color: #b45309; }
.myad-exp.is-expired { background: var(--danger-50); color: var(--red-2); }
.myad-exp.is-expired svg.lucide { color: var(--red); }
.myad-exp.is-pending { background: var(--info-50); color: var(--info); }
.myad-exp.is-pending svg.lucide { color: var(--info); }
.myad-acts { grid-area: acts; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.ma-btn { display: flex; align-items: center; justify-content: center; gap: 7px; height: 50px; border: 0; border-left: 1px solid var(--line); background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.ma-btn:first-child { border-left: 0; }
.ma-btn svg.lucide { width: 17px; height: 17px; }
.ma-btn:hover { background: var(--brand-50); color: var(--bordo); }
.ma-btn:disabled { color: var(--line-2); cursor: not-allowed; background: #fff; }
.ma-primary { color: var(--ok); }
.ma-danger { color: var(--red-2); }
.ma-danger:hover { background: var(--danger-50); color: var(--red-2); }
.myad-confirm { grid-area: acts; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--danger-50); border-top: 1px solid #f6c9cd; font-size: 14px; color: #7f1d1d; }
.myad-confirm span { display: inline-flex; gap: 8px; align-items: center; }
.myad-confirm svg.lucide { width: 18px; height: 18px; color: var(--red); }
.myad-confirm .btn-danger { background: var(--red); color: #fff; }

/* ---------- Moji poslovi ---------- */
.myjob { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.mj-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.mj-ic { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-50); color: var(--bordo); display: grid; place-items: center; }
.mj-ic svg.lucide { width: 22px; height: 22px; }
.myjob h4 { margin: 0 0 6px; font-size: 17px; line-height: 1.35; }
.myjob h4 a { color: var(--ink); }
.mj-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--muted); }
.mj-meta span { display: inline-flex; gap: 6px; align-items: center; }
.mj-meta svg.lucide { width: 15px; height: 15px; }
.mj-steps { list-style: none; padding: 0; margin: 18px 0 16px; display: grid; grid-template-columns: repeat(4, 1fr); }
.mj-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.mj-steps li::before { content: ""; position: absolute; top: 9px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.mj-steps li:first-child::before { display: none; }
.mj-steps li.done::before, .mj-steps li.cur::before { background: var(--ok); }
.mj-steps li span { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--line-2); position: relative; z-index: 1; }
.mj-steps li.done span { background: var(--ok); border-color: var(--ok); }
.mj-steps li.cur span { border-color: var(--ok); box-shadow: 0 0 0 4px var(--ok-50); }
.mj-steps em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.25; }
.mj-steps li.cur em, .mj-steps li.done em { color: var(--ink); }
.mj-offers { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: #f5f7fb; }
.mj-av { display: flex; flex-shrink: 0; }
.mj-av span { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; background: #fff; color: var(--bordo); font-family: var(--display); font-size: 11px; font-weight: 700; display: grid; place-items: center; margin-left: -8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.mj-av span:first-child { margin-left: 0; }
.mj-av span.more { background: var(--bordo); color: #fff; }
.mj-otext b { display: block; font-size: 15px; }
.mj-otext b em { font-style: normal; font-size: 12px; background: var(--red); color: #fff; padding: 2px 8px; border-radius: 20px; margin-left: 6px; vertical-align: 1px; }
.mj-otext span { font-size: 13.5px; color: var(--muted); }
.mj-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Sačuvani ---------- */
.gcard-unsave { color: var(--red) !important; border-color: #f6c9cd !important; }
.gcard-unsave svg.lucide { fill: var(--red); }
.gcard-unsave:hover { background: var(--danger-50) !important; }
.gcard-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.gcard-saved svg.lucide { width: 14px; height: 14px; color: var(--bordo); }

/* ---------- Moje teme ---------- */
.mytopic { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.mytopic.has-new { border-left: 4px solid var(--red); padding-left: 15px; }
.mt-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-50); color: var(--bordo); display: grid; place-items: center; }
.mt-ic svg.lucide { width: 21px; height: 21px; }
.mt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.mt-cat { font-size: 12.5px; font-weight: 700; color: var(--bordo); background: var(--brand-50); padding: 3px 9px; border-radius: 20px; }
.mt-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.mt-flag svg.lucide { width: 13px; height: 13px; }
.mt-flag.is-pin { background: #fff4e0; color: #9a5b00; }
.mt-flag.ok { background: var(--ok-50); color: var(--ok); }
.mt-flag.wait { background: #eef1f6; color: var(--muted); }
.mytopic h4 { margin: 0 0 8px; font-size: 16.5px; line-height: 1.4; }
.mytopic h4 a { color: var(--ink); }
.mt-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--muted); }
.mt-meta span { display: inline-flex; gap: 6px; align-items: center; }
.mt-meta svg.lucide { width: 15px; height: 15px; }
.mt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mt-new { background: var(--red); color: #fff; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 20px; white-space: nowrap; }
.mt-new:hover { color: #fff; background: var(--red-2); }
.mt-follow { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.mt-follow.on { color: var(--bordo); background: var(--brand-50); border-color: var(--brand-100); }
.mt-follow svg.lucide { width: 18px; height: 18px; }

/* ---------- Telefon ---------- */
@media (max-width: 860px) {
  .ad-summary { grid-template-columns: repeat(2, 1fr); }
  .ad-summary div:nth-child(3) { border-left: 0; }
  .ad-summary div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .myad { grid-template-columns: minmax(0, 1fr); grid-template-areas: "img" "body" "acts"; }
  .myad-img { min-height: 0; aspect-ratio: 16 / 9; }
  .myad-body { padding: 14px 16px 12px; }
  .myad-top { flex-direction: column; gap: 6px; }
  .myad-price { font-size: 20px; }
  .ma-btn { flex-direction: column; gap: 4px; height: 62px; font-size: 12.5px; }
  .ma-btn svg.lucide { width: 20px; height: 20px; }
  .myad-confirm > div { display: flex; gap: 8px; width: 100%; }
  .myad-confirm .btn { flex: 1; height: 44px; }

  .myjob { padding: 16px; }
  .mj-head { grid-template-columns: 44px minmax(0, 1fr); }
  .mj-head > .myad-st { grid-column: 1 / -1; justify-self: start; margin-top: 2px; }
  .mj-ic { width: 44px; height: 44px; }
  .mj-steps em { font-size: 11.5px; }
  .mj-acts .btn { flex: 1 1 100%; height: 50px; }

  .mytopic { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .mytopic.has-new { padding-left: 11px; }
  .mt-ic { width: 40px; height: 40px; }
  .mt-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
  .mt-side:not(:has(.mt-new)) { justify-content: flex-end; }
  .mt-meta .mt-last { flex-basis: 100%; }
  .chip-tabs { margin-right: -16px; padding-right: 16px; }
}
.mj-av span { font-size: 10px; letter-spacing: -.02em; }
@media (max-width: 860px) {
  .saved-list .gcard { grid-template-areas: "logo top" "meta meta" "saved saved" "tags tags" "side side"; }
  .saved-list .gcard-saved { grid-area: saved; margin: 10px 0 0; }
}
