:root{
  --bg:#f7f9fb; --panel:#ffffff; --panel2:#f0f4f8; --border:#e1e8ef;
  --text:#16212b; --muted:#64748b; --accent:#0b6fd1; --accent2:#c97a1e;
  --good:#1f9d63; --bad:#d64545;
}
*{box-sizing:border-box;}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text);}
header{border-bottom:1px solid var(--border);background:var(--panel);}
header .wrap{max-width:1100px;margin:0 auto;padding:14px 20px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;}
header .brand{font-weight:700;font-size:17px;letter-spacing:.02em;color:var(--text);text-decoration:none;cursor:pointer;}
header .brand span{color:var(--accent);}
header nav{display:flex;gap:10px;align-items:center;font-size:13px;color:var(--muted);}
header nav a, header nav button{color:var(--text);text-decoration:none;background:transparent;border:1px solid var(--border);padding:6px 10px;border-radius:6px;cursor:pointer;font-size:13px;}
main{max-width:1100px;margin:0 auto;padding:20px;}
.card{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:18px 20px;margin-bottom:16px;box-shadow:0 1px 2px rgba(16,40,60,.04);}
.card h2{margin:0 0 12px;font-size:15px;text-transform:uppercase;letter-spacing:.04em;color:var(--accent);}
.field{margin-bottom:10px;}
.field label{display:block;font-size:12px;color:var(--muted);margin-bottom:4px;}
.field input, .field select, .field textarea{width:100%;padding:8px 10px;background:var(--panel2);border:1px solid var(--border);border-radius:6px;color:var(--text);font-size:13px;font-family:inherit;}

/* Highlights a required field that was left empty/invalid on save — cleared automatically
   the moment the user interacts with it again. */
input.field-invalid, select.field-invalid, textarea.field-invalid{
  border-color:var(--bad) !important;
  box-shadow:0 0 0 2px rgba(214,69,69,.15);
}
/* Non-input containers (e.g. the boundary courses list) get an outline instead of a border. */
div.field-invalid{outline:2px solid var(--bad);outline-offset:2px;border-radius:8px;}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;}
/* .btn styling applies by class alone (not scoped to the <button> element) so an
   <a class="btn ...">, like the "Back to search" link on the public record page, gets
   the same box/border treatment as a real button instead of rendering as bare text. */
