/* ==========================================================================
   HAVN Mission Control — v1.3.0
   Linear / Notion / Stripe-inspired Real Estate OS UI
   ========================================================================== */

:root {
	--mc-bg:           #07080B;
	--mc-bg-2:         #0B0C10;
	--mc-bg-3:         #11131A;
	--mc-surface:      rgba(255,255,255,.03);
	--mc-surface-2:    rgba(255,255,255,.05);
	--mc-border:       rgba(255,255,255,.07);
	--mc-border-2:     rgba(255,255,255,.12);
	--mc-text:         #F4F4F5;
	--mc-text-2:       rgba(244,244,245,.72);
	--mc-text-3:       rgba(244,244,245,.48);
	--mc-accent:       #D4B370;
	--mc-accent-soft:  rgba(212,179,112,.14);
	--mc-success:      #6FCF97;
	--mc-info:         #8AB4F8;
	--mc-warn:         #E0C285;
	--mc-radius:       14px;
	--mc-radius-lg:    20px;
	--mc-shadow:       0 1px 0 rgba(255,255,255,.04) inset, 0 30px 60px -30px rgba(0,0,0,.8);
	--mc-sidebar-w:    248px;
}

/* ==========================================================================
   Shell — sidebar + main
   ========================================================================== */

.havn-mc {
	display: grid;
	grid-template-columns: var(--mc-sidebar-w) minmax(0, 1fr);
	gap: 0;
	min-height: 100vh;
	background: var(--mc-bg);
	color: var(--mc-text);
	font: 14px/1.5 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	letter-spacing: -0.005em;
}

.havn-mc * { box-sizing: border-box; }

/* Full-bleed app shell — cancel the page-level .havn-app-bg gutter (40px sides /
   32px top) whenever the Mission Control shell is present, so the sidebar sits
   flush to the viewport edges exactly like the design previews. Plain form /
   billing surfaces have no .havn-mc, so they keep their comfortable padding. v2.2.45 */
.havn-app-bg:has(.havn-mc) {
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
}

.havn-mc-main {
	min-width: 0;
	padding: 24px clamp(20px, 3vw, 40px) 80px;
	display: flex;
	flex-direction: column;
	gap: 28px;
	background:
		radial-gradient(1200px 600px at -10% -20%, rgba(212,179,112,.04), transparent 50%),
		radial-gradient(800px 500px at 110% 0%, rgba(138,180,248,.03), transparent 50%),
		var(--mc-bg);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.havn-mc-sidebar {
	position: sticky;
	top: 0;
	height: 100vh;
	padding: 22px 14px;
	background: linear-gradient(180deg, #0A0B10 0%, #07080B 100%);
	border-right: 1px solid var(--mc-border);
	display: flex;
	flex-direction: column;
	gap: 8px;
	overflow-y: auto;
}

.havn-mc-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 8px 18px;
	border-bottom: 1px solid var(--mc-border);
	margin-bottom: 10px;
}

.havn-mc-brand-name {
	font-weight: 600;
	font-size: 15px;
	letter-spacing: -0.01em;
}

.havn-mc-brand-tier {
	margin-left: auto;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.havn-mc-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.havn-mc-nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 11px;
	border-radius: 10px;
	color: var(--mc-text-2);
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 500;
	transition: background .15s ease, color .15s ease, transform .15s ease;
	position: relative;
}

.havn-mc-nav-item:hover {
	background: var(--mc-surface);
	color: var(--mc-text);
}

.havn-mc-nav-item.is-active {
	background: var(--mc-accent-soft);
	color: var(--mc-text);
}

.havn-mc-nav-item.is-active::before {
	content: '';
	position: absolute;
	left: -14px;
	top: 8px;
	bottom: 8px;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--mc-accent);
	box-shadow: 0 0 12px var(--mc-accent);
}

.havn-mc-nav-item.is-locked {
	opacity: 0.55;
}

.havn-mc-nav-icon {
	width: 18px;
	height: 18px;
	display: grid;
	place-items: center;
	color: var(--mc-text-3);
}

.havn-mc-nav-item.is-active .havn-mc-nav-icon { color: var(--mc-accent); }
.havn-mc-nav-item:hover .havn-mc-nav-icon { color: var(--mc-text); }

.havn-mc-nav-icon svg { width: 100%; height: 100%; }

.havn-mc-nav-label { flex: 1; min-width: 0; }

.havn-mc-nav-badge {
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.1em;
	padding: 2px 7px;
	border-radius: 999px;
	background: var(--mc-accent);
	color: #0B0C10;
}

.havn-mc-nav-lock {
	width: 14px;
	height: 14px;
	color: var(--mc-text-3);
}

.havn-mc-sidebar-foot {
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--mc-border);
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.havn-mc-profile {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	margin-top: 8px;
	border-radius: 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
}

.havn-mc-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: linear-gradient(135deg, var(--mc-accent), #C9A86B);
	color: #0B0C10;
	font-weight: 700;
	font-size: 15px;
	flex-shrink: 0;
}

.havn-mc-avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.havn-mc-avatar.lg { width: 48px; height: 48px; font-size: 18px; }

.havn-mc-profile-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.havn-mc-profile-name {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.havn-mc-profile-tier {
	font-size: 11px;
	color: var(--mc-text-3);
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.havn-mc-topbar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 4px;
	margin-bottom: 4px;
	position: sticky;
	top: 0;
	z-index: 50;
	background: linear-gradient(180deg, rgba(7,8,11,.92), rgba(7,8,11,.78));
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--mc-border);
	margin: -24px -40px 0;
	padding: 14px clamp(20px, 3vw, 40px);
}

.havn-mc-menu {
	display: none;
	width: 34px; height: 34px;
	border-radius: 10px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	color: var(--mc-text);
	cursor: pointer;
}

.havn-mc-search {
	flex: 1;
	max-width: 540px;
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 14px;
	height: 38px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	color: var(--mc-text-3);
	transition: border-color .15s ease;
}

.havn-mc-search:focus-within {
	border-color: var(--mc-accent);
	box-shadow: 0 0 0 3px rgba(212,179,112,.12);
}

.havn-mc-search svg { width: 16px; height: 16px; flex-shrink: 0; }

.havn-mc-search input {
	flex: 1;
	background: transparent;
	border: 0;
	outline: 0;
	color: var(--mc-text);
	font: inherit;
}

.havn-mc-search input::placeholder { color: var(--mc-text-3); }

.havn-mc-search kbd {
	font-size: 10.5px;
	padding: 2px 6px;
	border-radius: 6px;
	background: rgba(255,255,255,.06);
	border: 1px solid var(--mc-border-2);
	color: var(--mc-text-2);
	font-family: inherit;
}

.havn-mc-topbar-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
}

.havn-mc-pill,
.havn-mc-icon-btn,
.havn-mc-profile-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	height: 36px;
	border-radius: 10px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	color: var(--mc-text);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background .15s ease, transform .15s ease, border-color .15s ease;
	position: relative;
}

.havn-mc-pill:hover, .havn-mc-icon-btn:hover, .havn-mc-profile-pill:hover {
	background: var(--mc-surface-2);
	border-color: var(--mc-border-2);
}

.havn-mc-pill svg, .havn-mc-icon-btn svg {
	width: 16px; height: 16px;
}

.havn-mc-icon-btn {
	width: 36px;
	padding: 0;
	justify-content: center;
}

.havn-mc-pill.is-locked {
	opacity: 0.55;
	background: transparent;
}

.havn-mc-pill[data-mc-action="ai"] {
	background: linear-gradient(135deg, rgba(212,179,112,.25), rgba(242,211,144,.18));
	border-color: rgba(212,179,112,.45);
	color: #F2D390;
}

.havn-mc-dot {
	position: absolute;
	top: 7px; right: 7px;
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--mc-success);
	box-shadow: 0 0 0 2px var(--mc-bg);
}

.havn-mc-profile-pill {
	padding: 4px 10px 4px 4px;
}

.havn-mc-profile-pill-name {
	font-size: 12.5px;
}

/* AI panel */
.havn-mc-ai-panel {
	position: fixed;
	top: 60px;
	right: 24px;
	width: 380px;
	max-width: calc(100vw - 48px);
	background: var(--mc-bg-3);
	border: 1px solid var(--mc-border-2);
	border-radius: var(--mc-radius-lg);
	box-shadow: var(--mc-shadow);
	padding: 18px;
	z-index: 100;
	opacity: 0;
	transform: translateY(-8px);
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}

.havn-mc-ai-panel.is-open {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.havn-mc-ai-head {
	display: flex;
	justify-content: space-between;
	align-items: start;
	gap: 12px;
	margin-bottom: 14px;
}

.havn-mc-ai-head h3 { margin: 4px 0 0; font-size: 16px; }

.havn-mc-ai-suggestions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 14px;
}

.havn-mc-chip-btn {
	text-align: left;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	color: var(--mc-text);
	font-size: 13px;
	cursor: pointer;
}

.havn-mc-chip-btn:hover {
	background: var(--mc-accent-soft);
	border-color: rgba(212,179,112,.35);
}

.havn-mc-ai-input {
	display: flex;
	gap: 8px;
}

.havn-mc-ai-input input {
	flex: 1;
	padding: 10px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	color: var(--mc-text);
	font: inherit;
	outline: 0;
}

.havn-mc-locked {
	padding: 24px;
	text-align: center;
	border: 1px dashed var(--mc-border-2);
	border-radius: 14px;
	background: rgba(255,255,255,.02);
}

.havn-mc-locked svg { width: 28px; height: 28px; color: var(--mc-accent); }

/* ==========================================================================
   Generic section / card primitives
   ========================================================================== */

.havn-mc-section {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.havn-mc-section-head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.havn-mc-section-head.tight { margin-bottom: 4px; }

.havn-mc-section-actions {
	display: flex; gap: 8px; flex-wrap: wrap;
}

.havn-mc-eyebrow {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mc-text-3);
}

.havn-mc-h3 {
	margin: 4px 0 0;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.015em;
	color: var(--mc-text);
}

.havn-mc-mode-tag {
	font-size: 12px;
	font-weight: 500;
	color: var(--mc-text-3);
	margin-left: 6px;
}

.havn-mc-link {
	font-size: 13px;
	color: var(--mc-accent);
	text-decoration: none;
}
.havn-mc-link:hover { text-decoration: underline; }

.havn-mc-card {
	background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
	border: 1px solid var(--mc-border);
	border-radius: var(--mc-radius);
	padding: 18px;
	box-shadow: var(--mc-shadow);
	min-width: 0;
}

.havn-mc-card.havn-mc-locked {
	text-align: left;
}

.havn-mc-locked-head h3 { margin: 8px 0 6px; font-size: 18px; }
.havn-mc-locked-head p { margin: 0 0 14px; color: var(--mc-text-2); }
.havn-mc-locked-badge {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mc-accent);
	background: var(--mc-accent-soft);
	padding: 4px 9px;
	border-radius: 999px;
}
.havn-mc-locked-badge svg { width: 11px; height: 11px; }

.havn-mc-muted { color: var(--mc-text-2); margin: 0 0 12px; }

.havn-mc-empty {
	padding: 28px;
	border: 1px dashed var(--mc-border-2);
	border-radius: 14px;
	color: var(--mc-text-2);
	text-align: center;
	background: rgba(255,255,255,.02);
}
.havn-mc-empty svg { width: 28px; height: 28px; color: var(--mc-text-3); margin-bottom: 8px; }

.havn-mc-row {
	display: grid;
	gap: 18px;
}
.havn-mc-row > * { min-width: 0; }   /* prevent overflow children from blowing the grid */
.havn-mc-row-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.havn-mc-row-1-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Chart container — fixed aspect so Chart.js can't grow forever inside
   .havn-mc-an-big (which spans 2 grid rows). */
.havn-mc-chart-wrap {
	position: relative;
	height: 200px;
	width: 100%;
	margin-top: 10px;
}
.havn-mc-chart-wrap canvas {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
}

.havn-mc-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	background: var(--mc-accent-soft);
	color: var(--mc-accent);
	border: 1px solid rgba(212,179,112,.25);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.havn-mc-tag-soft {
	background: var(--mc-surface);
	color: var(--mc-text-2);
	border-color: var(--mc-border);
}

.havn-mc-toggle-group {
	display: inline-flex;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	padding: 3px;
}
.havn-mc-toggle-group button {
	padding: 5px 12px;
	background: transparent;
	border: 0;
	border-radius: 7px;
	color: var(--mc-text-2);
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
}
.havn-mc-toggle-group .is-active {
	background: var(--mc-accent-soft);
	color: var(--mc-accent);
}

/* ==========================================================================
   KPI grid
   ========================================================================== */

.havn-mc-kpis {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.havn-mc-kpi {
	position: relative;
	overflow: hidden;
	padding: 18px 20px;
	background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
	transition: transform .25s ease, border-color .25s ease;
}

.havn-mc-kpi::after {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--card-accent, var(--mc-accent)), transparent);
}

.havn-mc-kpi:hover {
	transform: translateY(-2px);
	border-color: var(--mc-border-2);
}

.havn-mc-kpi-head {
	display: flex;
	justify-content: space-between;
	align-items: start;
	margin-bottom: 14px;
}

.havn-mc-kpi-icon {
	width: 36px; height: 36px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: var(--mc-surface);
	color: var(--card-accent, var(--mc-accent));
}
.havn-mc-kpi-icon svg { width: 18px; height: 18px; }

.havn-mc-kpi-trend {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--mc-success);
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(111,207,151,.10);
}
.havn-mc-kpi-trend.is-down {
	color: #F2A1A1;
	background: rgba(242,161,161,.08);
}
.havn-mc-kpi-trend svg { width: 11px; height: 11px; }

.havn-mc-kpi-label {
	font-size: 12px;
	color: var(--mc-text-3);
	margin-bottom: 6px;
}

.havn-mc-kpi-value {
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.05;
	color: var(--mc-text);
}

.havn-mc-kpi-suffix {
	font-size: 16px;
	color: var(--mc-text-3);
	margin-left: 4px;
	font-weight: 500;
}

.havn-mc-kpi-sub {
	font-size: 11.5px;
	color: var(--mc-text-3);
	margin-top: 4px;
}

/* ==========================================================================
   Hot leads
   ========================================================================== */

.havn-mc-hot-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 14px;
}

.havn-mc-hot-card {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
	transition: border-color .2s ease;
	overflow: hidden;
}
.havn-mc-hot-body { min-width: 0; }
.havn-mc-hot-stats strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
	max-width: 100%;
}
.havn-mc-hot-card:hover { border-color: var(--mc-accent); }

.havn-mc-hot-score {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.havn-mc-score-ring {
	--score: 75;
	width: 70px; height: 70px;
	border-radius: 50%;
	background:
		conic-gradient(var(--mc-accent) calc(var(--score) * 1%), rgba(255,255,255,.06) 0);
	display: grid;
	place-items: center;
	position: relative;
}
.havn-mc-score-ring::before {
	content: '';
	position: absolute;
	inset: 5px;
	background: var(--mc-bg-2);
	border-radius: 50%;
}
.havn-mc-score-ring span {
	position: relative;
	font-size: 18px;
	font-weight: 700;
	color: var(--mc-text);
}

.havn-mc-hot-meta { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }

.havn-mc-hot-title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
}

.havn-mc-hot-loc {
	margin: 0 0 12px;
	font-size: 12.5px;
	color: var(--mc-text-3);
}

.havn-mc-hot-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	padding: 10px;
	background: var(--mc-surface);
	border-radius: 10px;
	margin-bottom: 12px;
}
.havn-mc-hot-stats strong {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-top: 2px;
}

.havn-mc-hot-actions { display: flex; gap: 8px; }
.havn-mc-hot-actions .havn-btn { flex: 1; justify-content: center; }
.havn-mc-hot-actions .havn-btn svg { width: 14px; height: 14px; margin-right: 4px; }

/* ==========================================================================
   CRM module
   ========================================================================== */

.havn-mc-crm-pro {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr) 280px;
	gap: 14px;
	min-height: 420px;
}

.havn-mc-crm-list, .havn-mc-crm-right {
	background: var(--mc-bg-2);
	border: 1px solid var(--mc-border);
	border-radius: var(--mc-radius);
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.havn-mc-crm-list-head input {
	width: 100%;
	padding: 9px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	color: var(--mc-text);
	font: inherit;
	outline: 0;
}

.havn-mc-contact-list {
	list-style: none;
	margin: 0; padding: 0;
	display: flex; flex-direction: column;
	gap: 4px;
	overflow-y: auto;
}

.havn-mc-contact-row {
	display: grid;
	grid-template-columns: 28px 1fr auto;
	gap: 10px;
	align-items: center;
	padding: 8px 10px;
	border-radius: 9px;
	cursor: pointer;
	transition: background .15s ease;
}
.havn-mc-contact-row:hover { background: var(--mc-surface); }
.havn-mc-contact-row.is-active {
	background: var(--mc-accent-soft);
	box-shadow: inset 0 0 0 1px rgba(212,179,112,.25);
}

.havn-mc-contact-meta { display: flex; flex-direction: column; min-width: 0; }
.havn-mc-contact-meta strong { font-size: 13px; }
.havn-mc-contact-meta span { font-size: 11.5px; color: var(--mc-text-3); }

.havn-mc-score-mini {
	font-size: 11px;
	font-weight: 700;
	padding: 3px 7px;
	border-radius: 999px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
}

.havn-mc-crm-center {
	background: var(--mc-bg-2);
	border: 1px solid var(--mc-border);
	border-radius: var(--mc-radius);
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.havn-mc-contact-header {
	display: flex;
	align-items: center;
	gap: 14px;
}
.havn-mc-contact-header h4 { margin: 0 0 2px; font-size: 18px; }
.havn-mc-contact-header p { margin: 0; font-size: 12.5px; color: var(--mc-text-3); }
.havn-mc-contact-actions { margin-left: auto; display: flex; gap: 6px; }

.havn-mc-timeline {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 8px 0 0;
	border-top: 1px solid var(--mc-border);
}
.havn-mc-timeline-item {
	display: grid;
	grid-template-columns: 16px 1fr;
	gap: 12px;
	align-items: start;
}
.havn-mc-timeline-dot {
	width: 10px; height: 10px;
	border-radius: 50%;
	margin-top: 6px;
	box-shadow: 0 0 0 3px rgba(255,255,255,.05);
}
.havn-mc-timeline-item small { color: var(--mc-text-3); }

.havn-mc-mini-card {
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 11px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.havn-mc-mini-card strong { font-size: 14px; }
.havn-mc-mini-card small { color: var(--mc-text-3); }
.havn-mc-mini-card p { margin: 4px 0 0; font-size: 13px; color: var(--mc-text-2); }
.havn-mc-task {
	display: flex; align-items: center; gap: 8px; font-size: 12.5px;
	color: var(--mc-text-2); cursor: pointer;
}
.havn-mc-task input { accent-color: var(--mc-accent); }

/* CRM kanban */
.havn-mc-kanban {
	display: grid;
	grid-template-columns: repeat(5, minmax(180px, 1fr));
	gap: 12px;
	overflow-x: auto;
}
.havn-mc-kanban-col {
	background: var(--mc-bg-2);
	border: 1px solid var(--mc-border);
	border-radius: var(--mc-radius);
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 220px;
}
.havn-mc-kanban-head {
	display: flex; justify-content: space-between; align-items: center;
	font-size: 12px; font-weight: 600; color: var(--mc-text-2);
	padding-bottom: 8px; border-bottom: 1px solid var(--mc-border);
}
.havn-mc-kanban-count {
	font-size: 11px; padding: 2px 7px;
	background: var(--mc-surface); border-radius: 999px;
}
.havn-mc-kanban-card {
	background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	padding: 10px 12px;
	cursor: grab;
	transition: transform .15s ease, border-color .15s ease;
}
.havn-mc-kanban-card:hover { border-color: var(--mc-border-2); transform: translateY(-1px); }
.havn-mc-kanban-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.havn-mc-kanban-card small { color: var(--mc-text-3); }
.havn-mc-kanban-card footer { margin-top: 8px; }

/* CRM simple list (Starter) */
.havn-mc-crm-list-simple {
	background: var(--mc-bg-2);
	border: 1px solid var(--mc-border);
	border-radius: var(--mc-radius);
	overflow: hidden;
}
.havn-mc-list-head, .havn-mc-list-row {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1fr;
	gap: 12px;
	padding: 12px 16px;
	align-items: center;
}
.havn-mc-list-head {
	background: var(--mc-surface);
	border-bottom: 1px solid var(--mc-border);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mc-text-3);
}
.havn-mc-list-row + .havn-mc-list-row { border-top: 1px solid var(--mc-border); }
.havn-mc-list-row { font-size: 13px; }
.havn-mc-locked-inline {
	display: flex; align-items: center; gap: 10px;
	padding: 14px 16px;
	border-top: 1px solid var(--mc-border);
	background: var(--mc-accent-soft);
	font-size: 13px;
}
.havn-mc-locked-inline svg { color: var(--mc-accent); width: 18px; height: 18px; }
.havn-mc-locked-inline .havn-btn { margin-left: auto; }

/* ==========================================================================
   Deal flow
   ========================================================================== */

.havn-mc-deal-stages {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
}
.havn-mc-deal-stage {
	background: var(--mc-bg-2);
	border: 1px solid var(--mc-border);
	border-radius: 12px;
	padding: 14px;
	display: flex; flex-direction: column; gap: 6px;
	position: relative;
	overflow: hidden;
}
.havn-mc-deal-stage strong { font-size: 14px; }
.havn-mc-deal-stage-bar {
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: var(--w, 50%);
	background: linear-gradient(90deg, var(--mc-accent-soft), transparent);
	pointer-events: none;
}
.havn-mc-deal-stage > * { position: relative; }

.havn-mc-deal-table {
	background: var(--mc-bg-2);
	border: 1px solid var(--mc-border);
	border-radius: var(--mc-radius);
	overflow: hidden;
}
.havn-mc-deal-row {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.2fr 1fr 1fr;
	gap: 12px;
	padding: 12px 16px;
	align-items: center;
	font-size: 13px;
}
.havn-mc-deal-head {
	background: var(--mc-surface);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mc-text-3);
}
.havn-mc-deal-row + .havn-mc-deal-row { border-top: 1px solid var(--mc-border); }

/* ==========================================================================
   Marketing hub
   ========================================================================== */

.havn-mc-mkt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}
.havn-mc-mkt-card {
	text-align: left;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
	transition: transform .2s ease, border-color .2s ease;
	color: var(--mc-text);
}
.havn-mc-mkt-card:hover {
	transform: translateY(-2px);
	border-color: var(--mc-accent);
}
.havn-mc-mkt-icon {
	width: 38px; height: 38px;
	display: grid; place-items: center;
	border-radius: 10px;
	background: var(--mc-accent-soft);
	color: var(--mc-accent);
	margin-bottom: 4px;
}
.havn-mc-mkt-icon svg { width: 18px; height: 18px; }
.havn-mc-mkt-card strong { font-size: 14px; }
.havn-mc-mkt-card small { color: var(--mc-text-3); }
.havn-mc-mkt-cta { font-size: 12px; color: var(--mc-accent); margin-top: 4px; }

