/* Golf View Estate — shared styles */
:root{
  /* Shared with the estate website (site.css) so the two feel like one product */
  --green:#0b5c2d; --green-600:#0f7a3c; --green-500:#22803f; --green-50:#eaf5ee;
  --gold:#f28c28; --ink:#1d1d1f; --muted:#6e6e73; --line:rgba(0,0,0,.09);
  --bg:#fbfbfd; --card:#ffffff; --red:#b91c1c; --red-50:#fef2f2;
  --amber:#b45309; --amber-50:#fffbeb; --blue:#1d4ed8; --blue-50:#eff6ff;
  --radius:16px; --shadow:0 1px 2px rgba(0,0,0,.04);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI Variable","Segoe UI",Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--ink); font-size:15px; line-height:1.5; letter-spacing:-.008em;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
h1,h2,h3{margin:0 0 .35em; line-height:1.2; font-weight:600; letter-spacing:-.02em}
h1{font-size:1.75rem} h2{font-size:1.15rem} h3{font-size:1rem}
p{margin:0 0 .75em}
a{color:var(--green-600)}
small,.small{font-size:.82rem}
.muted{color:var(--muted)}
.hidden{display:none !important}

/* ---------- layout ---------- */
.topbar{
  background:rgba(251,251,253,.82); -webkit-backdrop-filter:saturate(180%) blur(20px); backdrop-filter:saturate(180%) blur(20px);
  color:var(--ink); border-bottom:1px solid var(--line); min-height:56px;
  padding:.5rem 1rem; display:flex; align-items:center; gap:.9rem; position:sticky; top:0; z-index:40;
}
.topbar .brand{display:flex; align-items:center; gap:.75rem; min-width:0}
.topbar .brand-logo{height:36px; width:auto; flex:0 0 auto}
.topbar .brand-text{display:flex; flex-direction:column; line-height:1.15; min-width:0}
.topbar .brand-text b{font-weight:600; letter-spacing:-.01em; white-space:nowrap}
.topbar .brand-text span,.topbar .brand span{display:block; font-weight:400; font-size:.75rem; color:var(--muted); white-space:nowrap}
@media(max-width:420px){.topbar .brand-text b{font-size:.9rem}}
.topbar .spacer{flex:1}
.wrap{max-width:820px; margin:0 auto; padding:1.25rem 1rem 5rem}
.wrap.wide{max-width:1400px}
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:1.25rem; box-shadow:var(--shadow); margin-bottom:1rem}
@media(min-width:640px){.card{padding:1.5rem}}
.card h2{display:flex; align-items:center; gap:.5rem}
.grid{display:grid; gap:.85rem}
.g2{grid-template-columns:1fr 1fr}
.g3{grid-template-columns:repeat(3,1fr)}
@media(max-width:640px){.g2,.g3{grid-template-columns:1fr}}
.row{display:flex; gap:.6rem; align-items:center; flex-wrap:wrap}
.right{margin-left:auto}

