:root {
    --pl-navy: #1F3864;
    --pl-blue: #2E74B5;
    --pl-gold: #F2B705;
    --bs-primary: #2E74B5;
    --bs-primary-rgb: 46, 116, 181;
    --bs-link-color: #2E74B5;
    --bs-link-color-rgb: 46, 116, 181;
}

body { background: #f6f8fb; }

.pl-navbar { background: var(--pl-navy); }
.btn-primary { --bs-btn-bg: var(--pl-blue); --bs-btn-border-color: var(--pl-blue); --bs-btn-hover-bg: var(--pl-navy); --bs-btn-hover-border-color: var(--pl-navy); }
.btn-outline-primary { --bs-btn-color: var(--pl-blue); --bs-btn-border-color: var(--pl-blue); --bs-btn-hover-bg: var(--pl-blue); --bs-btn-hover-border-color: var(--pl-blue); }

.pl-hero { background: linear-gradient(135deg, var(--pl-navy) 0%, var(--pl-blue) 100%); }
.pl-price { color: var(--pl-navy); }

.listing-card { transition: transform .15s ease, box-shadow .15s ease; border: 0; }
.listing-card:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.25rem rgba(31, 56, 100, .12) !important; }
.listing-cover img, .listing-cover > div { width: 100%; height: 100%; }

.pl-map { height: 340px; }
.pl-map-sm { height: 260px; }

