/* Monly — zajednički stilovi za javne stranice Tržište i Agenti (uz monly-oglas.css). */

.phead { padding: 32px 0 6px; max-width: 780px; }
.kicker { display: inline-block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.phead h1 { margin: 14px 0 0; font-size: clamp(26px, 3.6vw, 36px); font-weight: 700; line-height: 1.08; letter-spacing: -.028em; color: var(--ink); text-wrap: balance; }
.phead p { margin: 12px 0 0; font-size: 15px; color: var(--muted); max-width: 62ch; }

/* ---------- ključni brojevi ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 26px; }
.stat { padding: 18px 20px 18px 0; border-right: 1px solid var(--line); min-width: 0; }
.stat + .stat { padding-left: 20px; }
.stat:last-child { border-right: 0; }
.stat small { display: block; font-size: 11px; color: var(--muted); }
.stat strong { display: block; margin-top: 6px; font-size: 23px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.15; }
.note { margin-top: 16px; font-size: 11.5px; color: var(--muted); }

/* ---------- tabele ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 0 14px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th + th, .tbl td + td { padding-left: 20px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; }
.tbl td b { font-weight: 600; color: var(--ink); }
.tbl td small { display: block; font-size: 11.5px; color: var(--muted); }
.bar { display: block; width: 100%; height: 2px; background: var(--soft); }
.bar i { display: block; height: 2px; background: var(--ink); }

/* ---------- filteri ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 0; }
.filters input, .filters select {
  border: 1px solid var(--line); border-radius: var(--r); background: #fff;
  padding: 9px 12px; font: inherit; font-size: 13px; color: var(--text); min-width: 190px;
}
.filters input:focus, .filters select:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- agenti ---------- */
.agent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.acard { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.acard-top { display: flex; align-items: center; gap: 12px; }
.ava { width: 44px; height: 44px; border-radius: 999px; background: var(--soft); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink); overflow: hidden; flex: none; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.acard b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.acard small { font-size: 11.5px; color: var(--muted); }
.verified { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; color: var(--muted); margin-left: 6px; vertical-align: 2px; }
.acard-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; color: var(--muted); }
.acard-top b a { color: inherit; text-decoration: none; }
.acard-top b a:hover { text-decoration: underline; }
.acard-links { display: inline-flex; align-items: center; gap: 10px; }
.acard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.acard-foot span { font-size: 12px; color: var(--text); }
.acard-foot .btn { height: 32px; padding: 0 11px; font-size: 12px; }
.empty { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: var(--r); padding: 22px; font-size: 13px; color: var(--muted); }
.body-text { font-size: 12.5px; color: var(--text); margin-top: 10px; }

/* ---------- responzivno ---------- */
@media (max-width: 960px) {
  .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .stat:nth-child(3) { padding-left: 0; }
}

@media (max-width: 720px) {
  .phead { padding-top: 22px; }
  .phead h1 { font-size: 26px; }
  .agent-grid { grid-template-columns: 1fr; }
  .filters input, .filters select { min-width: 0; width: 100%; }
  .tbl { font-size: 12.5px; }
  .tbl th, .tbl td { padding-right: 10px; }
}

/* Telefon: tabela tržišta se skroluje, umjesto da se kolone stisnu. */
@media (max-width: 620px) {
  .table-wrap table.tbl { min-width: 520px; }
}

/* Imenik: kartice iste visine, radnje poravnate na dno. */
.agent-grid { align-items: stretch; }
.acard { display: flex; flex-direction: column; }
.acard-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.acard-foot > span { font-size: 11.5px; color: var(--muted); }
.acard-links { gap: 8px; }
.acard-links .btn { height: 34px; display: inline-flex; align-items: center; padding: 0 11px; font-size: 12px; }
.plan-chip { display: inline-block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--ink); border-radius: 999px; padding: 2px 7px; color: var(--ink); margin-left: 6px; vertical-align: 2px; }

/* ---------- imenik: kocke / vodoravna lista ---------- */
.dir-switch { display: inline-flex; gap: 4px; margin-left: auto; align-items: center; }
/* Iste ikone kao na Oglasima i Početnoj — bez teksta, ista veličina svuda. */
.dir-switch button {
  appearance: none; width: 34px; height: 30px; padding: 0; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 8px;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.dir-switch button svg { display: block; }
.dir-switch button:hover { color: var(--ink); border-color: #cfd1d4; }
.dir-switch button.is-on { background: var(--soft); border-color: #c3c5ca; color: var(--ink); font-weight: 600; }

.dir-body { margin-top: 14px; }
.dir-body.is-rows { display: block; }
.dir-body.is-rows > .dir-row:first-child { border-top: 1px solid var(--line); }

/* Logo-kocka: ista kao na profilu — agent soft/ink tekst, agencija i firma ink/bijeli tekst. */
.dir-logo {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 4px; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
}
.dir-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dir-logo.is-soft { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.dir-logo.is-ink { background: var(--ink); color: #fff; }
.dir-logo.is-ink.has-img { background: #fff; border: 1px solid var(--line); }
.dir-logo.is-ink.has-img img { object-fit: contain; padding: 7px; }
.dir-logo-sm { width: 26px; height: 26px; flex-basis: 26px; font-size: 10px; margin-left: 8px; vertical-align: middle; }

.dir-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.dir-row:last-child { border-bottom: 0; }
.dir-row-main { min-width: 0; flex: 1 1 auto; }
.dir-row-main b { display: flex; align-items: center; gap: 0; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: var(--ink); }
.dir-row-main b a { color: inherit; text-decoration: none; }
.dir-row-main b a:hover { text-decoration: underline; }
.dir-row-main small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.dir-row-stats { display: flex; gap: 26px; flex: none; }
.dir-row-stats strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.dir-row-stats small { display: block; margin-top: 2px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dir-row-act { display: inline-flex; gap: 8px; flex: none; }
.dir-row-act .btn { height: 34px; display: inline-flex; align-items: center; padding: 0 12px; font-size: 12px; }

.is-clickable { cursor: pointer; }
.is-clickable:hover .dir-row-main b a { text-decoration: underline; }

@media (max-width: 860px) {
  .dir-row { flex-wrap: wrap; align-items: flex-start; }
  .dir-row-stats { gap: 18px; order: 3; width: 100%; }
  .dir-row-act { margin-left: auto; }
}

@media (max-width: 620px) {
  .dir-switch { width: 100%; margin-left: 0; }
  .dir-switch button { flex: 1; justify-content: center; }
  /* Telefon: naziv i dugmad u prvom redu, brojevi odmah ispod — bez praznog pojasa. */
  .dir-row { padding: 12px 0; gap: 8px 12px; }
  .dir-row-main small { margin-top: 3px; }
  .dir-row-stats { gap: 20px; }
  .dir-row-stats strong { font-size: 13px; }
  .dir-row-act .btn { height: 32px; padding: 0 10px; font-size: 11.5px; }
  .dir-logo-sm { width: 24px; height: 24px; flex-basis: 24px; margin-left: 6px; }
}

/* ---------- Telefon: zone dodira najmanje 36 px ---------- */
@media (max-width: 720px) {
  .acard-links .btn { height: 36px; }
  .dir-switch button { min-height: 36px; padding: 8px 13px; }
  .btn { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { min-height: 36px; }
}