/* ---------- forms ---------- */
label{display:block; font-weight:600; font-size:.82rem; margin-bottom:.28rem; color:#374151}
label .req{color:var(--red)}
input[type=text],input[type=email],input[type=tel],input[type=number],input[type=date],select,textarea{
  width:100%; padding:.6rem .7rem; border:1px solid #d1d5db; border-radius:9px;
  font:inherit; background:#fff; color:var(--ink);
}
input:focus,select:focus,textarea:focus{outline:2px solid var(--green-500); outline-offset:-1px; border-color:var(--green-500)}
input[aria-invalid=true],select[aria-invalid=true]{border-color:var(--red); background:var(--red-50)}
textarea{min-height:80px; resize:vertical}
.hint{font-size:.78rem; color:var(--muted); margin-top:.25rem}
/* reserve the line so async validation messages never shift the tap targets below them */
#propMatch{min-height:1.3rem}
.err{font-size:.78rem; color:var(--red); margin-top:.25rem; font-weight:600}
fieldset{border:1px solid var(--line); border-radius:10px; padding:.8rem; margin:0 0 .85rem}
legend{font-weight:650; font-size:.85rem; padding:0 .35rem}

.choice{display:flex; gap:.5rem; flex-wrap:wrap}
.choice input{position:absolute; opacity:0; width:0; height:0}
.choice label{
  display:inline-flex; align-items:center; gap:.4rem; margin:0; cursor:pointer;
  border:1.5px solid #d1d5db; border-radius:999px; padding:.45rem .9rem; font-weight:600; font-size:.85rem;
  background:#fff; transition:.12s;
}
.choice input:checked + label{border-color:var(--green-600); background:var(--green-50); color:var(--green)}
.choice input:focus-visible + label{outline:2px solid var(--green-500); outline-offset:2px}

.check{display:flex; gap:.6rem; align-items:flex-start; margin-bottom:.6rem}
.check input{margin-top:.2rem; width:1.05rem; height:1.05rem; accent-color:var(--green-600); flex:none}
.check label{font-weight:500; font-size:.87rem; margin:0; color:var(--ink)}

/* ---------- buttons ---------- */
button{font:inherit}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.4rem;
  padding:.6rem 1.15rem; border-radius:999px; border:1px solid transparent;
  background:var(--green-600); color:#fff; font-weight:500; cursor:pointer; transition:.15s;
}
.btn:hover:not(:disabled){background:var(--green)}
.btn:disabled{opacity:.5; cursor:not-allowed}
.btn.ghost{background:#fff; color:var(--ink); border-color:rgba(0,0,0,.14)}
.btn.ghost:hover:not(:disabled){background:#f3f4f6}
.btn.danger{background:var(--red)}
.btn.sm{padding:.35rem .8rem; font-size:.82rem}
.btn.link{background:none; color:var(--green-600); border:none; padding:.2rem; text-decoration:underline}

/* ---------- pills / alerts ---------- */
.pill{display:inline-flex; align-items:center; gap:.3rem; padding:.16rem .55rem; border-radius:999px; font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em}
.pill.draft{background:#f3f4f6; color:#4b5563}
.pill.submitted{background:var(--blue-50); color:var(--blue)}
.pill.under_review{background:var(--amber-50); color:var(--amber)}
.pill.approved{background:#ecfdf5; color:#047857}
.pill.rejected{background:var(--red-50); color:var(--red)}
.pill.expired,.pill.deactivated{background:#f3f4f6; color:#6b7280}
.alert{padding:.75rem .9rem; border-radius:10px; font-size:.87rem; margin-bottom:.9rem; border:1px solid}
.alert.info{background:var(--blue-50); border-color:#bfdbfe; color:#1e3a8a}
.alert.warn{background:var(--amber-50); border-color:#fde68a; color:#78350f}
.alert.err{background:var(--red-50); border-color:#fecaca; color:#7f1d1d}
.alert.ok{background:#ecfdf5; border-color:#a7f3d0; color:#065f46}

/* ---------- stepper ---------- */
.steps{display:flex; gap:.3rem; overflow-x:auto; padding:.2rem 0 .9rem; scrollbar-width:none}
.steps::-webkit-scrollbar{display:none}
.steps .s{
  flex:none; display:flex; align-items:center; gap:.4rem; padding:.35rem .7rem;
  border-radius:999px; font-size:.78rem; font-weight:650; color:var(--muted);
  background:#fff; border:1px solid var(--line); white-space:nowrap;
}
.steps .s .n{width:1.25rem; height:1.25rem; border-radius:50%; background:#e5e7eb; color:#4b5563; display:grid; place-items:center; font-size:.7rem}
.steps .s.active{color:var(--green); border-color:var(--green-500); background:var(--green-50)}
.steps .s.active .n{background:var(--green-600); color:#fff}
.steps .s.done{color:var(--green-600)}
.steps .s.done .n{background:#a7f3d0; color:#065f46}

/* ---------- camera ---------- */
.camera-stage{position:relative; background:#0b0f0d; border-radius:12px; overflow:hidden; aspect-ratio:3/4; max-width:340px; margin:0 auto}
.camera-stage video,.camera-stage img,.camera-stage canvas{width:100%; height:100%; object-fit:cover; display:block}
.face-guide{position:absolute; inset:0; pointer-events:none}
.face-guide::after{
  content:''; position:absolute; left:50%; top:46%; transform:translate(-50%,-50%);
  width:58%; aspect-ratio:3/4; border:3px dashed rgba(255,255,255,.75); border-radius:50%;
}
.cam-hint{position:absolute; left:0; right:0; bottom:0; padding:.5rem; background:linear-gradient(transparent,rgba(0,0,0,.75)); color:#fff; font-size:.78rem; text-align:center}
.selfie-thumb{width:64px; height:84px; object-fit:cover; border-radius:8px; border:1px solid var(--line); background:#f3f4f6}

/* ---------- repeatable item cards ---------- */
.item{border:1px solid var(--line); border-radius:10px; padding:.8rem; margin-bottom:.7rem; background:#fff; position:relative}
.item .rm{position:absolute; top:.5rem; right:.5rem}
.item h3{font-size:.9rem; color:var(--green); margin-bottom:.6rem}

/* ---------- upload ---------- */
.drop{border:1.5px dashed rgba(0,0,0,.2); border-radius:12px; padding:.9rem; text-align:center; background:#fbfcfb; cursor:pointer}
.drop:hover{border-color:var(--green-500); background:var(--green-50)}
.drop.has{border-style:solid; border-color:#a7f3d0; background:#f0fdf4; text-align:left}
.filerow{display:flex; align-items:center; gap:.55rem; font-size:.84rem; padding:.3rem 0}
.filerow .ic{width:26px; height:26px; border-radius:6px; background:var(--green-50); color:var(--green); display:grid; place-items:center; font-size:.7rem; font-weight:700; flex:none}

/* ---------- signature ---------- */
.sigpad{border:1px solid #d1d5db; border-radius:10px; background:#fff; touch-action:none; width:100%; height:150px; display:block}

/* ---------- table ---------- */
table{width:100%; border-collapse:collapse; font-size:.86rem}
th,td{text-align:left; padding:.55rem .6rem; border-bottom:1px solid var(--line); vertical-align:middle}
th{font-size:.74rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); background:#fafafa; position:sticky; top:0; z-index:1}
tbody tr:hover{background:#fafcfa; cursor:pointer}
.tablewrap{overflow:auto; max-height:60vh; border:1px solid var(--line); border-radius:10px}

/* ---------- sticky footer nav ---------- */
.stickybar{
  position:fixed; left:0; right:0; bottom:0; background:#fff; border-top:1px solid var(--line);
  padding:.7rem 1rem; display:flex; gap:.6rem; align-items:center; z-index:30;
  box-shadow:0 -2px 8px rgba(16,24,40,.05);
}
.stickybar .inner{max-width:820px; margin:0 auto; width:100%; display:flex; gap:.6rem; align-items:center}

/* ---------- modal ---------- */
.modal{position:fixed; inset:0; background:rgba(17,24,39,.55); display:grid; place-items:center; z-index:60; padding:1rem}
.modal .box{background:#fff; border-radius:14px; max-width:900px; width:100%; max-height:90vh; overflow:auto; padding:1.2rem}
.modal .box.sm{max-width:460px}

/* ---------- map ---------- */
#map{height:70vh; border-radius:10px; border:1px solid var(--line); background:#fff}
.leaflet-container{background:#fff !important}
.mappin{display:grid; place-items:center; width:26px; height:26px; border-radius:50%; color:#fff; font-size:.68rem; font-weight:800; border:2px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.35)}

/* ---------- misc ---------- */
.kv{display:grid; grid-template-columns:150px 1fr; gap:.3rem .8rem; font-size:.87rem}
.kv dt{color:var(--muted); font-weight:600}
.kv dd{margin:0}
.spinner{width:16px;height:16px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
.spinner.dark{border-color:rgba(0,0,0,.15); border-top-color:var(--green-600)}
@keyframes spin{to{transform:rotate(360deg)}}
.stat{background:#fff;border:1px solid var(--line);border-radius:10px;padding:.7rem .85rem}
.stat b{display:block;font-size:1.5rem;line-height:1.1;color:var(--green)}
.stat span{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
@media print{.topbar,.stickybar,.btn,.steps{display:none !important} body{background:#fff} .card{box-shadow:none;break-inside:avoid}}

/* ---------- landing ---------- */
.landing{max-width:640px; margin:1.5rem auto}
.landing .lede{font-size:1.05rem; color:var(--muted); margin-bottom:1.2rem}
.needbox{background:var(--green-50); border:1px solid transparent; border-radius:var(--radius); padding:1rem 1.1rem; margin-bottom:1.2rem}
.needbox h2{font-size:.95rem; margin-bottom:.6rem}
.needlist{margin:0 0 .8rem; padding-left:1.1rem}
.needlist li{margin-bottom:.35rem}
.btn.lg{font-size:1rem; padding:.8rem 1.4rem; width:100%}
.helpline{margin-top:1rem; text-align:center}

/* ---------- progress ---------- */
.progress{margin-bottom:.9rem}
.progress-bar{height:6px; background:var(--line); border-radius:99px; overflow:hidden}
.progress-fill{height:100%; width:0; background:var(--green-500); border-radius:99px; transition:width .3s ease}
.progress-meta{display:flex; justify-content:space-between; font-size:.8rem; margin-top:.35rem; font-weight:600}
.needbox.compact{padding:.7rem .85rem; margin-bottom:1rem; font-size:.88rem}
/* the stepper scrolls rather than wrapping onto three lines on a phone */
.steps{display:flex; gap:.4rem; overflow-x:auto; scrollbar-width:none; padding-bottom:.3rem}
.steps::-webkit-scrollbar{display:none}
.steps>*{flex:0 0 auto}

/* ---------- office capture ---------- */
.officebar{
  background:var(--amber-50); border:1px solid var(--amber); color:var(--amber);
  border-radius:var(--radius); padding:.7rem .9rem; margin-bottom:1rem;
  font-size:.88rem; line-height:1.45;
}
.officebar b{display:block; font-size:.95rem; margin-bottom:.15rem}

/* ---------- estate-wide duplicate ID warning ---------- */
.dupwarn ul{margin:.4rem 0 .5rem; padding-left:1.1rem}
.dupwarn li{margin-bottom:.25rem}

/* ---------- resubmission diff ---------- */
.difflist{list-style:none; margin:0; padding:0}
.difflist li{padding:.4rem 0; border-bottom:1px solid var(--line)}
.difflist li:last-child{border-bottom:0}
.dtag{display:inline-block; font-size:.68rem; font-weight:700; text-transform:uppercase;
  padding:.1rem .4rem; border-radius:5px; margin-right:.45rem; letter-spacing:.3px}
.d-added .dtag{background:var(--green-50); color:var(--green-600)}
.d-removed .dtag{background:var(--red-50); color:var(--red)}
.d-changed .dtag{background:var(--amber-50); color:var(--amber)}
.difflist s{opacity:.65}
