:root{
  --navy:#1f2f55; --navy-2:#2b3f6e; --red:#c8202f; --red-d:#a3172a; --gold:#f5c542;
  --bg:#f6f7fa; --card:#fff; --ink:#1b2233; --muted:#5f6b80; --line:#dfe3ea;
  --ok:#1e7d4f; --ok-bg:#e4f4ec; --warn:#9a6200; --warn-bg:#fff3d6; --bad:#b3261e; --bad-bg:#fde7e5;
  --r:10px; --shadow:0 1px 2px rgba(20,30,60,.06),0 4px 16px rgba(20,30,60,.06);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg)}
a{color:var(--navy-2)}
h1,h2,h3{line-height:1.2;margin:0 0 .5em;color:var(--navy)}
h1{font-size:clamp(1.6rem,4vw,2.3rem)} h2{font-size:1.35rem} h3{font-size:1.08rem}
.wrap{max-width:1120px;margin:0 auto;padding:0 16px}
.muted{color:var(--muted)} .small{font-size:.875rem}
.right{text-align:right}

/* top bar */
.topbar{background:#fff;border-bottom:3px solid var(--red);position:sticky;top:0;z-index:5}
.topbar-in{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;flex-wrap:wrap}
.topbar nav{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.topbar nav a{text-decoration:none;color:var(--navy);font-weight:600;font-size:.95rem}
.logo{display:flex;align-items:center;gap:10px;text-decoration:none}
.logo-img{height:44px;width:auto}
.logo-text{display:flex;flex-direction:column;line-height:1;color:var(--navy)}
.logo-text b{font-size:1.2rem;letter-spacing:.06em}
.logo-text small{font-size:.66rem;letter-spacing:.24em;color:var(--red);font-weight:700;margin-top:3px}
.badge-bo{background:var(--navy);color:#fff;font-size:.7rem;padding:3px 8px;border-radius:99px;font-weight:700;letter-spacing:.04em}
.admin-bar{border-bottom-color:var(--navy)}

/* buttons */
.btn{display:inline-block;background:var(--red);color:#fff!important;border:0;border-radius:8px;padding:12px 20px;font-weight:700;font-size:1rem;text-decoration:none;cursor:pointer;font-family:inherit}
.btn:hover{background:var(--red-d)}
.btn-navy{background:var(--navy)} .btn-navy:hover{background:var(--navy-2)}
.btn-ghost{background:#fff;color:var(--navy)!important;border:1px solid var(--line)} .btn-ghost:hover{background:#eef1f6}
.btn-sm{padding:7px 12px;font-size:.875rem}
.btn-block{display:block;width:100%;text-align:center}
.linkbtn{background:none;border:0;color:var(--navy-2);text-decoration:underline;cursor:pointer;padding:0;font:inherit}

/* hero */
.hero{background:linear-gradient(135deg,var(--navy) 0%,var(--navy-2) 100%);color:#fff;padding:48px 0 56px}
.hero h1{color:#fff} .hero p{font-size:1.1rem;opacity:.9;max-width:620px;margin:0}
.section{padding-top:36px;padding-bottom:36px}

/* cards */
.grid{display:grid;gap:20px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.card{background:var(--card);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden}
.card-pad{padding:20px}
.listing .ph{aspect-ratio:16/10;background:#dfe4ee center/cover no-repeat;position:relative}
.listing .ph.empty{display:flex;align-items:center;justify-content:center;color:var(--muted)}
.price{font-size:1.5rem;font-weight:800;color:var(--navy)} .price small{font-size:.9rem;font-weight:600;color:var(--muted)}
.facts{display:flex;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:.92rem;margin:4px 0 10px}
.tag{position:absolute;left:12px;top:12px;background:var(--red);color:#fff;font-size:.75rem;font-weight:700;padding:4px 10px;border-radius:99px}
.steps{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.step b{display:inline-flex;width:32px;height:32px;border-radius:50%;background:var(--red);color:#fff;align-items:center;justify-content:center;margin-bottom:8px}

/* property page */
.gallery{display:grid;gap:8px;grid-template-columns:2fr 1fr;grid-auto-rows:180px}
.gallery a{background:#dfe4ee center/cover no-repeat;border-radius:8px;display:block}
.gallery a:first-child{grid-row:span 2}
.prop-layout{display:grid;gap:24px;grid-template-columns:1fr 340px;align-items:start}
.factlist{display:grid;grid-template-columns:1fr 1fr;gap:10px 18px;margin:0}
.factlist div{border-bottom:1px solid var(--line);padding:6px 0}
.factlist dt{font-size:.8rem;color:var(--muted)} .factlist dd{margin:0;font-weight:600}
.sticky{position:sticky;top:84px}

/* forms */
form .sec{background:#fff;border-radius:var(--r);box-shadow:var(--shadow);padding:20px;margin-bottom:18px}
form .sec h2{border-bottom:2px solid var(--red);padding-bottom:8px;margin-bottom:14px;font-size:1.15rem}
.row{display:grid;gap:12px 16px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin-bottom:12px}
label{display:block;font-weight:600;font-size:.9rem;margin-bottom:4px}
label .req{color:var(--red)}
input[type=text],input[type=email],input[type=tel],input[type=date],input[type=number],input[type=password],input[type=search],select,textarea{
  width:100%;padding:10px 12px;border:1px solid #c9cfda;border-radius:8px;font:inherit;background:#fff;color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:2px solid var(--navy-2);outline-offset:0;border-color:var(--navy-2)}
textarea{min-height:80px;resize:vertical}
.check{display:flex;gap:10px;align-items:flex-start;font-weight:500}
.check input{margin-top:4px;width:18px;height:18px;flex:none}
.radios{display:flex;gap:18px} .radios label{display:flex;gap:6px;align-items:center;font-weight:500}
.help{font-size:.82rem;color:var(--muted);margin-top:3px}
.legal{background:#f3f5f9;border-left:4px solid var(--navy);padding:12px 14px;font-size:.9rem;border-radius:6px}
.err-list{background:var(--bad-bg);color:var(--bad);border-radius:8px;padding:12px 16px 12px 32px;margin-bottom:16px}
.hide{display:none}
.hp{position:absolute;left:-9999px}

/* flashes */
.flash{padding:12px 16px;border-radius:8px;margin:16px 0;font-weight:600}
.flash-ok{background:var(--ok-bg);color:var(--ok)} .flash-err{background:var(--bad-bg);color:var(--bad)} .flash-info{background:#e7eefb;color:var(--navy)}

/* doc portal */
.doc-item{display:flex;gap:16px;justify-content:space-between;align-items:flex-start;padding:16px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}
.doc-item:last-child{border-bottom:0}
.doc-item .info{flex:1 1 260px}
.doc-item .act{flex:1 1 260px}
.filelist{list-style:none;padding:0;margin:6px 0 0;font-size:.88rem}
.filelist li{padding:2px 0}
input[type=file]{width:100%;font-size:.9rem;padding:8px;border:1px dashed #aab3c4;border-radius:8px;background:#fafbfd}

/* pills */
.pill{display:inline-flex;align-items:center;gap:4px;font-size:.75rem;font-weight:700;padding:3px 9px;border-radius:99px;white-space:nowrap}
.pill.missing{background:var(--bad-bg);color:var(--bad)}
.pill.uploaded{background:var(--warn-bg);color:var(--warn)}
.pill.verified{background:var(--ok-bg);color:var(--ok)}
.st{font-size:.75rem;font-weight:700;padding:3px 9px;border-radius:6px;background:#e7eefb;color:var(--navy);white-space:nowrap}
.st-new{background:#e7eefb;color:var(--navy)} .st-missing{background:var(--bad-bg);color:var(--bad)}
.st-review{background:var(--warn-bg);color:var(--warn)} .st-approved{background:var(--ok-bg);color:var(--ok)}
.st-denied,.st-withdrawn{background:#eceef2;color:#555}

/* admin */
.admin-main{padding-top:20px;padding-bottom:60px}
.stats{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));margin-bottom:18px}
.stat{background:#fff;border-radius:var(--r);box-shadow:var(--shadow);padding:14px 16px;text-decoration:none;color:inherit;border-top:3px solid var(--navy)}
.stat b{display:block;font-size:1.6rem;color:var(--navy)} .stat span{font-size:.85rem;color:var(--muted)}
.stat.alert{border-top-color:var(--red)}
.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px;align-items:end}
.filters > *{flex:1 1 160px} .filters .btn{flex:0 0 auto}
.table-wrap{overflow-x:auto;background:#fff;border-radius:var(--r);box-shadow:var(--shadow)}
table{width:100%;border-collapse:collapse;font-size:.92rem}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:middle}
th{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);background:#fafbfc}
tr:hover td{background:#fafbfd}
td .pills{display:flex;gap:4px;flex-wrap:wrap}
.two-col{display:grid;gap:20px;grid-template-columns:minmax(0,1fr) 360px;align-items:start}
.panel{background:#fff;border-radius:var(--r);box-shadow:var(--shadow);padding:18px;margin-bottom:18px}
.panel h2{font-size:1.05rem;margin-bottom:12px}
.kv{display:grid;grid-template-columns:180px 1fr;gap:6px 14px;font-size:.92rem;margin:0}
.kv dt{color:var(--muted)} .kv dd{margin:0;word-break:break-word}
.chk-row{border:1px solid var(--line);border-radius:8px;padding:12px;margin-bottom:10px}
.chk-row.verified{border-color:#9fd6b9;background:#f6fcf9}
.chk-row.missing{border-color:#f2b8b3}
.chk-head{display:flex;justify-content:space-between;gap:8px;align-items:center}
.chk-row ul{list-style:none;margin:8px 0 0;padding:0;font-size:.88rem}
.chk-row li{display:flex;justify-content:space-between;gap:8px;padding:3px 0}
.progress{height:8px;background:#e8ebf1;border-radius:99px;overflow:hidden;margin:6px 0 2px}
.progress i{display:block;height:100%;background:var(--ok)}
.timeline{list-style:none;margin:0;padding:0;font-size:.85rem;max-height:320px;overflow:auto}
.timeline li{padding:6px 0;border-bottom:1px dashed var(--line)}
.note{background:#fbfaf3;border:1px solid #efe8c8;border-radius:8px;padding:10px;margin-bottom:8px;font-size:.92rem;white-space:pre-wrap}
.inline{display:inline}
.thumbs{display:flex;gap:10px;flex-wrap:wrap}
.thumbs figure{margin:0;width:150px} .thumbs img{width:150px;height:100px;object-fit:cover;border-radius:6px;display:block}
.login-box{max-width:400px;margin:60px auto}
.foot{background:var(--navy);color:#cfd6e6;padding:28px 0;margin-top:40px;font-size:.92rem}
.foot a{color:#fff} .foot-in{display:flex;gap:24px;justify-content:space-between;flex-wrap:wrap}
.foot strong{color:#fff} .foot .muted{color:#aeb8cf}

@media (max-width:860px){
  .prop-layout,.two-col{grid-template-columns:1fr}
  .sticky{position:static}
  .gallery{grid-template-columns:1fr;grid-auto-rows:220px} .gallery a:first-child{grid-row:auto}
  .gallery a:nth-child(n+3){display:none}
  .kv{grid-template-columns:1fr} .kv dt{margin-top:6px}
  .topbar nav{gap:12px} .public .topbar nav a:not(.btn){display:none} .topbar-in{flex-wrap:nowrap}
}
@media print{
  .topbar,.foot,.noprint{display:none!important}
  body{background:#fff} .panel,.card{box-shadow:none;border:1px solid #ccc}
}
