@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
  font-family: "DM Sans", sans-serif;
  color: #202d29;
  background: #f5f6f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #202d29;
  --muted: #6c7771;
  --green: #28745b;
  --green-deep: #1b5a45;
  --line: #e5e9e3;
  --surface: #fff;
  --soft: #edf3ee;
  --amber: #a76a28;
  --shadow: 0 22px 65px rgba(33, 55, 43, 0.07);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.shell { min-height: 100vh; }
.topbar {
  height: 76px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 6vw, 88px); border-bottom: 1px solid #e8ebe5;
  background: rgba(250, 251, 248, .86);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px;
  color: #fff; background: var(--green); font-family: Manrope, sans-serif;
  font-size: 19px; font-weight: 800;
}
.brand-name { font: 800 17px Manrope, sans-serif; letter-spacing: -.55px; }
.top-caption { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

.main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 72px; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.heading { margin: 12px 0 12px; font: 700 clamp(32px, 5vw, 50px)/1.08 Manrope, sans-serif; letter-spacing: -1.8px; }
.intro { max-width: 600px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(290px, .88fr); gap: 26px; margin-top: 37px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.form-panel { padding: clamp(22px, 3.4vw, 36px); }
.panel-title { margin: 0 0 5px; font: 700 19px Manrope, sans-serif; letter-spacing: -.35px; }
.panel-subtitle { margin: 0 0 25px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.property-map-help { margin: -3px 0 9px; }
.property-map-shell { overflow: hidden; border: 1px solid #dce3dc; border-radius: 10px; }
#property-map { height: 270px; width: 100%; background: #e9eee9; }
.location-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.location-actions .location-button { width: 100%; margin-top: 0; }
.field-help a { color: var(--green); }
.property-editor { margin: 18px 0 21px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcf9; }
.property-editor-title { margin: 0 0 15px; color: var(--ink); font: 700 14px Manrope, sans-serif; }
.location-button {
  min-height: 38px; margin-top: 9px; border: 1px solid #d7e0d8; border-radius: 8px;
  padding: 8px 12px; color: var(--green-deep); background: #fff;
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.location-button:hover { background: #f2f7f2; }
.location-button:disabled { opacity: .65; cursor: wait; }
.save-address-button {
  display: flex; width: 100%; min-height: 42px; justify-content: center; align-items: center;
  margin-top: 10px; border: 1px solid #cddbd0; border-radius: 8px; padding: 9px 12px;
  color: var(--green-deep); background: #edf3ee; font-size: 12px; font-weight: 700; cursor: pointer;
}
.save-address-button:hover { background: #e3eee5; }
.save-address-button:disabled { opacity: .65; cursor: wait; }
.save-address-button[hidden] { display: none; }
.save-address-help { margin-top: 6px; }
.login-main { max-width: 650px; }
.login-panel { max-width: 460px; margin-top: 28px; }
.sign-out-button {
  border: 1px solid #d7e0d8; border-radius: 8px; padding: 8px 12px;
  color: var(--green-deep); background: white; font-size: 12px; font-weight: 700; cursor: pointer;
}
.sign-out-button:hover { background: #f2f7f2; }
label { display: block; margin-bottom: 7px; color: #38463f; font-size: 12px; font-weight: 700; }
input, textarea, select {
  width: 100%; min-height: 46px; border: 1px solid #dce3dc; border-radius: 9px;
  outline: none; padding: 11px 13px; color: var(--ink); background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
input:focus, textarea:focus, select:focus { border-color: #6b9e85; box-shadow: 0 0 0 3px rgba(40, 116, 91, .11); }
input:read-only { color: #69766e; background: #f4f6f2; }
input::placeholder, textarea::placeholder { color: #a1aaa4; }
textarea { resize: vertical; min-height: 86px; }
.primary-button {
  width: 100%; min-height: 49px; display: flex; justify-content: center; align-items: center;
  gap: 10px; border: 0; border-radius: 10px; padding: 12px 18px; color: white;
  background: var(--green); font-weight: 700; cursor: pointer; transition: background .18s, transform .18s;
}
.primary-button:hover { background: var(--green-deep); transform: translateY(-1px); }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.error { margin: 14px 0 0; color: #aa4138; font-size: 13px; line-height: 1.5; }
.side-panel { overflow: hidden; }
.side-top { padding: 27px 28px 24px; background: #eaf1eb; }
.side-kicker { color: #5f7a68; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.side-head { margin: 10px 0 8px; font: 700 22px/1.25 Manrope, sans-serif; letter-spacing: -.7px; }
.side-copy { margin: 0; color: #617169; font-size: 13px; line-height: 1.65; }
.steps { padding: 8px 28px 14px; }
.step { display: grid; grid-template-columns: 31px 1fr; gap: 13px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-number { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--soft); font-size: 12px; font-weight: 700; }
.step-title { margin: 1px 0 4px; font-size: 13px; font-weight: 700; }
.step-copy { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.privacy-note { display: flex; gap: 10px; margin: 0 28px 23px; padding: 13px 14px; border-radius: 10px; color: #5e6b62; background: #f7f8f5; font-size: 11px; line-height: 1.55; }
.privacy-note strong { color: #40554a; }

.result-wrap { margin-top: 26px; }
.result-panel { padding: 25px; }
.success-heading { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; }
.success-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--soft); font-weight: 800; }
.success-heading h2 { margin: 1px 0 4px; font: 700 17px Manrope, sans-serif; }
.success-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.link-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdfa; }
.link-label { margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.link-address { display: block; overflow: hidden; margin-bottom: 12px; color: #43514a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { width: 100%; min-height: 38px; border: 1px solid #d7e0d8; border-radius: 8px; color: var(--green-deep); background: white; font-size: 12px; font-weight: 700; cursor: pointer; }
.copy-button:hover { background: #f2f7f2; }
.appointment-summary { margin-top: 15px; padding: 14px 16px; border-radius: 10px; background: #f7f8f5; }
.summary-line { display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.summary-line strong { color: var(--ink); font-weight: 600; }
.appointment-history { margin-top: 35px; }
.history-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 14px; }
.history-heading h2 { margin: 0 0 4px; font: 700 20px Manrope, sans-serif; letter-spacing: -.4px; }
.history-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.appointment-list { display: grid; gap: 12px; }
.appointment-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.appointment-card-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; color: var(--ink); font-size: 13px; }
.appointment-card-heading span, .appointment-card-address { color: var(--muted); font-size: 11px; }
.appointment-card-address { margin: 6px 0 12px; }
.appointment-card-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.appointment-card-actions .copy-button { display: grid; place-items: center; padding: 7px; text-align: center; text-decoration: none; }
.appointment-delete-button { grid-column: 1 / -1; min-height: 36px; border: 1px solid #ead4d0; border-radius: 8px; color: #9b4840; background: white; font-size: 11px; font-weight: 700; cursor: pointer; }
.appointment-delete-button:hover { background: #fcf1ef; }
.appointment-delete-button:disabled { opacity: .65; cursor: wait; }
.appointment-delete-status { margin: 8px 0 0; color: #9b4840; font-size: 11px; line-height: 1.4; }
.appointment-delete-status:empty { display: none; }
.empty-state { padding: 18px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.55); font-size: 12px; }
.saved-houses-section { margin-top: 30px; }
.saved-houses-list { display: grid; gap: 10px; }
.saved-house-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.saved-house-card strong { color: var(--ink); font-size: 13px; }
.saved-house-card p { margin: 5px 0; color: var(--muted); font-size: 12px; }
.saved-house-card span { color: #819087; font-size: 10px; }
.saved-house-actions { display: flex; gap: 8px; }
.saved-house-card .copy-button, .house-delete-button { width: auto; min-height: 38px; padding: 0 13px; white-space: nowrap; }
.house-delete-button { border: 1px solid #ead4d0; border-radius: 8px; color: #9b4840; background: white; font-size: 12px; font-weight: 700; cursor: pointer; }
.house-delete-button:hover { background: #fcf1ef; }
.house-delete-button:disabled { opacity: .65; cursor: wait; }
.saved-house-status { grid-column: 1 / -1; color: #9b4840 !important; }
.saved-house-status:empty { display: none; }
.inline-share-panel { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #f8faf7; }
.inline-share-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); font-size: 12px; }
.inline-share-panel .share-controls { margin-top: 12px; }
.inline-share-panel .meta-line { margin-bottom: 0; }

.share-main, .track-main { width: min(920px, calc(100% - 36px)); margin: 0 auto; padding: 44px 0 60px; }
.page-title { margin: 10px 0 8px; font: 700 clamp(26px, 5vw, 38px)/1.15 Manrope, sans-serif; letter-spacing: -1px; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.appointment-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 25px 0 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.appointment-property { margin: 0 0 5px; font-size: 14px; font-weight: 700; }
.appointment-time { margin: 0; color: var(--muted); font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 7px 10px; border-radius: 30px; color: #657069; background: #f0f2ef; font-size: 11px; font-weight: 700; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #96a199; }
.status-pill.live { color: #27634d; background: #eaf5ec; }
.status-pill.live .status-dot { background: #3a9c67; box-shadow: 0 0 0 3px rgba(58, 156, 103, .12); }
.status-pill.wait { color: #966320; background: #fbf2df; }
.status-pill.wait .status-dot { background: #c38a35; }
.map-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); }
#map { height: min(52vh, 430px); min-height: 290px; width: 100%; background: #e9eee9; }
.map-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 17px; color: var(--muted); font-size: 11px; }
.map-footer a { color: var(--green); text-decoration: none; }
.map-legend { display: inline-flex; align-items: center; gap: 6px; }
.legend-house, .legend-agent { display: inline-block; width: 9px; height: 9px; margin-left: 5px; }
.legend-house { border-radius: 2px; background: #cf7440; transform: rotate(-45deg); }
.legend-agent { border: 2px solid #fff; border-radius: 50%; background: #28745b; box-shadow: 0 0 0 1px #28745b; }
.property-pin, .agent-pin { border: 0; background: transparent; }
.property-pin span {
  display: block; width: 21px; height: 21px; border: 2px solid #fff;
  border-radius: 50% 50% 50% 2px; background: #cf7440;
  box-shadow: 0 2px 7px rgba(32, 45, 41, .34); transform: rotate(-45deg);
}
.agent-pin span {
  display: block; width: 17px; height: 17px; border: 3px solid #fff;
  border-radius: 50%; background: #28745b;
  box-shadow: 0 0 0 2px #28745b, 0 2px 7px rgba(32, 45, 41, .25);
}
.notice { margin: 18px 0 0; padding: 15px 17px; border: 1px solid #e8e3d5; border-radius: 11px; color: #7a6543; background: #fcf8ef; font-size: 13px; line-height: 1.6; }
.notice strong { color: #644d2c; }
.notice.good { border-color: #d8e8da; color: #55715e; background: #f0f7f0; }
.notice.error-notice { border-color: #f0d7d3; color: #9b4840; background: #fcf1ef; }
.share-controls { display: flex; flex-wrap: wrap; gap: 11px; margin: 19px 0 0; }
.share-controls .primary-button { width: auto; min-width: 200px; }
.stop-button { min-height: 49px; border: 1px solid #d8dfd9; border-radius: 10px; padding: 11px 17px; color: #4e5b53; background: white; font-weight: 700; cursor: pointer; }
.stop-button:hover { background: #f5f7f3; }
.meta-line { margin-top: 13px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.client-details { margin-top: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.client-details h2 { margin: 0 0 10px; font: 700 14px Manrope, sans-serif; }
.client-details p { margin: 5px 0; color: #59655e; font-size: 12px; line-height: 1.6; }
.footer { padding: 22px 20px 28px; color: #8a948d; text-align: center; font-size: 11px; }
.loading { padding: 60px 20px; color: var(--muted); text-align: center; }

@media (max-width: 760px) {
  .topbar { height: 65px; padding: 0 20px; }
  .top-caption { display: none; }
  .main { padding-top: 38px; }
  .home-grid { grid-template-columns: 1fr; gap: 17px; margin-top: 26px; }
  .side-panel { order: 2; }
  .link-grid { grid-template-columns: 1fr; }
  .share-main, .track-main { padding-top: 31px; }
  .appointment-bar { align-items: flex-start; }
  .status-pill { margin-top: 1px; }
  #map { height: 48vh; min-height: 260px; }
}
@media (max-width: 480px) {
  .main { width: calc(100% - 28px); }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-panel { padding: 21px 18px; }
  .side-top { padding: 22px 20px; }
  .steps { padding: 7px 20px 10px; }
  .privacy-note { margin: 0 20px 18px; }
  .appointment-bar { flex-direction: column; gap: 11px; padding: 15px; }
  .share-controls { flex-direction: column; }
  .share-controls .primary-button, .stop-button { width: 100%; }
  .map-footer { align-items: flex-start; flex-direction: column; }
  #property-map { height: 250px; }
  .appointment-card-heading { flex-direction: column; gap: 4px; }
  .appointment-card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .saved-house-card { grid-template-columns: 1fr; align-items: stretch; }
  .saved-house-actions { display: grid; grid-template-columns: minmax(0, 1fr) 100px; }
  .saved-house-card .copy-button, .saved-house-actions .house-delete-button { width: 100%; min-height: 40px; }
}
