/* ============================================================
   EstateMate — Auth & Registration
   Brand layer over Bootstrap 5 · "Immersive mint"
   All custom styling is namespaced under .em-* so it sits
   cleanly on top of Bootstrap utilities/components.
   ============================================================ */
:root {
  --em-mint: #3DC298;
  --em-mint-600: #2FA983;
  --em-mint-700: #248D6C;
  --em-mint-050: #ECF8F2;
  --em-mint-100: #D6F1E6;
  --em-ink: #16201C;
  --em-lemon: #FFEB9E;
  --em-magenta: #C026D3;
  --em-line: #E3E7E5;
  --em-muted: #6A746F;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-color: var(--em-ink);
}
html, body { height: 100%; }
body { font-family: var(--bs-body-font-family); color: var(--em-ink); background: #fff; -webkit-font-smoothing: antialiased; }
.em-view { min-height: 100vh; }
.em-view[hidden] { display: none !important; }
a { color: var(--em-mint-700); text-decoration: none; font-weight: 600; }
a:hover { color: var(--em-mint-600); text-decoration: underline; }

/* ---- Wordmark ---- */
.em-wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -0.02em; font-size: 1.35rem; color: var(--em-mint-700); }
.em-wordmark .em-logo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.em-wordmark .em-dot { color: var(--em-magenta); }
.em-wordmark.mono { color: #fff; }
.em-wordmark.mono .em-logo { box-shadow: 0 0 0 1.5px rgba(255,255,255,0.4); }
.em-wordmark.mono .em-dot { color: var(--em-lemon); }

/* ---- Marketing panel ---- */
.em-marketing {
  background: linear-gradient(150deg, #43CCA1 0%, #2FA983 55%, #248D6C 100%);
  color: #fff; position: relative; overflow: hidden;
  padding: 3rem 3.25rem;
}
.em-marketing::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-radial-gradient(circle at 90% 14%, rgba(255,255,255,0.13) 0 2px, transparent 2px 54px),
    radial-gradient(circle at 88% 14%, rgba(255,255,255,0.16), transparent 42%),
    radial-gradient(circle at 8% 96%, rgba(255,255,255,0.12), transparent 46%);
}
.em-marketing > * { position: relative; z-index: 1; }
.em-tag-glass { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.45rem 0.85rem; border-radius: 999px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.32); }
.em-headline { font-size: clamp(2.4rem, 3.4vw, 3.4rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; margin: 0; }
.em-hl-lemon { color: var(--em-lemon); }
.em-lede { font-size: 1.05rem; line-height: 1.5; color: rgba(255,255,255,0.92); max-width: 30rem; }

.em-proof { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: rgba(255,255,255,0.94); }
.em-avatars { display: flex; }
.em-av { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #2FA983; margin-left: -9px; }
.em-av:first-child { margin-left: 0; }
.em-av.a1 { background: #7ED0B2; } .em-av.a2 { background: #B7A6E6; } .em-av.a3 { background: #FBC9A6; } .em-av.a4 { background: #9AD0EC; }

/* ---- Rotating feature (frosted) ---- */
/* min-height keeps the panel from shifting as highlights rotate between 1- and 2-line titles */
.em-feature { display: flex; gap: 0.9rem; align-items: center; min-height: 124px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); border-radius: 16px; padding: 1rem 1.1rem; backdrop-filter: blur(4px); }
.em-feature .em-fic { width: 44px; height: 44px; border-radius: 13px; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.25rem; }
.em-feature .em-ftag { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--em-lemon); }
.em-feature .em-ftitle { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
.em-feature .em-fsub { font-size: 0.85rem; color: rgba(255,255,255,0.84); margin-top: 2px; }
.em-dots { display: flex; gap: 6px; margin-top: 0.9rem; }
.em-dots span { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,0.3); transition: width .25s, background .25s; }
.em-dots span.on { width: 22px; background: #fff; }
.em-fade { animation: emFade .45s ease; }
@keyframes emFade { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* ---- Compact mobile hero ---- */
.em-mhero { background: linear-gradient(150deg, #43CCA1, #248D6C); color: #fff; padding: 1.75rem 1.5rem 2rem; position: relative; overflow: hidden; }
.em-mhero::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 88% 10%, rgba(255,255,255,0.18), transparent 45%); }
.em-mhero > * { position: relative; z-index: 1; }

/* ---- Form side ---- */
.em-formwrap { display: flex; flex-direction: column; padding: 0; }
@media (min-width: 992px) { .em-formwrap { justify-content: center; } }
.em-form { width: 100%; max-width: 460px; margin: 0 auto; padding: 2.25rem 2rem 2.5rem; }
.em-form h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.025em; margin: 0; }
.em-form .em-sub { font-size: 0.95rem; color: var(--em-muted); margin: 0.4rem 0 0; }

.em-seg { display: flex; gap: 4px; background: #F1F4F2; border-radius: 11px; padding: 4px; }
.em-seg button { flex: 1; border: 0; background: transparent; padding: 0.55rem; border-radius: 8px; font-size: 0.86rem; font-weight: 600; color: var(--em-muted); cursor: pointer; transition: background .12s, color .12s; }
.em-seg button.on { background: #fff; color: var(--em-ink); box-shadow: 0 1px 2px rgba(0,0,0,0.09); }

.em-label { font-size: 0.85rem; font-weight: 600; color: #3A443F; margin-bottom: 0.4rem; }
.em-control { position: relative; }
.em-control > .lead { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9AA39E; pointer-events: none; }
.em-control .form-control { height: 48px; border-radius: 12px; border: 1.5px solid var(--em-line); padding-left: 40px; font-size: 0.97rem; }
.em-control .form-control:focus { border-color: var(--em-mint); box-shadow: 0 0 0 0.25rem rgba(61,194,152,0.18); }
.em-control .em-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #9AA39E; padding: 6px; cursor: pointer; }
.em-cc { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 600; font-size: 0.92rem; color: #3A443F; }
.em-control.has-cc .form-control { padding-left: 74px; }

.btn-mint { background: var(--em-mint-700); color: #fff; height: 48px; border-radius: 12px; font-weight: 700; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; }
.btn-mint:hover, .btn-mint:focus { background: #1F7A5E; color: #fff; }
.btn-ghost { background: #fff; color: #3A443F; height: 48px; border-radius: 12px; font-weight: 700; border: 1.5px solid var(--em-line); display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }
.btn-ghost:hover { background: #F4F6F5; }

.em-check .form-check-input { width: 1.15em; height: 1.15em; margin-top: 0.15em; border-color: #CBD2CE; }
.em-check .form-check-input:checked { background-color: var(--em-mint); border-color: var(--em-mint); }
.em-check .form-check-input:focus { box-shadow: 0 0 0 0.2rem rgba(61,194,152,0.2); }

.em-otp { display: flex; gap: 8px; }
.em-otp input { flex: 1; width: 0; height: 54px; text-align: center; font-size: 1.3rem; font-weight: 700; border: 1.5px solid var(--em-line); border-radius: 12px; }
.em-otp input:focus { outline: 0; border-color: var(--em-mint); background: var(--em-mint-050); box-shadow: 0 0 0 0.2rem rgba(61,194,152,0.18); }
.em-pin-hint { display: flex; gap: 0.55rem; align-items: flex-start; padding: 0.7rem 0.85rem; background: var(--em-mint-050); border-radius: 11px; font-size: 0.8rem; line-height: 1.45; color: var(--em-mint-700); }
.em-pin-hint .bi { font-size: 0.95rem; margin-top: 1px; flex-shrink: 0; }
.em-control.is-valid { border-color: var(--em-mint); }
.em-control.is-invalid { border-color: #E0857C; box-shadow: 0 0 0 3px rgba(224,133,124,0.14); }
.em-control.has-tick .form-control { padding-right: 40px; }
.em-valid-tick { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--em-mint); opacity: 0; transition: opacity .12s; pointer-events: none; }
.em-control.is-valid .em-valid-tick { opacity: 1; }

/* ---- Country-code picker (reusable: .em-ccwrap) ---- */
.em-ccwrap { position: relative; display: flex; align-items: center; height: 48px; padding: 0 4px 0 13px; border: 1.5px solid var(--em-line); border-radius: 12px; background: #fff; transition: border-color .12s, box-shadow .12s; }
.em-ccwrap:focus-within { border-color: var(--em-mint); box-shadow: 0 0 0 0.25rem rgba(61,194,152,0.18); }
.em-ccwrap .em-ccbtn { flex-shrink: 0; }
.em-ccwrap .form-control { flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 0; padding-left: 9px; box-shadow: none; }
.em-ccwrap .form-control:focus { border: 0; box-shadow: none; }
.em-ccbtn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 0.92rem; color: #3A443F; cursor: pointer; padding: 0 10px 0 0; margin-right: 4px; border-right: 1px solid var(--em-line); white-space: nowrap; }
.em-ccbtn .bi { font-size: 0.7rem; color: #9AA39E; }
.em-cc-menu { position: absolute; top: calc(100% + 6px); left: 0; width: 300px; max-width: 86vw; background: #fff; border: 1px solid var(--em-line); border-radius: 12px; box-shadow: 0 14px 34px rgba(20,32,28,0.16); z-index: 40; overflow: hidden; }
.em-cc-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #EEF1EF; }
.em-cc-search .bi { color: #9AA39E; }
.em-cc-search input { border: 0; outline: 0; flex: 1; font: inherit; font-size: 0.9rem; background: transparent; }
.em-cc-list { max-height: 240px; overflow: auto; padding: 6px; }
.em-cc-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 0.9rem; cursor: pointer; }
.em-cc-opt:hover { background: var(--em-mint-050); }
.em-cc-opt .flag { font-size: 1.05rem; }
.em-cc-opt .nm { flex: 1; }
.em-cc-opt .dl { color: var(--em-muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.em-lock-badge { width: 52px; height: 52px; border-radius: 14px; background: var(--em-mint-100); color: var(--em-mint-700); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 14px; }

/* ---- Human verification widget (Turnstile-style placeholder) ---- */
.em-verify { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 320px; padding: 12px 14px; border: 1.5px solid var(--em-line); border-radius: 14px; background: linear-gradient(180deg, #fff, #FAFCFB); }
.em-verify .ev-ind { position: relative; width: 24px; height: 24px; flex-shrink: 0; }
.ev-spinner { position: absolute; inset: 0; border: 2.5px solid var(--em-mint-100); border-top-color: var(--em-mint); border-radius: 50%; animation: evspin .7s linear infinite; transition: opacity .2s; }
.ev-check { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--em-mint); color: #fff; font-size: 0.8rem; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .28s cubic-bezier(.2,.8,.2,1.4); }
.em-verify.done .ev-spinner { opacity: 0; }
.em-verify.done .ev-check { opacity: 1; transform: scale(1); }
.ev-label { flex: 1; font-size: 0.9rem; font-weight: 600; color: #3A443F; }
.em-verify.done .ev-label { color: var(--em-mint-700); }
.ev-logo { display: inline-flex; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 600; color: #9AA39E; }
@keyframes evspin { to { transform: rotate(360deg); } }

.em-legal { font-size: 0.72rem; color: #98A19C; line-height: 1.55; }
.em-legal a { color: var(--em-muted); text-decoration: underline; font-weight: 500; }

/* ---- Registration / Forgot / Lead shell ---- */
.em-reg { background: #F4F7F5; position: relative; }
.em-reg::before { content:""; position:absolute; inset:0; background-image: radial-gradient(rgba(36,141,108,0.12) 1.4px, transparent 1.5px); background-size: 24px 24px; -webkit-mask-image: radial-gradient(120% 100% at 100% 0%, #000 25%, transparent 70%); mask-image: radial-gradient(120% 100% at 100% 0%, #000 25%, transparent 70%); pointer-events: none; }
.em-reg > * { position: relative; z-index: 1; }
.em-reg-top { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem 2rem; }
.em-stepper { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0.25rem 0 1.5rem; flex-wrap: wrap; }
.em-step { display: flex; align-items: center; gap: 0.55rem; }
.em-step .dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; background: #E7ECE9; color: #9AA39E; flex-shrink: 0; }
.em-step .lbl { font-size: 0.85rem; font-weight: 600; color: #9AA39E; }
.em-step.on .dot { background: var(--em-mint-700); color: #fff; box-shadow: 0 0 0 4px rgba(36,141,108,0.16); }
.em-step.done .dot { background: var(--em-mint-100); color: var(--em-mint-700); }
.em-step.on .lbl, .em-step.done .lbl { color: var(--em-ink); }
.em-step-bar { width: 38px; height: 2px; background: #E1E7E3; border-radius: 2px; }
.em-step-bar.done { background: var(--em-mint); }

.em-card { background: #fff; border: 1px solid #EAECEB; border-radius: 20px; box-shadow: 0 14px 44px rgba(20,32,28,0.07); padding: 2rem 2.1rem; max-width: 600px; margin: 0 auto; }
.em-card h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.025em; margin: 0; }
.em-card .em-sub { font-size: 0.95rem; color: var(--em-muted); margin: 0.5rem 0 0; }

.em-role { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.85rem; border: 1.5px solid var(--em-line); border-radius: 14px; background: #fff; cursor: pointer; text-align: left; transition: border-color .14s, background .14s, box-shadow .14s; }
.em-role:hover { border-color: #CBD2CE; }
.em-role.on { border-color: var(--em-mint); background: var(--em-mint-050); box-shadow: 0 0 0 3px rgba(61,194,152,0.13); }
.em-role .ic { width: 38px; height: 38px; border-radius: 11px; background: #F1F4F2; color: var(--em-muted); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.em-role.on .ic { background: var(--em-mint); color: #fff; }
.em-role .ti { font-weight: 700; font-size: 0.95rem; }
.em-role .de { font-size: 0.8rem; color: var(--em-muted); }
.em-role .ck { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--em-mint); color: #fff; display: none; align-items: center; justify-content: center; font-size: 0.7rem; }
.em-role.on .ck { display: flex; }

/* sub-option blocks + search-select combobox */
.em-subblock { background: #F7F9F8; border: 1px solid #EEF1EF; border-radius: 14px; padding: 0.9rem 1rem; }
.em-combo { position: relative; }
.em-combo-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--em-line); border-radius: 12px; box-shadow: 0 14px 34px rgba(20,32,28,0.14); padding: 6px; z-index: 30; max-height: 236px; overflow: auto; }
.em-combo-opt { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; font-size: 0.93rem; cursor: pointer; }
.em-combo-opt .bi { color: var(--em-mint-700); font-size: 0.95rem; }
.em-combo-opt:hover { background: var(--em-mint-050); }
.em-combo-opt .sub { margin-left: auto; font-size: 0.8rem; color: var(--em-muted); }
.em-combo-empty { padding: 11px; font-size: 0.86rem; color: var(--em-muted); }

/* ---- Community rules & documents modal list ---- */
.em-doc-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; margin-bottom: 8px; border: 1px solid var(--em-line); border-radius: 10px; color: var(--em-ink); font-weight: 500; text-decoration: none; transition: background 0.15s, border-color 0.15s; }
.em-doc-row:last-child { margin-bottom: 0; }
.em-doc-row:hover { background: var(--em-mint-050); border-color: var(--em-mint-100); color: var(--em-ink); text-decoration: none; }
.em-doc-row > .bi:first-child { color: var(--em-mint-700); font-size: 1.05rem; }
.em-doc-row .nm { flex: 1; }
.em-doc-row .ext { color: var(--em-muted); font-size: 0.85rem; }
.em-control.has-trail .form-control { padding-right: 40px; }
.em-control .trail-ic { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #9AA39E; pointer-events: none; transition: color .12s; }
.em-combo.is-selected .trail-ic { color: var(--em-mint-700); }
.em-control.is-disabled { opacity: 0.6; }
.em-control.is-disabled .form-control { background: #F4F6F5; cursor: not-allowed; }

.em-review { border: 1px solid #EAECEB; border-radius: 14px; overflow: hidden; }
.em-review .r { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 1rem; border-bottom: 1px solid #F0F2F1; }
.em-review .r:last-child { border-bottom: 0; }
.em-review .k { font-size: 0.82rem; color: #98A19C; width: 96px; flex-shrink: 0; }
.em-review .v { font-size: 0.9rem; font-weight: 600; flex: 1; }
.em-note { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.85rem 1rem; background: var(--em-mint-050); border-radius: 12px; font-size: 0.85rem; color: var(--em-mint-700); }

/* ---- Success ---- */
.em-success { background: #F4F7F5; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.em-success-badge { width: 84px; height: 84px; border-radius: 50%; background: var(--em-mint-100); color: var(--em-mint-700); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; margin: 0 auto 1.4rem; }
.em-success-card { background: #fff; border: 1px solid #EAECEB; border-radius: 16px; box-shadow: 0 10px 30px rgba(20,32,28,0.05); }
.em-success-row { display: flex; align-items: center; gap: 0.7rem; font-size: 0.9rem; font-weight: 600; }
.em-success-row .sd { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; }
.em-success-row .sd.done { background: var(--em-mint); color: #fff; }
.em-success-row .sd.wait { background: var(--em-lemon); color: #8A6A12; }

.invalid-hint { display: none; font-size: 0.8rem; color: #B23A2E; margin-top: 0.3rem; }
.was-validated .em-control .form-control:invalid { border-color: #E0857C; }

/* Mobile/tablet (< lg): centre the brand + marketing hero and the welcome heading. */
@media (max-width: 991.98px) {
  .em-mhero { text-align: center; }
  .em-mhero .em-wordmark { justify-content: center; }
  .em-form > h1,
  .em-form > .em-sub { text-align: center; }
}

/* ============================================================
   Responsive — phone tuning (< 576px)
   The whole product promise is "in your pocket", so phones are
   a first-class target, not an afterthought.
   ============================================================ */
@media (max-width: 575.98px) {
  .em-reg-top { padding: 1rem 1.1rem; }
  .em-wordmark { font-size: 1.15rem; gap: 7px; }
  .em-wordmark .em-logo { width: 50px; height: 50px; }
  .em-reg-top .small { font-size: 0.78rem; }
  /* Stepper: dots only on phones (labels would wrap/cramp) */
  .em-stepper { gap: 0.4rem; margin-bottom: 1.25rem; }
  .em-step .lbl { display: none; }
  .em-step-bar { width: 26px; }
  .em-card { padding: 1.4rem 1.15rem; border-radius: 16px; }
  .em-card h2 { font-size: 1.35rem; }
  .em-reg .flex-grow-1 { padding-left: 0.85rem; padding-right: 0.85rem; }
  .em-form { padding: 1.6rem 1.2rem 2rem; }
  .em-mhero .em-headline { font-size: 1.7rem; }
  .em-cc-menu { width: 270px; }
  .em-otp input { height: 50px; font-size: 1.15rem; }
  /* Comfortable tap targets */
  .em-role { padding: 0.9rem 0.85rem; }
}