.btn{cursor:pointer;border:1px solid var(--border);background:var(--panel2);color:var(--text);padding:9px 16px;border-radius:7px;font-size:13px;display:inline-block;text-decoration:none;}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600;}
.btn.ghost{background:transparent;}
.btn.danger{color:var(--bad);}
.btn.good{background:var(--good);border-color:var(--good);color:#fff;font-weight:600;}
button.btn:disabled{opacity:.5;cursor:not-allowed;}
.note{font-size:12px;color:var(--muted);line-height:1.5;margin-top:6px;}
.error{color:var(--bad);font-size:13px;margin:8px 0;}
.success{color:var(--good);font-size:13px;margin:8px 0;}
.badge{display:inline-flex;align-items:center;padding:2px 9px;border-radius:100px;font-size:11px;font-weight:600;letter-spacing:.03em;}
.badge.verified{background:rgba(31,157,99,.12);color:var(--good);border:1px solid rgba(31,157,99,.35);}
.badge.unverified{background:rgba(201,122,30,.12);color:var(--accent2);border:1px solid rgba(201,122,30,.35);}
.badge.pending{background:rgba(11,111,209,.12);color:var(--accent);border:1px solid rgba(11,111,209,.35);}
.badge.rejected{background:rgba(214,69,69,.12);color:var(--bad);border:1px solid rgba(214,69,69,.35);}
/* Partial verification (1-2 of 3 points verified, nothing currently pending) — its own
   color so it reads distinctly from "unverified" (nothing done yet) and "pending" (mid-review). */
.badge.partial{background:rgba(107,70,193,.12);color:#6b46c1;border:1px solid rgba(107,70,193,.35);}

/* Per-verification-point badges (Deed / Letter of Administration / Court Decree) — each
   type gets its own fixed color + icon regardless of status, so the three are easy to
   tell apart at a glance. Status layers on top: solid border = verified, dashed = pending
   review, red inset ring = rejected. */
.badge.vp-badge{gap:4px;}
.vp-icon{width:13px;height:13px;flex:0 0 auto;display:inline-block;}
.badge.vp-deed{background:rgba(79,70,229,.12);color:#4f46e5;border:1px solid rgba(79,70,229,.4);}
.badge.vp-letter_of_administration{background:rgba(13,148,136,.12);color:#0d9488;border:1px solid rgba(13,148,136,.4);}
.badge.vp-court_decree{background:rgba(161,98,7,.12);color:#a16207;border:1px solid rgba(161,98,7,.4);}
.badge.vp-badge.vp-pending{border-style:dashed;}
.badge.vp-badge.vp-rejected{box-shadow:inset 0 0 0 1px var(--bad);}

.stamp{display:inline-flex;align-items:center;gap:5px;padding:3px 10px 3px 7px;border-radius:100px;font-size:11px;font-weight:700;letter-spacing:.03em;background:linear-gradient(135deg,#2ec27e,#1f9d63);color:#fff;}
.stamp-icon{width:14px;height:14px;flex:0 0 auto;display:inline-block;vertical-align:-2px;margin-right:4px;}
.banner{background:rgba(201,122,30,.10);border:1px solid rgba(201,122,30,.35);color:#8a5416;padding:12px 16px;border-radius:8px;margin-bottom:16px;font-size:13px;}
.banner.info{background:rgba(11,111,209,.08);border-color:rgba(11,111,209,.3);color:var(--accent);}
table.list{width:100%;border-collapse:collapse;font-size:13px;}
table.list th, table.list td{text-align:left;padding:10px 8px;border-bottom:1px solid var(--border);}
table.list th{color:var(--muted);font-weight:500;font-size:11px;text-transform:uppercase;}
table.list tr:hover{background:var(--panel2);cursor:pointer;}
.course-row{display:grid;grid-template-columns:60px 70px 60px 1fr 34px;gap:8px;align-items:center;margin-bottom:6px;}
.course-row select, .course-row input{padding:6px 6px;background:var(--panel2);border:1px solid var(--border);border-radius:6px;color:var(--text);font-size:12px;}
.course-row .rm{background:transparent;border:none;color:var(--bad);cursor:pointer;font-size:16px;}
#map, #mapDetail, #mapPublic{height:380px;border-radius:8px;border:1px solid var(--border);margin-top:10px;}

/* Verification points list (owner's property detail page): a row per point (Deed / Letter
   of Administration / Court Decree) with a status badge or a "Request Review" button on
   the right — reuses .stat's layout, just needs the action area to hold either. */
.vp-row{align-items:center;}
.vp-action{display:flex;align-items:center;gap:8px;}

/* Public record page: hero area toggles between the map and a selected photo/video,
   with a thumbnail strip (including a "Map" thumbnail to switch back) underneath. */
#pub_photoView{height:380px;border-radius:8px;border:1px solid var(--border);background:#000;overflow:hidden;display:flex;align-items:center;justify-content:center;}
#pub_photoView img, #pub_photoView video{width:100%;height:100%;object-fit:contain;}
.pub-thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto;padding-bottom:2px;}
.pub-thumb{flex:0 0 auto;width:76px;height:58px;border-radius:6px;overflow:hidden;cursor:pointer;border:2px solid transparent;position:relative;background:#000;}
.pub-thumb img, .pub-thumb video{width:100%;height:100%;object-fit:cover;display:block;}
.pub-thumb.active{border-color:var(--accent);}
.pub-thumb-map{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--panel2);color:var(--muted);font-size:16px;}
.pub-thumb .play-badge{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:15px;text-shadow:0 0 4px rgba(0,0,0,.7);pointer-events:none;}
/* Per-point verification badges on the public page — small row of 3 badges below the
   headline stats, each with a hover title summarizing what's been checked. */
.pub-verification{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;}
.pub-vp-badge{cursor:default;}
.stat{display:flex;justify-content:space-between;font-size:13px;padding:5px 0;border-bottom:1px dashed var(--border);}
.stat:last-child{border-bottom:none;}
.stat b{color:#0f3a5f;}
.codebox{display:flex;align-items:center;gap:10px;background:var(--panel2);border:1px solid var(--border);border-radius:8px;padding:12px 14px;font-family:monospace;font-size:16px;}
.muted{color:var(--muted);}
.center{text-align:center;}
.hidden{display:none !important;}
a.link{color:var(--accent);}
.docrow{display:flex;justify-content:space-between;font-size:13px;padding:6px 0;border-bottom:1px solid var(--border);}
.small{font-size:11px;color:var(--muted);}
.tabs{display:flex;gap:8px;margin-bottom:16px;border-bottom:1px solid var(--border);}
.tabs button{background:transparent;border:none;color:var(--muted);padding:10px 4px;cursor:pointer;font-size:13px;border-bottom:2px solid transparent;}
.tabs button.active{color:var(--accent);border-bottom-color:var(--accent);}
.resultcard{border:1px solid var(--border);border-radius:8px;padding:12px 14px;margin-bottom:10px;background:var(--panel2);}
.resultcard .top{display:flex;justify-content:space-between;align-items:center;}

/* Zillow-style search result cards: grid of photo-topped cards, a colored status pill
   overlaid on the photo, a bold headline (acreage), a stats line, and a small meta line —
   click through to the public record page. */
.listing-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px;}
.listing-card{background:var(--panel);border:1px solid var(--border);border-radius:10px;overflow:hidden;cursor:pointer;box-shadow:0 1px 2px rgba(16,40,60,.04);transition:box-shadow .15s,transform .15s;}
.listing-card:hover{box-shadow:0 4px 14px rgba(16,40,60,.10);transform:translateY(-1px);}
.listing-photo-wrap{position:relative;}
.listing-photo{width:100%;height:190px;object-fit:cover;display:block;background:#000;}
.listing-photo-empty{width:100%;height:190px;display:flex;align-items:center;justify-content:center;background:var(--panel2);color:var(--muted);font-size:12px;}
.listing-pill{position:absolute;top:10px;left:10px;padding:4px 10px;border-radius:100px;font-size:11px;font-weight:700;letter-spacing:.02em;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);}
.listing-pill.verified{background:var(--good);}
.listing-pill.pending{background:var(--accent);}
.listing-pill.unverified{background:var(--accent2);}
.listing-pill.partial{background:#6b46c1;}
.listing-pill.rejected{background:var(--bad);}
.listing-body{padding:12px 14px;}
.listing-headline{font-size:19px;font-weight:800;color:var(--text);}
.listing-stats{font-size:13px;color:var(--text);margin-top:3px;}
.listing-meta{font-size:11.5px;color:var(--muted);margin-top:5px;}
.listing-meta code{font-family:monospace;}
.listing-card.active{box-shadow:0 0 0 2px var(--accent),0 4px 14px rgba(16,40,60,.10);transform:translateY(-1px);}

/* Browse page: Zillow-style split map/list view. Previously main.wide widened this route
   to 1440px — that made it visibly wider than every other page and out of alignment with
   the header/rest of the site, so it now matches the site's standard 1100px column
   instead of getting its own special width. */
main.wide{max-width:1100px;}
.split-view{display:flex;gap:18px;align-items:flex-start;margin-top:14px;}
.split-list{flex:1 1 340px;min-width:280px;max-height:calc(100vh - 220px);overflow-y:auto;display:flex;flex-direction:column;gap:14px;padding-right:4px;}
.split-list .listing-card{flex:0 0 auto;}
.split-map-wrap{flex:1 1 400px;position:sticky;top:88px;height:calc(100vh - 220px);min-height:360px;border-radius:10px;overflow:hidden;border:1px solid var(--border);}
#b_map{width:100%;height:100%;}
.map-pin{width:16px;height:16px;border-radius:100px;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.4);cursor:pointer;transition:transform .12s;}
.map-pin.verified{background:var(--good);}
.map-pin.pending{background:var(--accent);}
.map-pin.unverified{background:var(--accent2);}
.map-pin.partial{background:#6b46c1;}
.map-pin.rejected{background:var(--bad);}
.map-pin-active{transform:scale(1.35);}
.map-popup{min-width:170px;}
.map-popup-photo{width:100%;height:100px;object-fit:cover;border-radius:6px;display:block;margin-bottom:6px;background:#000;}
.map-popup-headline{font-weight:800;font-size:15px;color:var(--text);}
.map-popup-meta{font-size:11.5px;color:var(--muted);margin:3px 0 6px;}
.map-popup-meta code{font-family:monospace;}
.map-popup a{font-size:12.5px;font-weight:600;}
@media (max-width:860px){
  .split-view{flex-direction:column;}
  .split-map-wrap{position:static;width:100%;height:280px;}
  .split-list{max-height:none;overflow:visible;width:100%;}
}

/* Admin dashboard overview numbers */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;}
.stat-box{background:var(--panel2);border:1px solid var(--border);border-radius:8px;padding:12px 14px;text-align:center;}
.stat-box .num{font-size:22px;font-weight:700;color:var(--accent);}
.stat-box .label{font-size:11px;color:var(--muted);margin-top:2px;}
.stat-box.wide{grid-column:1/-1;text-align:left;}
.stat-box.wide .wide-value{margin-top:4px;font-size:13px;color:var(--text);}
.dropzone{border:2px dashed var(--border);border-radius:8px;padding:20px 14px;text-align:center;cursor:pointer;background:var(--panel2);transition:border-color .15s,background .15s;}
.dropzone p{margin:2px 0;font-size:13px;}
.dropzone.drag{border-color:var(--accent);background:rgba(11,111,209,.06);}
.linklike{background:none;border:none;padding:0;color:var(--accent);cursor:pointer;font-size:13px;text-decoration:underline;}
.dz-filename{color:var(--good);margin-top:8px;}

/* Property Photos & Drone Video gallery */
.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin-top:10px;}
.media-item{border:1px solid var(--border);border-radius:8px;overflow:hidden;background:var(--panel2);}
.media-item .thumb{width:100%;height:120px;object-fit:cover;display:block;background:#000;}
.media-item .meta{padding:8px 10px;}
.media-item .meta .caption{font-size:12px;color:var(--text);margin-bottom:2px;word-break:break-word;}
.media-item .meta .stamp-date{font-size:11px;color:var(--muted);}

/* Locked-field indicator next to Grantee/Grantor/Coordinate source */
.lock{font-size:11px;opacity:.6;cursor:help;}

/* "Continue with Google/Facebook" buttons */
#oauthButtons{display:flex;flex-direction:column;gap:10px;margin-bottom:6px;}
button.btn.oauth{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:10px 16px;font-weight:600;font-size:13.5px;}
button.btn.oauth.google{background:#fff;border:1px solid var(--border);color:#3c4043;}
button.btn.oauth.google:hover{background:var(--panel2);}
button.btn.oauth.facebook{background:#1877F2;border-color:#1877F2;color:#fff;}
button.btn.oauth.facebook:hover{background:#166fe0;}
.divider{display:flex;align-items:center;gap:10px;margin:16px 0;color:var(--muted);font-size:12px;}
.divider::before, .divider::after{content:"";flex:1;height:1px;background:var(--border);}

/* Collapsible "Change History" section */
details#auditDetails summary{cursor:pointer;list-style:none;}
details#auditDetails summary::-webkit-details-marker{display:none;}
details#auditDetails summary::before{content:"▸ ";color:var(--muted);font-size:12px;}
details#auditDetails[open] summary::before{content:"▾ ";}

/* Change-history timeline: a vertical line of colored dots, click to expand */
.timeline{position:relative;margin-top:14px;padding-left:22px;}
.timeline::before{content:"";position:absolute;left:5px;top:4px;bottom:4px;width:2px;background:var(--border);}
.tl-row{position:relative;padding:8px 0 8px 14px;cursor:pointer;}
.tl-row:hover .tl-label{color:var(--accent);}
.tl-dot{position:absolute;left:-22px;top:12px;width:11px;height:11px;border-radius:100px;border:2px solid var(--panel);box-shadow:0 0 0 1px var(--border);}
.tl-dot.owner{background:var(--good);}
.tl-dot.admin{background:var(--accent);}
.tl-dot.system, .tl-dot.public{background:var(--muted);}
.tl-label{font-size:13px;font-weight:500;}
.timeline-detail{margin-top:12px;padding:14px 16px;background:var(--panel2);border:1px solid var(--border);border-radius:8px;}
/* Detail shown inline right under the entry that was clicked, instead of at the bottom
   of the whole list — tighter spacing since it sits directly beneath its own row. */
.tl-inline-detail{margin:0 0 10px;}

/* Boundary measurement labels on the map (Leaflet divIcon) */
.measure-label span{
  display:inline-block;background:rgba(255,255,255,.92);color:#16212b;font-size:10.5px;font-weight:600;
  padding:2px 6px;border-radius:4px;border:1px solid rgba(0,0,0,.15);white-space:nowrap;
  transform:translate(-50%,-50%);box-shadow:0 1px 3px rgba(0,0,0,.15);
}

.surveyor-shell{display:flex;gap:20px;align-items:flex-start;}
.surveyor-sidebar{flex:0 0 220px;background:var(--panel);border:1px solid var(--border);border-radius:10px;overflow:hidden;}
.surveyor-sidebar a, .surveyor-sidebar button.surveyor-nav-item{display:block;width:100%;text-align:left;padding:13px 18px;font-size:13.5px;color:var(--text);text-decoration:none;background:transparent;border:none;border-bottom:1px solid var(--border);cursor:pointer;}
.surveyor-sidebar a:last-child, .surveyor-sidebar button.surveyor-nav-item:last-child{border-bottom:none;}
.surveyor-sidebar a.active, .surveyor-sidebar button.surveyor-nav-item.active{background:var(--panel2);font-weight:600;color:var(--accent);}
.surveyor-sidebar a:hover, .surveyor-sidebar button.surveyor-nav-item:hover{background:var(--panel2);}
.surveyor-content{flex:1;min-width:0;}
.surveyor-photo-row{display:flex;gap:16px;align-items:center;margin-bottom:14px;}
.surveyor-photo{width:96px;height:96px;border-radius:100px;object-fit:cover;border:2px solid var(--border);display:block;background:var(--panel2);}
.surveyor-photo-empty{width:96px;height:96px;border-radius:100px;display:flex;align-items:center;justify-content:center;background:var(--panel2);color:var(--muted);font-size:11px;text-align:center;border:2px dashed var(--border);}
@media (max-width:720px){ .surveyor-shell{flex-direction:column;} .surveyor-sidebar{flex:0 0 auto;width:100%;display:flex;overflow-x:auto;} .surveyor-sidebar a, .surveyor-sidebar button.surveyor-nav-item{border-bottom:none;border-right:1px solid var(--border);white-space:nowrap;} }
