:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111111;
  background: #ffffff;
  --ink: #111111;
  --yellow: #ffd600;
  --paper: #ffffff;
  --soft: #f3f3f0;
  --line: #e3e3de;
  --muted: #6b6b65;
  --danger: #8d2929;
  --max: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
}

a { color: inherit; }

button, input, select, textarea { font: inherit; }

button { cursor: pointer; }

button:disabled { opacity: .55; cursor: default; }

.hidden { display: none !important; }

.shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -.6px;
  text-decoration: none;
}

.dot { color: var(--yellow); }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.country-pill {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.btn {
  border: 0;
  border-radius: 15px;
  min-height: 48px;
  padding: 11px 17px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.secondary {
  background: var(--paper);
  border: 1px solid var(--line);
}

.btn.dark {
  background: var(--ink);
  color: white;
}

.btn.small {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.page {
  padding: 42px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.kicker {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
}

h1 {
  margin: 12px 0 8px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: .95;
  letter-spacing: -2.4px;
}

h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -.7px;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.status {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 15px;
  background: #eeeeea;
  color: var(--ink);
  font-weight: 700;
}

.status.error { color: var(--danger); }

.empty {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  padding: 42px;
  text-align: center;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.listing-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 10px 32px rgba(0,0,0,.04);
}

.listing-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eeeeea;
}

.listing-cover.placeholder {
  display: grid;
  place-items: center;
  font-size: 42px;
}

.listing-body { padding: 18px; }

.listing-address {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
}

.listing-rent {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 900;
}

.listing-features,
.listing-inspection,
.listing-description {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.listing-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}

.metric {
  border-radius: 14px;
  padding: 11px 12px;
  background: var(--soft);
  font-size: 12px;
  color: var(--muted);
}

.metric strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  margin-bottom: 2px;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.card-actions .btn { flex: 1; }

.login-wrap {
  width: min(520px, calc(100% - 32px));
  margin: 60px auto;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  padding: 26px;
  box-shadow: 0 14px 42px rgba(0,0,0,.05);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 17px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.wide { grid-column: 1 / -1; }

.field span {
  font-size: 14px;
  font-weight: 850;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  border: 1.5px solid #d9d9d4;
  border-radius: 15px;
  background: white;
  padding: 12px 14px;
  color: var(--ink);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.5;
}

.help {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.section-card {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--paper);
  padding: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head p {
  margin: 4px 0 0;
  font-size: 13px;
}

.photo-picker {
  position: relative;
  border: 2px dashed #cfcfc8;
  border-radius: 20px;
  padding: 28px;
  background: #fbfbf9;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}

.photo-picker:hover {
  border-color: #aaa99f;
  background: #fffdf1;
}

.photo-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.photo-picker strong {
  display: block;
  font-size: 17px;
  margin-bottom: 5px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-top: 16px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--soft);
}

.photo-meta { padding: 10px; }

.photo-label {
  font-size: 12px;
  font-weight: 900;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.photo-actions button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.photo-actions button.danger { color: var(--danger); }

.save-bar {
  position: sticky;
  bottom: 14px;
  z-index: 12;
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 42px rgba(0,0,0,.09);
  backdrop-filter: blur(12px);
}

.save-bar .btn.primary { flex: 1; }

@media (max-width: 960px) {
  .listing-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .photo-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .shell { width: min(calc(100% - 24px), var(--max)); }
  .topbar-inner { min-height: 64px; }
  .country-pill { display: none; }
  .page { padding-top: 26px; }
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero-actions { justify-content: flex-start; }
  h1 { font-size: 48px; }
  .listing-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .panel, .section-card { padding: 18px; border-radius: 22px; }
}

@media (max-width: 430px) {
  .photo-grid { grid-template-columns: 1fr; }
  .topbar-actions .btn.secondary { display: none; }
}

/* Agency portal: clean white canvas throughout. */
html, body { min-height: 100%; background: #ffffff; }
.portal-nav { display: flex; gap: 7px; margin-bottom: 28px; flex-wrap: wrap; }
.portal-nav a { text-decoration: none; padding: 10px 15px; border: 1px solid var(--line); border-radius: 12px; font-weight: 850; font-size: 14px; }
.portal-nav a[aria-current="page"] { background: var(--ink); color: white; border-color: var(--ink); }
.portal-nav a:focus-visible, .btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.agent-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.agent-card { background: white; border: 1px solid var(--line); border-radius: 23px; padding: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.035); }
.agent-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); font-size: 21px; font-weight: 900; margin-bottom: 16px; }
.agent-card h2 { overflow-wrap: anywhere; font-size: 23px; }
.agent-card p { margin: 8px 0 18px; font-size: 14px; }
.agent-card .btn { width: 100%; }
@media(max-width: 960px) { .agent-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 720px) { .agent-grid { grid-template-columns: 1fr; } }

/* 2026-10-15 usability pass: whole listing photo box is clickable */
.photo-picker { display:flex; flex-direction:column; align-items:center; justify-content:center;
  width:100%; min-height:152px; cursor:pointer; padding:28px 20px; }
.photo-picker input { position:absolute; width:1px; height:1px; opacity:0; overflow:hidden;
  clip-path:inset(50%); }
.photo-picker:focus-within { outline:3px solid #111; outline-offset:3px; }
.photo-picker strong, .photo-picker span { pointer-events:none; }
.agent-avatar img { height:100%; width:100%; border-radius:50%; object-fit:cover; }
.agent-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:20px 0; }
.agent-form .wide { grid-column:1/-1; }
.agent-actions { display:flex; gap:10px; flex-wrap:wrap; }
@media(max-width:640px) { .agent-form { grid-template-columns:1fr; } }
