/* /agents directory — stage 4 redesign (2026-10-03).
   Scoped: every rule hangs off .ad so the global dark overrides in
   resources/css/app.css (.dark .bg-white, .dark input …) never reach it, and no
   Vite rebuild is needed. Dark = html.dark (localStorage.prix_theme). */
.ad {
  --ad-ink: #0f172a; --ad-sub: #475569; --ad-muted: #64748b; --ad-line: #e2e8f0; --ad-soft: #f1f5f9;
  --ad-bg: #f8fafc; --ad-card: #fff; --ad-input: #fff;
  --ad-teal: #32a2ad; --ad-teal-btn: #1e7a84; --ad-teal-d: #1c5c66; --ad-teal-ink: #1c5c66; --ad-navy: #0d2b67;
  --ad-r-agent: #32a2ad; --ad-r-broker: #0d2b67; --ad-r-builder: #ff7062; --ad-r-investor: #f5b700;
  --ad-wa: #128c4a; --ad-sw: #cbd5e1;
  --ad-shadow: 0 12px 30px -18px rgba(13,43,103,.25);
  --ad-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  background: var(--ad-bg); color: var(--ad-ink); font: 16px/1.6 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
html.dark .ad {
  --ad-ink: #e8edf5; --ad-sub: #b0bdd0; --ad-muted: #8899b4; --ad-line: rgba(255,255,255,.08); --ad-soft: #0d1a30;
  --ad-bg: #0a1628; --ad-card: #111d33; --ad-input: #0d1a30; --ad-teal-ink: #5cc4cf; --ad-r-broker: #7ea2ea;
  --ad-wa: #4ade80; --ad-sw: #33445f; --ad-shadow: none; color-scheme: dark;
}
/* fill the flex-1 <main> so no body-coloured strip shows above the footer */
main:has(> .ad) { display: flex; flex-direction: column; background: #f8fafc; }
html.dark main:has(> .ad) { background: #0a1628; }
main > .ad { flex: 1; }
.ad *, .ad *::before, .ad *::after { box-sizing: border-box; }
.ad h1, .ad h2, .ad h3 { font-family: var(--ad-display); letter-spacing: -.02em; margin: 0; }
.ad-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* hero (partials/block-hero) — line it up with the 1160px grid, no rule under it */
.ad .dhh { border-bottom: 0; }
.ad .dhh .dhh-in { max-width: 1208px; padding: 56px 24px 30px; }
.ad .dhh h1 { max-width: 760px; }
.ad .dhh .dhh-pill { padding: 6px 12px; font-size: 13px; }
.ad .dhh .dhh-pill svg { width: 15px; height: 15px; }

/* filter bar */
.ad-filters { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) auto; gap: 10px; padding: 12px; margin-top: 28px;
  border-radius: 22px; background: var(--ad-card); border: 1px solid var(--ad-line); box-shadow: var(--ad-shadow); }
.ad-fi { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; height: 48px; padding: 0 14px; margin: 0;
  border-radius: 14px; background: var(--ad-input); border: 1.5px solid var(--ad-line); color: var(--ad-muted); cursor: text; }
.ad-fi > svg { width: 18px; height: 18px; flex: none; }
.ad-fi:focus-within { border-color: var(--ad-teal); }
.ad .ad-fi input, .ad .ad-fi select, html.dark .ad .ad-fi input, html.dark .ad .ad-fi select {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none;
  font: 15px 'Inter', system-ui, sans-serif; color: var(--ad-ink) !important; -webkit-appearance: none; appearance: none; }
.ad .ad-fi select { padding-right: 24px; cursor: pointer; }
.ad .ad-fi input::placeholder { color: var(--ad-muted); }
.ad .ad-fi input::-webkit-search-cancel-button { filter: grayscale(1); }
.ad .ad-fi select option { color: #0f172a; background: #fff; }
html.dark .ad .ad-fi select option { color: #e8edf5; background: #111d33; }
.ad-cv { position: absolute; right: 12px; width: 16px; height: 16px; pointer-events: none; }
.ad-vt { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; margin: 0; border-radius: 14px; border: 1.5px solid var(--ad-line);
  background: var(--ad-input); font: 600 14px 'Inter', system-ui, sans-serif; color: var(--ad-ink); white-space: nowrap; cursor: pointer; }
.ad input.ad-sw, html.dark .ad input.ad-sw { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 38px; height: 22px; margin: 0; padding: 0;
  border-radius: 999px; border: 0 !important; background: var(--ad-sw) !important; cursor: pointer; transition: background .15s; }
.ad input.ad-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ad input.ad-sw:checked, html.dark .ad input.ad-sw:checked { background: var(--ad-teal-btn) !important; }
.ad input.ad-sw:checked::after { transform: translateX(16px); }
.ad input.ad-sw:focus-visible { outline: 2px solid var(--ad-teal); outline-offset: 2px; }
.ad-fchip { display: none; }

/* buttons */
.ad-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 14px; border: 0; cursor: pointer;
  font: 700 15px/1 var(--ad-display); text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.ad-btn svg { width: 15px; height: 15px; }
.ad-btn-main { background: var(--ad-teal-btn); color: #fff !important; box-shadow: 0 10px 26px rgba(50,162,173,.32); }
.ad-btn-main:hover { background: var(--ad-teal-d); }
html.dark .ad .ad-btn-main { box-shadow: none; }
.ad-btn-ghost { background: var(--ad-card); color: var(--ad-navy); border: 1.5px solid var(--ad-line); }
html.dark .ad .ad-btn-ghost { color: var(--ad-ink); border-color: rgba(255,255,255,.14); }

/* results */
.ad-wrap { max-width: 1208px; margin: 0 auto; padding: 0 24px; }
.ad-res-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 34px 0 16px; }
.ad-res-h > b { font: 800 20px var(--ad-display); color: var(--ad-ink); }
.ad-sort { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ad-muted); }
.ad .ad-sort select, html.dark .ad .ad-sort select { -webkit-appearance: none; appearance: none; border: 0 !important; background: transparent !important; padding: 4px 22px 4px 0;
  font: 600 14px 'Inter', system-ui, sans-serif; color: var(--ad-ink) !important; cursor: pointer; box-shadow: none !important; }
.ad .ad-sort select option { color: #0f172a; background: #fff; }
html.dark .ad .ad-sort select option { color: #e8edf5; background: #111d33; }
.ad-sort .ad-cv { right: 0; width: 15px; height: 15px; color: var(--ad-ink); }
.ad-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }

/* card */
.ad-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 26px 22px 20px; border-radius: 22px; overflow: hidden;
  background: var(--ad-card); border: 1px solid var(--ad-line); box-shadow: var(--ad-shadow); transition: transform .2s, box-shadow .2s, border-color .2s; }
.ad-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.ad-card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -22px rgba(13,43,103,.35); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
html.dark .ad .ad-card:hover { box-shadow: none; border-color: rgba(50,162,173,.45); }
.ad-who { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 14px; align-items: center; }
.ad-av { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 800 21px/1 var(--ad-display); color: #fff; background: var(--g); }
.ad-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ad-tk { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--ad-teal-btn); color: #fff; border: 3px solid var(--ad-card); display: grid; place-items: center; }
.ad-tk svg { width: 11px; height: 11px; }
.ad-id { min-width: 0; }
.ad-role { display: inline-block; margin-bottom: 6px; padding: 4px 7px; border-radius: 6px; font: 800 10.5px/1 var(--ad-display); text-transform: uppercase; letter-spacing: .08em;
  background: color-mix(in srgb, var(--c) 15%, var(--ad-card)); color: var(--ad-ink); }
.ad-id h3 { font-size: 18px; font-weight: 800; line-height: 1.2; color: var(--ad-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-id h3 a { color: inherit; text-decoration: none; }
.ad-id h3 a:hover { color: var(--ad-teal-ink); }
.ad-id p { margin: 3px 0 0; font-size: 14px; line-height: 1.35; color: var(--ad-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-city { display: flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 14px; color: var(--ad-sub); min-width: 0; }
.ad-city span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-city svg { width: 15px; height: 15px; flex: none; color: var(--ad-muted); }
.ad-langs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ad-lg { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; border-radius: 999px; border: 1px solid var(--ad-line); background: var(--ad-soft);
  font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--ad-ink); }
.ad-lg b { font-weight: 400; font-size: 14px; line-height: 1; }
.ad-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ad-line); font-size: 13.5px; color: var(--ad-sub); }
.ad-stats b { margin-right: 3px; font: 800 16px var(--ad-display); color: var(--ad-ink); }
.ad-new { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ad-line); font-size: 13.5px; line-height: 24px; color: var(--ad-muted); }
.ad-acts { display: flex; gap: 8px; margin-top: auto; padding-top: 18px; }
.ad-acts .ad-btn { flex: 1; height: 46px; padding: 0; font-size: 14.5px; }
.ad-wa { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; border: 1.5px solid var(--ad-line); background: var(--ad-card); color: var(--ad-wa); transition: border-color .15s; }
.ad-wa:hover { border-color: var(--ad-wa); }
.ad-wa svg { width: 20px; height: 20px; }

/* empty */
.ad-empty { margin: 34px 0 0; padding: 48px 24px; border-radius: 22px; text-align: center; background: var(--ad-card); border: 1px solid var(--ad-line); }
.ad-empty h3 { font-size: 18px; font-weight: 800; color: var(--ad-ink); }
.ad-empty p { max-width: 460px; margin: 8px auto 0; font-size: 14px; color: var(--ad-sub); }

/* pagination */
.ad-pag { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 34px 0 0; flex-wrap: wrap; }
.ad-pg-nums { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ad-pg { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px;
  border: 1.5px solid var(--ad-line); background: var(--ad-card); color: var(--ad-ink); font: 700 14px/1 var(--ad-display); text-decoration: none; transition: border-color .15s, color .15s; }
a.ad-pg:hover { border-color: var(--ad-teal); color: var(--ad-teal-ink); }
.ad-pg svg { width: 16px; height: 16px; }
.ad-pg.is-on { background: var(--ad-teal-btn); border-color: var(--ad-teal-btn); color: #fff; }
.ad-pg.is-dots { border-color: transparent; background: none; color: var(--ad-muted); min-width: 24px; padding: 0; }
.ad-pg.is-off { opacity: .45; cursor: default; }
.ad-pg-of { display: none; font: 700 14px var(--ad-display); color: var(--ad-sub); padding: 0 6px; }

/* "are you an agent?" band */
.ad-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 64px 0 0; padding: 32px; border-radius: 26px;
  background: linear-gradient(135deg, #e8f7f8 0%, #fff4f2 100%); border: 1px solid var(--ad-line); }
html.dark .ad .ad-band { background: linear-gradient(135deg, rgba(50,162,173,.14), rgba(255,112,98,.08)); }
.ad-band h2 { font-size: 26px; font-weight: 800; color: var(--ad-ink); }
.ad-band p { margin: 6px 0 0; color: var(--ad-sub); }
.ad-wrap { padding-bottom: 72px; }

/* mobile sheet */
.ad-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(5,11,26,.55); display: none; }
.ad-sheet { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; padding: 10px 20px 20px; border-radius: 24px 24px 0 0;
  background: var(--ad-card); color: var(--ad-ink); transform: translateY(105%); visibility: hidden; transition: transform .25s, visibility 0s .25s; }
body.ad-sheet-open { overflow: hidden; }
body.ad-sheet-open .ad-scrim { display: block; }
body.ad-sheet-open .ad-sheet { transform: none; visibility: visible; transition: transform .25s; }
.ad-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--ad-line); margin: 0 auto 14px; }
html.dark .ad .ad-grab { background: rgba(255,255,255,.18); }
.ad-sheet-h { display: flex; justify-content: space-between; align-items: center; }
.ad-sheet-h h3 { font-size: 19px; font-weight: 800; color: var(--ad-ink); }
.ad-link { border: 0; background: none; padding: 6px 0; font: 600 14px 'Inter', system-ui, sans-serif; color: var(--ad-teal-ink); cursor: pointer; }
.ad-grp { margin: 18px 0 0; padding: 0; border: 0; min-width: 0; }
.ad-grp legend, .ad-grp > b { display: block; margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 700; color: var(--ad-ink); }
.ad-grp-row { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.ad-grp-row > b { margin: 0; }
.ad-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-opt { position: relative; cursor: pointer; margin: 0; }
.ad-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ad-opt span { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--ad-line); background: var(--ad-input);
  font: 600 14px 'Inter', system-ui, sans-serif; color: var(--ad-ink); }
.ad-opt input:checked + span { border-color: var(--ad-teal-btn); background: color-mix(in srgb, var(--ad-teal) 14%, var(--ad-card)); }
.ad-opt input:focus-visible + span { outline: 2px solid var(--ad-teal); outline-offset: 2px; }
.ad-sheet-f { position: sticky; bottom: -20px; display: grid; grid-template-columns: auto 1fr; gap: 10px; margin: 22px -20px -20px; padding: 14px 20px 20px; background: var(--ad-card); border-top: 1px solid var(--ad-line); }
.ad-sheet-f .ad-btn { height: 52px; }

@media (max-width: 1000px) {
  .ad-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ad-filters { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ad-filters .ad-fi-q { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .ad-wrap { padding: 0 16px 56px; }
  .ad .dhh .dhh-in { padding: 32px 16px 20px; }
  .ad .dhh h1 { font-size: 34px; }
  .ad .dhh p.dhh-sub { font-size: 16px; }
  .ad-filters { grid-template-columns: minmax(0,1fr) auto; padding: 8px; border-radius: 18px; margin-top: 20px; }
  .ad-filters .ad-fi-q { grid-column: auto; }
  .ad-filters > :not(.ad-fi-q):not(.ad-fchip):not(.ad-sr) { display: none; }
  .ad-fchip { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--ad-line); background: var(--ad-input);
    font: 700 14px var(--ad-display); color: var(--ad-ink); cursor: pointer; }
  .ad-fchip svg { width: 17px; height: 17px; }
  .ad-fchip i { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ad-teal-btn); color: #fff; font-size: 12px; display: grid; place-items: center; }
  .ad-grid { grid-template-columns: 1fr; gap: 14px; }
  .ad-res-h { margin-top: 22px; flex-wrap: wrap; gap: 4px 12px; }
  .ad-pg-t { display: none; }
  .ad-pg-nums { display: none; }
  .ad-pg-of { display: inline; }
  .ad-pag { flex-wrap: nowrap; }
  .ad-pg-nav { padding: 0; }
  .ad-band { flex-direction: column; align-items: flex-start; padding: 24px; margin-top: 44px; }
  .ad-band h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .ad-card, .ad-sheet { transition: none; } .ad-card:hover { transform: none; } }
