:root {
  --crm-primary: #6a30b0;
  --crm-primary-dark: #442070;
  --crm-primary-soft: rgba(106, 48, 176, .1);
  --crm-background: #f7f5fa;
  --crm-sidebar-width: 232px;
}
body { background: var(--crm-background); color: #24212a; padding-top: 56px; }
.bg-brand { background: linear-gradient(110deg, var(--crm-primary-dark), var(--crm-primary)); }
.bg-brand .navbar-brand span { color: #d8c2f4; }
.sidebar { position: fixed; inset: 56px auto 0 0; width: var(--crm-sidebar-width); padding: 1.5rem 1rem; background: #21172d; z-index: 1010; }
.sidebar .nav-link, .offcanvas .nav-link { color: #d8cde5; padding: .7rem .85rem; }
.sidebar .nav-link:hover, .offcanvas .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar .nav-link.active, .offcanvas .nav-link.active { color: #fff; background: var(--crm-primary); }
.main-content { min-height: calc(100vh - 56px); }
.card { border: 1px solid rgba(106,48,176,.15); box-shadow: 0 .125rem .35rem rgba(54,31,77,.05); }
.kpi-card { position: relative; overflow: hidden; }
.kpi-card::after { content: ''; position: absolute; width: 72px; height: 72px; right: -20px; top: -20px; border-radius: 50%; background: var(--crm-primary-soft); }
.kpi-label { color: #756b7f; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.kpi-value { font-size: 1.85rem; font-weight: 750; line-height: 1.2; }
.section-title { font-size: 1rem; font-weight: 700; margin: 0; }
.btn-primary { --bs-btn-bg: var(--crm-primary); --bs-btn-border-color: var(--crm-primary); --bs-btn-hover-bg: var(--crm-primary-dark); --bs-btn-hover-border-color: var(--crm-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--crm-primary); --bs-btn-border-color: var(--crm-primary); --bs-btn-hover-bg: var(--crm-primary); --bs-btn-hover-border-color: var(--crm-primary); }
.table > :not(caption) > * > * { padding: .8rem .85rem; vertical-align: middle; }
.table thead th { color: #756b7f; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge-status { border-radius: 50rem; font-weight: 650; padding: .38rem .62rem; }
.status-new, .status-to_contact, .status-todo { background: #ece6f7; color: #56308b; }
.status-contacted, .status-in_progress, .status-on_hold { background: #fff3cd; color: #755800; }
.status-interested, .status-meeting, .status-proposal, .status-opportunity { background: #e8dcff; color: #55309a; }
.status-follow_up { background: #d9f2ff; color: #075b78; }
.status-won, .status-completed, .status-confirmed { background: #d9f3e5; color: #11663c; }
.status-lost, .status-cancelled { background: #f0f1f3; color: #59616c; }
.rating-stars { color: #8a5a00; font-weight: 700; white-space: nowrap; }
.project-assets { display: inline-block; max-width: 18rem; white-space: normal; }
.kpi-money { font-size: clamp(1.25rem, 2vw, 1.85rem); }
.priority-high { color: #b42318; font-weight: 700; }
.priority-normal { color: #9a6700; font-weight: 650; }
.priority-low { color: #397354; }
.timeline-item { position: relative; margin-left: .35rem; padding: 0 0 1.15rem 1.25rem; border-left: 2px solid #ded5e8; }
.timeline-item::before { content: ''; position: absolute; left: -6px; top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--crm-primary); }
.timeline-time { color: #756b7f; font-size: .78rem; }
.empty-state { padding: 2rem 1rem; text-align: center; color: #756b7f; }
.form-label { font-weight: 650; }
.followup-list-item + .followup-list-item { border-top: 1px solid #ece6f2; }
@media (min-width: 992px) { .main-content { margin-left: var(--crm-sidebar-width); } }

.main-public { max-width: 520px; margin: 2.5rem auto 0; }
.main-content.main-public { margin-left: auto; }
.contact-meta dd { overflow-wrap: anywhere; }
.bg-brand .navbar-brand .text-info { color: #d8c2f4 !important; }

.searchable-select { position: relative; }
.searchable-select-results { position: absolute; z-index: 1050; inset-inline: 0; top: 2.6rem; max-height: 18rem; overflow-y: auto; }
.searchable-select-results [role="option"] { cursor: pointer; white-space: normal; }
