/* TopHat CRE Listing Manager v4.2
   Brand: #184461 (dark navy) | #81a1b6 (light blue)
   Font: Inter 600 / -0.015em
*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ══════════════════════════════════════════
   LISTINGS INDEX  [tophat_listings]
══════════════════════════════════════════ */
.th-listings-index {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
    gap: 28px;
    padding: 24px 0 48px;
}
.th-no-listings { font-family:'Inter',sans-serif; color:#666; padding:20px 0; }

.th-listing-card {
    display:block; text-decoration:none; color:inherit;
    background:#fff; border-radius:12px; overflow:hidden;
    box-shadow:0 2px 16px rgba(0,0,0,.09);
    transition:transform .2s, box-shadow .2s;
}
.th-listing-card:hover { transform:translateY(-4px); box-shadow:0 8px 32px rgba(0,0,0,.15); text-decoration:none; color:inherit; }
.th-card-img-wrap { position:relative; height:210px; overflow:hidden; background:#184461; }
.th-card-img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.th-listing-card:hover .th-card-img { transform:scale(1.04); }
.th-card-img-placeholder { display:flex; align-items:center; justify-content:center; height:100%; font-size:48px; color:rgba(255,255,255,.3); }
.th-card-status { position:absolute; top:12px; left:12px; background:#184461; color:#fff; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; padding:4px 10px; border-radius:20px; }
.th-card-ca-badge { position:absolute; bottom:12px; left:12px; background:rgba(0,0,0,.55); color:#fff; font-size:11px; font-weight:600; padding:3px 10px; border-radius:20px; }
.th-card-body { padding:20px 22px 24px; }
.th-card-type { font-family:'Inter',sans-serif; font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:#81a1b6; margin:0 0 6px; }
.th-card-title { font-family:'Inter',sans-serif; font-weight:600; font-size:18px; letter-spacing:-0.01em; color:#184461; margin:0 0 8px; line-height:1.2; }
.th-card-location { font-family:'Inter',sans-serif; font-size:13px; color:#666; margin:0 0 14px; }
.th-card-meta { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.th-card-price { font-family:'Inter',sans-serif; font-weight:700; font-size:15px; color:#184461; }
.th-card-sf { font-family:'Inter',sans-serif; font-size:13px; color:#888; }
.th-card-cta { display:inline-block; background:#184461; color:#fff; font-family:'Inter',sans-serif; font-size:13px; font-weight:600; padding:8px 18px; border-radius:6px; transition:background .18s; }
.th-listing-card:hover .th-card-cta { background:#81a1b6; }

/* ══════════════════════════════════════════
   CA GATE PAGE
══════════════════════════════════════════ */
.tophat-ca-body { background:#dde4ea; min-height:100vh; margin:0; padding:40px 16px 60px; box-sizing:border-box; font-family:'Inter',sans-serif; }
.tophat-ca-wrap { max-width:640px; margin:0 auto; }
.tophat-ca-header { background:#81a1b6; border-radius:14px 14px 0 0; padding:44px 36px 38px; text-align:center; color:#fff; }
.tophat-ca-lock { font-size:40px; margin-bottom:18px; }
.tophat-ca-brand { font-family:'Inter',sans-serif; font-weight:600; font-size:13px; letter-spacing:.18em; text-transform:uppercase; color:rgba(255,255,255,.92); margin:0 0 12px; }
.tophat-ca-title { font-family:'Inter',sans-serif; font-weight:600; font-size:34px; letter-spacing:-0.015em; color:#fff; margin:0 0 14px; line-height:1.15; }
.tophat-ca-listing-name { font-family:'Inter',sans-serif; font-weight:600; font-size:16px; letter-spacing:.08em; text-transform:uppercase; color:rgba(255,255,255,.92); margin:0; }
.tophat-ca-card { background:#fff; border-radius:0 0 14px 14px; padding:36px 40px 40px; box-shadow:0 6px 32px rgba(0,0,0,.10); }
@media(max-width:520px){ .tophat-ca-card{padding:24px 18px;} .tophat-ca-title{font-size:26px;} }
.tophat-ca-notice { background:#fffbe6; border-left:4px solid #c9a227; border-radius:6px; padding:14px 18px; font-size:14px; line-height:1.6; color:#574300; margin-bottom:28px; }
.tophat-ca-error { background:#fff0f0; border-left:4px solid #c0392b; border-radius:6px; padding:12px 16px; color:#a00; font-size:14px; margin-bottom:18px; }
.tophat-ca-fields { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:30px; }
@media(max-width:520px){ .tophat-ca-fields{grid-template-columns:1fr;} }
.tophat-ca-fgroup label { display:block; font-family:'Inter',sans-serif; font-weight:600; font-size:13px; color:#333; margin-bottom:6px; }
.tophat-ca-fgroup label .req { color:#b00; }
.tophat-ca-fgroup input { width:100%; padding:11px 14px; background:#81a1b6; border:none; border-radius:8px; color:#fff; font-family:'Inter',sans-serif; font-size:14px; box-sizing:border-box; outline:none; transition:box-shadow .18s; }
.tophat-ca-fgroup input::placeholder { color:rgba(255,255,255,.72); }
.tophat-ca-fgroup input::-webkit-input-placeholder { color:rgba(255,255,255,.72); }
.tophat-ca-fgroup input::-moz-placeholder { color:rgba(255,255,255,.72); }
.tophat-ca-fgroup input:focus { box-shadow:0 0 0 3px rgba(24,68,97,.25); }
.tophat-ca-section-title { font-family:'Inter',sans-serif; font-weight:600; font-size:17px; letter-spacing:-0.01em; color:#184461; margin:0 0 12px; }
.tophat-ca-agreement-wrap { margin-bottom:28px; }
.tophat-ca-agreement-box { border:1px solid #d0dce6; border-radius:8px; padding:18px 20px; max-height:250px; overflow-y:auto; background:#f7fafc; }
.tophat-ca-agreement-heading { font-family:'Inter',sans-serif; font-weight:600; font-size:11px; letter-spacing:.09em; text-transform:uppercase; color:#81a1b6; margin:0 0 10px; }
.tophat-ca-agreement-body { font-size:13px; color:#444; line-height:1.7; }
.tophat-ca-sig-wrap { margin-bottom:26px; }
.tophat-ca-sig-note { font-size:13px; color:#555; line-height:1.6; margin:0 0 12px; }
.tophat-ca-sig-input { width:100%; padding:14px 16px; background:#81a1b6; border:none; border-radius:8px; color:#fff; font-family:'Inter',sans-serif; font-size:15px; box-sizing:border-box; outline:none; transition:box-shadow .18s; }
.tophat-ca-sig-input::placeholder { color:#fff; opacity:.8; }
.tophat-ca-sig-input::-webkit-input-placeholder { color:#fff; opacity:.8; }
.tophat-ca-sig-input::-moz-placeholder { color:#fff; opacity:.8; }
.tophat-ca-sig-input:focus { box-shadow:0 0 0 3px rgba(24,68,97,.25); }
.tophat-ca-submit-btn { display:block; width:100%; padding:16px; background:#184461; color:#fff; font-family:'Inter',sans-serif; font-weight:600; font-size:16px; border:none; border-radius:10px; cursor:pointer; transition:background .18s; margin-bottom:16px; }
.tophat-ca-submit-btn:hover { background:#0f2d42; }
.tophat-ca-submit-btn:disabled { opacity:.55; cursor:not-allowed; }
.tophat-ca-fine-print { font-size:12px; color:#aaa; text-align:center; line-height:1.5; margin:0; }

/* ══════════════════════════════════════════
   LISTING DETAIL PAGE
   Matches screenshot: #184461 hero + sidebar cards
══════════════════════════════════════════ */
.th-listing-page {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    color: #222;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ── Hero ── */
.th-hero {
    background: #184461;
    border-radius: 10px 10px 0 0;
    padding: 32px 36px 30px;
    margin-top: 20px;
    color: #fff;
}
.th-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}
.th-hero-left  { flex: 1 1 380px; }
.th-hero-right { display:flex; flex-direction:column; gap:20px; text-align:right; flex-shrink:0; }

.th-status-badge {
    display: inline-block;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.th-hero-type {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    margin: 0 0 8px;
}
.th-hero-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 38px;
    letter-spacing: -0.015em;
    line-height: 1.1;
    color: #fff;
    margin: 0 0 10px;
}
.th-hero-addr {
    font-size: 14px;
    color: rgba(255,255,255,.72);
    margin: 0 0 10px;
}
.th-hero-price {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 24px;
    letter-spacing: -0.01em;
    color: #fff;
    margin: 0 0 10px;
}
.th-hero-ca-badge {
    font-size: 12px;
    color: rgba(255,255,255,.5);
    margin: 0;
}

/* Stats: Building / Land / Year Built */
.th-hero-stat { text-align: right; }
.th-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    margin-bottom: 3px;
}
.th-stat-value {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: #fff;
}

/* ── Media row: gallery + map ── */
.th-media-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 320px;
    background: #000;
}
.th-gallery-wrap { position:relative; overflow:hidden; }
.th-gallery-main { position:relative; height:285px; overflow:hidden; }
.th-gallery-main img { width:100%; height:100%; object-fit:cover; display:block; }
.th-gallery-counter {
    position:absolute; top:12px; left:12px;
    background:rgba(0,0,0,.55); color:#fff;
    font-size:12px; font-weight:600; padding:3px 10px; border-radius:20px;
}
.th-gallery-thumbs { display:flex; gap:4px; padding:4px; background:#111; overflow-x:auto; }
.th-gallery-thumbs img { width:64px; height:50px; object-fit:cover; cursor:pointer; opacity:.6; border-radius:3px; flex-shrink:0; transition:opacity .18s; }
.th-gallery-thumbs img.active, .th-gallery-thumbs img:hover { opacity:1; }
.th-no-photo { display:flex; align-items:center; justify-content:center; height:320px; background:#1a2a38; color:#666; font-size:14px; }
.th-map-wrap { width:100%; min-height:320px; }
.th-map-empty { display:flex; align-items:center; justify-content:center; background:#eef2f5; color:#888; font-size:14px; padding:20px; text-align:center; }
@media(max-width:680px){
    .th-media-row { grid-template-columns:1fr; }
    .th-map-wrap { height:260px; }
}

/* ── Body row ── */
.th-body-row {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
    padding: 36px 0 0;
    align-items: start;
}
@media(max-width:740px){ .th-body-row { grid-template-columns:1fr; } }

/* Main column */
.th-section { margin-bottom: 36px; }
.th-section-heading {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: #184461;
    margin: 0 0 8px;
}
.th-rule { border:none; border-top:1px solid #dde4eb; margin:0 0 20px; }
.th-overview-body { font-size:15px; line-height:1.72; color:#444; }

/* Key highlights */
.th-highlights { list-style:none; padding:0; margin:0; }
.th-highlights li {
    font-size:14px; line-height:1.65; color:#333;
    padding:9px 0 9px 28px;
    position:relative;
    border-bottom:1px solid #f0f3f6;
}
.th-highlights li:last-child { border-bottom:none; }
.th-highlights li::before {
    content:'\2713';
    position:absolute; left:0; top:9px;
    color:#81a1b6;
    font-weight:700; font-size:14px;
}

/* ── Sidebar cards ── */
.th-sidebar { display:flex; flex-direction:column; gap:18px; }

.th-sidebar-card {
    background: #184461;
    border-radius: 10px;
    padding: 20px 22px;
    color: #fff;
}
.th-sidebar-card-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.52);
    margin: 0 0 16px;
}

/* Property details rows */
.th-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.th-detail-row:last-child { border-bottom:none; }
.th-detail-label { font-size:13px; color:rgba(255,255,255,.6); flex-shrink:0; }
.th-detail-val   { font-weight:600; font-size:13px; color:#fff; text-align:right; word-break:break-word; max-width:60%; }

/* Documents */
.th-doc-item { display:flex; align-items:center; gap:8px; padding:9px 0; }
.th-doc-icon { font-size:16px; flex-shrink:0; }
.th-doc-name { flex:1; font-size:13px; color:rgba(255,255,255,.85); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.th-doc-btn {
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .18s;
}
.th-doc-btn:hover { background:rgba(255,255,255,.28); color:#fff; }
.th-doc-secure { font-size:11px; color:rgba(255,255,255,.38); margin:2px 0 8px; }

/* Broker */
.th-broker-name  { font-weight:600; font-size:15px; color:#fff; margin:0 0 4px; }
.th-broker-title { font-size:12px; color:rgba(255,255,255,.55); margin:0 0 10px; }
.th-broker-contact { display:block; font-size:13px; color:rgba(255,255,255,.80); text-decoration:none; margin-bottom:3px; }
.th-broker-contact:hover { color:#fff; }
