/* ══════════════════════════════════════════════════
   Agent Profile Page — agent-profile.css
   ══════════════════════════════════════════════════ */

/* ── Page container ─────────────────────────────── */
.agent-profile-page {
    padding-top: 70px; /* fixed header height */
    min-height: 100vh;
    background: white;
}

/* ── Loading / Not Found ───────────────────────── */
.profile-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}
.profile-not-found {
    text-align: center;
    padding: 4rem 1rem;
}

/* ── Cover Banner ──────────────────────────────── */
.profile-cover {
    position: relative;
    margin: 1rem 7.5% 0;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    background-color: #083169;
    z-index: 0;
}
.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.12));
}

/* ── Identity row ──────────────────────────────── */
.profile-identity-wrapper {
    background: white;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}
.profile-identity {
    max-width: 1440px;
    margin: 0 auto;
    /* Left padding = 7.5% + 180px avatar + 19px gap */
    padding: 0 7.5% 0.75rem calc(7.5% + 180px + 19px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 180px;
}
/*
 * Avatar crescent:
 *  - top: -40px  →  top 40px of the circle pokes INTO the cover area
 *  - identity-wrapper z-index:1 > cover z-index:0  →  avatar paints on top of cover
 *  - result: a white circular arc is visible at the cover's bottom edge
 */
.profile-avatar-abs {
    position: absolute;
    left: 7.5%;
    top: -40px;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 50%;
    background: white;
    padding: 9.5px;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 2;
}
.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
}
.profile-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #395A87, #083169);
    color: white;
    font-weight: 700;
    font-size: 2rem;
    border-radius: 50%;
}
.verified-dot {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}
.profile-identity-info {
    flex: 1;
    min-width: 0;
}
.profile-name-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.agent-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
}
.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F0F0F;
    margin: 0 0 0.2rem;
}
.profile-agency {
    font-size: 1rem;
    color: #868686;
    margin: 0 0 0.4rem;
}
.profile-rating-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.star-row { display: flex; gap: 2px; }
.rating-num {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}
.rating-count {
    font-size: 0.82rem;
    color: #64748b;
}
.profile-identity-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    margin-left: 1rem;
}
.btn-contact-agent {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    height: 40px;
    background: #083169;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
    margin: 0;
    align-self: center;
}
.btn-contact-agent:hover { background: #062756; }
.btn-share-agent {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 8px 8px 16px;
    height: 40px;
    border: 1px solid #C2C2C2;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    color: #083169;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
    margin: 0;
}
.btn-share-agent:hover { border-color: #083169; }
.share-dropdown-wrap { position: relative; display: flex; align-items: center; }
.share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    min-width: 180px;
    z-index: 100;
}
.share-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #334155;
    font-weight: 500;
}
.share-option:hover { background: #f1f5f9; }

/* ── Stat Bar ──────────────────────────────────── */
.profile-stat-bar {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 7.5% 1.5rem;
    display: flex;
    gap: 20px;
    background: white;
}
.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px;
    height: 108px;
    border: 1px solid #F3F3F3;
    border-radius: 20px;
    background: white;
    box-sizing: border-box;
}
.stat-val {
    font-size: 24px;
    font-weight: 700;
    color: #212121;
    line-height: 32px;
}
.stat-lbl {
    font-size: 18px;
    font-weight: 400;
    color: #868686;
    line-height: 28px;
}
.stat-divider { display: none; }

/* ── Layout ────────────────────────────────────── */
.profile-layout {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 7.5% 4rem;
    display: grid;
    grid-template-columns: 1fr 392px;
    gap: 24px;
    align-items: start;
}

/* ── Cards ─────────────────────────────────────── */
.profile-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid #F3F3F3;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1.25rem;
}
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}
.section-header-row .card-title { margin-bottom: 0; }

/* ── Agent Overview ────────────────────────────── */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.overview-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.overview-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}
.overview-value {
    font-size: 0.9rem;
    color: #334155;
}
.overview-link {
    font-size: 0.9rem;
    color: #083169;
    word-break: break-all;
}
.overview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.overview-tag {
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
    background: #EFF6FF;
    color: #3b82f6;
    border-radius: 999px;
}
.overview-tag.area {
    background: #F0FDF4;
    color: #16a34a;
}
.social-links-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.social-link-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: border-color 0.2s;
}
.social-link-icon:hover { border-color: currentColor; }
.social-link-icon svg { width: 18px; height: 18px; }