.pl-dropzone { border: 2px dashed #b8c7da; background: #fbfdff; cursor: pointer; }
.pl-dropzone:hover { border-color: var(--pl-blue); }

.role-option { cursor: pointer; }
.role-option:has(input:checked) { border-color: var(--pl-blue) !important; background: #eef5fc; }

.pl-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--pl-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.min-w-0 { min-width: 0; }

.pl-thread { height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; background: #fafbfd; }
.pl-msg { max-width: 75%; }
.pl-msg.mine { align-self: flex-end; text-align: right; }
.pl-msg.theirs { align-self: flex-start; }
.pl-bubble { display: inline-block; padding: .6rem .9rem; border-radius: 1rem; white-space: pre-line; text-align: left; }
.pl-msg.mine .pl-bubble { background: var(--pl-blue); color: #fff; border-bottom-right-radius: .25rem; }
.pl-msg.theirs .pl-bubble { background: #fff; border: 1px solid #e3e8ef; border-bottom-left-radius: .25rem; }
.pl-meta { font-size: .75rem; color: #6c757d; margin-top: .2rem; }

.pl-unread { background: #eef5fc; border-left: 3px solid var(--pl-blue); }

.pl-quick { transition: transform .15s ease; }
.pl-quick:hover { transform: translateY(-2px); }

/* ---------- Footer ---------- */
.pl-footer { background: var(--pl-navy); color: #e8eef7; }
.pl-footer-muted { color: #aebdd3; }
.pl-footer-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--pl-gold); margin-bottom: 1rem; font-weight: 600; }
.pl-footer-links li { margin-bottom: .5rem; }
.pl-footer-links a { color: #e8eef7; text-decoration: none; }
.pl-footer-links a:hover { color: #fff; text-decoration: underline; }
.pl-footer-contact li { display: flex; gap: .5rem; color: #e8eef7; font-size: .925rem; }
.pl-footer-contact i { color: var(--pl-gold); margin-top: .15rem; }
.pl-social-icon { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; transition: background .15s ease; }
.pl-social-icon:hover { background: var(--pl-blue); color: #fff; }
.pl-footer-pill { background: rgba(255,255,255,.1); color: #e8eef7; font-weight: 500; }
.pl-footer-bottom { background: rgba(0,0,0,.18); color: #e8eef7; }
.pl-footer-bottom a { color: var(--pl-gold); }

/* ---------- Info pages ---------- */
.pl-page-hero { background: linear-gradient(135deg, var(--pl-navy) 0%, var(--pl-blue) 100%); color: #fff; border-radius: 1rem; padding: 2.5rem; margin-bottom: 2rem; }
.pl-step { width: 44px; height: 44px; border-radius: 50%; background: var(--pl-blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }

/* ---------- Sharing & WhatsApp ---------- */
.pl-share-btn { color: #fff; border: 0; }
.pl-share-btn:hover { color: #fff; filter: brightness(.92); }
.pl-share-whatsapp { background: #25d366; }
.pl-share-facebook { background: #1877f2; }
.pl-share-x { background: #111; }
.pl-share-linkedin { background: #0a66c2; }
.pl-share-telegram { background: #229ed9; }
.pl-btn-whatsapp { background: #25d366; border-color: #25d366; }
.pl-btn-whatsapp:hover { background: #1ebe5b; border-color: #1ebe5b; }
.pl-whatsapp-float { position: fixed; left: 1.25rem; bottom: 1.25rem; z-index: 1030; width: 56px; height: 56px; border-radius: 50%;
    background: #25d366; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.75rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.25); text-decoration: none; transition: transform .15s ease; }
.pl-whatsapp-float:hover { color: #fff; transform: scale(1.06); }

/* ---------- Investments & projects ---------- */
.pl-invest-band { background: linear-gradient(135deg, #0f2a4a 0%, #1f3864 60%, #2e5c8a 100%); color: #fff; border-radius: 1rem; }
.pl-invest-band .text-muted-light { color: #c3d2e6; }
.pl-progress-thin { height: .5rem; }
.pl-risk-Low { background: #d1f0dc; color: #14532d; }
.pl-risk-Medium { background: #fff1c2; color: #7a5300; }
.pl-risk-High { background: #fbd5d5; color: #7f1d1d; }
.pl-cover { object-fit: cover; }
.pl-milestone { border-left: 3px solid #dee2e6; padding-left: 1rem; position: relative; }
.pl-milestone::before { content: ""; position: absolute; left: -8px; top: .35rem; width: 13px; height: 13px; border-radius: 50%; background: #dee2e6; }
.pl-milestone.done { border-color: #198754; }
.pl-milestone.done::before { background: #198754; }

/* ---------- Listing your property ---------- */
.pl-fee-check { border-left: 4px solid #dee2e6; }
.pl-fee-check.ok { border-color: #198754; background: #f0faf4; }
.pl-fee-check.warn { border-color: #ffc107; background: #fffaeb; }
.pl-fee-check.block { border-color: #dc3545; background: #fdf1f2; }
.pl-quality-list li { font-size: .85rem; }
.pl-demo-card { transition: box-shadow .15s ease, transform .15s ease; }
.pl-demo-card:hover { box-shadow: 0 .5rem 1rem rgba(0,0,0,.08); transform: translateY(-1px); }

/* ---------- AI assistant chat ---------- */
.pl-chat-launcher { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1040; border: 0; border-radius: 28px; padding: .8rem 1.1rem;
    background: #1f3864; color: #fff; font-weight: 600; box-shadow: 0 0 0 2px #f5b800, 0 8px 22px rgba(15, 42, 74, .35); display: inline-flex; align-items: center; }
.pl-chat-launcher .bi { font-size: 1.25rem; }
.pl-chat-launcher:hover { background: #2e5c8a; }
.pl-chat-panel { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1045; width: 380px; max-width: calc(100vw - 2rem);
    height: min(600px, calc(100vh - 2.5rem)); background: #fff; border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; }
.pl-chat-panel[hidden] { display: none; }
.pl-chat-head { background: linear-gradient(135deg, #0f2a4a, #1f3864); color: #fff; padding: .75rem .9rem; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 3px solid #f5b800; }
.pl-chat-body { flex: 1; overflow-y: auto; padding: .9rem; background: #f6f8fb; }
.pl-chat-msg { max-width: 86%; padding: .55rem .75rem; border-radius: 14px; margin-bottom: .5rem; font-size: .92rem; line-height: 1.45; word-wrap: break-word; }
.pl-chat-assistant { background: #fff; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; }
.pl-chat-staff { background: #fff8e1; border: 1px solid #f5d77a; border-bottom-left-radius: 4px; }
.pl-chat-me { background: #1f3864; color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.pl-chat-me a { color: #ffd966; }
.pl-chat-system { background: transparent; color: #6b7280; font-size: .8rem; text-align: center; max-width: 100%; }
.pl-chat-who { font-size: .72rem; font-weight: 700; color: #7a5300; margin-bottom: 2px; }
.pl-chat-typing span { display: inline-block; width: 7px; height: 7px; margin-right: 3px; border-radius: 50%; background: #9ca3af; animation: plDot 1.2s infinite; }
.pl-chat-typing span:nth-child(2) { animation-delay: .2s; } .pl-chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes plDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .pl-chat-typing span { animation: none; } }
.pl-chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .25rem; }
.pl-chat-suggest button { border: 1px solid #c7d2e3; background: #fff; color: #1f3864; border-radius: 16px; padding: .25rem .7rem; font-size: .8rem; }
.pl-chat-suggest button:hover { background: #eef4fb; }
.pl-chat-cards { display: grid; gap: .5rem; margin: 0 0 .6rem; }
.pl-chat-card { display: grid; grid-template-columns: 76px 1fr; gap: .6rem; align-items: center; background: #fff; border: 1px solid #e5e7eb;
    border-radius: 12px; padding: .4rem; color: inherit; text-decoration: none; }
.pl-chat-card:hover { border-color: #1f3864; }
.pl-chat-card img, .pl-chat-noimg { width: 76px; height: 56px; object-fit: cover; border-radius: 8px; background: #eef2f7; display: flex; align-items: center; justify-content: center; }
.pl-chat-input { display: flex; gap: .5rem; padding: .6rem; border-top: 1px solid #e5e7eb; background: #fff; }
.pl-chat-input textarea { flex: 1; resize: none; border: 1px solid #d1d5db; border-radius: 12px; padding: .5rem .7rem; font-size: .92rem; max-height: 120px; }
.pl-chat-input textarea:focus { outline: 2px solid #9db8e6; border-color: #1f3864; }
.pl-chat-foot { font-size: .7rem; color: #6b7280; text-align: center; padding: 0 .6rem .45rem; background: #fff; }
@media (max-width: 575px) {
    .pl-chat-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; border-radius: 0; }
    .pl-chat-launcher { right: 1rem; bottom: 1rem; padding: .85rem; }
}

/* Staff transcript */
.pl-transcript { max-height: 65vh; overflow-y: auto; background: #f6f8fb; }
.pl-transcript .pl-bubble { max-width: 80%; padding: .55rem .8rem; border-radius: 12px; font-size: .92rem; white-space: normal; }
.pl-bubble-customer { background: #fff; border: 1px solid #e5e7eb; }
.pl-bubble-assistant { background: #eef4fb; border: 1px solid #c7d7ef; }
.pl-bubble-staff { background: #fff8e1; border: 1px solid #f5d77a; }
.pl-bubble-time { font-size: .7rem; color: #6b7280; margin-top: .25rem; }
.pl-toasts { margin-bottom: 4.5rem; }
