/* Sierra Buyer Portal: brand green #64c092, clean + mobile-friendly */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --green: #64c092;
  --green-dark: #4ea87c;
  --ink: #23312b;
  --muted: #6b7a73;
  --bg: #f4f7f5;
  --card: #ffffff;
  --line: #dfe7e2;
  --red: #d9534f;
}
body { font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--ink); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }

/* buttons */
.btn { border: 0; border-radius: 6px; padding: 10px 16px; font-size: 15px; cursor: pointer; }
.btn-primary { background: var(--green); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-dark); }

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 36px; width: 100%; max-width: 420px; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.login-card h1 { color: var(--green-dark); margin-bottom: 4px; }
.tagline { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.login-card input { padding: 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; }
.login-msg { margin-top: 12px; font-size: 14px; color: var(--red); min-height: 18px; }
.login-msg.ok { color: var(--green-dark); }

/* topbar */
.topbar { display: flex; justify-content: space-between; align-items: center; background: var(--card); border-bottom: 1px solid var(--line); padding: 12px 20px; position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--green-dark); font-size: 18px; }
.brand-sub { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 6px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.who { color: var(--muted); font-size: 14px; }

/* board */
main { padding: 20px; max-width: 1500px; margin: 0 auto; }
.board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; align-items: start; }
.col { background: #eceff0aa; border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-height: 220px; }
.col h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.col[data-section="interested"] h2 { color: var(--green-dark); }
.col[data-section="overpriced"] h2 { color: #c98a1b; }
.col[data-section="make_offer"] h2 { color: #2e6fd8; }
.btn-offer { background: #2e6fd8; color: #fff; font-weight: 600; }
.btn-offer:hover { background: #245cb7; }
.offer-badge { font-size: 12.5px; color: #2e6fd8; font-weight: 700; margin-top: 2px; }
.count { font-weight: 400; }
.col-cards { display: flex; flex-direction: column; gap: 12px; min-height: 120px; }

/* property card */
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: grab; box-shadow: 0 2px 8px rgba(0,0,0,.05); position: relative; }
.pcard:hover { border-color: var(--green); }
.pcard img { width: 100%; height: 130px; object-fit: cover; display: block; background: #e6ebe8; }
.pcard .pbody { padding: 10px 12px 12px; }
.pcard .addr { font-weight: 700; font-size: 14px; line-height: 1.3; }
.pcard .facts { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.pcard .price { color: var(--green-dark); font-weight: 700; font-size: 16px; margin-top: 6px; }
.pcard .wish { font-size: 12.5px; color: #c98a1b; margin-top: 2px; }
.sortable-ghost { opacity: .4; }

/* sold strip */
.sold-strip { margin-top: 28px; }
.sold-strip h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 10px; }
.sold-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sold-cards .pcard { cursor: pointer; }
.banner-sold { position: absolute; top: 10px; left: -34px; transform: rotate(-35deg); background: var(--red); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .12em; padding: 4px 40px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.sold-price { font-size: 13px; color: var(--red); font-weight: 700; }

/* modals */
dialog { border: 0; border-radius: 12px; padding: 24px; width: min(560px, 92vw); box-shadow: 0 16px 60px rgba(0,0,0,.25); margin: auto; }
#modal-detail { width: 75vw; max-width: 75vw; max-height: 85vh; overflow-y: auto; }
#modal-photos { width: 96vw; max-width: 96vw; height: 94vh; max-height: 94vh; overflow: hidden; position: relative; }
.pgrid { margin-top: 10px; overflow-y: auto; height: calc(100% - 52px); display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; align-content: start; }
.pgrid img { width: 100%; height: 175px; object-fit: cover; border-radius: 8px; cursor: zoom-in; background: #e6ebe8; }
.photos-frame-fill { height: 100%; margin-top: 0; }
.zoom-layer { position: absolute; inset: 0; background: rgba(12,18,15,.93); display: flex; align-items: center; justify-content: center; cursor: zoom-out; z-index: 10; border-radius: 12px; }
.zoom-layer img { max-width: 96%; max-height: 94%; object-fit: contain; border-radius: 6px; }
@media (max-width: 700px) {
  #modal-detail { width: 94vw; max-width: 94vw; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .pgrid img { height: 120px; }
}
dialog::backdrop { background: rgba(20, 30, 25, .5); }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 26px; color: var(--muted); cursor: pointer; }
dialog h3 { margin-bottom: 10px; }
dialog form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
dialog label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; }
dialog input[type="text"], dialog input[type="tel"], dialog input[type="number"] { padding: 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; }
.check-row { flex-direction: row !important; align-items: center; gap: 8px !important; }

/* detail modal content */
.hero-carousel { position: relative; height: 540px; max-height: 62vh; border-radius: 8px; overflow: hidden; background: #dfe5e1; }
@media (max-width: 700px) { .hero-carousel { height: 320px; } }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(24px); transform: scale(1.18); opacity: .8; }
.detail-hero { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
.detail-hero.clickable { cursor: zoom-in; }
.car-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(20,30,25,.55); color: #fff; border: 0; border-radius: 50%; width: 42px; height: 42px; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.car-count { z-index: 2; }
.car-arrow:hover { background: rgba(20,30,25,.85); }
.car-left { left: 10px; }
.car-right { right: 10px; }
.car-count { position: absolute; bottom: 10px; right: 12px; background: rgba(20,30,25,.6); color: #fff; font-size: 12.5px; padding: 3px 9px; border-radius: 999px; }
.detail-addr { font-size: 20px; font-weight: 700; margin: 14px 0 4px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 10px 0 6px; }
.spec-table td { border: 0; padding: 8px 0; font-size: 15px; vertical-align: top; }
.spec-table td:first-child { color: var(--muted); width: 40%; }
.spec-table td:last-child { font-weight: 600; }
.val-price { color: var(--green-dark); font-weight: 800; font-size: 17px; }
.val-sold { color: var(--red); font-weight: 800; }
.val-wish { color: #c98a1b; font-weight: 700; }
.detail-desc { font-size: 14.5px; line-height: 1.55; margin: 8px 0 14px; white-space: pre-wrap; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; bottom: -24px; background: #fff; margin: 16px -24px -24px; padding: 12px 24px 16px; border-top: 1px solid var(--line); }
.entity-list { list-style: none; margin: 6px 0; }
.entity-list li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.entity-list button { background: none; border: 0; color: var(--red); cursor: pointer; }
.entity-add { display: flex; gap: 8px; }
.entity-add input { flex: 1; }

/* card arrows (for the drag-and-drop averse) */
.card-arrows { display: flex; justify-content: space-between; gap: 6px; padding: 0 10px 10px; }
.arrow { background: #f0f4f2; border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; font-size: 12px; cursor: pointer; color: var(--ink); }
.arrow:hover { border-color: var(--green); color: var(--green-dark); }

/* embedded Drive photos */
.photos-frame { width: 100%; height: 420px; border: 0; border-radius: 8px; margin-top: 12px; background: #e6ebe8; display: block; }
#photos-wrap a { display: inline-block; margin-top: 6px; }

/* profile page */
.profile-wrap { max-width: 540px; margin: 28px auto; padding: 0 16px; }
.profile-wrap .login-card { max-width: none; }
.topbar a.brand-link { text-decoration: none; }

/* responsive */
@media (max-width: 1000px) {
  .board { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .board { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; gap: 8px; }
  .photos-frame { height: 320px; }
}