/* ==========================================================================
   Calendar
   ========================================================================== */

.havn-mc-cal-sync { display: flex; gap: 8px; align-items: center; color: var(--mc-text-3); }
.havn-mc-cal-sync svg { width: 18px; height: 18px; }

.havn-mc-cal-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.havn-mc-cal-item {
	display: grid;
	grid-template-columns: 8px 60px 1fr auto;
	gap: 12px;
	align-items: center;
	padding: 10px 12px;
	border-radius: 9px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
}
.havn-mc-cal-dot { width: 8px; height: 8px; border-radius: 50%; }
.havn-mc-cal-time { font-size: 12px; font-weight: 600; color: var(--mc-text-2); }
.havn-mc-cal-title { font-size: 13px; }

/* ==========================================================================
   Analytics
   ========================================================================== */

.havn-mc-analytics-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
}
/* The conversion chart card no longer spans 2 grid rows — it grew unbounded
   when paired with .havn-mc-chart-wrap. Single row with a fixed chart area. */
.havn-mc-an-big { grid-column: span 1; }
.havn-mc-an-funnel { grid-column: span 4; }

.havn-mc-card h4 { margin: 4px 0 0; font-size: 22px; font-weight: 600; }
.havn-mc-card h4 small { font-size: 11px; margin-left: 6px; }
.havn-mc-card small { color: var(--mc-text-3); }

.havn-mc-funnel { display: flex; flex-direction: column; gap: 8px; }
.havn-mc-funnel-row {
	display: grid;
	grid-template-columns: 90px 1fr 50px;
	gap: 12px;
	align-items: center;
	font-size: 12.5px;
}
.havn-mc-funnel-bar {
	height: 14px;
	background: var(--mc-surface);
	border-radius: 7px;
	overflow: hidden;
}
.havn-mc-funnel-bar span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--mc-accent), #F2D390);
	border-radius: 7px;
}

/* ==========================================================================
   AI panel + activity + tasks
   ========================================================================== */

.havn-mc-ai-list, .havn-mc-task-list, .havn-mc-activity-list {
	list-style: none; margin: 12px 0 0; padding: 0;
	display: flex; flex-direction: column; gap: 6px;
}
.havn-mc-ai-list li {
	display: grid;
	grid-template-columns: 32px 1fr auto;
	gap: 12px;
	align-items: center;
	padding: 10px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 11px;
}
.havn-mc-ai-icon {
	width: 32px; height: 32px;
	display: grid; place-items: center;
	border-radius: 9px;
	background: var(--mc-accent-soft);
	color: var(--mc-accent);
}
.havn-mc-ai-icon svg { width: 16px; height: 16px; }
.havn-mc-ai-list strong { display: block; font-size: 13px; }
.havn-mc-ai-list small { color: var(--mc-text-3); }

.havn-mc-task-list li {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
}
.havn-mc-task-list label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; font-size: 13px; }
.havn-mc-task-list input { accent-color: var(--mc-accent); }
.havn-mc-task-list .is-done span, .havn-mc-task-list li.is-done span { text-decoration: line-through; color: var(--mc-text-3); }

.havn-mc-activity-list li {
	display: grid;
	grid-template-columns: 10px 1fr auto;
	gap: 12px;
	align-items: start;
	padding: 8px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
}
.havn-mc-activity-dot {
	width: 8px; height: 8px; border-radius: 50%; margin-top: 7px;
	box-shadow: 0 0 0 3px rgba(255,255,255,.04);
}
.havn-mc-activity-list strong { font-size: 13px; display: block; }
.havn-mc-activity-list small { color: var(--mc-text-3); }
.havn-mc-when { font-size: 11px; color: var(--mc-text-3); }

/* Market insights + money grid */
.havn-mc-market-grid, .havn-mc-money-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-top: 10px;
}
.havn-mc-market-grid > div, .havn-mc-money-grid > div {
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 11px;
	padding: 12px;
	display: flex; flex-direction: column; gap: 2px;
}
.havn-mc-market-grid strong, .havn-mc-money-grid strong { font-size: 18px; font-weight: 700; }

.havn-mc-progress {
	margin-top: 14px;
}
.havn-mc-progress-bar {
	height: 8px; background: var(--mc-surface);
	border-radius: 999px; overflow: hidden;
	margin-bottom: 6px;
}
.havn-mc-progress-bar span {
	display: block; height: 100%;
	background: linear-gradient(90deg, var(--mc-accent), #F2D390);
	border-radius: 999px;
}

/* CMA */
.havn-mc-cma-input { display: flex; gap: 8px; margin-top: 8px; }
.havn-mc-cma-input input {
	flex: 1;
	padding: 11px 14px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	color: var(--mc-text);
	font: inherit;
	outline: 0;
}
.havn-mc-cma-input .havn-btn svg { width: 14px; height: 14px; margin-right: 4px; }

/* Locked module grid */
.havn-mc-locked-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 12px;
}
.havn-mc-locked-mini {
	display: flex; flex-direction: column; gap: 8px;
}
.havn-mc-locked-mini strong { font-size: 15px; }
.havn-mc-locked-mini small { color: var(--mc-text-2); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
	.havn-mc-kpis { grid-template-columns: repeat(2, 1fr); }
	.havn-mc-analytics-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.havn-mc-an-big, .havn-mc-an-funnel { grid-column: span 2; }
	.havn-mc-crm-pro { grid-template-columns: 1fr; }
	.havn-mc-deal-stages { grid-template-columns: repeat(2, 1fr); }
	.havn-mc-deal-row { grid-template-columns: 1fr 1fr; }
	.havn-mc-deal-head { display: none; }
	.havn-mc-market-grid, .havn-mc-money-grid { grid-template-columns: 1fr 1fr; }
	.havn-mc-row-2-1, .havn-mc-row-1-1 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
	.havn-mc { grid-template-columns: 1fr; }
	.havn-mc-sidebar {
		position: fixed;
		top: 0; left: 0;
		width: 260px;
		z-index: 200;
		transform: translateX(-100%);
		transition: transform .25s ease;
	}
	.havn-mc.is-sidebar-open .havn-mc-sidebar { transform: translateX(0); }
	.havn-mc-menu { display: inline-flex; align-items: center; justify-content: center; }
	.havn-mc-topbar { margin-left: 0; margin-right: 0; padding: 12px 16px; }
	.havn-mc-main { padding: 20px 16px 80px; }
	.havn-mc-search { max-width: none; }
	.havn-mc-search kbd { display: none; }
	.havn-mc-profile-pill-name { display: none; }
	.havn-mc-kanban { grid-auto-flow: column; grid-auto-columns: 220px; grid-template-columns: none; }
}

