body.dashboard-body { min-height: 100vh; overflow-x: hidden; background: var(--ren-canvas); }
.dashboard-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.dashboard-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px 16px; border-right: 1px solid var(--ren-line); background: white; }
.dashboard-sidebar .brand { padding: 0 8px 22px; border-bottom: 1px solid var(--ren-line); }
.dashboard-sidebar .brand-logo { width: 140px; height: 52px; }
.workspace-label { margin: 18px 10px 8px; color: var(--ren-muted); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.side-nav { display: grid; gap: 3px; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 12px; border-radius: 8px; color: #52605b; font-size: 12px; font-weight: 600; }
.side-nav a::before { content: ""; width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 2px; opacity: .65; }
.side-nav a:hover { color: var(--ren-ink); background: var(--ren-canvas); }
.side-nav a.active { color: var(--ren-green); background: var(--ren-green-soft); }
.side-nav a.active::before { background: currentColor; }
.sidebar-foot { margin-top: auto; padding: 16px 10px 4px; border-top: 1px solid var(--ren-line); }
.sidebar-user { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 10px; }
.avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: white; background: var(--ren-green); font-size: 11px; font-weight: 750; }
.sidebar-user b, .sidebar-user small { display: block; }
.sidebar-user b { font-size: 11px; }
.sidebar-user small { margin-top: 3px; color: var(--ren-muted); font-size: 9px; }

.dashboard-content { min-width: 0; }
.dashboard-topbar { position: sticky; top: 0; z-index: 30; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px; border-bottom: 1px solid var(--ren-line); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.topbar-title b, .topbar-title span { display: block; }
.topbar-title b { font: 750 13px var(--font-display); }
.topbar-title span { margin-top: 3px; color: var(--ren-muted); font-size: 9px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.top-search { width: 240px; height: 38px; padding: 0 12px; border: 1px solid var(--ren-line); border-radius: 8px; color: var(--ren-muted); background: var(--ren-canvas); font-size: 11px; text-align: left; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--ren-line); border-radius: 8px; color: var(--ren-muted); background: white; font-size: 12px; }
.mobile-side-toggle { display: none; }
.tenant-switch { height: 38px; padding: 0 10px; border: 1px solid var(--ren-line); border-radius: 8px; color: var(--ren-ink); background: white; font-size: 11px; }

.dashboard-main { padding: 28px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font: 800 clamp(25px, 3vw, 34px)/1.1 var(--font-display); letter-spacing: -.045em; }
.page-head p { margin: 7px 0 0; color: var(--ren-muted); font-size: 11px; }
.page-actions { display: flex; gap: 8px; }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; border: 1px solid var(--ren-line); border-radius: var(--radius-md); background: white; }
.metric { min-width: 0; padding: 20px; border-right: 1px solid var(--ren-line); }
.metric:last-child { border-right: 0; }
.metric span { display: block; color: var(--ren-muted); font-size: 10px; font-weight: 600; }
.metric strong { display: block; margin-top: 9px; font: 760 26px var(--font-display); letter-spacing: -.035em; }
.metric small { display: block; margin-top: 5px; color: var(--ren-green); font-size: 9px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 18px; }
.dashboard-grid > * { min-width: 0; }
.panel { min-width: 0; border: 1px solid var(--ren-line); border-radius: var(--radius-md); background: white; }
.panel + .panel { margin-top: 18px; }
.panel-head { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px; border-bottom: 1px solid var(--ren-line); }
.panel-head h2 { margin: 0; font: 730 14px var(--font-display); }
.panel-head p { margin: 3px 0 0; color: var(--ren-muted); font-size: 9px; }
.panel-head button { border: 0; color: var(--ren-green); background: transparent; font-size: 10px; font-weight: 650; }
.panel-body { padding: 18px; }
.wide-panel { grid-column: 1 / -1; }

.bar-chart { height: 230px; display: flex; align-items: end; gap: 14px; padding: 14px 8px 0; border-bottom: 1px solid var(--ren-line); background: repeating-linear-gradient(to top, transparent 0 45px, #eef2f0 46px); }
.chart-bar { flex: 1; min-width: 20px; display: grid; align-items: end; gap: 8px; height: 100%; }
.chart-bar i { display: block; min-height: 12px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #1b7b65, var(--ren-green)); }
.chart-bar span { color: var(--ren-muted); font-size: 9px; text-align: center; }

.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.data-table th { padding: 10px 12px; color: var(--ren-muted); background: #f8faf9; font-size: 9px; font-weight: 650; text-align: left; white-space: nowrap; }
.data-table td { padding: 12px; border-top: 1px solid var(--ren-line); color: #44534e; vertical-align: middle; }
.data-table td b { color: var(--ren-ink); }
.data-table tr:hover td { background: #fbfcfc; }
.table-title { display: flex; align-items: center; gap: 9px; min-width: 190px; }
.table-thumb { width: 40px; height: 34px; flex: 0 0 auto; border-radius: 6px; background: #dce5e1 center/cover; }
.table-title small { display: block; margin-top: 3px; color: var(--ren-muted); }
.status { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 6px; color: var(--ren-green); background: var(--ren-green-soft); font-size: 9px; font-weight: 650; white-space: nowrap; }
.status.pending, .status.new, .status.hot { color: var(--ren-warning); background: #fff4df; }
.status.rejected, .status.lost { color: var(--ren-danger); background: #fdecea; }
.status.closed { color: #315c8a; background: #edf4fb; }
.status.accepted, .status.responded, .status.completed { color: var(--ren-green); background: var(--ren-green-soft); }
.status.declined, .status.expired, .status.overdue, .status.cancelled, .status.no_show { color: var(--ren-danger); background: #fdecea; }
.row-actions { display: flex; gap: 5px; }
.row-actions button { min-height: 30px; padding: 0 9px; border: 1px solid var(--ren-line); border-radius: 6px; color: #50605a; background: white; font-size: 9px; font-weight: 650; }
.row-actions button.primary-action { color: white; border-color: var(--ren-green); background: var(--ren-green); }

.queue { display: grid; }
.queue-item { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ren-line); }
.queue-item:first-child { padding-top: 0; }
.queue-item:last-child { padding-bottom: 0; border-bottom: 0; }
.queue-item b, .queue-item small { display: block; }
.queue-item b { font-size: 11px; line-height: 1.45; }
.queue-item small { margin-top: 4px; color: var(--ren-muted); font-size: 9px; line-height: 1.5; }
.queue-item button { align-self: center; min-height: 30px; padding: 0 9px; border: 1px solid var(--ren-line); border-radius: 6px; color: var(--ren-green); background: white; font-size: 9px; font-weight: 650; }

.pipeline { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; }
.pipeline-column { min-height: 290px; padding: 12px; border: 1px solid var(--ren-line); border-radius: 10px; background: #f8faf9; }
.pipeline-column h3 { display: flex; justify-content: space-between; margin: 0 0 12px; font: 700 11px var(--font-display); }
.pipeline-column h3 span { color: var(--ren-muted); }
.lead-card { margin-bottom: 8px; padding: 12px; border: 1px solid var(--ren-line); border-radius: 8px; background: white; }
.lead-card.selected { border-color: var(--ren-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ren-green) 10%, transparent); }
.lead-card b, .lead-card small { display: block; }
.lead-card b { font-size: 10px; }
.lead-card small { margin-top: 5px; color: var(--ren-muted); font-size: 9px; line-height: 1.5; }
.lead-card footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--ren-green); font-size: 8px; font-weight: 650; }

.crm-phone { color: var(--ren-ink); font-weight: 650; white-space: nowrap; }
.crm-phone.locked { color: var(--ren-muted); }
.crm-sla { display: grid; justify-items: start; gap: 4px; margin-top: 9px; }
.crm-sla small { margin: 0; font-size: 8px; }
.crm-stack { display: grid; gap: 10px; }
.crm-card { padding: 13px; border: 1px solid var(--ren-line); border-radius: 9px; background: #fbfcfb; }
.crm-card-main { display: flex; justify-content: space-between; gap: 16px; }
.crm-card-main b, .crm-card-main small { display: block; }
.crm-card-main b { font-size: 11px; }
.crm-card-main small { margin-top: 4px; color: var(--ren-muted); font-size: 9px; line-height: 1.5; }
.crm-card-meta { display: grid; justify-items: end; gap: 6px; }
.crm-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--ren-line); color: var(--ren-muted); font-size: 8px; }
.crm-card-foot .row-actions { margin-left: auto; }
.crm-timeline { display: grid; }
.crm-timeline article { position: relative; display: grid; grid-template-columns: 12px 1fr; gap: 10px; padding-bottom: 15px; }
.crm-timeline article:not(:last-child)::before { content: ''; position: absolute; left: 5px; top: 10px; bottom: 0; width: 1px; background: var(--ren-line); }
.crm-timeline i { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 2px; border: 3px solid var(--ren-green-soft); border-radius: 50%; background: var(--ren-green); }
.crm-timeline b { font-size: 10px; }
.crm-timeline p { margin: 3px 0; color: var(--ren-ink); font-size: 9px; line-height: 1.5; }
.crm-timeline small { color: var(--ren-muted); font-size: 8px; }
.dispatch-control { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 6px; min-width: 250px; }
.dispatch-control select { min-height: 32px; padding: 0 8px; border: 1px solid var(--ren-line); border-radius: 6px; color: var(--ren-ink); background: white; font-size: 9px; }
.dispatch-control button { min-height: 32px; padding: 0 9px; border: 0; border-radius: 6px; color: white; background: var(--ren-green); font-size: 9px; font-weight: 700; }
.crm-dialog { width: min(520px, calc(100vw - 28px)); padding: 0; border: 0; border-radius: 14px; color: var(--ren-ink); background: white; box-shadow: 0 24px 80px rgb(10 40 30 / 24%); }
.crm-dialog::backdrop { background: rgb(7 24 19 / 55%); backdrop-filter: blur(3px); }
.crm-dialog form { display: grid; }
.crm-dialog header, .crm-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.crm-dialog header { border-bottom: 1px solid var(--ren-line); }
.crm-dialog header small { color: var(--ren-green); font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.crm-dialog h2 { margin: 3px 0 0; font: 750 18px var(--font-display); }
.crm-dialog header button { width: 34px; height: 34px; border: 1px solid var(--ren-line); border-radius: 50%; background: white; font-size: 20px; }
.crm-form-fields { display: grid; gap: 14px; padding: 20px; }
.crm-form-fields label { display: grid; gap: 7px; color: var(--ren-ink); font-size: 10px; font-weight: 650; }
.crm-form-fields input, .crm-form-fields select, .crm-form-fields textarea { width: 100%; min-height: 42px; padding: 10px 11px; border: 1px solid var(--ren-line); border-radius: 8px; color: var(--ren-ink); background: white; font: 500 11px var(--font-body); }
.crm-form-fields textarea { min-height: 96px; resize: vertical; }
.crm-form-error { min-height: 18px; margin: 0; padding: 0 20px; color: var(--ren-danger); font-size: 9px; }
.crm-dialog footer { justify-content: flex-end; border-top: 1px solid var(--ren-line); }

.listing-dialog { width: min(1040px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow: hidden; border: 0; border-radius: 16px; color: var(--ren-ink); background: white; box-shadow: 0 28px 90px rgb(10 40 30 / 26%); }
.listing-dialog::backdrop { background: rgb(7 24 19 / 56%); backdrop-filter: blur(3px); }
.listing-dialog form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; max-height: calc(100vh - 28px); }
.listing-dialog header, .listing-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; }
.listing-dialog header { border-bottom: 1px solid var(--ren-line); }
.listing-dialog footer { justify-content: flex-end; border-top: 1px solid var(--ren-line); background: #fbfcfb; }
.listing-dialog header small { color: var(--ren-green); font-size: 8px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.listing-dialog h2 { margin: 4px 0 0; font: 780 20px var(--font-display); }
.listing-dialog header button { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid var(--ren-line); border-radius: 50%; background: white; font-size: 20px; cursor: pointer; }
.listing-dialog-body { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; padding: 18px 22px; overflow-y: auto; background: #f8faf9; }
.listing-form-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.listing-form-section, .listing-media-panel section { min-width: 0; padding: 15px; border: 1px solid var(--ren-line); border-radius: 12px; background: white; }
.listing-form-section.span-2 { grid-column: 1 / -1; }
.listing-form-section h3, .listing-media-panel h3 { margin: 0 0 12px; font: 740 13px var(--font-display); }
.listing-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.listing-field-grid label { display: grid; gap: 7px; min-width: 0; color: var(--ren-ink); font-size: 10px; font-weight: 650; }
.listing-field-grid label.span-2 { grid-column: 1 / -1; }
.listing-field-grid input, .listing-field-grid select, .listing-field-grid textarea { width: 100%; min-height: 42px; padding: 10px 11px; border: 1px solid var(--ren-line); border-radius: 9px; color: var(--ren-ink); background: white; font: 500 11px var(--font-body); outline: none; }
.listing-field-grid textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.listing-field-grid input:focus, .listing-field-grid select:focus, .listing-field-grid textarea:focus { border-color: var(--ren-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ren-green) 12%, transparent); }
.listing-media-panel { display: grid; align-content: start; gap: 12px; }
.listing-dropzone { position: relative; display: grid; place-items: center; min-height: 150px; padding: 18px; border: 1.5px dashed rgb(8 122 98 / 34%); border-radius: 12px; background: var(--ren-green-soft); text-align: center; cursor: pointer; transition: 160ms ease; }
.listing-dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.listing-dropzone span, .listing-dropzone small { display: block; }
.listing-dropzone span { color: var(--ren-green); font-size: 12px; font-weight: 760; }
.listing-dropzone small { margin-top: 7px; color: var(--ren-muted); font-size: 9px; line-height: 1.5; }
.listing-dropzone:hover, .listing-dropzone.dragging { transform: translateY(-1px); border-color: var(--ren-green); background: #eef8f4; box-shadow: 0 12px 28px rgb(8 122 98 / 11%); }
.listing-image-grid { display: grid; gap: 9px; margin-top: 12px; }
.listing-image-preview { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 10px; min-height: 70px; padding: 8px; border: 1px solid var(--ren-line); border-radius: 10px; background: #fbfcfb; }
.listing-image-preview img { width: 70px; height: 54px; border-radius: 8px; object-fit: cover; background: #dfe7e3; }
.listing-image-preview b, .listing-image-preview small { display: block; }
.listing-image-preview b { font-size: 10px; }
.listing-image-preview small { margin-top: 5px; color: var(--ren-muted); font-size: 8px; line-height: 1.4; }
.listing-image-preview button { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 1px solid var(--ren-line); border-radius: 50%; color: var(--ren-danger); background: white; font-size: 16px; line-height: 1; cursor: pointer; }
.listing-upload-empty { min-height: 66px; display: grid; place-items: center; padding: 12px; border: 1px dashed var(--ren-line); border-radius: 10px; color: var(--ren-muted); background: #fbfcfb; font-size: 10px; text-align: center; }
.listing-submit-note ul { margin: 0; padding-left: 16px; color: #53645e; font-size: 10px; line-height: 1.65; }
.listing-submit-note p { min-height: 18px; margin: 10px 0 0; color: var(--ren-green); font-size: 9px; line-height: 1.5; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-bar input, .filter-bar select { height: 38px; padding: 0 11px; border: 1px solid var(--ren-line); border-radius: 8px; color: var(--ren-ink); background: white; font-size: 10px; }
.filter-bar input { min-width: 260px; }
.filter-bar small { align-self: center; color: var(--ren-muted); font-size: 9px; }
.crm-filter-bar { align-items: center; padding: 12px; border: 1px solid var(--ren-line); border-radius: var(--radius-md); background: white; }
.status-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.status-tabs button { min-height: 38px; padding: 0 12px; border: 1px solid var(--ren-line); border-radius: 10px; color: var(--ren-ink); background: white; font-size: 10px; font-weight: 700; box-shadow: 0 7px 18px rgb(11 45 35 / 5%); transition: 160ms ease; }
.status-tabs button span { margin-left: 5px; color: var(--ren-muted); font-weight: 650; }
.status-tabs button:hover, .status-tabs button.active { transform: translateY(-1px); border-color: rgb(8 122 98 / 36%); background: var(--ren-green-soft); box-shadow: 0 12px 24px rgb(8 122 98 / 12%); }
.status-tabs button:active { transform: translateY(0); }
.lead-detail-card { display: grid; gap: 16px; }
.lead-detail-card header { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--ren-line); }
.lead-detail-card header small { color: var(--ren-green); font-size: 8px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.lead-detail-card h3 { margin: 4px 0 6px; font: 750 18px var(--font-display); }
.lead-detail-card h4 { margin: 0 0 10px; font: 730 12px var(--font-display); }
.lead-detail-card p { margin: 0; color: var(--ren-muted); font-size: 10px; line-height: 1.55; }
.lead-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--ren-line); border-radius: 9px; background: var(--ren-line); }
.lead-detail-grid div { min-width: 0; padding: 12px; background: #fbfcfb; }
.lead-detail-grid span, .lead-detail-grid b { display: block; }
.lead-detail-grid span { color: var(--ren-muted); font-size: 8px; }
.lead-detail-grid b { margin-top: 5px; font-size: 10px; }
.lead-detail-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-detail-actions button { min-height: 32px; padding: 0 10px; border: 1px solid var(--ren-line); border-radius: 6px; color: #50605a; background: white; font-size: 9px; font-weight: 650; }
.lead-detail-actions button.primary-action { color: white; border-color: var(--ren-green); background: var(--ren-green); }
.empty { min-height: 220px; display: grid; place-items: center; padding: 40px; color: var(--ren-muted); text-align: center; font-size: 11px; }

.profile-progress { display: grid; gap: 14px; }
.progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: var(--ren-line); }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--ren-green); }
.profile-progress p { margin: 0; color: var(--ren-muted); font-size: 10px; line-height: 1.6; }
.sale-profile-editor .sale-profile-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--ren-line); border-radius: var(--radius-md); background: #fbfdfc; }
.sale-profile-editor h3 { margin: 0 0 4px; font: 750 16px var(--font-display); }
.profile-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-field-grid span { display: grid; gap: 3px; min-width: 0; padding: 10px; border: 1px solid var(--ren-line); border-radius: 10px; background: white; color: var(--ren-muted); font-size: 10px; }
.profile-field-grid b { color: var(--ren-ink); font-size: 9px; text-transform: uppercase; }
.sale-profile-media-editor { display: grid; gap: 14px; }
.sale-hero-preview { min-height: 250px; display: flex; align-items: end; overflow: hidden; border: 1px solid var(--ren-line); border-radius: 12px; color: white; background: linear-gradient(90deg, rgba(2,45,34,.86), rgba(2,45,34,.42)), url('/assets/images/renos-hero-brand.png') center/cover; box-shadow: 0 12px 34px rgb(10 40 30 / 8%); }
.sale-hero-preview div { width: 100%; padding: 22px; background: linear-gradient(transparent, rgba(2, 28, 22, .72)); }
.sale-hero-preview small, .sale-hero-preview b, .sale-hero-preview span { display: block; }
.sale-hero-preview small { color: #c9f47a; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sale-hero-preview b { margin-top: 6px; font: 800 28px var(--font-display); }
.sale-hero-preview span { margin-top: 4px; color: rgba(255,255,255,.78); font-size: 11px; }
.sale-profile-media-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; }
.sale-profile-media-grid article { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px; border: 1px solid var(--ren-line); border-radius: 12px; background: #fbfdfc; }
.sale-profile-media-grid article:last-child { align-items: start; }
.sale-profile-media-grid b { display: block; font-size: 12px; }
.sale-profile-media-grid p { margin: 5px 0 10px; color: var(--ren-muted); font-size: 10px; line-height: 1.55; }
.sale-profile-media-grid .button { margin-right: 6px; margin-bottom: 6px; }
.file-action { position: relative; overflow: hidden; cursor: pointer; }
.file-action input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sale-avatar-preview { display: grid; width: 84px; height: 84px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 2px solid white; border-radius: 18px; background: var(--ren-green-soft); box-shadow: 0 12px 24px rgb(10 40 30 / 10%); }
.sale-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.sale-avatar-preview span { color: var(--ren-green); font: 800 22px var(--font-display); }
.profile-media-status { min-height: 18px; margin: 0; color: var(--ren-green); font-size: 10px; }

.project-master-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); gap: 18px; margin-bottom: 18px; }
.project-master-grid > *, .project-workbench > * { min-width: 0; }
.project-workbench { display: grid; grid-template-columns: minmax(250px, .32fr) minmax(0, 1fr); gap: 18px; }
.project-picker { display: grid; gap: 7px; }
.project-picker button { display: grid; gap: 4px; width: 100%; padding: 12px; border: 1px solid var(--ren-line); border-radius: 8px; color: var(--ren-ink); background: white; text-align: left; }
.project-picker button.active { border-color: var(--ren-green); background: var(--ren-green-soft); }
.project-picker b { font-size: 10px; }
.project-picker small { color: var(--ren-muted); font-size: 8px; }
.project-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--ren-line); border-radius: 9px; background: var(--ren-line); }
.project-summary div { min-width: 0; padding: 14px; background: white; }
.project-summary span, .project-summary b { display: block; }
.project-summary span { color: var(--ren-muted); font-size: 8px; }
.project-summary b { margin-top: 5px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.truncate-url { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-empty { min-height: 120px; padding: 22px; }
.project-preview-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 12px; overflow: hidden; border: 1px solid var(--ren-line); border-radius: 9px; background: var(--ren-line); }
.project-preview-summary div { padding: 12px; background: white; }
.project-preview-summary span, .project-preview-summary b { display: block; }
.project-preview-summary span { color: var(--ren-muted); font-size: 8px; }
.project-preview-summary b { margin-top: 4px; color: var(--ren-ink); font-family: var(--font-display); font-size: 18px; }
.project-preview-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; color: var(--ren-muted); font-size: 9px; }
.project-preview-meta b { color: var(--ren-ink); }
.status.preview-inserted { color: var(--ren-green); background: var(--ren-green-soft); }
.status.preview-updated { color: #315c8a; background: #edf4fb; }
.status.preview-unchanged { color: var(--ren-muted); background: #f1f3f2; }
.status.preview-hidden { color: var(--ren-danger); background: #fdecea; }
.status.failed, .status.error { color: var(--ren-danger); background: #fdecea; }
.status.queued, .status.paused, .status.held { color: var(--ren-warning); background: #fff4df; }
.status.succeeded, .status.available { color: var(--ren-green); background: var(--ren-green-soft); }
.status.processing, .status.syncing { color: #315c8a; background: #edf4fb; }

.auth-view { min-height: calc(100vh - 106px); display: grid; place-items: center; padding: 28px 14px; }
.auth-card { width: min(440px, 100%); display: grid; gap: 24px; padding: 34px; border: 1px solid var(--ren-line); border-radius: 18px; background: white; box-shadow: var(--shadow-soft); }
.auth-brand { width: fit-content; }
.auth-brand .brand-logo { width: 138px; height: 50px; }
.auth-kicker { margin: 0 0 8px; color: var(--ren-green); font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.auth-card h1 { margin: 0; font: 750 clamp(24px, 4vw, 34px)/1.15 var(--font-display); }
.auth-card p { margin: 10px 0 0; color: var(--ren-muted); font-size: 11px; line-height: 1.65; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 7px; color: var(--ren-ink); font-size: 10px; font-weight: 650; }
.auth-form input { height: 46px; padding: 0 13px; border: 1px solid var(--ren-line); border-radius: 9px; color: var(--ren-ink); background: white; font: 500 12px var(--font-body); outline: none; }
.auth-form input:focus { border-color: var(--ren-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ren-green) 12%, transparent); }
.auth-form button { min-height: 46px; }
.auth-form small { color: var(--ren-muted); font-size: 9px; line-height: 1.5; text-align: center; }
.auth-error { padding: 11px 13px; border: 1px solid #f1c9c4; border-radius: 8px; color: var(--ren-danger); background: #fff3f1; font-size: 10px; line-height: 1.5; }
.auth-logout { color: var(--ren-danger); }

.exchange-dashboard { --ren-green: #17324d; --ren-green-strong: #10283c; --ren-green-soft: #edf3f7; --ren-canvas: #f1f5f8; }

@media (max-width: 1100px) {
  .dashboard-shell { grid-template-columns: 220px 1fr; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--ren-line); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .project-master-grid, .project-workbench { grid-template-columns: 1fr; }
  .crm-lead-workspace { grid-template-columns: 1fr; }
  .listing-dialog-body { grid-template-columns: 1fr; }
  .listing-media-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sale-profile-media-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .dashboard-shell { display: block; }
  .dashboard-sidebar { position: fixed; left: -260px; z-index: 60; width: 248px; transition: 180ms ease; box-shadow: var(--shadow-soft); }
  .dashboard-sidebar.open { left: 0; }
  .mobile-side-toggle { display: grid; }
  .dashboard-topbar { padding: 0 14px; }
  .top-search, .tenant-switch { display: none; }
  .dashboard-main { padding: 18px 14px 28px; }
  .page-head { align-items: start; flex-direction: column; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .project-summary { grid-template-columns: repeat(2, 1fr); }
  .project-preview-summary { grid-template-columns: repeat(2, 1fr); }
  .listing-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 12px; }
  .listing-dialog form { max-height: calc(100vh - 16px); }
  .listing-dialog header, .listing-dialog footer { padding: 14px; }
  .listing-dialog-body { padding: 14px; }
  .listing-form-main, .listing-media-panel { grid-template-columns: 1fr; }
  .listing-field-grid { grid-template-columns: 1fr; }
  .listing-field-grid label.span-2 { grid-column: auto; }
}

@media (max-width: 520px) {
  .metric-strip { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--ren-line); }
  .metric:last-child { border-bottom: 0; }
  .filter-bar input { min-width: 100%; }
  .auth-card { padding: 24px 20px; }
  .crm-card-main { flex-direction: column; }
  .crm-card-meta { justify-items: start; }
  .crm-card-foot .row-actions { width: 100%; margin-left: 0; }
  .dispatch-control { grid-template-columns: 1fr; min-width: 180px; }
  .lead-detail-grid { grid-template-columns: 1fr; }
  .sale-hero-preview { min-height: 190px; }
  .sale-profile-media-grid article { align-items: start; flex-direction: column; }
}