/* ── Coverage Areas (US-206) ───────────────────── */
.coverage-map-visual {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.coverage-area-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    background: #f0f7ff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
}
.coverage-icon { flex-shrink: 0; }
.coverage-name { font-size: 0.88rem; font-weight: 500; color: #1e293b; }

/* ── Specialization Breakdown (US-206) ────────── */
.spec-breakdown { display: flex; flex-direction: column; gap: 0.75rem; }
.spec-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.spec-bar-label {
    font-size: 0.85rem;
    color: #334155;
    font-weight: 500;
    min-width: 120px;
}
.spec-bar-track {
    flex: 1;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}
.spec-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}
.spec-bar-pct {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    min-width: 36px;
    text-align: right;
}

/* ── Bio ───────────────────────────────────────── */
.bio-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #475569;
    margin: 0 0 0.75rem;
    white-space: pre-line;
}
.bio-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bio-text.expanded { display: block; }
.btn-read-more {
    background: none;
    border: none;
    color: #083169;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
}

/* ── Performance KPIs ──────────────────────────── */
.perf-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.perf-kpi {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.kpi-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
}
.kpi-lbl {
    font-size: 0.78rem;
    color: #64748b;
}
.kpi-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    width: fit-content;
}
.kpi-badge.up { background: #DCFCE7; color: #16a34a; }
.kpi-badge.down { background: #FEE2E2; color: #dc2626; }

/* ── Chart ─────────────────────────────────────── */
.chart-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.chart-tab {
    padding: 0.4rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}
.chart-tab.active {
    background: #083169;
    border-color: #083169;
    color: white;
}
.chart-container { min-height: 200px; }

/* ── Awards ────────────────────────────────────── */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.award-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
}
.award-img { width: 48px; height: 48px; object-fit: contain; }
.award-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.award-info h4 { font-size: 0.85rem; font-weight: 600; margin: 0; color: #1e293b; }
.award-info p { font-size: 0.75rem; color: #64748b; margin: 0.15rem 0 0; }
.award-info span { font-size: 0.75rem; color: #94a3b8; }

/* ── Certifications ────────────────────────────── */
.cert-list { display: flex; flex-direction: column; gap: 0.75rem; }
.cert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.cert-item.verified {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.cert-details h4 { margin: 0; font-size: 0.9rem; font-weight: 600; color: #1e293b; }
.cert-details p { margin: 0.1rem 0 0; font-size: 0.78rem; color: #64748b; }
.cert-verified {
    margin-left: auto;
    font-size: 0.72rem;
    background: #16a34a;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* ── Listing Tabs ──────────────────────────────── */
.listing-tabs {
    display: flex;
    gap: 0.25rem;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 0.25rem;
}
.listing-tab {
    padding: 0.35rem 0.85rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}
.listing-tab.active { background: white; color: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* ── Listing Cards ─────────────────────────────── */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.listing-card-new {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    display: block;
    transition: box-shadow 0.2s;
}
.listing-card-new:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.listing-card-img {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f1f5f9;
}
.listing-card-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.listing-status-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: capitalize;
    background: #083169;
    color: white;
}
.listing-status-badge.sold { background: #16a34a; }
.listing-status-badge.rent { background: #E1A23B; }
.listing-status-badge.pending { background: #6b7280; }
.listing-card-body { padding: 0.75rem; }
.listing-card-price { font-size: 1rem; font-weight: 700; color: #0f172a; margin: 0 0 0.25rem; }
.listing-card-title { font-size: 0.85rem; font-weight: 600; color: #334155; margin: 0 0 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-card-city { font-size: 0.78rem; color: #64748b; margin: 0 0 0.5rem; }
.listing-card-meta { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.listing-card-meta span { display: flex; align-items: center; gap: 0.2rem; font-size: 0.78rem; color: #475569; }

/* ── Reviews ───────────────────────────────────── */
.rating-summary {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}
.rating-big { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; min-width: 100px; }
.big-num { font-size: 3rem; font-weight: 700; color: #0f172a; line-height: 1; }
.big-stars { display: flex; gap: 2px; }
.big-count { font-size: 0.78rem; color: #64748b; text-align: center; }
.rating-bars { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; justify-content: center; }
.rating-bar-row { display: flex; align-items: center; gap: 0.5rem; }
.bar-label { font-size: 0.78rem; color: #64748b; width: 12px; text-align: right; }
.bar-track { flex: 1; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: #F59E0B; border-radius: 4px; transition: width 0.4s; }
.bar-count { font-size: 0.78rem; color: #64748b; width: 20px; }

.review-cards { display: flex; flex-direction: column; gap: 1rem; }
.review-card-new {
    padding: 1rem;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    background: #fafafa;
}
.review-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.reviewer-avatar-sm {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #395A87, #083169);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}
.reviewer-meta { flex: 1; }
.reviewer-meta h4 { margin: 0; font-size: 0.9rem; font-weight: 600; color: #1e293b; }
.reviewer-meta .review-date { font-size: 0.75rem; color: #94a3b8; }
.reviewer-role { display: block; font-size: 0.75rem; color: #64748b; }
.review-stars-sm { display: flex; gap: 2px; margin-left: auto; flex-shrink: 0; }
.review-title { font-size: 0.9rem; font-weight: 600; color: #1e293b; margin: 0 0 0.4rem; }
.review-body { font-size: 0.88rem; color: #475569; line-height: 1.6; margin: 0; }

.btn-write-review {
    padding: 0.4rem 0.9rem;
    border: 1px solid #083169;
    border-radius: 6px;
    background: transparent;
    color: #083169;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}
.btn-write-review:hover { background: #eff6ff; }
.btn-load-more {
    display: block;
    width: 100%;
    padding: 0.6rem;
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.88rem;
    color: #083169;
    font-weight: 500;
}
.empty-reviews { text-align: center; color: #94a3b8; padding: 1.5rem 0; }

/* ── Sidebar Cards ─────────────────────────────── */
.profile-sidebar-col { position: sticky; top: 90px; }

.contact-card-new {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 1.25rem;
    border: 1px solid #f1f5f9;
}
/* Contact card header: avatar + name */
.contact-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}
.contact-avatar-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.contact-avatar-initials {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #395A87, #083169);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.contact-agent-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.15rem;
}
.contact-agent-agency {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}
/* Contact info rows */
.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.contact-info-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.contact-info-row:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.contact-info-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-info-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.contact-info-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.contact-info-val {
    font-size: 0.88rem;
    color: #334155;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-send-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem;
    background: #083169;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-send-msg:hover { background: #062756; }
.btn-send-msg:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-live-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem;
    background: white;
    color: #083169;
    border: 1.5px solid #083169;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 8px;
    transition: all 0.15s;
}
.btn-live-chat:hover { background: #eff6ff; }

.agency-card-new {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.agency-card-new h3 { font-size: 0.85rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.75rem; }
.agency-link-card { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.agency-logo-img { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; }
.agency-logo-ph { width: 52px; height: 52px; border-radius: 8px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.agency-name-text { font-size: 0.95rem; font-weight: 600; color: #1e293b; margin: 0; }
.agency-view-link { font-size: 0.8rem; color: #083169; margin: 0.15rem 0 0; }

/* ── Review Modal ──────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-box {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 0.25rem;
}
.modal-box h3 { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin: 0 0 1.5rem; }
.review-form { display: flex; flex-direction: column; gap: 1rem; }
.star-picker { display: flex; gap: 0.25rem; }
.star-pick { background: none; border: none; cursor: pointer; padding: 0; }
.form-input { width: 100%; padding: 0.65rem 0.85rem; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.9rem; outline: none; box-sizing: border-box; }
.form-input:focus { border-color: #083169; }
.btn-submit-review {
    width: 100%;
    padding: 0.75rem;
    background: #083169;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-submit-review:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-submit-review:hover:not(:disabled) { background: #062756; }

/* ── Modal Dialog (schedule, qr) ──────────────────── */
.modal-dialog {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #F3F3F3;
    flex-shrink: 0;
}
.modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0F0F0F;
}
.modal-body {
    padding: 0.75rem 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    flex: 1;
}
.modal-body .form-group label { margin-bottom: 3px; font-size: 0.82rem; }
.modal-body .form-input { padding: 0.5rem 0.75rem; font-size: 0.875rem; }
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: #868686;
    line-height: 1;
    padding: 0;
}
.modal-close:hover { color: #0F0F0F; }

/* ── Form validation ───────────────────────────── */
.field-required { color: #e53e3e; margin-left: 2px; }
.field-error { display: block; color: #e53e3e; font-size: 0.78rem; margin-top: 4px; }
.input-error { border-color: #e53e3e !important; }
.input-error:focus { box-shadow: 0 0 0 3px rgba(229,62,62,0.15) !important; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-sidebar-col {
        position: static;
        order: -1;
    }
    .perf-kpi-row {
        grid-template-columns: 1fr 1fr;
    }
    .overview-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .profile-identity {
        flex-wrap: wrap;
        padding: 0 1rem 0.75rem calc(1rem + 110px + 1rem);
        min-height: 110px;
    }
    .profile-avatar-abs {
        left: 1rem;
        width: 110px;
        height: 110px;
        top: -25px;
        padding: 6px;
    }
    .profile-identity-info {
        flex: 0 0 100%;
    }
    .profile-identity-actions {
        flex: 0 0 100%;
        margin-left: 0;
        margin-top: 0.5rem;
        flex-wrap: wrap;
    }
    .btn-contact-agent {
        flex: 0 0 100%;
    }
    .btn-schedule-showing {
        flex: 1;
    }
    .share-dropdown-wrap {
        flex: 1;
    }
    .btn-share-agent {
        width: 100%;
        justify-content: center;
    }
    .profile-stat-bar {
        flex-wrap: wrap;
        padding: 1rem;
        gap: 10px;
    }
    .stat-item { flex: 0 0 calc(50% - 5px); border-radius: 16px; }
    .profile-layout { padding: 0 1rem 3rem; }
    .perf-kpi-row { grid-template-columns: 1fr 1fr; }
}

/* Listing sort (US-204/205) */
.listing-sort-row {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}
.price-filter-input {
    width: 110px;
    padding: 0.375rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
}
.btn-schedule-showing {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    height: 40px;
    background: white;
    color: #083169;
    border: 1px solid #C2C2C2;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    margin: 0;
    align-self: center;
}
.btn-schedule-showing:hover { border-color: #083169; }
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.form-group { margin-bottom: 0.75rem; }
.form-group label { display: block; font-size: 0.8125rem; font-weight: 500; color: #374151; margin-bottom: 0.25rem; }

/* Review sort/filter & report (US-203) */
.review-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.review-sort {
    padding: 0.375rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    background: #fff;
}
.review-filter-stars {
    display: flex;
    gap: 0.25rem;
}
.star-filter {
    padding: 0.25rem 0.5rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
}
.star-filter.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.agent-response {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-left: 3px solid #2563eb;
    border-radius: 0 6px 6px 0;
}
.agent-response-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    color: #2563eb;
}
.agent-response-label {
    font-size: 0.8rem;
    font-weight: 600;
}
.agent-response-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-left: auto;
}
.agent-response-body {
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.6;
    margin: 0;
}
.review-card-footer {
    margin-top: 0.5rem;
    text-align: right;
}
.btn-report {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.75rem;
    cursor: pointer;
}
.btn-report:hover {
    color: #ef4444;
}
.modal-content {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 480px;
    width: 90%;
}
.modal-content h3 { margin: 0 0 0.5rem; }
.modal-content p { color: #6b7280; font-size: 0.875rem; margin: 0 0 1rem; }
.modal-content textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-family: inherit;
    resize: vertical;
}
.modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}
.agent-toast { position: fixed; bottom: 2rem; right: 2rem; display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.5rem; border-radius: 0.75rem; font-size: 0.9375rem; font-weight: 500; z-index: 10001; animation: agent-toast-in 0.3s ease-out; box-shadow: 0 4px 20px rgba(0,0,0,0.15); max-width: 420px; cursor: pointer; opacity: 1; }
.agent-toast.success { background: #059669; color: white; }
.agent-toast.error { background: #dc2626; color: white; }
.agent-toast.info { background: #2563eb; color: white; }
@keyframes agent-toast-in { from { transform: translateY(1rem); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Dark mode: contact card ─────────────────── */
[data-theme="dark"] .contact-card-new {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
[data-theme="dark"] .contact-card-header {
    border-bottom-color: #334155;
}
[data-theme="dark"] .contact-agent-name { color: #f1f5f9; }
[data-theme="dark"] .contact-agent-agency { color: #94a3b8; }
[data-theme="dark"] .contact-info-row {
    background: #0f172a;
    border-color: #334155;
}
[data-theme="dark"] .contact-info-row:hover {
    background: #1a2a3d;
    border-color: #4b6a9b;
}
[data-theme="dark"] .contact-info-icon-wrap { background: #1a3352; }
[data-theme="dark"] .contact-info-val { color: #cbd5e1; }
[data-theme="dark"] .contact-info-label { color: #64748b; }
[data-theme="dark"] .btn-live-chat {
    background: #1e293b;
    color: #93c5fd;
    border-color: #3b82f6;
}
[data-theme="dark"] .btn-live-chat:hover { background: #1d4ed8; color: white; border-color: #1d4ed8; }
[data-theme="dark"] .agency-card-new {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .agency-name-text { color: #e2e8f0; }
[data-theme="dark"] .agency-card-new h3 { color: #64748b; }