@media (max-width: 560px) {
	.havn-mc-kpis { grid-template-columns: 1fr; }
	.havn-mc-market-grid, .havn-mc-money-grid { grid-template-columns: 1fr; }
	.havn-mc-analytics-grid { grid-template-columns: 1fr; }
	.havn-mc-an-big, .havn-mc-an-funnel { grid-column: auto; }
	.havn-mc-hot-card { grid-template-columns: 1fr; }
	.havn-mc-hot-score { flex-direction: row; }
	.havn-mc-deal-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Light mode (opt-in via .havn-mc.is-light)
   ========================================================================== */

.havn-mc.is-light {
	--mc-bg:       #F8F9FB;
	--mc-bg-2:     #FFFFFF;
	--mc-bg-3:     #FFFFFF;
	--mc-surface:  rgba(15,15,20,.03);
	--mc-surface-2: rgba(15,15,20,.05);
	--mc-border:   rgba(15,15,20,.08);
	--mc-border-2: rgba(15,15,20,.14);
	--mc-text:     #15171C;
	--mc-text-2:   rgba(21,23,28,.72);
	--mc-text-3:   rgba(21,23,28,.5);
	--mc-shadow:   0 1px 0 rgba(255,255,255,.6) inset, 0 12px 32px -16px rgba(0,0,0,.12);
}
.havn-mc.is-light .havn-mc-main {
	background:
		radial-gradient(1000px 500px at -10% -20%, rgba(212,179,112,.10), transparent 50%),
		var(--mc-bg);
}
.havn-mc.is-light .havn-mc-sidebar {
	background: #FFFFFF;
	border-right-color: var(--mc-border);
}

/* ---------- v1.7.0 — comprehensive light-mode overrides ---------- */

.havn-mc.is-light .havn-mc-card,
.havn-mc.is-light .havn-ot-card,
.havn-mc.is-light .havn-mc-deal-row,
.havn-mc.is-light .havn-mc-step-panel,
.havn-mc.is-light .havn-mc-modal-card,
.havn-mc.is-light .havn-mc-priority-banner {
	background: #FFFFFF;
	border-color: var(--mc-border);
	box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 24px -16px rgba(15,15,20,.18);
}
.havn-mc.is-light .havn-mc-card {
	background: linear-gradient(180deg, #FFFFFF, rgba(15,15,20,.01)) !important;
}

/* Topbar */
.havn-mc.is-light .havn-mc-topbar {
	background: rgba(255,255,255,.85);
	border-bottom-color: var(--mc-border);
	backdrop-filter: blur(10px);
}
.havn-mc.is-light .havn-mc-search,
.havn-mc.is-light .havn-mc-pill {
	background: #F4F5F8;
	border-color: var(--mc-border);
	color: var(--mc-text);
}
.havn-mc.is-light .havn-mc-search input { color: var(--mc-text); }
.havn-mc.is-light .havn-mc-search input::placeholder { color: var(--mc-text-3); }
.havn-mc.is-light .havn-mc-search kbd {
	background: #FFFFFF;
	border-color: var(--mc-border);
	color: var(--mc-text-2);
}

/* Sidebar */
.havn-mc.is-light .havn-mc-nav-item { color: var(--mc-text-2); }
.havn-mc.is-light .havn-mc-nav-icon { color: var(--mc-text-3); }
.havn-mc.is-light .havn-mc-nav-item:hover { background: #F4F5F8; color: var(--mc-text); }
.havn-mc.is-light .havn-mc-nav-item:hover .havn-mc-nav-icon { color: var(--mc-text); }
.havn-mc.is-light .havn-mc-nav-item.is-active {
	background: #FFFBF0;
	color: var(--mc-text);
}
.havn-mc.is-light .havn-mc-nav-item.is-active .havn-mc-nav-icon { color: var(--mc-accent); }
.havn-mc.is-light .havn-mc-brand-name,
.havn-mc.is-light .havn-mc-profile-name { color: var(--mc-text); }
.havn-mc.is-light .havn-mc-sidebar-foot { border-top-color: var(--mc-border); }
.havn-mc.is-light .havn-mc-avatar {
	background: var(--mc-accent-soft);
	color: var(--mc-accent);
}
.havn-mc.is-light .havn-mc-profile-tier,
.havn-mc.is-light .havn-mc-brand-tier { color: var(--mc-text-3); }

/* KPI cards */
.havn-mc.is-light .havn-mc-kpi {
	background: #FFFFFF !important;
	border-color: var(--mc-border);
}
.havn-mc.is-light .havn-mc-kpi-label,
.havn-mc.is-light .havn-mc-kpi-sub { color: var(--mc-text-3); }
.havn-mc.is-light .havn-mc-kpi-value { color: var(--mc-text); }
.havn-mc.is-light .havn-mc-kpi-trend.is-up   { background: rgba(111,207,151,.16); color: #2E8B57; }
.havn-mc.is-light .havn-mc-kpi-trend.is-down { background: rgba(232,90,90,.16);  color: #C84545; }

/* Welcome hero + priority */
.havn-mc.is-light .havn-welcome-card,
.havn-mc.is-light .havn-mc-welcome,
.havn-mc.is-light .havn-mc-welcome-card {
	background: linear-gradient(135deg, #F8F2E1 0%, #FFFFFF 100%) !important;
	color: var(--mc-text) !important;
	border: 1px solid var(--mc-border);
}
.havn-mc.is-light .havn-welcome-card h1,
.havn-mc.is-light .havn-mc-welcome h1 { color: var(--mc-text) !important; }
.havn-mc.is-light .havn-mc-priority-banner {
	background: linear-gradient(135deg, var(--mc-accent-soft), #FFFFFF) !important;
	color: var(--mc-text) !important;
	border: 1px solid var(--mc-accent);
}

/* Tables */
.havn-mc.is-light .havn-mc-table thead th { color: var(--mc-text-3); border-bottom-color: var(--mc-border); }
.havn-mc.is-light .havn-mc-table tbody td { color: var(--mc-text); border-bottom-color: var(--mc-border); }
.havn-mc.is-light .havn-mc-table tbody tr:hover { background: #F8F9FB; }

/* Buttons */
.havn-mc.is-light .havn-mc-btn-ghost {
	background: #F4F5F8;
	border-color: var(--mc-border);
	color: var(--mc-text-2);
}
.havn-mc.is-light .havn-mc-btn-ghost:hover { background: #ECEEF3; color: var(--mc-text); }
.havn-mc.is-light .havn-mc-iconbtn {
	background: #F4F5F8;
	border-color: var(--mc-border);
	color: var(--mc-text-2);
}
.havn-mc.is-light .havn-mc-iconbtn:hover { background: #ECEEF3; color: var(--mc-text); }

/* Chips */
.havn-mc.is-light .havn-mc-chip {
	background: #F4F5F8;
	border-color: var(--mc-border);
	color: var(--mc-text-2);
}
.havn-mc.is-light .havn-mc-chip:hover { background: #ECEEF3; color: var(--mc-text); }
.havn-mc.is-light .havn-mc-chip.is-active {
	background: var(--mc-accent-soft);
	color: var(--mc-accent);
}

/* Form inputs */
.havn-mc.is-light .havn-mc-form input,
.havn-mc.is-light .havn-mc-form textarea,
.havn-mc.is-light .havn-mc-form select,
.havn-mc.is-light .havn-ot-calc input,
.havn-mc.is-light .havn-ot-form-grid input,
.havn-mc.is-light .havn-ot-form-grid select,
.havn-mc.is-light .havn-mc-select {
	background: #FFFFFF;
	border-color: var(--mc-border);
	color: var(--mc-text);
}

/* Pipeline + stepper + tools */
.havn-mc.is-light .havn-mc-rail-step,
.havn-mc.is-light .havn-mc-cal-day,
.havn-mc.is-light .havn-mc-agenda-item,
.havn-mc.is-light .havn-mc-toggle-list li,
.havn-mc.is-light .havn-mc-checkbox,
.havn-mc.is-light .havn-mc-pm,
.havn-mc.is-light .havn-ot-step,
.havn-mc.is-light .havn-ot-factor,
.havn-mc.is-light .havn-ot-stat,
.havn-mc.is-light .havn-ot-tips li,
.havn-mc.is-light .havn-ot-lesson-col,
.havn-mc.is-light .havn-ot-val-card,
.havn-mc.is-light .havn-ot-agent,
.havn-mc.is-light .havn-ot-calc-summary,
.havn-mc.is-light .havn-ot-prob-factors li {
	background: #FFFFFF;
	border-color: var(--mc-border);
	color: var(--mc-text);
}
.havn-mc.is-light .havn-mc-step-dot {
	background: #FFFFFF;
	border-color: var(--mc-border-2);
	color: var(--mc-text-3);
}
.havn-mc.is-light .havn-mc-deal-row { background: #FFFFFF; border-color: var(--mc-border); }
.havn-mc.is-light .havn-mc-deal-row:hover { background: #F8F9FB; }

/* Marketplace cards */
.havn-mc.is-light .havn-market-card {
	background: #FFFFFF;
	border-color: var(--mc-border);
}
.havn-mc.is-light .havn-market-card .havn-market-title { color: var(--mc-text); }
.havn-mc.is-light .havn-market-meta { color: var(--mc-text-2); }
.havn-mc.is-light .havn-market-card .havn-muted { color: var(--mc-text-3); }

/* Score bars / progress */
.havn-mc.is-light .havn-mc-score-bar,
.havn-mc.is-light .havn-mc-bar,
.havn-mc.is-light .havn-mc-deal-progress-bar {
	background: #ECEEF3;
}

/* Status pills */
.havn-mc.is-light .havn-mc-status-hot       { background: rgba(232,90,90,.16); color: #C84545; }
.havn-mc.is-light .havn-mc-status-new       { background: var(--mc-accent-soft); color: var(--mc-accent); }
.havn-mc.is-light .havn-mc-status-responded { background: rgba(111,207,151,.16); color: #2E8B57; }
.havn-mc.is-light .havn-mc-status-cold      { background: #F4F5F8; color: var(--mc-text-3); }

/* Empty states */
.havn-mc.is-light .havn-mc-empty,
.havn-mc.is-light .havn-mc-empty-state { color: var(--mc-text-2); border-color: var(--mc-border-2); }

/* Modal backdrop */
.havn-mc.is-light .havn-mc-modal-back { background: rgba(8,8,12,.28); }
.havn-mc.is-light .havn-mc-modal-card {
	background: #FFFFFF !important;
	border-color: var(--mc-border-2);
	box-shadow: 0 30px 80px rgba(15,15,20,.22);
}

/* Funnel */
.havn-mc.is-light .havn-mc-funnel-step {
	background: linear-gradient(90deg, var(--mc-accent-soft), #F8F9FB);
	color: var(--mc-text);
}

/* AI panel */
.havn-mc.is-light .havn-mc-ai-panel {
	background: #FFFFFF;
	border-left: 1px solid var(--mc-border);
	color: var(--mc-text);
}

/* ==========================================================================
   Reveal animation
   ========================================================================== */

.havn-mc-card, .havn-mc-kpi, .havn-mc-section {
	animation: havnMcReveal .55s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes havnMcReveal {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   v1.4.0 — VIEW ROUTER (SPA-style per-sidebar pages)
   ========================================================================== */

.havn-mc-views {
	display: block;
	width: 100%;
}

.havn-mc-view {
	display: none;
	flex-direction: column;
	gap: 22px;
	animation: havnMcViewIn .35s cubic-bezier(.2,.7,.2,1) both;
}
.havn-mc-view.is-active { display: flex; }

@keyframes havnMcViewIn {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   View header bar (eyebrow + h1 + actions)
   ========================================================================== */

.havn-mc-view-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	padding: 0 0 4px;
}
.havn-mc-view-head-text { min-width: 0; }
.havn-mc-view-title {
	margin: 6px 0 4px;
	font-size: 30px;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--mc-text);
	line-height: 1.1;
}
.havn-mc-view-sub {
	margin: 0;
	color: var(--mc-text-2);
	font-size: 14px;
	max-width: 56ch;
}
.havn-mc-view-actions {
	display: flex; gap: 8px; flex-wrap: wrap;
}

/* ==========================================================================
   Buttons (forms, action rows, view header)
   ========================================================================== */

.havn-mc-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 14px;
	border-radius: 10px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--mc-text);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s, transform .1s;
	text-decoration: none;
}
.havn-mc-btn svg { width: 15px; height: 15px; }
.havn-mc-btn-sm  { padding: 6px 10px; font-size: 12.5px; }
.havn-mc-btn-ghost {
	background: var(--mc-surface);
	border-color: var(--mc-border);
	color: var(--mc-text-2);
}
.havn-mc-btn-ghost:hover {
	background: var(--mc-surface-2);
	color: var(--mc-text);
}
.havn-mc-btn-primary {
	background: linear-gradient(180deg, var(--mc-accent), color-mix(in srgb, var(--mc-accent), #000 18%));
	color: #0E0F12;
	font-weight: 600;
}
.havn-mc-btn-primary:hover { transform: translateY(-1px); }

.havn-mc-iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px; height: 32px;
	border-radius: 8px;
	border: 1px solid var(--mc-border);
	background: var(--mc-surface);
	color: var(--mc-text-2);
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.havn-mc-iconbtn:hover { background: var(--mc-surface-2); color: var(--mc-text); }
.havn-mc-iconbtn.is-active { background: var(--mc-accent-soft); color: var(--mc-accent); border-color: var(--mc-accent); }
.havn-mc-iconbtn svg { width: 16px; height: 16px; }

/* ==========================================================================
   Chips + filter rows
   ========================================================================== */

.havn-mc-chip {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--mc-border);
	background: var(--mc-surface);
	color: var(--mc-text-2);
	font-size: 12.5px;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.havn-mc-chip:hover { background: var(--mc-surface-2); color: var(--mc-text); }
.havn-mc-chip.is-active {
	background: var(--mc-accent-soft);
	color: var(--mc-accent);
	border-color: color-mix(in srgb, var(--mc-accent), transparent 60%);
}

.havn-mc-filter-row {
	display: flex; gap: 8px; flex-wrap: wrap;
}

/* ==========================================================================
   Tables (Leads, Billing, generic)
   ========================================================================== */

.havn-mc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}
.havn-mc-table thead th {
	text-align: left;
	font-weight: 600;
	font-size: 11.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mc-text-3);
	padding: 10px 12px;
	border-bottom: 1px solid var(--mc-border);
}
.havn-mc-table tbody td {
	padding: 12px;
	border-bottom: 1px solid var(--mc-border);
	color: var(--mc-text);
	vertical-align: middle;
}
.havn-mc-table tbody tr:hover { background: var(--mc-surface); }
.havn-mc-table tbody tr:last-child td { border-bottom: 0; }
.havn-mc-table input[type="checkbox"] { accent-color: var(--mc-accent); }
.havn-mc-row-actions { white-space: nowrap; }
.havn-mc-row-actions .havn-mc-iconbtn { margin-left: 4px; }

.havn-mc-lead-name { font-weight: 600; }
.havn-mc-tiny { font-size: 11.5px; }

.havn-mc-score {
	display: flex; align-items: center; gap: 8px; min-width: 110px;
}
.havn-mc-score-bar {
	flex: 1;
	height: 6px;
	background: var(--mc-surface-2);
	border-radius: 999px;
	overflow: hidden;
}
.havn-mc-score-bar span {
	display: block; height: 100%;
	background: linear-gradient(90deg, #6FCF97, var(--mc-accent));
}
.havn-mc-score strong { font-size: 12px; color: var(--mc-text-2); }

.havn-mc-status {
	display: inline-flex; align-items: center;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
}
.havn-mc-status-hot       { background: rgba(255,107,107,.16); color: #FF8585; }
.havn-mc-status-new       { background: var(--mc-accent-soft);  color: var(--mc-accent); }
.havn-mc-status-responded { background: rgba(111,207,151,.16); color: #6FCF97; }
.havn-mc-status-cold      { background: rgba(255,255,255,.06); color: var(--mc-text-3); }

/* ==========================================================================
   Toolbar row above tables (search + chips)
   ========================================================================== */

.havn-mc-leads-toolbar,
.havn-mc-marketplace-toolbar {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	padding-bottom: 14px;
	margin-bottom: 4px;
	border-bottom: 1px solid var(--mc-border);
}
.havn-mc-search-inline {
	flex: 1; min-width: 240px;
	display: flex; align-items: center; gap: 8px;
	padding: 8px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
}
.havn-mc-search-inline svg { width: 16px; height: 16px; color: var(--mc-text-3); }
.havn-mc-search-inline input {
	flex: 1; border: 0; background: transparent; outline: none;
	color: var(--mc-text); font: inherit; font-size: 13.5px;
}

.havn-mc-view-toggle { display: flex; gap: 4px; margin-left: auto; }

/* ==========================================================================
   Marketplace specific
   ========================================================================== */

.havn-mc-marketplace-filters {
	display: flex; flex-wrap: wrap; gap: 8px;
	width: 100%;
}
.havn-mc-select {
	padding: 8px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	color: var(--mc-text);
	font: inherit; font-size: 13px;
	cursor: pointer;
}
.havn-market-badge {
	position: absolute; top: 10px; left: 10px;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(0,0,0,.55);
	color: #fff;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.havn-market-media { position: relative; }
.havn-mc-fav {
	position: absolute; top: 8px; right: 8px;
	width: 30px; height: 30px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	border: 0;
	background: rgba(0,0,0,.55);
	color: #fff;
	cursor: pointer;
}
.havn-mc-fav svg { width: 15px; height: 15px; }
.havn-mc-card-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* ==========================================================================
   Calendar
   ========================================================================== */

.havn-mc-cal-head {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 14px;
}
.havn-mc-cal-nav { display: flex; align-items: center; gap: 6px; }
.havn-mc-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}
.havn-mc-cal-dow {
	font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
	text-transform: uppercase; color: var(--mc-text-3);
	padding: 6px 0;
	text-align: center;
}
.havn-mc-cal-day {
	min-height: 64px;
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	padding: 8px;
	position: relative;
	display: flex; flex-direction: column; justify-content: space-between;
	background: var(--mc-surface);
}
.havn-mc-cal-day.is-blank { background: transparent; border-color: transparent; }
.havn-mc-cal-day.is-today {
	border-color: var(--mc-accent);
	background: var(--mc-accent-soft);
}
.havn-mc-cal-num { font-size: 13px; font-weight: 600; }
.havn-mc-cal-dot { display: block; width: 6px; height: 6px; border-radius: 50%; }

/* ----- Interactive calendar (v2.2.60) ----- */
/* minmax(0,1fr) keeps all 7 columns equal even when a chip holds long text */
.havn-mc-cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.havn-mc-cal-day {
	height: 92px;            /* fixed square — never grows with events */
	min-height: 0;
	overflow: hidden;        /* extra chips are clipped, not stretched */
	padding: 7px;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
	justify-content: flex-start;
	gap: 4px;
}
.havn-mc-cal-day.is-blank { cursor: default; }
.havn-mc-cal-day:not(.is-blank):hover { border-color: var(--mc-accent); }
.havn-mc-cal-day:not(.is-blank):focus-visible { outline: 2px solid var(--mc-accent); outline-offset: 1px; }
.havn-mc-cal-day.is-drop {
	border-color: var(--mc-accent);
	background: var(--mc-accent-soft);
	box-shadow: inset 0 0 0 1px var(--mc-accent);
}

.havn-mc-cal-events {
	display: flex; flex-direction: column; gap: 2px;
	width: 100%; min-width: 0;
	overflow: hidden;
}
.havn-mc-cal-event {
	display: flex; align-items: center; gap: 4px;
	width: 100%; min-width: 0; max-width: 100%;
	text-align: left;
	border: 0;
	border-left: 3px solid var(--mc-accent);
	border-radius: 4px;
	padding: 2px 5px;
	background: var(--mc-accent-soft);
	color: var(--mc-text);
	cursor: pointer;
	font: inherit;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	flex: 0 0 auto;
	transition: filter .12s ease;
}
.havn-mc-cal-event:hover { filter: brightness(1.14); }
.havn-mc-cal-event.is-dragging { opacity: .45; }
.havn-mc-cal-event-time { font-size: 9.5px; font-weight: 700; color: var(--mc-text-2); flex: 0 0 auto; }
.havn-mc-cal-event-title {
	font-size: 11px; font-weight: 600;
	flex: 1 1 auto; min-width: 0;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.havn-mc-cal-more { font-size: 10px; font-weight: 700; color: var(--mc-text-3); padding: 1px 4px; }
/* urgency accents on the chip's left border */
.havn-mc-cal-event.urg-high   { border-left-color: #E5675C; background: rgba(229,103,92,.14); }
.havn-mc-cal-event.urg-medium { border-left-color: #E0C285; background: rgba(224,194,133,.14); }
.havn-mc-cal-event.urg-low    { border-left-color: #8A93A3; background: rgba(138,147,163,.14); }

/* urgency badge (Upcoming popup + event detail) */
.havn-mc-urg {
	display: inline-block;
	font-size: 10px; font-weight: 700; letter-spacing: .03em;
	text-transform: uppercase;
	padding: 2px 7px; border-radius: 999px;
	background: rgba(138,147,163,.18); color: #B9C0CC;
}
.havn-mc-urg-high   { background: rgba(229,103,92,.20);  color: #F0A39B; }
.havn-mc-urg-medium { background: rgba(224,194,133,.20); color: #E8CF9C; }
.havn-mc-urg-low    { background: rgba(138,147,163,.18); color: #B9C0CC; }

/* ----- Event detail popup ----- */
.havn-mc-ed-body { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 14px; }
.havn-mc-ed-row {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 9px 2px;
	border-bottom: 1px solid var(--mc-border);
	font-size: 13.5px;
}
.havn-mc-ed-lbl { color: var(--mc-text-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.havn-mc-ed-link {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	width: 100%; text-align: left;
	margin-top: 8px;
	padding: 11px 12px;
	border: 1px solid var(--mc-border); border-radius: 10px;
	background: var(--mc-accent-soft); color: var(--mc-text);
	cursor: pointer; font: inherit;
}
.havn-mc-ed-link:hover { border-color: var(--mc-accent); }
.havn-mc-ed-link-val { font-weight: 600; color: var(--mc-accent); }
.havn-mc-modal-sm .havn-mc-modal-card { max-width: 380px; }

/* ----- Upcoming popup (topbar) ----- */
.havn-mc-upcoming-panel { width: 320px; max-height: 60vh; overflow: auto; }
.havn-mc-upcoming-list { display: flex; flex-direction: column; }
.havn-mc-upcoming-row {
	display: flex; flex-direction: column; gap: 3px;
	width: 100%; text-align: left;
	padding: 10px 14px;
	border: 0; border-bottom: 1px solid var(--mc-border);
	background: transparent; color: var(--mc-text);
	cursor: pointer; font: inherit;
}
.havn-mc-upcoming-row:last-child { border-bottom: 0; }
.havn-mc-upcoming-row:hover { background: var(--mc-accent-soft); }
.havn-mc-upcoming-when { font-size: 11px; font-weight: 700; color: var(--mc-text-3); }
.havn-mc-upcoming-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.havn-mc-upcoming-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.havn-mc-drawer-head-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.havn-mc-drawer-head-actions .havn-mc-drawer-close { margin-left: 0; }

.havn-mc-agenda {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-direction: column; gap: 10px;
}
.havn-mc-agenda-item {
	display: flex; gap: 14px;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--mc-surface);
	border-left: 3px solid var(--mc-accent);
}
.havn-mc-agenda-item[draggable="true"] { cursor: grab; }
.havn-mc-agenda-item[draggable="true"]:active { cursor: grabbing; }
.havn-mc-agenda-item.is-dragging { opacity: .45; }
.havn-mc-agenda-shoot   { border-left-color: #8AB4F8; }
.havn-mc-agenda-viewing { border-left-color: #6FCF97; }
.havn-mc-agenda-meeting { border-left-color: var(--mc-accent); }
.havn-mc-agenda-open    { border-left-color: #E0C285; }
.havn-mc-agenda-time { font-weight: 600; font-size: 12.5px; min-width: 64px; }
.havn-mc-agenda-title { font-size: 13.5px; font-weight: 500; }

/* ==========================================================================
   Analytics extras
   ========================================================================== */

.havn-mc-source-list {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-direction: column; gap: 10px;
}
.havn-mc-source-list li {
	display: grid;
	grid-template-columns: 130px 1fr 48px;
	align-items: center; gap: 10px;
	font-size: 13px;
}
.havn-mc-source-list strong { font-weight: 600; text-align: right; }
.havn-mc-bar {
	display: block; height: 6px;
	background: var(--mc-surface-2);
	border-radius: 999px;
	overflow: hidden;
}
.havn-mc-bar span {
	display: block; height: 100%;
	background: linear-gradient(90deg, var(--mc-accent), #E0C285);
}

.havn-mc-funnel {
	display: flex; flex-direction: column; gap: 8px; padding-top: 6px;
}
.havn-mc-funnel-step {
	width: var(--w, 100%);
	min-width: 120px;
	display: flex; justify-content: space-between; align-items: center;
	padding: 12px 16px;
	background: linear-gradient(90deg, var(--mc-accent-soft), transparent);
	border-left: 3px solid var(--mc-accent);
	border-radius: 8px;
	font-size: 13px;
}
.havn-mc-funnel-step strong { font-size: 16px; font-weight: 600; }

/* ==========================================================================
   Settings
   ========================================================================== */

.havn-mc-settings-side { padding: 12px; }
.havn-mc-settings-nav {
	display: flex; flex-direction: column; gap: 2px;
}
.havn-mc-settings-nav a {
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--mc-text-2);
	text-decoration: none;
	font-size: 13.5px;
}
.havn-mc-settings-nav a:hover { background: var(--mc-surface); color: var(--mc-text); }
.havn-mc-settings-nav a.is-active {
	background: var(--mc-accent-soft);
	color: var(--mc-accent);
	font-weight: 600;
}

.havn-mc-form { display: flex; flex-direction: column; gap: 14px; }
.havn-mc-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.havn-mc-form label {
	display: flex; flex-direction: column; gap: 6px;
	font-size: 12px; color: var(--mc-text-3);
	letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600;
}
.havn-mc-form input,
.havn-mc-form textarea,
.havn-mc-form select {
	padding: 10px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	color: var(--mc-text);
	font: inherit; font-size: 13.5px;
	text-transform: none; letter-spacing: 0;
}
.havn-mc-form input:focus,
.havn-mc-form textarea:focus,
.havn-mc-form select:focus {
	outline: 2px solid var(--mc-accent);
	outline-offset: 1px;
}

.havn-mc-toggle-list {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-direction: column; gap: 8px;
}
.havn-mc-toggle-list li {
	display: flex; justify-content: space-between; align-items: center;
	gap: 14px;
	padding: 12px;
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	background: var(--mc-surface);
}
.havn-mc-toggle-list small { display: block; color: var(--mc-text-3); margin-top: 2px; }

.havn-mc-switch {
	position: relative;
	display: inline-block;
	width: 38px; height: 22px;
	flex-shrink: 0;
}
.havn-mc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.havn-mc-switch span {
	position: absolute; inset: 0;
	background: var(--mc-surface-2);
	border-radius: 999px;
	transition: background .15s;
}
.havn-mc-switch span::after {
	content: "";
	position: absolute;
	top: 2px; left: 2px;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .18s;
}
.havn-mc-switch input:checked + span { background: var(--mc-accent); }
.havn-mc-switch input:checked + span::after { transform: translateX(16px); }

/* ==========================================================================
   Billing
   ========================================================================== */

.havn-mc-plan h3 small { font-size: 12px; color: var(--mc-text-3); font-weight: 400; margin-left: 4px; }
.havn-mc-plan-features {
	list-style: none; padding: 0; margin: 12px 0 0;
	display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
	font-size: 13px;
}
.havn-mc-plan-features li {
	display: flex; align-items: center; gap: 8px;
	color: var(--mc-text-2);
}
.havn-mc-plan-features svg { width: 14px; height: 14px; color: #6FCF97; }

.havn-mc-pm {
	display: flex; align-items: center; gap: 12px;
	padding: 14px;
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	background: var(--mc-surface);
	margin: 8px 0 14px;
}
.havn-mc-pm svg { width: 22px; height: 22px; color: var(--mc-accent); }
.havn-mc-pm strong { display: block; font-size: 13.5px; }
.havn-mc-pm small  { display: block; color: var(--mc-text-3); font-size: 11.5px; }

/* ==========================================================================
   Sidebar nav badge variants
   ========================================================================== */

.havn-mc-nav-badge { font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; }

/* Responsive form rows */
@media (max-width: 720px) {
	.havn-mc-form-row { grid-template-columns: 1fr; }
	.havn-mc-plan-features { grid-template-columns: 1fr; }
	.havn-mc-view-title { font-size: 24px; }
}

/* No-JS / pre-init fallback: show dashboard view by default. JS replaces
   .is-active as soon as it boots, but until then the first view is visible
   so the user is never staring at a blank page. */
.havn-mc-views > .havn-mc-view[data-mc-view="dashboard"] { display: flex; }
.havn-mc-views.is-routed > .havn-mc-view[data-mc-view="dashboard"]:not(.is-active) { display: none; }

/* ==========================================================================
   v1.4.2 — Messages moved into the sidebar
   ========================================================================== */

/* Hide the floating chat FAB whenever the Mission Control shell is on the
   page — the sidebar Messages item replaces it. The modal itself is left
   alone so opening from the sidebar still works. */
.havn-mc ~ #havn-chat-fab,
body:has(.havn-mc) #havn-chat-fab { display: none !important; }

/* Unread count badge inside the sidebar Messages item */
.havn-mc-nav-badge-unread {
	background: #e85a5a !important;
	color: #fff !important;
	border-radius: 999px !important;
	min-width: 18px;
	height: 18px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.havn-mc-nav-badge-unread[hidden] { display: none !important; }

/* ==========================================================================
   v1.5.0 — Pipeline / stepper / deal cards / modal
   ========================================================================== */

/* Pipeline stage rail */
.havn-mc-pipeline-rail .havn-mc-rail {
	display: grid;
	grid-template-columns: repeat(9, minmax(0, 1fr));
	gap: 8px;
	margin-top: 8px;
}
@media (max-width: 920px) {
	.havn-mc-pipeline-rail .havn-mc-rail { grid-template-columns: repeat(3, 1fr); }
}
.havn-mc-rail-step {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 12px 8px;
	gap: 4px;
	border-radius: 12px;
	border: 1px solid var(--mc-border);
	background: var(--mc-surface);
	color: var(--mc-text);
	cursor: pointer;
	position: relative;
	transition: background .15s, border-color .15s, transform .1s;
}
.havn-mc-rail-step:hover { background: var(--mc-surface-2); transform: translateY(-1px); }
.havn-mc-rail-step.is-active {
	border-color: var(--mc-accent);
	background: var(--mc-accent-soft);
}
.havn-mc-rail-step.is-locked { opacity: .55; cursor: not-allowed; }
.havn-mc-rail-num { font-size: 22px; font-weight: 700; line-height: 1; }
.havn-mc-rail-label { font-size: 11.5px; color: var(--mc-text-2); letter-spacing: .04em; }
.havn-mc-rail-lock { position: absolute; top: 6px; right: 6px; }
.havn-mc-rail-lock svg { width: 11px; height: 11px; color: var(--mc-text-3); }

/* Empty state */
.havn-mc-empty-state {
	text-align: center;
	padding: 48px 24px;
}
.havn-mc-empty-icon {
	width: 56px; height: 56px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: var(--mc-accent-soft);
	display: flex; align-items: center; justify-content: center;
	color: var(--mc-accent);
}
.havn-mc-empty-icon svg { width: 26px; height: 26px; }

/* Deals list rows */
.havn-mc-deals-list { display: flex; flex-direction: column; gap: 10px; }
.havn-mc-deal-row {
	display: flex; align-items: center; gap: 16px;
	padding: 14px 16px;
	border: 1px solid var(--mc-border);
	border-radius: 12px;
	background: var(--mc-surface);
	transition: border-color .15s, background .15s;
}
.havn-mc-deal-row:hover { border-color: var(--mc-border-2); background: var(--mc-surface-2); }
.havn-mc-deal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.havn-mc-deal-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.havn-mc-deal-title { font-size: 14.5px; font-weight: 600; }
.havn-mc-deal-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--mc-text-2); }
.havn-mc-deal-meta span { display: inline-flex; align-items: center; gap: 5px; }
.havn-mc-deal-meta svg { width: 12px; height: 12px; }
.havn-mc-deal-progress { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.havn-mc-deal-progress-bar {
	flex: 1; max-width: 360px;
	height: 5px;
	background: var(--mc-surface-2);
	border-radius: 999px;
	overflow: hidden;
}
.havn-mc-deal-progress-bar span {
	display: block; height: 100%;
	transition: width .35s cubic-bezier(.2,.7,.2,1);
}
.havn-mc-deal-progress-pct { font-size: 11.5px; color: var(--mc-text-3); min-width: 36px; text-align: right; }
.havn-mc-deal-actions { display: flex; gap: 6px; flex-shrink: 0; }
.havn-mc-tag {
	display: inline-flex; align-items: center;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 10.5px; font-weight: 700;
	letter-spacing: 0.06em; text-transform: uppercase;
}
.havn-mc-tag-soft { background: var(--mc-surface-2); color: var(--mc-text-2); }

/* The big horizontal stepper */
.havn-mc-stepper-head {
	display: flex; justify-content: space-between; align-items: flex-end;
	gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.havn-mc-stepper-title { margin: 4px 0 2px; font-size: 22px; font-weight: 600; }
.havn-mc-stepper-actions { display: flex; gap: 8px; }

.havn-mc-stepper {
	list-style: none; padding: 0; margin: 0;
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 0;
	position: relative;
}
@media (max-width: 920px) {
	.havn-mc-stepper { grid-template-columns: repeat(4, 1fr); gap: 18px 0; }
}
.havn-mc-step {
	position: relative;
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	padding: 8px 4px;
	cursor: pointer;
}
.havn-mc-step-dot {
	width: 34px; height: 34px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--mc-surface);
	border: 2px solid var(--mc-border-2);
	color: var(--mc-text-3);
	z-index: 1;
	transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.havn-mc-step-dot svg { width: 14px; height: 14px; }
.havn-mc-step-label { font-size: 11.5px; color: var(--mc-text-2); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.havn-mc-step-line {
	position: absolute;
	top: 24px;
	left: calc(50% + 17px);
	right: calc(-50% + 17px);
	height: 2px;
	background: var(--mc-border-2);
	z-index: 0;
}
.havn-mc-step.is-done .havn-mc-step-dot {
	background: var(--step-colour, var(--mc-accent));
	border-color: var(--step-colour, var(--mc-accent));
	color: #0E0F12;
}
.havn-mc-step.is-done ~ .havn-mc-step .havn-mc-step-line { background: var(--mc-border-2); }
.havn-mc-step.is-done .havn-mc-step-line { background: var(--step-colour, var(--mc-accent)); }
.havn-mc-step.is-current .havn-mc-step-dot {
	border-color: var(--step-colour, var(--mc-accent));
	color: var(--step-colour, var(--mc-accent));
	background: var(--mc-accent-soft);
	transform: scale(1.1);
	box-shadow: 0 0 0 6px color-mix(in srgb, var(--step-colour, var(--mc-accent)), transparent 88%);
}
.havn-mc-step.is-current .havn-mc-step-label { color: var(--mc-text); }
.havn-mc-step.is-locked { opacity: .55; cursor: not-allowed; }

/* Stage panel below stepper */
.havn-mc-step-panel {
	margin-top: 24px;
	padding: 20px;
	border: 1px solid var(--mc-border);
	border-radius: 14px;
	background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
}
.havn-mc-step-panel-head {
	display: flex; justify-content: space-between; align-items: flex-start;
	gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.havn-mc-step-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.havn-mc-checklist {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-direction: column; gap: 6px;
}
.havn-mc-checkbox {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 14px;
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	background: var(--mc-surface);
	cursor: pointer;
	font-size: 13.5px;
	transition: background .15s, border-color .15s;
}
.havn-mc-checkbox:hover { background: var(--mc-surface-2); }
.havn-mc-checkbox input {
	width: 18px; height: 18px;
	accent-color: var(--mc-accent);
	cursor: pointer;
}
.havn-mc-checkbox input:checked + span {
	color: var(--mc-text-3);
	text-decoration: line-through;
}

/* Modal */
.havn-mc-modal {
	position: fixed; inset: 0;
	z-index: 99999;
	display: flex; align-items: center; justify-content: center;
	padding: 24px;
}
.havn-mc-modal[hidden] { display: none !important; }
.havn-mc-modal-back {
	position: absolute; inset: 0;
	background: rgba(8,8,12,.72);
	backdrop-filter: blur(6px);
}
.havn-mc-modal-card {
	position: relative;
	width: min(620px, 100%);
	max-height: 90vh; overflow-y: auto;
	background: var(--mc-bg, #14141a);
	color: var(--mc-text);
	border-radius: 18px;
	border: 1px solid var(--mc-border-2);
	box-shadow: 0 30px 80px rgba(0,0,0,.55);
	display: flex; flex-direction: column;
}
.havn-mc-modal-head {
	display: flex; justify-content: space-between; align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid var(--mc-border);
}
.havn-mc-modal-head h3 { margin: 0; font-size: 18px; font-weight: 600; }
.havn-mc-modal-card form { padding: 16px 20px 20px; }
.havn-mc-form-feedback {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
}
.havn-mc-form-feedback.is-ok    { background: rgba(111,207,151,.16); color: #6FCF97; }
.havn-mc-form-feedback.is-error { background: rgba(232,90,90,.18);  color: #FF8585; }

/* Lock disabled options visually */
.havn-mc-form select option:disabled { color: var(--mc-text-3); }

/* ==========================================================================
   v1.6.0 — Homeowner Tools
   ========================================================================== */

.havn-mc-owner { --mc-accent: #D4B370; }

/* Generic tool card */
.havn-ot-card {
	background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
	border: 1px solid var(--mc-border);
	border-radius: var(--mc-radius, 14px);
	padding: 24px;
	box-shadow: var(--mc-shadow);
	display: flex; flex-direction: column; gap: 18px;
}
.havn-ot-head { display: flex; flex-direction: column; gap: 4px; }
.havn-ot-title {
	margin: 4px 0;
	font-size: 22px; font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--mc-text);
}

/* --- 1. True Cost calculator --- */
.havn-ot-calc { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 920px) { .havn-ot-calc { grid-template-columns: 1fr; } }
.havn-ot-calc-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
@media (max-width: 720px) { .havn-ot-calc-grid { grid-template-columns: 1fr; } }
.havn-ot-calc label {
	display: flex; flex-direction: column; gap: 6px;
	font-size: 11.5px; color: var(--mc-text-3);
	font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.havn-ot-calc input {
	padding: 10px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	color: var(--mc-text);
	font: inherit; font-size: 14px;
	text-transform: none; letter-spacing: 0;
}
.havn-ot-calc-summary {
	padding: 18px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 14px;
	display: flex; flex-direction: column; gap: 6px;
	align-self: start;
	min-width: 0;
}
.havn-ot-summary-line {
	display: flex; justify-content: space-between; align-items: baseline;
	gap: 8px;
	font-size: 13px;
	color: var(--mc-text-2);
}
.havn-ot-summary-line strong { font-size: 15px; color: var(--mc-text); font-weight: 600; }
.havn-ot-summary-line .havn-ot-neg { color: #FF8585; }
.havn-ot-summary-divider { height: 1px; background: var(--mc-border); margin: 10px 0; }
.havn-ot-walk-away strong {
	font-size: 28px !important;
	color: var(--mc-accent) !important;
}

/* --- 2. Market Power gauge --- */
.havn-ot-power { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; }
@media (max-width: 720px) { .havn-ot-power { grid-template-columns: 1fr; } }
.havn-ot-gauge { position: relative; }
.havn-ot-gauge svg { width: 100%; height: auto; }
.havn-ot-gauge-value {
	position: absolute; left: 0; right: 0; top: 60%;
	text-align: center; transform: translateY(-50%);
}
.havn-ot-gauge-num { font-size: 48px; font-weight: 700; color: var(--mc-text); }
.havn-ot-gauge-of  { font-size: 16px; color: var(--mc-text-3); margin-left: 4px; }
.havn-ot-power-desc { font-size: 15px; line-height: 1.5; color: var(--mc-text); margin: 0 0 16px; }
.havn-ot-power-factors {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}
.havn-ot-factor {
	padding: 10px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
}
.havn-ot-factor strong { display: block; font-size: 18px; font-weight: 600; }
.havn-ot-factor small  { display: block; font-size: 11.5px; color: var(--mc-text-3); margin-top: 2px; }

/* --- 3. Valuation engine --- */
.havn-ot-valuations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .havn-ot-valuations { grid-template-columns: 1fr; } }
.havn-ot-val-card {
	padding: 18px;
	border: 1px solid var(--mc-border);
	border-radius: 14px;
	background: linear-gradient(180deg, color-mix(in srgb, var(--val-accent), transparent 96%), transparent);
	display: flex; flex-direction: column; gap: 8px;
}
.havn-ot-val-tag {
	align-self: flex-start;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 10.5px; font-weight: 700;
	letter-spacing: 0.08em; text-transform: uppercase;
}
.havn-ot-val-title { font-size: 14px; font-weight: 600; }
.havn-ot-val-range { font-size: 20px; font-weight: 600; color: var(--mc-text); margin-top: 6px; }
.havn-ot-val-conf { font-size: 12px; color: var(--mc-text-2); margin-top: 4px; }
.havn-ot-val-conf strong { color: var(--val-accent); }
.havn-ot-fair-value {
	display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap;
	padding: 18px;
	border: 1px solid var(--mc-accent);
	background: var(--mc-accent-soft);
	border-radius: 14px;
}

/* --- 4. Offer simulator --- */
.havn-ot-offer { display: flex; flex-direction: column; gap: 18px; }
.havn-ot-form-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
@media (max-width: 720px) { .havn-ot-form-grid { grid-template-columns: 1fr; } }
.havn-ot-form-grid label {
	display: flex; flex-direction: column; gap: 6px;
	font-size: 11.5px; color: var(--mc-text-3);
	font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.havn-ot-form-grid input, .havn-ot-form-grid select {
	padding: 10px 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 10px;
	color: var(--mc-text);
	font: inherit; font-size: 14px;
	text-transform: none; letter-spacing: 0;
}
.havn-ot-offer-output {
	display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center;
	padding: 18px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
	border-radius: 14px;
}
@media (max-width: 720px) { .havn-ot-offer-output { grid-template-columns: 1fr; } }
.havn-ot-prob { position: relative; width: 160px; height: 160px; color: #6FCF97; margin: 0 auto; }
.havn-ot-prob-ring { width: 100%; height: 100%; }
.havn-ot-prob-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.havn-ot-prob-text strong { font-size: 30px; font-weight: 700; color: var(--mc-text); }
.havn-ot-prob-text small  { font-size: 12px; color: var(--mc-text-3); margin-top: 2px; }
.havn-ot-prob-factors { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.havn-ot-prob-factors li {
	display: flex; align-items: center; gap: 8px;
	padding: 8px 12px; border-radius: 10px;
	background: var(--mc-surface-2);
	font-size: 13px;
}
.havn-ot-prob-factors li.is-positive::before { content: "✓"; color: #6FCF97; font-weight: 700; }
.havn-ot-prob-factors li.is-negative::before { content: "!"; color: #FF8585; font-weight: 700; }
.havn-ot-prob-factors li.is-neutral::before  { content: "·"; color: var(--mc-text-3); font-weight: 700; }

/* --- 5. Neighbourhood lessons --- */
.havn-ot-sales-table thead th { background: transparent; }
.havn-ot-lessons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 720px) { .havn-ot-lessons { grid-template-columns: 1fr; } }
.havn-ot-lesson-col {
	padding: 16px;
	border-radius: 12px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
}
.havn-ot-lesson-col h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.havn-ot-lesson-col ul { padding-left: 20px; margin: 0; font-size: 13px; color: var(--mc-text-2); }
.havn-ot-lesson-col li { margin: 4px 0; }
.havn-ot-lesson-win   { border-color: color-mix(in srgb, #6FCF97, transparent 70%); }
.havn-ot-lesson-fail  { border-color: color-mix(in srgb, #FF8585, transparent 70%); }

/* --- 6. Demand heatmap --- */
.havn-ot-demand { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; }
@media (max-width: 720px) { .havn-ot-demand { grid-template-columns: 1fr; } }
.havn-ot-demand-stats {
	grid-column: 1 / -1;
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px;
}
.havn-ot-stat {
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--mc-surface);
	border: 1px solid var(--mc-border);
}
.havn-ot-stat strong { display: block; font-size: 22px; font-weight: 700; }
.havn-ot-stat small  { font-size: 11.5px; color: var(--mc-text-3); }
.havn-ot-map { border-radius: 12px; overflow: hidden; }
.havn-ot-demand-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.havn-ot-demand-list li {
	display: grid; grid-template-columns: 200px 1fr 36px; gap: 10px; align-items: center;
	font-size: 13px;
}
.havn-ot-demand-list strong { text-align: right; }
.havn-ot-demand-label em { display: block; font-style: normal; font-size: 11px; color: var(--mc-text-3); }

/* --- 7. Sale timeline --- */
.havn-ot-timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.havn-ot-step {
	display: grid; grid-template-columns: 56px 1fr; gap: 14px;
	padding: 14px;
	border-left: 3px solid var(--mc-border);
	border-radius: 0 12px 12px 0;
	background: var(--mc-surface);
	border-top: 1px solid var(--mc-border);
	border-right: 1px solid var(--mc-border);
	border-bottom: 1px solid var(--mc-border);
}
.havn-ot-step.is-current { border-left-color: var(--mc-accent); background: var(--mc-accent-soft); }
.havn-ot-step-marker {
	font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em;
	color: var(--mc-text-3);
	display: flex; align-items: flex-start; justify-content: center;
	padding-top: 4px;
}
.havn-ot-step-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.havn-ot-step-tasks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }

/* --- 8. Stress score --- */
.havn-ot-stress { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; }
@media (max-width: 720px) { .havn-ot-stress { grid-template-columns: 1fr; justify-items: center; } }
.havn-ot-stress-score { position: relative; width: 160px; height: 160px; margin: 0 auto; }
.havn-ot-stress-score svg { width: 100%; height: 100%; }
.havn-ot-stress-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 42px; font-weight: 700; }
.havn-ot-stress-label { font-size: 15px; margin: 0 0 12px; color: var(--mc-text); }
.havn-ot-tips { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 720px) { .havn-ot-tips { grid-template-columns: 1fr; } }
.havn-ot-tips li {
	display: flex; gap: 10px; padding: 10px 12px;
	border: 1px solid var(--mc-border); border-radius: 10px;
	background: var(--mc-surface);
}
.havn-ot-tip-icon {
	width: 28px; height: 28px;
	border-radius: 8px;
	display: flex; align-items: center; justify-content: center;
	background: var(--mc-accent-soft);
	color: var(--mc-accent);
	flex-shrink: 0;
}
.havn-ot-tip-icon svg { width: 14px; height: 14px; }
.havn-ot-tips strong { display: block; font-size: 13.5px; }
.havn-ot-tips small  { display: block; font-size: 11.5px; margin-top: 2px; }

/* --- 9. Agent shortlist --- */
.havn-ot-shortlist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 720px) { .havn-ot-shortlist { grid-template-columns: 1fr; } }
.havn-ot-agent {
	padding: 18px;
	border: 1px solid var(--mc-border);
	border-radius: 14px;
	background: linear-gradient(180deg, rgba(255,255,255,.025), transparent);
	display: flex; flex-direction: column; gap: 12px;
}
.havn-ot-agent-head { display: flex; align-items: center; gap: 10px; }
.havn-ot-agent-avatar {
	width: 36px; height: 36px;
	border-radius: 50%;
	background: var(--mc-accent-soft);
	color: var(--mc-accent);
	display: flex; align-items: center; justify-content: center;
	font-weight: 700;
}
.havn-ot-agent-head strong { display: block; font-size: 14px; }
.havn-ot-agent-head small  { display: block; font-size: 11.5px; }
.havn-ot-agent-head .havn-mc-tag { margin-left: auto; }
.havn-ot-agent-score {
	display: flex; align-items: baseline; gap: 6px;
	padding: 6px 12px;
	background: var(--mc-accent-soft);
	border-radius: 8px;
	width: fit-content;
}
.havn-ot-agent-pct { font-size: 22px; font-weight: 700; color: var(--mc-accent); }
.havn-ot-agent-why { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--mc-text-2); }
.havn-ot-agent-stats { font-size: 12px; color: var(--mc-text-3); }

/* ==========================================================================
   v2.1.4 — COMPREHENSIVE LIGHT-MODE OVERRIDES
   Fixes white-on-white text caused by hard-coded dark colors in legacy
   .havn-* classes (hero, tiles, sections, forms, marketplace, etc.) and
   in any Mission Control widget that was missed by the earlier pass.

   Trigger: the JS toggle now also adds `havn-mc-light` to <body>, so the
   overrides below cascade across BOTH the Mission Control shell and the
   legacy dashboard partials living inside it.
   ========================================================================== */

/* ---- 1. Body / page canvas ---- */
body.havn-mc-light.havn-dashboard-page,
html.havn-mc-light.havn-dashboard-page,
body.havn-mc-light .havn-app-bg,
body.havn-mc-light {
	background: #F6F7FA !important;
	background-color: #F6F7FA !important;
	color: #15171C !important;
}
body.havn-mc-light::before {
	background:
		radial-gradient(1200px 600px at 80% -10%, rgba(212,179,112,.12), transparent 60%),
		radial-gradient(900px 500px at -10% 110%, rgba(138,180,248,.08), transparent 60%),
		#F6F7FA !important;
}

/* Neutralise the legacy text-color !important rules from havn-dashboard.css */
body.havn-mc-light.havn-dashboard-page p,
body.havn-mc-light.havn-dashboard-page h1,
body.havn-mc-light.havn-dashboard-page h2,
body.havn-mc-light.havn-dashboard-page h3,
body.havn-mc-light.havn-dashboard-page h4,
body.havn-mc-light.havn-dashboard-page h5,
body.havn-mc-light.havn-dashboard-page h6,
body.havn-mc-light.havn-dashboard-page span,
body.havn-mc-light.havn-dashboard-page li,
body.havn-mc-light.havn-dashboard-page strong,
body.havn-mc-light.havn-dashboard-page em,
body.havn-mc-light.havn-dashboard-page small,
body.havn-mc-light.havn-dashboard-page label,
body.havn-mc-light.havn-dashboard-page td,
body.havn-mc-light.havn-dashboard-page th,
body.havn-mc-light .havn-app-bg p,
body.havn-mc-light .havn-app-bg h1,
body.havn-mc-light .havn-app-bg h2,
body.havn-mc-light .havn-app-bg h3,
body.havn-mc-light .havn-app-bg h4,
body.havn-mc-light .havn-app-bg h5,
body.havn-mc-light .havn-app-bg h6,
body.havn-mc-light .havn-app-bg span,
body.havn-mc-light .havn-app-bg li,
body.havn-mc-light .havn-app-bg strong,
body.havn-mc-light .havn-app-bg em,
body.havn-mc-light .havn-app-bg small,
body.havn-mc-light .havn-app-bg label,
body.havn-mc-light .havn-app-bg td,
body.havn-mc-light .havn-app-bg th {
	color: #15171C !important;
}

/* ---- 2. Re-bind the legacy --havn-* design tokens for light mode ---- */
body.havn-mc-light {
	--havn-bg:        #F6F7FA;
	--havn-bg-2:      #FFFFFF;
	--havn-panel:     #FFFFFF;
	--havn-panel-2:   #F4F5F8;
	--havn-border:    rgba(15,23,42,.10);
	--havn-border-2:  rgba(15,23,42,.18);
	--havn-text:      #15171C;
	--havn-muted:     #5B6473;
	--havn-shadow:    0 12px 36px rgba(15,23,42,.08);
	--havn-shadow-sm: 0 4px 12px rgba(15,23,42,.06);
}

/* ---- 3. Welcome hero (the "Good morning, Tiago" banner) ---- */
body.havn-mc-light .havn-hero {
	background:
		radial-gradient(closest-side at 100% 0%, rgba(212,179,112,.18), transparent 70%),
		linear-gradient(135deg, #FFFFFF 0%, #F8F2E1 100%) !important;
	border: 1px solid rgba(212,179,112,.35) !important;
	box-shadow: 0 12px 36px rgba(15,23,42,.06) !important;
}
body.havn-mc-light .havn-hero-glow { opacity: .35; }
body.havn-mc-light .havn-hero-title,
body.havn-mc-light .havn-hero-eyebrow,
body.havn-mc-light .havn-hero-sub {
	color: #15171C !important;
}
body.havn-mc-light .havn-hero-eyebrow { color: #8A6A2C !important; }
body.havn-mc-light .havn-hero-sub     { color: #5B6473 !important; }
body.havn-mc-light .havn-hero-title span {
	background: linear-gradient(92deg, #B68F3F 0%, #8A6A2C 60%, #15171C 140%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
body.havn-mc-light .havn-chip {
	background: #FFFFFF;
	border-color: rgba(15,23,42,.10);
	color: #15171C;
}
body.havn-mc-light .havn-chip-soft {
	background: linear-gradient(90deg, rgba(212,179,112,.20), rgba(212,179,112,.06));
	color: #8A6A2C;
	border-color: rgba(212,179,112,.4);
}

/* ---- 4. Stat tiles (KPI cards: New leads / Active deals / etc.) ---- */
body.havn-mc-light .havn-tile {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.10) !important;
	box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 24px -16px rgba(15,15,20,.14);
}
body.havn-mc-light .havn-tile::before { opacity: .08; }
body.havn-mc-light .havn-tile:hover {
	border-color: rgba(212,179,112,.5) !important;
	box-shadow: 0 12px 32px rgba(15,23,42,.10), 0 0 0 1px rgba(212,179,112,.18) inset;
}
body.havn-mc-light .havn-tile-label  { color: #5B6473 !important; }
body.havn-mc-light .havn-tile-value  { color: #15171C !important; }
body.havn-mc-light .havn-suffix      { color: #5B6473 !important; }
body.havn-mc-light .havn-tile-icon   { background: rgba(212,179,112,.16); color: #8A6A2C; }

/* ---- 5. Sections / cards / panels ---- */
body.havn-mc-light .havn-section,
body.havn-mc-light .havn-owner-listing,
body.havn-mc-light .havn-agent-card,
body.havn-mc-light .havn-form-wrap {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.10) !important;
	box-shadow: 0 8px 24px -16px rgba(15,15,20,.10) !important;
}
body.havn-mc-light .havn-section-head h3 { color: #15171C; }
body.havn-mc-light .havn-section-head p,
body.havn-mc-light .havn-muted,
body.havn-mc-light .havn-owner-meta,
body.havn-mc-light .havn-owner-empty,
body.havn-mc-light .havn-agent-meta-row {
	color: #5B6473 !important;
}
body.havn-mc-light .havn-owner-thumb { background-color: #ECEEF3; }

/* ---- 6. Sparkline canvas — switch ink color so the line is visible ---- */
body.havn-mc-light .havn-sparkline canvas { filter: none; }

/* ---- 7. Forms ---- */
body.havn-mc-light .havn-form-grid input[type="text"],
body.havn-mc-light .havn-form-grid input[type="email"],
body.havn-mc-light .havn-form-grid input[type="tel"],
body.havn-mc-light .havn-form-grid input[type="number"],
body.havn-mc-light .havn-form-grid input[type="url"],
body.havn-mc-light .havn-form-grid select,
body.havn-mc-light .havn-form-grid textarea {
	background: #FFFFFF !important;
	color: #15171C !important;
	border-color: rgba(15,23,42,.16) !important;
}
body.havn-mc-light .havn-form-grid input::placeholder,
body.havn-mc-light .havn-form-grid textarea::placeholder { color: rgba(91,100,115,.6) !important; }
body.havn-mc-light .havn-form-grid select option { background: #FFFFFF; color: #15171C; }
body.havn-mc-light .havn-form-grid label { color: #5B6473; }

/* ---- 8. Mission Control shell — fill remaining gaps ---- */
.havn-mc.is-light .havn-mc-section,
.havn-mc.is-light .havn-mc-card-head,
.havn-mc.is-light .havn-mc-card-body,
.havn-mc.is-light .havn-mc-hot-card,
.havn-mc.is-light .havn-mc-contact-row,
.havn-mc.is-light .havn-mc-tasks-list li,
.havn-mc.is-light .havn-mc-activity-item,
.havn-mc.is-light .havn-mc-insights-card,
.havn-mc.is-light .havn-mc-feature-row,
.havn-mc.is-light .havn-mc-locked,
.havn-mc.is-light .havn-mc-upgrade-cta {
	background: #FFFFFF;
	border-color: rgba(15,23,42,.10);
	color: #15171C;
}
.havn-mc.is-light .havn-mc-card-title,
.havn-mc.is-light .havn-mc-section-title,
.havn-mc.is-light .havn-mc-stepper-title,
.havn-mc.is-light .havn-mc-view-title,
.havn-mc.is-light .havn-mc-hot-card-title,
.havn-mc.is-light .havn-mc-contact-name,
.havn-mc.is-light .havn-mc-deal-title,
.havn-mc.is-light .havn-mc-step-label.is-current,
.havn-mc.is-light h1,
.havn-mc.is-light h2,
.havn-mc.is-light h3,
.havn-mc.is-light h4 {
	color: #15171C !important;
}
.havn-mc.is-light .havn-mc-card-sub,
.havn-mc.is-light .havn-mc-view-sub,
.havn-mc.is-light .havn-mc-section-sub,
.havn-mc.is-light .havn-mc-deal-meta,
.havn-mc.is-light .havn-mc-hot-card-sub,
.havn-mc.is-light .havn-mc-contact-sub,
.havn-mc.is-light .havn-mc-tasks-list li,
.havn-mc.is-light .havn-mc-activity-item,
.havn-mc.is-light .havn-mc-rail-label,
.havn-mc.is-light .havn-mc-step-label,
.havn-mc.is-light .havn-mc-muted,
.havn-mc.is-light p {
	color: #15171C;
}
.havn-mc.is-light .havn-mc-empty,
.havn-mc.is-light .havn-mc-empty-state,
.havn-mc.is-light .havn-mc-kpi-sub,
.havn-mc.is-light .havn-mc-deal-progress-pct,
.havn-mc.is-light .havn-mc-rail-lock svg {
	color: #5B6473 !important;
}

/* Calendar / agenda widget */
.havn-mc.is-light .havn-mc-cal,
.havn-mc.is-light .havn-mc-cal-day,
.havn-mc.is-light .havn-mc-agenda,
.havn-mc.is-light .havn-mc-agenda-item {
	background: #FFFFFF;
	color: #15171C;
	border-color: rgba(15,23,42,.10);
}
.havn-mc.is-light .havn-mc-cal-day-num { color: #15171C; }
.havn-mc.is-light .havn-mc-cal-day-label { color: #5B6473; }

/* Action menu hover, pill icons */
.havn-mc.is-light .havn-mc-iconbtn,
.havn-mc.is-light .havn-mc-icon-btn {
	color: #5B6473;
}
.havn-mc.is-light .havn-mc-iconbtn:hover,
.havn-mc.is-light .havn-mc-icon-btn:hover { color: #15171C; }

/* Plan / billing tier features */
.havn-mc.is-light .havn-mc-plan,
.havn-mc.is-light .havn-mc-plan-features li,
.havn-mc.is-light .havn-billing-card,
.havn-mc.is-light .havn-mc-locked-head h3,
.havn-mc.is-light .havn-mc-locked-head p {
	color: #15171C;
}

/* Diagnostic admin pill (the floating black box bottom-left) */
body.havn-mc-light .havn-diag,
body.havn-mc-light #havn-diag,
body.havn-mc-light [class*="havn-diag"] {
	background: #15171C !important;
	color: #F4F4F5 !important;
}

/* ---- 9. Match-score / progress rings — make the track readable on white ---- */
body.havn-mc-light .havn-mc-score-ring-track,
body.havn-mc-light .havn-mc-ring-track,
body.havn-mc-light .havn-ot-prob-track {
	stroke: rgba(15,23,42,.12) !important;
}

/* ---- 10. Marketplace / leads / listing thumbnails ---- */
body.havn-mc-light .havn-market-thumb,
body.havn-mc-light .havn-listing-thumb {
	background-color: #ECEEF3;
}

/* ==========================================================================
   v2.1.5 — FOLLOW-UP LIGHT-MODE FIXES
   Hardens the remaining washed-out widgets: KPI tiles on every view,
   eyebrows, agenda items, funnel rows, marketplace cards, team hub,
   listings card overlay, leads-table secondary text, and the
   `Maximum visibility is ON` banner.
   ========================================================================== */

/* ---- 1. KPI tiles — force everything to high-contrast ---- */
.havn-mc.is-light .havn-mc-kpi,
.havn-mc.is-light .havn-mc-card.havn-mc-kpi {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.10) !important;
	box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 22px -16px rgba(15,15,20,.14) !important;
}
.havn-mc.is-light .havn-mc-kpi-value,
.havn-mc.is-light .havn-mc-card.havn-mc-kpi .havn-mc-kpi-value {
	color: #0F1115 !important;
}
.havn-mc.is-light .havn-mc-kpi-label,
.havn-mc.is-light .havn-mc-card.havn-mc-kpi .havn-mc-kpi-label {
	color: #3D4452 !important;
}
.havn-mc.is-light .havn-mc-kpi-sub,
.havn-mc.is-light .havn-mc-kpi-suffix {
	color: #5B6473 !important;
}
.havn-mc.is-light .havn-mc-kpi-icon {
	background: rgba(212,179,112,.16) !important;
	color: #8A6A2C !important;
}
.havn-mc.is-light .havn-mc-kpi-icon svg { color: inherit; }

/* ---- 2. Eyebrow labels ($2M+ INVENTORY, WHAT'S INCLUDED, COMMAND CENTRE) ---- */
.havn-mc.is-light .havn-mc-eyebrow,
body.havn-mc-light .havn-mc-eyebrow,
body.havn-mc-light .havn-hero-eyebrow {
	color: #8A6A2C !important;
	font-weight: 700;
}

/* ---- 3. "Maximum visibility is ON" banner ---- */
body.havn-mc-light .havn-banner {
	background: linear-gradient(100deg, rgba(212,179,112,.22) 0%, #FFFFFF 90%) !important;
	border: 1px solid rgba(212,179,112,.45) !important;
	box-shadow: 0 8px 24px -16px rgba(15,15,20,.18) !important;
}
body.havn-mc-light .havn-banner-icon {
	background: rgba(212,179,112,.20) !important;
	color: #8A6A2C !important;
}
body.havn-mc-light .havn-banner-title {
	color: #15171C !important;
	font-weight: 700 !important;
}
body.havn-mc-light .havn-banner-sub {
	color: #3D4452 !important;
}

/* ---- 4. Calendar — agenda items (Today panel) ---- */
.havn-mc.is-light .havn-mc-agenda-item {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.10) !important;
	border-left-width: 3px !important;
}
.havn-mc.is-light .havn-mc-agenda-time {
	color: #15171C !important;
	font-weight: 700 !important;
}
.havn-mc.is-light .havn-mc-agenda-title,
.havn-mc.is-light .havn-mc-agenda-item strong {
	color: #15171C !important;
}
.havn-mc.is-light .havn-mc-agenda-item small,
.havn-mc.is-light .havn-mc-agenda-sub {
	color: #5B6473 !important;
}
.havn-mc.is-light .havn-mc-cal-dow { color: #5B6473 !important; }

/* ---- 5. Funnel rows (Analytics → Conversion funnel) ---- */
.havn-mc.is-light .havn-mc-funnel-row,
.havn-mc.is-light .havn-mc-funnel-row > * {
	color: #15171C !important;
}
.havn-mc.is-light .havn-mc-funnel-row span:first-child {
	color: #3D4452 !important;
	font-weight: 600;
}
.havn-mc.is-light .havn-mc-funnel-bar { background: #ECEEF3 !important; }
.havn-mc.is-light .havn-mc-bar { background: #ECEEF3 !important; }
.havn-mc.is-light .havn-mc-funnel-step {
	color: #15171C !important;
	background: linear-gradient(90deg, rgba(212,179,112,.22), #F8F9FB) !important;
}
.havn-mc.is-light .havn-mc-funnel-step strong { color: #15171C !important; }

/* ---- 6. Source list (Lead sources) ---- */
.havn-mc.is-light .havn-mc-source-list li,
.havn-mc.is-light .havn-mc-source-list li > * {
	color: #15171C !important;
}

/* ---- 7. Marketplace cards (national feed thumbnails) ---- */
body.havn-mc-light .havn-market-card,
.havn-mc.is-light .havn-market-card {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.10) !important;
}
body.havn-mc-light .havn-market-title,
.havn-mc.is-light .havn-market-card .havn-market-title {
	color: #15171C !important;
	font-weight: 600 !important;
}
body.havn-mc-light .havn-market-meta,
.havn-mc.is-light .havn-market-card .havn-market-meta {
	color: #3D4452 !important;
}
body.havn-mc-light .havn-market-card .havn-muted {
	color: #5B6473 !important;
}

/* Marketplace dropdown selects (All regions / Any type / Any beds / Any price / Any timeline) */
.havn-mc.is-light .havn-mc-select,
body.havn-mc-light .havn-mc-select {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.16) !important;
	color: #15171C !important;
}
.havn-mc.is-light .havn-mc-select option,
body.havn-mc-light .havn-mc-select option { background: #FFFFFF; color: #15171C; }

/* ---- 8. Listings — listing card body text ("the gardens / 255 hill road") ---- */
.havn-mc.is-light .havn-mc-listing-title,
.havn-mc.is-light .havn-mc-listing-address,
.havn-mc.is-light .havn-mc-listing-card-title,
.havn-mc.is-light .havn-mc-listing-suburb {
	color: #15171C !important;
}
.havn-mc.is-light .havn-mc-listing-meta,
.havn-mc.is-light .havn-mc-listing-card-meta,
.havn-mc.is-light .havn-mc-listing-card-sub {
	color: #3D4452 !important;
}
/* Catch any address-style sub line inside a listing card */
.havn-mc.is-light .havn-mc-card .havn-mc-listing,
.havn-mc.is-light .havn-mc-card .havn-mc-address,
.havn-mc.is-light .havn-mc-card .havn-mc-suburb {
	color: #15171C !important;
}

/* ---- 9. Leads table — secondary text under name ---- */
.havn-mc.is-light .havn-mc-lead-name {
	color: #15171C !important;
	font-weight: 600 !important;
}
.havn-mc.is-light .havn-mc-tiny,
.havn-mc.is-light .havn-mc-muted {
	color: #5B6473 !important;
}
.havn-mc.is-light .havn-mc-table tbody td { color: #15171C !important; }
.havn-mc.is-light .havn-mc-table thead th { color: #5B6473 !important; }

/* Row action icon buttons (call / email / message) — give them a visible chip */
.havn-mc.is-light .havn-mc-row-actions .havn-mc-iconbtn,
.havn-mc.is-light .havn-mc-iconbtn {
	background: #F4F5F8 !important;
	border: 1px solid rgba(15,23,42,.10) !important;
	color: #3D4452 !important;
}
.havn-mc.is-light .havn-mc-iconbtn:hover {
	background: #ECEEF3 !important;
	color: #15171C !important;
}
.havn-mc.is-light .havn-mc-iconbtn svg { color: inherit; }

/* The Team performance KPI tiles (TEAM GMV / TEAM CONVERSION / VIP HOMEOWNERS / PROJECTED COMMISSION) */
.havn-mc.is-light .havn-mc-stat,
.havn-mc.is-light .havn-mc-stat-mini,
.havn-mc.is-light .havn-mc-metric,
body.havn-mc-light .havn-tile,
body.havn-mc-light .havn-mc-stat {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.10) !important;
}
.havn-mc.is-light .havn-mc-stat strong,
.havn-mc.is-light .havn-mc-stat-mini strong,
.havn-mc.is-light .havn-mc-metric strong,
body.havn-mc-light .havn-tile .havn-tile-value,
body.havn-mc-light .havn-mc-stat strong {
	color: #0F1115 !important;
}
.havn-mc.is-light .havn-mc-stat small,
.havn-mc.is-light .havn-mc-stat-mini small,
.havn-mc.is-light .havn-mc-metric small,
body.havn-mc-light .havn-tile .havn-tile-label,
body.havn-mc-light .havn-mc-stat small {
	color: #3D4452 !important;
}
/* Force icon backgrounds on these mini-cards so the icon square is visible */
.havn-mc.is-light .havn-mc-stat-icon,
.havn-mc.is-light .havn-mc-metric-icon,
body.havn-mc-light .havn-tile-icon {
	background: rgba(212,179,112,.16) !important;
	color: #8A6A2C !important;
}

/* ---- 11. Plan features (Your plan features cards) ---- */
.havn-mc.is-light .havn-mc-plan-features li,
body.havn-mc-light .havn-mc-plan-features li,
.havn-mc.is-light .havn-plan-features li {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.10) !important;
	color: #15171C !important;
}
.havn-mc.is-light .havn-mc-plan-features svg { color: #2E8B57 !important; }

/* ---- 12. Premium exclusive / empty dashed state ---- */
.havn-mc.is-light .havn-mc-empty,
.havn-mc.is-light .havn-mc-empty-state,
body.havn-mc-light .havn-empty,
body.havn-mc-light .havn-owner-empty {
	background: rgba(15,23,42,.02) !important;
	border: 1px dashed rgba(15,23,42,.18) !important;
	color: #5B6473 !important;
}
.havn-mc.is-light .havn-mc-empty-icon,
body.havn-mc-light .havn-mc-empty-icon {
	background: rgba(212,179,112,.16) !important;
	color: #8A6A2C !important;
}

/* ---- 13. Ghost / secondary buttons (+ INVITE MEMBER, IMPORT, VIEW OPTIONS, CALENDARS, FILTER) ---- */
body.havn-mc-light .havn-btn-ghost,
.havn-mc.is-light .havn-mc-btn-ghost {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.16) !important;
	color: #15171C !important;
}
body.havn-mc-light .havn-btn-ghost:hover,
.havn-mc.is-light .havn-mc-btn-ghost:hover {
	background: #F4F5F8 !important;
	border-color: rgba(212,179,112,.55) !important;
	color: #15171C !important;
}

/* ---- 14. CRM contact list — secondary "Seller · interested" line ---- */
.havn-mc.is-light .havn-mc-contact-row,
.havn-mc.is-light .havn-mc-contact {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.10) !important;
}
.havn-mc.is-light .havn-mc-contact-name,
.havn-mc.is-light .havn-mc-contact strong {
	color: #15171C !important;
}
.havn-mc.is-light .havn-mc-contact-sub,
.havn-mc.is-light .havn-mc-contact small {
	color: #5B6473 !important;
}
.havn-mc.is-light .havn-mc-search input::placeholder { color: #6B7280 !important; }

/* ---- 15. Catch-all: any small/sub text element that's still inheriting --mc-text-3 ---- */
.havn-mc.is-light small,
.havn-mc.is-light .havn-mc-sub,
.havn-mc.is-light .havn-mc-card small {
	color: #5B6473 !important;
}

/* ---- 16. Status pills inside listings ("HOUSE" badge on dark thumb stays as-is) ---- */
.havn-mc.is-light .havn-market-badge { background: rgba(15,23,42,.65); color: #FFFFFF; }

/* ---- 17. Make sure KPI ::after gradient strip is visible but subtle on white ---- */
.havn-mc.is-light .havn-mc-kpi::after {
	opacity: .9;
}

/* ==========================================================================
   v2.1.6 — DARK-MODE SCROLLBAR
   Make the chrome scrollbar transparent in dark mode so it doesn't paint a
   bright gray rail on top of the black canvas. A faint gold thumb appears
   only while the user is actively hovering / scrolling the container.
   Light mode keeps the OS default look.
   ========================================================================== */

/* WebKit (Chrome / Safari / Edge) — applies globally on dashboard pages
   that aren't in light mode. */
body.havn-dashboard-page:not(.havn-mc-light) ::-webkit-scrollbar,
.havn-mc:not(.is-light) ::-webkit-scrollbar,
.havn-mc:not(.is-light)::-webkit-scrollbar {
	width: 10px;
	height: 10px;
	background: transparent;
}
body.havn-dashboard-page:not(.havn-mc-light) ::-webkit-scrollbar-track,
.havn-mc:not(.is-light) ::-webkit-scrollbar-track,
.havn-mc:not(.is-light)::-webkit-scrollbar-track {
	background: transparent;
	border: 0;
}
body.havn-dashboard-page:not(.havn-mc-light) ::-webkit-scrollbar-thumb,
.havn-mc:not(.is-light) ::-webkit-scrollbar-thumb,
.havn-mc:not(.is-light)::-webkit-scrollbar-thumb {
	background: transparent;
	border-radius: 999px;
	border: 2px solid transparent;
	background-clip: padding-box;
	transition: background .25s ease;
}
/* Reveal a subtle thumb only while the container is being scrolled / hovered */
body.havn-dashboard-page:not(.havn-mc-light) *:hover::-webkit-scrollbar-thumb,
.havn-mc:not(.is-light) *:hover::-webkit-scrollbar-thumb,
.havn-mc:not(.is-light):hover::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,.10);
	background-clip: padding-box;
}
body.havn-dashboard-page:not(.havn-mc-light) ::-webkit-scrollbar-thumb:hover,
.havn-mc:not(.is-light) ::-webkit-scrollbar-thumb:hover {
	background: rgba(212,179,112,.45);
	background-clip: padding-box;
}
body.havn-dashboard-page:not(.havn-mc-light) ::-webkit-scrollbar-corner,
.havn-mc:not(.is-light) ::-webkit-scrollbar-corner {
	background: transparent;
}

/* Firefox — narrower track and matching colors */
body.havn-dashboard-page:not(.havn-mc-light),
body.havn-dashboard-page:not(.havn-mc-light) *,
.havn-mc:not(.is-light),
.havn-mc:not(.is-light) * {
	scrollbar-width: thin;
	scrollbar-color: transparent transparent;
}
body.havn-dashboard-page:not(.havn-mc-light) *:hover,
.havn-mc:not(.is-light) *:hover {
	scrollbar-color: rgba(255,255,255,.18) transparent;
}

/* ==========================================================================
   v2.1.7 — MARKETPLACE THEME BINDING
   The Marketplace partial (havn-marketplace.php) ships its own inline
   <style> block with its own --mp-* tokens. That block keys off
   `prefers-color-scheme` and a few explicit wrappers (.havn-dark,
   [data-theme=dark], body.dark, .havn-mc-dark) — but it doesn't know
   about Mission Control's `havn-mc-light` / `is-light` switch.

   Result: when the user toggles light mode, every .havn-mp-* widget
   (KPI tiles, search input, the five selects, sort chips, listing cards)
   stays on the inline default tokens — which on a white page renders
   as low-contrast washed-out boxes.

   Below we override those tokens explicitly for BOTH modes via the
   dashboard wrapper, so the toggle controls them deterministically
   instead of leaning on the OS-level media query.
   ========================================================================== */

/* ----- LIGHT MODE: high-contrast tokens for the marketplace ----- */
body.havn-mc-light .havn-mp {
	--mp-ink:        #15171C !important;
	--mp-ink-muted:  #3D4452 !important;
	--mp-ink-faint:  #5B6473 !important;
	--mp-surface:    #FFFFFF !important;
	--mp-surface-2:  #F4F5F8 !important;
	--mp-border:     rgba(15,23,42,.14) !important;
	--mp-input-bg:   #FFFFFF !important;
	--mp-input-ink:  #15171C !important;
	--mp-input-brd:  rgba(15,23,42,.22) !important;
	--mp-photo-bg:   #ECEEF3 !important;
	color: #15171C;
}
/* Add a soft drop-shadow on the KPI / toolbar / cards so they read as
   "elevated panels" on the white canvas (matches dark-mode visual weight). */
body.havn-mc-light .havn-mp-kpi,
body.havn-mc-light .havn-mp-toolbar,
body.havn-mc-light .havn-mp-card {
	box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 22px -16px rgba(15,15,20,.14);
}
/* Make the search & selects unambiguously editable */
body.havn-mc-light .havn-mp-toolbar input,
body.havn-mc-light .havn-mp-toolbar select {
	background: #FFFFFF !important;
	color: #15171C !important;
	border: 1px solid rgba(15,23,42,.22) !important;
}
body.havn-mc-light .havn-mp-toolbar input::placeholder { color: #6B7280 !important; }
body.havn-mc-light .havn-mp-toolbar select option { background: #FFFFFF; color: #15171C; }

/* Sort chips (Newest / Best match / etc.) — keep gold active state, but
   give the inactive chips visible secondary text on white. */
body.havn-mc-light .havn-mp-sort {
	color: #5B6473 !important;
}
body.havn-mc-light .havn-mp-sort:hover {
	color: #15171C !important;
	background: #F4F5F8 !important;
}
body.havn-mc-light .havn-mp-sort.is-active {
	background: linear-gradient(135deg, #D4B370, #B8975C) !important;
	color: #1A1305 !important;
	font-weight: 700 !important;
}

/* Listing card body text — the "the gardens · Auckland · 6-12 months"
   line plus title, stats, and action row. */
body.havn-mc-light .havn-mp-card .havn-mp-meta-row { color: #3D4452 !important; }
body.havn-mc-light .havn-mp-card .havn-mp-title    { color: #15171C !important; }
body.havn-mc-light .havn-mp-card .havn-mp-stats    { color: #3D4452 !important; }
body.havn-mc-light .havn-mp-card .havn-mp-stats strong { color: #15171C !important; }
body.havn-mc-light .havn-mp-btn-ghost {
	background: #FFFFFF !important;
	color: #15171C !important;
	border: 1px solid rgba(15,23,42,.22) !important;
}
body.havn-mc-light .havn-mp-btn-ghost:hover { background: #F4F5F8 !important; }

/* KPI tiles — labels + values forced dark, accent strip on top kept */
body.havn-mc-light .havn-mp-kpi {
	background: #FFFFFF !important;
	border: 1px solid rgba(15,23,42,.10) !important;
}
body.havn-mc-light .havn-mp-kpi-label { color: #3D4452 !important; }
body.havn-mc-light .havn-mp-kpi-value { color: #0F1115 !important; }

/* Empty state + pagination stay readable */
body.havn-mc-light .havn-mp-empty {
	background: #FFFFFF !important;
	color: #5B6473 !important;
	border: 1px dashed rgba(15,23,42,.20) !important;
}
body.havn-mc-light .havn-mp-page {
	background: #FFFFFF !important;
	color: #3D4452 !important;
	border-color: rgba(15,23,42,.14) !important;
}
body.havn-mc-light .havn-mp-page:hover { background: #F4F5F8 !important; color: #15171C !important; }

/* ----- DARK MODE: force the marketplace to use the dark token set
   regardless of OS preferences, so the toggle is deterministic. ----- */
body.havn-dashboard-page:not(.havn-mc-light) .havn-mp,
.havn-mc:not(.is-light) .havn-mp {
	--mp-ink:        #F1F5F9 !important;
	--mp-ink-muted:  #CBD5E1 !important;
	--mp-ink-faint:  #94A3B8 !important;
	--mp-surface:    rgba(255,255,255,.04) !important;
	--mp-surface-2:  rgba(255,255,255,.07) !important;
	--mp-border:     rgba(255,255,255,.12) !important;
	--mp-input-bg:   #0F172A !important;
	--mp-input-ink:  #F1F5F9 !important;
	--mp-input-brd:  rgba(255,255,255,.14) !important;
	--mp-photo-bg:   #0F172A !important;
}

/* ==========================================================================
   v2.1.8 — INPUT TEXT COLOR IN LIGHT MODE
   The inline search bars (Leads page search, marketplace toolbar search,
   topbar ⌘K search, any in-card filter inputs) were rendering typed text
   in the dark-mode ink color because the user's theme or the legacy
   havn-dashboard.css text-color !important rule wasn't being beaten by
   `.havn-mc-search input { color: var(--mc-text); }`.

   This block locks every text/search/textarea/select inside the Mission
   Control shell to dark ink in light mode, with a readable secondary
   color for placeholders and a sensible focus state. Dark mode untouched.
   ========================================================================== */

/* Every text-shaped input inside the dashboard shell, in light mode. */
body.havn-mc-light.havn-dashboard-page input,
body.havn-mc-light.havn-dashboard-page textarea,
body.havn-mc-light.havn-dashboard-page select,
.havn-mc.is-light input,
.havn-mc.is-light textarea,
.havn-mc.is-light select {
	color: #15171C !important;
	caret-color: #D4B370;
	-webkit-text-fill-color: #15171C; /* Safari quirk: type=search ignores `color` */
}

/* Specifically the Mission Control search wrappers (topbar + any inline) */
.havn-mc.is-light .havn-mc-search input,
.havn-mc.is-light .havn-mc-search-inline input,
body.havn-mc-light .havn-mc-search input,
body.havn-mc-light .havn-mc-search-inline input {
	color: #15171C !important;
	-webkit-text-fill-color: #15171C !important;
	background: transparent !important;
}
.havn-mc.is-light .havn-mc-search input::placeholder,
.havn-mc.is-light .havn-mc-search-inline input::placeholder,
body.havn-mc-light .havn-mc-search input::placeholder,
body.havn-mc-light .havn-mc-search-inline input::placeholder {
	color: #6B7280 !important;
	-webkit-text-fill-color: #6B7280 !important;
	opacity: 1;
}

/* The wrapper itself: ensure the panel reads as a real input on white */
.havn-mc.is-light .havn-mc-search,
.havn-mc.is-light .havn-mc-search-inline,
body.havn-mc-light .havn-mc-search,
body.havn-mc-light .havn-mc-search-inline {
	background: #F4F5F8 !important;
	border: 1px solid rgba(15,23,42,.14) !important;
	color: #15171C !important;
}
.havn-mc.is-light .havn-mc-search:focus-within,
body.havn-mc-light .havn-mc-search:focus-within {
	background: #FFFFFF !important;
	border-color: rgba(212,179,112,.55) !important;
	box-shadow: 0 0 0 3px rgba(212,179,112,.18) !important;
}
.havn-mc.is-light .havn-mc-search svg,
body.havn-mc-light .havn-mc-search svg {
	color: #5B6473 !important;
}

/* Text selection inside any input — keep it readable, not white-on-white */
body.havn-mc-light ::selection,
.havn-mc.is-light ::selection {
	background: rgba(212,179,112,.30);
	color: #15171C;
}

/* ==========================================================================
   v2.1.9 — MESSAGES POPUP LIGHT MODE
   The chat modal (#havn-chat-fab + #havn-chat-modal + .havn-chat-*) has
   its style block inlined directly inside havn-dashboard.php with
   hard-coded dark colors (lines ~3642-3686). It was never theme-aware.

   Below: repaint the entire modal for light mode (white card, dark text,
   light contact list, white incoming bubbles, gold outgoing bubbles,
   white textarea). Dark mode is left exactly as-is.
   ========================================================================== */

/* Backdrop — softer blur over a frosted white veil */
body.havn-mc-light #havn-chat-modal {
	background: rgba(232,234,240,.55) !important;
	backdrop-filter: blur(8px) saturate(120%) !important;
}

/* Modal card */
body.havn-mc-light .havn-chat-modal-inner {
	background: #FFFFFF !important;
	color: #15171C !important;
	border: 1px solid rgba(15,23,42,.10) !important;
	box-shadow: 0 30px 80px rgba(15,15,20,.22) !important;
}

/* Header bar */
body.havn-mc-light .havn-chat-modal-head {
	border-bottom: 1px solid rgba(15,23,42,.10) !important;
}
body.havn-mc-light .havn-chat-modal-head h3 {
	color: #15171C !important;
}
body.havn-mc-light #havn-chat-close {
	color: #15171C !important;
}
body.havn-mc-light #havn-chat-close:hover {
	background: rgba(15,23,42,.06) !important;
}

/* Contact / thread list (left rail) */
body.havn-mc-light #havn-chat-thread-list {
	background: #F4F5F8 !important;
	border-right: 1px solid rgba(15,23,42,.08) !important;
}
body.havn-mc-light .havn-chat-thread {
	color: #15171C !important;
}
body.havn-mc-light .havn-chat-thread:hover {
	background: rgba(15,23,42,.04) !important;
}
body.havn-mc-light .havn-chat-thread.is-active {
	background: rgba(212,179,112,.18) !important;
	box-shadow: inset 0 0 0 1px rgba(212,179,112,.45) !important;
}
body.havn-mc-light .havn-chat-avatar {
	background: rgba(212,179,112,.18) !important;
	color: #8A6A2C !important;
}
body.havn-mc-light .havn-chat-name { color: #15171C !important; }
body.havn-mc-light .havn-chat-sub,
body.havn-mc-light .havn-chat-preview,
body.havn-mc-light .havn-chat-time {
	color: #5B6473 !important;
	opacity: 1 !important;
}

/* Right pane header */
body.havn-mc-light #havn-chat-thread-pane .havn-chat-header {
	border-bottom: 1px solid rgba(15,23,42,.10) !important;
}
body.havn-mc-light #havn-chat-thread-pane .havn-muted {
	color: #5B6473 !important;
}

/* Message bubbles — incoming (left) */
body.havn-mc-light #havn-chat-thread-pane .havn-chat-bubble {
	background: #F4F5F8 !important;
	color: #15171C !important;
	border: 1px solid rgba(15,23,42,.08);
}
/* Message bubbles — me (right) keep gold but darker ink for contrast */
body.havn-mc-light #havn-chat-thread-pane .havn-chat-msg.is-me .havn-chat-bubble {
	background: linear-gradient(135deg, #F0DCA8, #D4B370) !important;
	color: #1A1305 !important;
	border-color: rgba(212,179,112,.45);
}
body.havn-mc-light #havn-chat-thread-pane .havn-chat-empty {
	color: #5B6473 !important;
}

/* Composer */
body.havn-mc-light .havn-chat-form textarea {
	background: #FFFFFF !important;
	color: #15171C !important;
	-webkit-text-fill-color: #15171C !important;
	border: 1px solid rgba(15,23,42,.18) !important;
}
body.havn-mc-light .havn-chat-form textarea::placeholder {
	color: #6B7280 !important;
	opacity: 1;
}
/* SEND button keeps the gold gradient — just sharpen ink */
body.havn-mc-light .havn-chat-form button {
	color: #1A1305 !important;
}

/* Floating Messages pill (when the modal is closed) — also light-mode it */
body.havn-mc-light #havn-chat-toggle {
	background: #FFFFFF !important;
	color: #15171C !important;
	border: 1px solid rgba(212,179,112,.55) !important;
	box-shadow: 0 8px 24px rgba(15,15,20,.10) !important;
}
body.havn-mc-light #havn-chat-toggle:hover {
	box-shadow: 0 12px 28px rgba(15,15,20,.14) !important;
}

/* Selection inside the modal stays the same — already handled globally. */

/* =========================================================================

/* =========================================================================

/* ===========================================================
   HAVN typography system — v2.2.5
   Inter (UI/body) + Fraunces (display/headlines/money figures)
   Loaded via Google Fonts (see wp_enqueue_style 'havn-fonts').
   Applied at the END of the file so it cascades over earlier rules.
   =========================================================== */

.havn-mc,
.havn-mc input,
.havn-mc textarea,
.havn-mc select,
.havn-mc button {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	font-feature-settings: "cv11", "ss01", "ss03";
}

/* Headlines + section titles -> Fraunces */
.havn-mc h1,
.havn-mc h2,
.havn-mc h3,
.havn-mc .havn-mc-view-title,
.havn-mc .havn-mc-stepper-title,
.havn-mc .havn-mc-card-title,
.havn-mc .havn-mc-section-title,
.havn-mc .havn-mc-hot-title,
.havn-mc .havn-mc-hot-card-title,
.havn-mc .havn-mc-deal-title,
.havn-mc .havn-mc-h3,
.havn-mc .havn-mc-locked-head h3,
.havn-mc .havn-mc-modal-head h3,
.havn-mc .havn-mc-ai-head h3,
.havn-mc .havn-mc-drawer-head-top h2,
.havn-mc .havn-ot-title,
.havn-mc .havn-ot-val-title,
.havn-mc .havn-mc-welcome h1,
.havn-mc .havn-welcome-card h1 {
	font-family: "Fraunces", "Times New Roman", serif;
	font-weight: 600;
	letter-spacing: -0.02em;
	font-feature-settings: "ss01", "ss02";
}

/* Money figures, KPI values, big numbers -> Fraunces */
.havn-mc .havn-mc-kpi-value,
.havn-mc .havn-mc-big-num,
.havn-mc .havn-mc-metric-value,
.havn-mc .havn-mc-money,
.havn-mc .havn-mc-stat-value,
.havn-mc .havn-ot-step-title {
	font-family: "Fraunces", "Times New Roman", serif;
	font-weight: 600;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

/* Sidebar brand wordmark */
.havn-mc-brand-name,
.havn-mc-brand-text .name {
	font-family: "Fraunces", "Times New Roman", serif;
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* Tier badge / eyebrow text stays Inter but tight */
.havn-mc-brand-tier,
.havn-mc-eyebrow {
	font-family: "Inter", sans-serif;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

/* ============================================================
 * HOMEOWNER — property switcher + My Properties grid (v2.2.17)
 * ============================================================ */
.havn-mc-property-switch {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px 4px 12px;
	border: 1px solid var(--mc-border, rgba(255,255,255,.1));
	border-radius: 999px;
	background: var(--mc-surface, rgba(255,255,255,.03));
}
.havn-mc-property-switch-ico { display: inline-flex; opacity: .6; }
.havn-mc-property-switch-ico svg { width: 15px; height: 15px; }
.havn-mc-property-switch select {
	border: 0;
	background: transparent;
	color: var(--mc-text, #f4f4f5);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	max-width: 200px;
	cursor: pointer;
	outline: none;
}
.havn-mc-property-switch select option { color: #1a1a1a; }

.havn-ot-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.havn-ot-count {
	display: inline-block;
	min-width: 22px;
	padding: 1px 8px;
	margin-left: 6px;
	border-radius: 999px;
	background: var(--mc-accent-soft, rgba(212,179,112,.16));
	color: var(--mc-accent, #D4B370);
	font-size: 13px;
	font-weight: 700;
	vertical-align: middle;
}
.havn-ot-property-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
	margin-top: 18px;
}
.havn-ot-property {
	border: 1px solid var(--mc-border, rgba(255,255,255,.1));
	border-radius: 16px;
	padding: 18px;
	background: var(--mc-surface, rgba(255,255,255,.02));
	transition: border-color .15s, transform .15s;
}
.havn-ot-property:hover { transform: translateY(-2px); }
.havn-ot-property.is-active {
	border-color: var(--mc-accent, #D4B370);
	box-shadow: 0 0 0 1px var(--mc-accent, #D4B370) inset;
}
.havn-ot-property-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.havn-ot-property-title {
	margin: 0;
	font-family: "Fraunces", "Times New Roman", serif;
	font-weight: 600;
	font-size: 18px;
	letter-spacing: -0.01em;
	color: var(--mc-text, #f4f4f5);
}
.havn-ot-property-current {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--mc-accent, #D4B370);
}
.havn-ot-property-current svg { width: 14px; height: 14px; }
.havn-ot-property-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin: 16px 0;
	padding: 14px 0;
	border-top: 1px solid var(--mc-border, rgba(255,255,255,.08));
	border-bottom: 1px solid var(--mc-border, rgba(255,255,255,.08));
}
.havn-ot-property-stats > div { display: flex; flex-direction: column; gap: 2px; }
.havn-ot-stat-v { font-weight: 700; font-size: 15px; color: var(--mc-text, #f4f4f5); }
.havn-ot-stat-l { font-size: 11px; color: var(--mc-text-2, #a1a1aa); }
.havn-ot-property-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.havn-ot-property-actions .havn-btn-sm { font-size: 12px; padding: 6px 12px; }
.havn-ot-property-actions .is-disabled { opacity: .55; pointer-events: none; }
@media (max-width: 600px) {
	.havn-ot-property-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * v2.2.19 — insights severity, GCI target button, portfolio rollup
 * ============================================================ */
/* Insight urgency accent (left border on the priority-moves list) */
.havn-mc .havn-mc-ai-list > li { border-left: 3px solid transparent; padding-left: 12px; }
.havn-mc .havn-mc-ai-list > li.havn-mc-ai-sev-3 { border-left-color: #E06A5E; }
.havn-mc .havn-mc-ai-list > li.havn-mc-ai-sev-2 { border-left-color: var(--mc-accent, #D4B370); }
.havn-mc .havn-mc-ai-list > li.havn-mc-ai-sev-1 { border-left-color: #6FCF97; }

/* Inline link-style button (e.g. "Edit" target) */
.havn-mc .havn-mc-linkbtn {
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	font-weight: 600;
	color: var(--mc-accent, #D4B370);
	cursor: pointer;
	text-decoration: underline;
}

/* Homeowner / investor portfolio rollup */
.havn-mc .havn-ot-portfolio {
	margin-top: 16px;
	padding: 16px 18px;
	border: 1px solid var(--mc-accent, #D4B370);
	border-radius: 14px;
	background: var(--mc-accent-soft, rgba(212,179,112,.08));
}
.havn-mc .havn-ot-portfolio-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}
.havn-mc .havn-ot-portfolio-stats > div { display: flex; flex-direction: column; gap: 2px; }
.havn-mc .havn-ot-portfolio-stats .havn-ot-stat-v { font-weight: 700; font-size: 19px; color: var(--mc-text, #f4f4f5); }
@media (max-width: 600px) {
	.havn-mc .havn-ot-portfolio-stats { grid-template-columns: 1fr 1fr; }
}

/* =========================================================================
 * v2.2.27 — functional layer: topbar menus, global search, tool generator,
 * CMA result, commission splitter, save toggle, calendar agenda
 * ====================================================================== */

/* Topbar dropdown menus (quick-create + notifications) */
.havn-mc .havn-mc-menu-host { position: relative; }
.havn-mc .havn-mc-dropdown {
	position: absolute; top: calc(100% + 8px); right: 0; z-index: 240;
	min-width: 230px; padding: 6px;
	background: var(--mc-surface, #131318);
	border: 1px solid var(--mc-border, rgba(255,255,255,.09));
	border-radius: var(--mc-radius, 12px);
	box-shadow: 0 18px 44px rgba(0,0,0,.45);
}
.havn-mc .havn-mc-dropdown > button,
.havn-mc .havn-mc-dropdown > a {
	display: flex; align-items: center; gap: 9px; width: 100%;
	padding: 9px 10px; border: 0; background: transparent; cursor: pointer;
	border-radius: 8px; font: inherit; font-size: 13px; text-align: left;
	color: var(--mc-text, #f4f4f5); text-decoration: none;
}
.havn-mc .havn-mc-dropdown > button:hover,
.havn-mc .havn-mc-dropdown > a:hover { background: rgba(255,255,255,.06); }
.havn-mc .havn-mc-dropdown svg { width: 15px; height: 15px; opacity: .75; }

/* Notifications panel */
.havn-mc .havn-mc-notif-panel { min-width: 320px; max-height: 380px; overflow-y: auto; }
.havn-mc .havn-mc-notif-head {
	padding: 8px 10px 6px; font-size: 11px; letter-spacing: .08em;
	text-transform: uppercase; color: var(--mc-text-dim, rgba(244,244,245,.55));
}
.havn-mc .havn-mc-notif-row {
	display: flex; align-items: flex-start; gap: 10px; width: 100%;
	padding: 9px 10px; border: 0; background: transparent; border-radius: 8px;
	font: inherit; text-align: left; color: var(--mc-text, #f4f4f5);
}
.havn-mc button.havn-mc-notif-row { cursor: pointer; }
.havn-mc button.havn-mc-notif-row:hover { background: rgba(255,255,255,.06); }
.havn-mc .havn-mc-notif-row .havn-mc-activity-dot { margin-top: 5px; flex: 0 0 auto; }
.havn-mc .havn-mc-notif-row strong { display: block; font-size: 13px; font-weight: 600; }
.havn-mc .havn-mc-notif-row small { display: block; font-size: 11.5px; color: var(--mc-text-dim, rgba(244,244,245,.55)); }
.havn-mc .havn-mc-notif-empty { padding: 14px 10px; font-size: 12.5px; color: var(--mc-text-dim, rgba(244,244,245,.55)); }

/* Global search results */
.havn-mc .havn-mc-search { position: relative; }
.havn-mc .havn-mc-search-results {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 240;
	padding: 6px; max-height: 360px; overflow-y: auto;
	background: var(--mc-surface, #131318);
	border: 1px solid var(--mc-border, rgba(255,255,255,.09));
	border-radius: var(--mc-radius, 12px);
	box-shadow: 0 18px 44px rgba(0,0,0,.45);
}
.havn-mc .havn-mc-search-row {
	display: flex; align-items: center; gap: 10px; padding: 9px 10px;
	border-radius: 8px; text-decoration: none; color: var(--mc-text, #f4f4f5);
}
.havn-mc .havn-mc-search-row:hover { background: rgba(255,255,255,.06); }
.havn-mc .havn-mc-search-row strong { display: block; font-size: 13px; font-weight: 600; }
.havn-mc .havn-mc-search-row small { display: block; font-size: 11.5px; color: var(--mc-text-dim, rgba(244,244,245,.55)); }
.havn-mc .havn-mc-search-empty { padding: 12px 10px; font-size: 12.5px; color: var(--mc-text-dim, rgba(244,244,245,.55)); }

/* Smart Tools generator output */
.havn-mc .havn-mc-tool-output { margin-top: 16px; }
.havn-mc .havn-mc-tool-output-head {
	display: flex; align-items: center; justify-content: space-between;
	gap: 10px; margin-bottom: 8px;
}
.havn-mc .havn-mc-tool-output-head strong { font-size: 13.5px; }
.havn-mc .havn-mc-tool-output textarea {
	width: 100%; resize: vertical; min-height: 220px; padding: 12px;
	font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
	color: var(--mc-text, #f4f4f5);
	background: rgba(255,255,255,.04);
	border: 1px solid var(--mc-border, rgba(255,255,255,.09));
	border-radius: var(--mc-radius, 12px);
}

/* CMA result block */
.havn-mc .havn-mc-cma-input { display: flex; gap: 8px; flex-wrap: wrap; }
.havn-mc .havn-mc-cma-result { margin-top: 16px; }
.havn-mc .havn-mc-cma-summary {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px;
}
.havn-mc .havn-mc-cma-summary > div {
	padding: 12px; border-radius: var(--mc-radius, 12px);
	background: rgba(255,255,255,.03);
	border: 1px solid var(--mc-border, rgba(255,255,255,.09));
	display: flex; flex-direction: column; gap: 3px;
}
.havn-mc .havn-mc-cma-summary strong { font-size: 17px; }

/* Hot-lead save toggle */
.havn-mc .havn-btn.is-saved { color: var(--mc-accent, #D4B370); border-color: var(--mc-accent, #D4B370); }

/* Calendar nav buttons render as anchors now */
.havn-mc a.havn-mc-iconbtn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* Deal-flow rows are clickable (open the lead drawer) */
.havn-mc .havn-mc-deal-row[data-mc-action="lead-open"]:hover { background: rgba(255,255,255,.035); }

/* Light mode */
.havn-mc.is-light .havn-mc-dropdown,
.havn-mc.is-light .havn-mc-search-results {
	background: #fff; border-color: rgba(15,15,20,.1);
	box-shadow: 0 18px 44px rgba(15,15,20,.14);
}
.havn-mc.is-light .havn-mc-dropdown > button:hover,
.havn-mc.is-light .havn-mc-dropdown > a:hover,
.havn-mc.is-light button.havn-mc-notif-row:hover,
.havn-mc.is-light .havn-mc-search-row:hover { background: rgba(15,15,20,.05); }
.havn-mc.is-light .havn-mc-tool-output textarea { background: rgba(15,15,20,.03); }
.havn-mc.is-light .havn-mc-cma-summary > div { background: rgba(15,15,20,.03); }

/* v2.2.31 — destructive actions (unmatch / delete lead / delete property) */
.havn-mc .havn-mc-btn-danger,
.havn-mc .havn-ot-danger { color: #ff7b72 !important; }
.havn-mc .havn-mc-btn-danger:hover,
.havn-mc .havn-ot-danger:hover {
	color: #ff958e !important;
	border-color: rgba(255,123,114,.45) !important;
	background: rgba(255,123,114,.08) !important;
}
.havn-mc.is-light .havn-mc-btn-danger,
.havn-mc.is-light .havn-ot-danger { color: #c4342b !important; }

/* =========================================================================
 * v2.2.32 — Cost Calculator redesign: sliders, hero price, breakdown bar
 * ====================================================================== */
.havn-mc .havn-ot-calc-v2{display:grid;grid-template-columns:1.55fr 1fr;gap:22px;align-items:start}
@media(max-width:980px){.havn-mc .havn-ot-calc-v2{grid-template-columns:1fr}}

/* --- shared slider look --- */
.havn-mc .havn-ot-calc-v2 input[type=range]{
	-webkit-appearance:none;appearance:none;width:100%;height:22px;cursor:pointer;margin:0;
	background:transparent!important;border:none!important;padding:0!important;box-shadow:none!important}
.havn-mc .havn-ot-calc-v2 input[type=range]::-webkit-slider-runnable-track{
	height:4px;border-radius:4px;
	background:linear-gradient(90deg,var(--cc-accent,var(--mc-accent)) 0%,rgba(255,255,255,.10) 0%);
	background:rgba(255,255,255,.10)}
.havn-mc .havn-ot-calc-v2 input[type=range]::-webkit-slider-thumb{
	-webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;margin-top:-6px;
	background:var(--cc-accent,var(--mc-accent));border:2px solid rgba(0,0,0,.35);
	box-shadow:0 2px 10px rgba(0,0,0,.45);transition:transform .15s}
.havn-mc .havn-ot-calc-v2 input[type=range]::-webkit-slider-thumb:hover{transform:scale(1.18)}
.havn-mc .havn-ot-calc-v2 input[type=range]::-moz-range-track{height:4px;border-radius:4px;background:rgba(255,255,255,.10)}
.havn-mc .havn-ot-calc-v2 input[type=range]::-moz-range-progress{height:4px;border-radius:4px;background:var(--cc-accent,var(--mc-accent))}
.havn-mc .havn-ot-calc-v2 input[type=range]::-moz-range-thumb{
	width:16px;height:16px;border-radius:50%;background:var(--cc-accent,var(--mc-accent));
	border:2px solid rgba(0,0,0,.35);box-shadow:0 2px 10px rgba(0,0,0,.45)}

/* --- sale price hero --- */
.havn-mc .havn-ot-cc-hero{padding:20px 22px;border-radius:14px;margin-bottom:14px;
	background:linear-gradient(160deg,rgba(212,179,112,.10),rgba(212,179,112,.02));
	border:1px solid rgba(212,179,112,.25)}
.havn-mc .havn-ot-cc-hero-value{display:flex;align-items:baseline;gap:10px;margin:6px 0 10px}
.havn-mc .havn-ot-cc-cur{font-size:18px;color:var(--mc-accent,#D4B370);font-weight:600}
.havn-mc .havn-ot-cc-hero-value input{
	flex:1;min-width:0;background:transparent!important;border:none!important;outline:none;padding:0!important;
	font-family:Fraunces,Georgia,serif;font-size:clamp(30px,4vw,44px);font-weight:600;letter-spacing:-.02em;
	color:var(--mc-text,#f4f4f5)!important;border-bottom:1px dashed rgba(212,179,112,.4)!important;border-radius:0!important}
.havn-mc .havn-ot-cc-hero-value input:focus{border-bottom-color:var(--mc-accent,#D4B370)!important}
.havn-mc .havn-ot-cc-marks{display:flex;justify-content:space-between;font-size:11px;color:var(--mc-text-dim,rgba(244,244,245,.5));margin-top:2px}

/* --- cost item cards --- */
.havn-mc .havn-ot-cc-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:640px){.havn-mc .havn-ot-cc-grid{grid-template-columns:1fr}}
.havn-mc .havn-ot-cc-item{padding:14px 16px;border-radius:12px;
	background:rgba(255,255,255,.025);border:1px solid var(--mc-border,rgba(255,255,255,.09));
	transition:border-color .25s,background .25s}
.havn-mc .havn-ot-cc-item:hover,.havn-mc .havn-ot-cc-item:focus-within{
	border-color:color-mix(in srgb,var(--cc-accent,#8AB4F8),transparent 55%);background:rgba(255,255,255,.04)}
.havn-mc .havn-ot-cc-item.is-wide{margin-bottom:14px}
.havn-mc .havn-ot-cc-item-head{display:flex;align-items:center;gap:9px;margin-bottom:9px}
.havn-mc .havn-ot-cc-ico{display:inline-flex;width:26px;height:26px;align-items:center;justify-content:center;
	border-radius:8px;background:color-mix(in srgb,var(--cc-accent,#8AB4F8),transparent 84%);
	color:var(--cc-accent,#8AB4F8);flex:none}
.havn-mc .havn-ot-cc-ico svg{width:14px;height:14px}
.havn-mc .havn-ot-cc-name{font-size:12.5px;font-weight:600;color:var(--mc-text,#f4f4f5)}
.havn-mc .havn-ot-cc-amt{margin-left:auto;font-size:13px;font-weight:700;color:var(--cc-accent,#D4B370);
	font-variant-numeric:tabular-nums}
.havn-mc .havn-ot-cc-ctrl{display:flex;align-items:center;gap:12px}
.havn-mc .havn-ot-cc-ctrl input[type=range]{flex:1}
.havn-mc .havn-ot-cc-num{display:inline-flex;align-items:center;gap:2px;flex:none;
	padding:5px 9px;border-radius:8px;background:rgba(255,255,255,.05);
	border:1px solid var(--mc-border,rgba(255,255,255,.10))}
.havn-mc .havn-ot-cc-num em{font-style:normal;font-size:12px;color:var(--mc-text-dim,rgba(244,244,245,.55))}
.havn-mc .havn-ot-cc-num input{
	width:74px;background:transparent!important;border:none!important;outline:none;padding:0!important;
	font-size:13.5px;font-weight:600;color:var(--mc-text,#f4f4f5)!important;text-align:right;
	font-variant-numeric:tabular-nums;-moz-appearance:textfield;appearance:textfield}
.havn-mc .havn-ot-cc-num input::-webkit-outer-spin-button,
.havn-mc .havn-ot-cc-num input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

/* --- summary --- */
.havn-mc .havn-ot-cc-sum{padding:20px 22px;border-radius:14px;position:sticky;top:18px;
	background:rgba(255,255,255,.03);border:1px solid var(--mc-border,rgba(255,255,255,.09))}
.havn-mc .havn-ot-cc-net{margin-bottom:16px}
.havn-mc .havn-ot-cc-net-num{display:block;font-family:Fraunces,Georgia,serif;font-weight:600;
	font-size:clamp(30px,3.4vw,40px);letter-spacing:-.02em;color:#6FCF97;margin:4px 0 2px;
	font-variant-numeric:tabular-nums;transition:color .3s}
.havn-mc .havn-ot-cc-net-num.is-negative{color:#FF7B72}
.havn-mc .havn-ot-cc-bar{display:flex;height:14px;border-radius:8px;overflow:hidden;gap:2px;margin-bottom:12px;
	background:rgba(255,255,255,.05)}
.havn-mc .havn-ot-cc-bar span{display:block;height:100%;background:var(--c);width:0;
	transition:width .45s cubic-bezier(.16,1,.3,1);min-width:0}
.havn-mc .havn-ot-cc-legend{list-style:none;margin:0 0 14px;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:7px 14px}
.havn-mc .havn-ot-cc-legend li{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--mc-text-dim,rgba(244,244,245,.6))}
.havn-mc .havn-ot-cc-legend i{width:9px;height:9px;border-radius:3px;background:var(--c);flex:none}
.havn-mc .havn-ot-cc-legend strong{margin-left:auto;color:var(--mc-text,#f4f4f5);font-size:12px;font-variant-numeric:tabular-nums}
.havn-mc .havn-ot-cc-rows{border-top:1px solid var(--mc-border,rgba(255,255,255,.09));padding-top:10px}

/* light mode */
.havn-mc.is-light .havn-ot-cc-item{background:rgba(15,15,20,.025);}
.havn-mc.is-light .havn-ot-cc-sum{background:rgba(15,15,20,.03)}
.havn-mc.is-light .havn-ot-cc-num{background:rgba(15,15,20,.04)}
.havn-mc.is-light .havn-ot-calc-v2 input[type=range]::-webkit-slider-runnable-track{background:rgba(15,15,20,.12)}
.havn-mc.is-light .havn-ot-calc-v2 input[type=range]::-moz-range-track{background:rgba(15,15,20,.12)}

/* v2.2.33 — per-property calculator context row */
.havn-mc .havn-ot-cc-context{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:-4px 0 16px}
.havn-mc .havn-ot-cc-propswitch{display:flex;align-items:center;gap:10px}
.havn-mc .havn-ot-cc-propswitch select{
	padding:7px 30px 7px 12px;border-radius:9px;font-size:13px;font-weight:600;cursor:pointer;
	color:var(--mc-text,#f4f4f5)!important;background:rgba(255,255,255,.05)!important;
	border:1px solid var(--mc-border,rgba(255,255,255,.12))!important;
	appearance:none;-webkit-appearance:none;
	background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23D4B370' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>")!important;
	background-repeat:no-repeat!important;background-position:right 11px center!important}
.havn-mc .havn-ot-cc-propname{display:flex;align-items:baseline;gap:8px;font-size:13.5px;font-weight:600;color:var(--mc-text,#f4f4f5)}
.havn-mc .havn-ot-cc-saved{display:inline-flex;align-items:center;gap:5px;margin-left:auto;
	font-size:11.5px;font-weight:600;letter-spacing:.04em;color:#6FCF97;
	opacity:0;transform:translateY(2px);transition:opacity .3s,transform .3s}
.havn-mc .havn-ot-cc-saved.is-show{opacity:1;transform:none}
.havn-mc .havn-ot-cc-saved svg{width:12px;height:12px}
.havn-mc.is-light .havn-ot-cc-propswitch select{background-color:rgba(15,15,20,.04)!important}

/* =========================================================================
 * v2.2.35 — My Properties polish: calm action row + ⋯ menu, theme-proofed
 * ====================================================================== */
/* Property cards get a gentle lift */
.havn-mc .havn-ot-property{transition:transform .35s cubic-bezier(.16,1,.3,1),border-color .35s,box-shadow .35s}
.havn-mc .havn-ot-property:hover{transform:translateY(-3px);box-shadow:0 16px 36px rgba(0,0,0,.35)}

/* Action buttons — explicit design, immune to theme button/link styling */
.havn-mc .havn-ot-act{
	display:inline-flex!important;align-items:center;gap:6px;
	padding:8px 14px!important;border-radius:9px!important;
	font-size:12.5px!important;font-weight:600!important;letter-spacing:.01em!important;
	text-transform:none!important;text-decoration:none!important;line-height:1!important;
	color:var(--mc-text,#f4f4f5)!important;
	background:rgba(255,255,255,.05)!important;
	border:1px solid var(--mc-border,rgba(255,255,255,.12))!important;
	box-shadow:none!important;cursor:pointer;
	transition:background .2s,border-color .2s,color .2s,transform .15s}
.havn-mc .havn-ot-act:hover{background:rgba(255,255,255,.09)!important;border-color:rgba(212,179,112,.45)!important;transform:translateY(-1px)}
.havn-mc .havn-ot-act svg{width:13px;height:13px;opacity:.85}
.havn-mc .havn-ot-act.is-primary{
	background:linear-gradient(135deg,#D4B370,#E8CD9A)!important;
	border-color:transparent!important;color:#1a1305!important}
.havn-mc .havn-ot-act.is-primary:hover{filter:brightness(1.06);background:linear-gradient(135deg,#D4B370,#E8CD9A)!important}
.havn-mc .havn-ot-property-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

/* ⋯ overflow menu (pure <details> — no JS dependency) */
.havn-mc .havn-ot-prop-more{position:relative;margin-left:auto}
.havn-mc .havn-ot-prop-more summary{
	list-style:none;display:inline-flex;align-items:center;justify-content:center;
	width:34px;height:34px;border-radius:9px;cursor:pointer;user-select:none;
	font-size:18px;line-height:1;color:var(--mc-text-dim,rgba(244,244,245,.6));
	background:rgba(255,255,255,.05);border:1px solid var(--mc-border,rgba(255,255,255,.12));
	transition:background .2s,color .2s,border-color .2s}
.havn-mc .havn-ot-prop-more summary::-webkit-details-marker{display:none}
.havn-mc .havn-ot-prop-more summary:hover{background:rgba(255,255,255,.09);color:var(--mc-text,#f4f4f5)}
.havn-mc .havn-ot-prop-more[open] summary{border-color:rgba(212,179,112,.5);color:var(--mc-accent,#D4B370)}
.havn-mc .havn-ot-prop-menu{
	position:absolute;right:0;bottom:calc(100% + 8px);z-index:80;min-width:200px;padding:6px;
	background:var(--mc-surface,#131318);border:1px solid var(--mc-border,rgba(255,255,255,.1));
	border-radius:12px;box-shadow:0 18px 44px rgba(0,0,0,.5)}
.havn-mc .havn-ot-prop-menu a{
	display:flex!important;align-items:center;gap:9px;padding:9px 11px!important;border-radius:8px!important;
	font-size:13px!important;font-weight:500!important;text-decoration:none!important;
	color:var(--mc-text,#f4f4f5)!important;background:transparent!important;border:none!important;box-shadow:none!important}
.havn-mc .havn-ot-prop-menu a:hover{background:rgba(255,255,255,.06)!important}
.havn-mc .havn-ot-prop-menu a svg{width:14px;height:14px;opacity:.8}
.havn-mc .havn-ot-prop-menu a.is-danger{color:#ff7b72!important}
.havn-mc .havn-ot-prop-menu a.is-danger:hover{background:rgba(255,123,114,.1)!important}

/* "Add a property" header button — kill foreign shadows/pills, keep gold */
.havn-mc .havn-ot-properties > header .havn-btn{
	box-shadow:none!important;border-radius:11px!important;padding:11px 20px!important;
	font-size:13px!important;letter-spacing:.02em!important;text-transform:none!important}

/* Light mode */
.havn-mc.is-light .havn-ot-act{background:rgba(15,15,20,.04)!important;color:#1d1d22!important}
.havn-mc.is-light .havn-ot-act:hover{background:rgba(15,15,20,.07)!important}
.havn-mc.is-light .havn-ot-prop-more summary{background:rgba(15,15,20,.04);color:#56565e}
.havn-mc.is-light .havn-ot-prop-menu{background:#fff;box-shadow:0 18px 44px rgba(15,15,20,.16)}
.havn-mc.is-light .havn-ot-prop-menu a{color:#1d1d22!important}
.havn-mc.is-light .havn-ot-prop-menu a:hover{background:rgba(15,15,20,.05)!important}

/* =========================================================================
   Lead drawer — stage-aware Documents tab (v2.2.40)
   ========================================================================== */
.havn-mc-docs { display:flex; flex-direction:column; gap:14px; }

/* stage stepper */
.havn-mc-docstepper { display:flex; align-items:center; gap:2px; overflow-x:auto; padding:2px 0 8px; }
.havn-mc-docstep { display:flex; flex-direction:column; align-items:center; gap:5px; background:none; border:0;
	cursor:default; padding:2px 4px; min-width:54px; color:var(--mc-text-3); font:inherit; }
.havn-mc-docstep-dot { width:14px; height:14px; border-radius:50%; border:2px solid var(--mc-border-2); background:var(--mc-bg-3); transition:.15s; }
.havn-mc-docstep-label { font-size:10px; font-weight:700; letter-spacing:.02em; white-space:nowrap; }
.havn-mc-docstep-line { flex:1; height:2px; min-width:10px; background:var(--mc-border); }
.havn-mc-docstep.is-done .havn-mc-docstep-dot { background:var(--mc-success); border-color:var(--mc-success); }
.havn-mc-docstep.is-current .havn-mc-docstep-dot { background:var(--mc-accent); border-color:var(--mc-accent); box-shadow:0 0 10px var(--mc-accent); }
.havn-mc-docstep.is-viewing { color:var(--mc-text); }
.havn-mc-docstep.is-viewing .havn-mc-docstep-dot { transform:scale(1.25); }

/* viewed-stage header */
.havn-mc-docstage-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.havn-mc-docstage-head h4 { margin:3px 0 0; font-family:"Fraunces",serif; font-weight:600; font-size:18px; color:var(--mc-text); }
.havn-mc-docstage-eyebrow { font-size:10px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.havn-mc-docstate-done { color:var(--mc-success); }
.havn-mc-docstate-current { color:var(--mc-accent); }
.havn-mc-docstate-upcoming { color:var(--mc-text-3); }
.havn-mc-docstage-summary { font-size:11.5px; color:var(--mc-text-3); font-weight:600; }

/* document rows */
.havn-mc-docrows { display:flex; flex-direction:column; gap:8px; }
.havn-mc-docrow { background:var(--mc-surface); border:1px solid var(--mc-border); border-radius:12px; padding:11px 13px; }
.havn-mc-docrow.has-file { border-color:rgba(111,207,151,.28); }
.havn-mc-docrow-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.havn-mc-docrow-name { font-size:13px; font-weight:600; color:var(--mc-text); display:flex; align-items:center; gap:7px; }
.havn-mc-docreq { font-size:8.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--mc-accent);
	border:1px solid rgba(212,179,112,.4); border-radius:4px; padding:0 4px; }
.havn-mc-docrow-desc { font-size:11px; color:var(--mc-text-3); margin-top:2px; line-height:1.3; }
.havn-mc-docrow-right { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.havn-mc-doctag { font-size:10.5px; font-weight:700; padding:3px 9px; border-radius:999px; white-space:nowrap; }
.havn-mc-doctag.up { background:rgba(111,207,151,.14); color:var(--mc-success); }
.havn-mc-doctag.miss { background:rgba(229,156,140,.14); color:#E59C8C; }
.havn-mc-doctag.opt { background:var(--mc-surface-2); color:var(--mc-text-3); }
.havn-mc-docup { border:1px solid var(--mc-accent); color:var(--mc-accent); background:rgba(212,179,112,.08);
	border-radius:8px; padding:4px 10px; font:inherit; font-weight:700; font-size:11px; cursor:pointer; white-space:nowrap; }
.havn-mc-docup:hover { background:var(--mc-accent); color:#1a1407; }

/* uploaded files under a row */
.havn-mc-docfiles { display:flex; flex-direction:column; gap:5px; margin-top:9px; padding-top:9px; border-top:1px solid var(--mc-border); }
.havn-mc-docfile { display:flex; align-items:center; gap:9px; }
.havn-mc-docfile-name { font-size:12px; color:var(--mc-info); text-decoration:none; word-break:break-all; flex:1; }
.havn-mc-docfile-name:hover { text-decoration:underline; }
.havn-mc-docfile-size { font-size:10.5px; color:var(--mc-text-3); white-space:nowrap; }
.havn-mc-iconbtn-sm { width:24px; height:24px; border-radius:7px; border:1px solid var(--mc-border); background:var(--mc-surface);
	color:var(--mc-text-3); display:grid; place-items:center; cursor:pointer; text-decoration:none; font-size:12px; line-height:1; }
.havn-mc-iconbtn-sm:hover { color:var(--mc-text); border-color:var(--mc-border-2); }
.havn-mc-docdel:hover { color:#E59C8C; border-color:rgba(229,156,140,.4); }

/* =========================================================================
 * COMMAND CENTER (v2.2.63) — single-screen dashboard overview
 *   Built on --mc-* tokens + the .havn-mc-card base only, so it inherits the
 *   light/dark flip for free (.havn-mc.is-light redefines the tokens).
 * ====================================================================== */
.havn-cc { display:flex; flex-direction:column; gap:14px; }

/* ---- Hero strip ---- */
.havn-cc-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; padding:16px 20px; }
.havn-cc-hero-text { min-width:0; }
.havn-cc-eyebrow { display:inline-block; font-family:"Inter",sans-serif; font-size:10.5px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:var(--mc-accent); }
.havn-cc-hero .havn-cc-greet { margin:7px 0 3px; font-size:30px; line-height:1.04; color:var(--mc-text); }
.havn-cc-sub { margin:0; font-size:13px; color:var(--mc-text-2); }
.havn-cc-hero-meta { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.havn-cc-chip { display:inline-flex; align-items:center; gap:7px; padding:6px 12px; border-radius:999px; border:1px solid var(--mc-border); background:var(--mc-surface); color:var(--mc-text-2); font-size:12px; white-space:nowrap; }
.havn-cc-dot { width:7px; height:7px; border-radius:50%; background:var(--mc-success); box-shadow:0 0 8px var(--mc-success); }
.havn-cc-chip-live { color:var(--mc-text); border-color:var(--mc-accent-soft); }
.havn-cc-pulse { width:7px; height:7px; border-radius:50%; background:var(--mc-accent); animation:havn-cc-pulse 2.2s infinite; }
@keyframes havn-cc-pulse { 0%{box-shadow:0 0 0 0 rgba(212,179,112,.5);} 70%{box-shadow:0 0 0 7px rgba(212,179,112,0);} 100%{box-shadow:0 0 0 0 rgba(212,179,112,0);} }

/* ---- 12-col grid ---- */
.havn-cc-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:14px; align-content:start; }
.havn-cc-grid > * { min-width:0; }
.havn-cc-kpi, .havn-cc-span-3 { grid-column:span 3; }
.havn-cc-span-6 { grid-column:span 6; }

/* card-as-link reset + hover lift */
a.havn-cc-kpi, a.havn-cc-box { text-decoration:none; color:inherit; display:flex; flex-direction:column; position:relative; overflow:hidden; transition:transform .15s ease, border-color .15s ease; }
a.havn-cc-kpi:hover, a.havn-cc-box:hover { transform:translateY(-2px); border-color:var(--mc-border-2); }

/* ---- KPI tile ---- */
.havn-cc-kpi { padding:15px 16px; gap:2px; }
.havn-cc-kpi::before { content:""; position:absolute; inset:0 0 auto 0; height:2px; background:linear-gradient(90deg, var(--card-accent, var(--mc-accent)), transparent); opacity:.85; }
.havn-cc-kpi-head { display:flex; align-items:center; justify-content:space-between; min-height:30px; margin-bottom:6px; }
.havn-cc-ico { width:30px; height:30px; border-radius:9px; display:grid; place-items:center; background:var(--mc-accent-soft); color:var(--card-accent, var(--mc-accent)); }
.havn-cc-ico svg { width:16px; height:16px; }
.havn-cc-kpi-value { font-size:30px; line-height:1; color:var(--mc-text); }
.havn-cc-kpi-suffix { font-size:14px; color:var(--mc-text-3); margin-left:3px; }
.havn-cc-kpi-label { margin-top:7px; font-size:12.5px; font-weight:600; color:var(--mc-text); }
.havn-cc-kpi-sub { font-size:11.5px; color:var(--mc-text-3); }
.havn-cc-trend { display:inline-flex; align-items:center; gap:3px; font-size:11px; font-weight:600; padding:3px 7px; border-radius:999px; }
.havn-cc-trend svg { width:12px; height:12px; }
.havn-cc-trend.is-up { color:var(--mc-success); background:rgba(111,207,151,.12); }
.havn-cc-trend.is-down { color:#E59C8C; background:rgba(229,156,140,.12); }

/* ---- generic summary box ---- */
.havn-cc-box { padding:16px; gap:6px; }
.havn-cc-box-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.havn-cc-box-head .havn-cc-ico { width:28px; height:28px; }
.havn-cc-box-title { margin:2px 0 8px; font-size:18px; color:var(--mc-text); }
.havn-cc-stat { font-size:32px; line-height:1; color:var(--mc-text); margin-top:4px; }
.havn-cc-stat-unit { font-size:15px; color:var(--mc-text-3); }
.havn-cc-more { margin-top:auto; display:inline-flex; align-items:center; gap:4px; padding-top:10px; font-size:11.5px; font-weight:600; color:var(--mc-accent); }
.havn-cc-more svg { width:13px; height:13px; }

/* ---- hot-leads list (wide box) ---- */
.havn-cc-leads { gap:4px; }
.havn-cc-lead-list { list-style:none; margin:4px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }
.havn-cc-lead { display:flex; align-items:center; gap:11px; padding:9px 11px; border:1px solid var(--mc-border); border-radius:11px; background:var(--mc-surface); }
.havn-cc-score { flex:0 0 auto; width:32px; height:32px; border-radius:9px; display:grid; place-items:center; font-family:"Fraunces",serif; font-weight:600; font-size:13px; color:var(--mc-accent); background:var(--mc-accent-soft); }
.havn-cc-lead-main { flex:1; min-width:0; display:flex; flex-direction:column; }
.havn-cc-lead-title { font-size:13.5px; font-weight:600; color:var(--mc-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.havn-cc-lead-sub { font-size:11.5px; color:var(--mc-text-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.havn-cc-lead-val { flex:0 0 auto; font-family:"Fraunces",serif; font-size:13px; color:var(--mc-text-2); white-space:nowrap; }
.havn-cc-empty { padding:16px; border:1px dashed var(--mc-border-2); border-radius:11px; color:var(--mc-text-2); font-size:12.5px; }

/* ---- embedded calendar / tasks widgets — stay compact, scroll inside ---- */
.havn-cc-embed { display:flex; min-width:0; }
.havn-cc-embed > .havn-mc-card { flex:1; margin:0; max-height:268px; overflow:auto; }

/* big figures -> Fraunces */
.havn-mc .havn-cc-kpi-value, .havn-mc .havn-cc-stat { font-family:"Fraunces","Times New Roman",serif; font-weight:600; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }

/* ---- responsive collapse ---- */
@media (max-width:1180px){
	.havn-cc-kpi, .havn-cc-span-3 { grid-column:span 6; }
	.havn-cc-span-6 { grid-column:span 12; }
}
@media (max-width:680px){
	.havn-cc-hero { flex-direction:column; align-items:flex-start; }
	.havn-cc-hero-meta { justify-content:flex-start; }
	.havn-cc-grid { grid-template-columns:1fr; }
	.havn-cc-kpi, .havn-cc-span-3, .havn-cc-span-6 { grid-column:1 / -1; }
}

/* ---- light-mode micro-tweaks (cards already flip via .havn-mc-card) ---- */
.havn-mc.is-light .havn-cc-lead { background:#FFFFFF; }
.havn-mc.is-light .havn-cc-trend.is-up { background:rgba(111,207,151,.16); }

/* ==========================================================================
   ANALYTICS REVAMP (v2.2.69) — agent performance + market intelligence + CMA
   ========================================================================== */

/* 8-tile hero band — 4 across, wraps to two rows */
.havn-mc-kpis-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Section band header that introduces a group of cards */
.havn-mc-band-head {
	display: flex; align-items: flex-end; justify-content: space-between;
	gap: 12px; margin: 26px 2px 12px;
}
.havn-mc-band-head .havn-mc-h3 { margin: 2px 0 0; }

/* Lead-source rows with a name + sub-line */
.havn-mc-src-name { display: flex; flex-direction: column; line-height: 1.25; }
.havn-mc-src-name small { color: var(--mc-text-3); font-size: 11px; margin-top: 1px; }
.havn-mc-source-list.havn-mc-dist li { grid-template-columns: minmax(0,1fr) 1.4fr 44px; }

/* Conversion chips strip above the funnel */
.havn-mc-conv-strip {
	display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap;
	margin: 4px 0 18px;
}
.havn-mc-conv {
	flex: 1; min-width: 110px;
	background: var(--mc-surface); border: 1px solid var(--mc-border);
	border-radius: 11px; padding: 12px 14px;
	display: flex; flex-direction: column; gap: 3px;
}
.havn-mc-conv-pct { font-size: 22px; font-weight: 700; color: var(--mc-text); letter-spacing: -.01em; }
.havn-mc-conv-lbl { font-size: 11.5px; color: var(--mc-text-3); }
.havn-mc-conv-arrow { align-self: center; color: var(--mc-text-3); font-size: 20px; }

/* Chart legend */
.havn-mc-legend { display: flex; gap: 14px; }
.havn-mc-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--mc-text-3); }
.havn-mc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* GCI-vs-goal card */
.havn-mc-goal-fig { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--mc-text); margin-top: 4px; }
.havn-mc-goal-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.havn-mc-goal-rows > div {
	display: flex; align-items: center; justify-content: space-between;
	padding-top: 8px; border-top: 1px solid var(--mc-border); font-size: 13px;
}
.havn-mc-goal-rows span { color: var(--mc-text-3); }
.havn-mc-goal-rows strong { font-weight: 600; color: var(--mc-text); }

/* Market intelligence KPI band (5 across) */
.havn-mc-mkt-kpis {
	display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px; margin-top: 4px;
}
.havn-mc-mkt-kpis > div {
	background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
	border: 1px solid var(--mc-border); border-radius: 12px; padding: 14px 16px;
	display: flex; flex-direction: column; gap: 3px;
}
.havn-mc-mkt-kpis strong { font-size: 22px; font-weight: 700; color: var(--mc-text); letter-spacing: -.01em; }
.havn-mc-mkt-kpis small { font-size: 11px; color: var(--mc-text-3); }

/* Inline up/down delta pill */
.havn-mc-delta { font-size: 12px; font-weight: 600; }
.havn-mc-delta.is-up { color: #6FCF97; }
.havn-mc-delta.is-down { color: #ff7b72; }

/* ---- CMA result presentation ---- */
.havn-mc-cma-input select {
	padding: 11px 12px; background: var(--mc-surface);
	border: 1px solid var(--mc-border); border-radius: 10px;
	color: var(--mc-text); font: inherit; outline: 0;
}
.havn-mc-cma-headline {
	background: var(--mc-accent-soft); border: 1px solid rgba(212,179,112,.32);
	border-radius: var(--mc-radius); padding: 16px 18px; margin-bottom: 14px;
}
.havn-mc-cma-range {
	display: flex; align-items: baseline; gap: 10px; margin-top: 4px;
	font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--mc-text);
}
.havn-mc-cma-range span { font-size: 18px; color: var(--mc-text-3); font-weight: 500; }
.havn-mc-cma-mid { margin-top: 6px; font-size: 13px; color: var(--mc-text-2); }
.havn-mc-cma-conf { font-weight: 600; }
.havn-mc-cma-conf.is-high { color: #6FCF97; }
.havn-mc-cma-conf.is-medium { color: var(--mc-accent); }
.havn-mc-cma-conf.is-low { color: #ff9d6e; }
.havn-mc-cma-trend { font-size: 12.5px; font-weight: 600; margin-top: 8px; display: inline-block; }
.havn-mc-cma-trend.is-up { color: #6FCF97; }
.havn-mc-cma-trend.is-down { color: #ff7b72; }
.havn-mc .havn-mc-cma-summary { grid-template-columns: repeat(6, 1fr); }
.havn-mc-cma-adj { font-size: 11px; font-weight: 600; color: var(--mc-text-3); }
.havn-mc-cma-adj.is-up { color: #6FCF97; }
.havn-mc-cma-adj.is-down { color: #ff9d6e; }
.havn-mc-cma-th { font-size: 13px; font-weight: 600; color: var(--mc-text-2); margin: 18px 0 8px; }
.havn-mc-cma-th .havn-mc-muted { font-weight: 400; }
.havn-mc-cma-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.havn-mc-cma-foot .havn-mc-tiny { flex: 1; min-width: 220px; margin: 0; }

/* Light-mode flips */
.havn-mc.is-light .havn-mc-conv,
.havn-mc.is-light .havn-mc-mkt-kpis > div { background: #F8F9FB; border-color: rgba(15,15,20,.08); }
.havn-mc.is-light .havn-mc-conv-pct,
.havn-mc.is-light .havn-mc-mkt-kpis strong,
.havn-mc.is-light .havn-mc-goal-fig,
.havn-mc.is-light .havn-mc-cma-range { color: #15171C; }
.havn-mc.is-light .havn-mc-cma-headline { background: rgba(212,179,112,.12); }

/* Responsive */
@media (max-width: 1100px) {
	.havn-mc-kpis-8 { grid-template-columns: repeat(2, 1fr); }
	.havn-mc-mkt-kpis { grid-template-columns: repeat(3, 1fr); }
	.havn-mc .havn-mc-cma-summary { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
	.havn-mc-kpis-8 { grid-template-columns: 1fr 1fr; }
	.havn-mc-mkt-kpis { grid-template-columns: 1fr 1fr; }
	.havn-mc-conv-arrow { display: none; }
	.havn-mc .havn-mc-cma-summary { grid-template-columns: 1fr 1fr; }
	.havn-mc-cma-range { font-size: 24px; }
}
