:root {
	--wpcrm-primary: #7b61ff;
	--wpcrm-primary-dark: #5e3fff;
	--wpcrm-sidebar-bg: #1b1533;
	--wpcrm-bg: #f3f4f9;
}

html, body.wpcrm-body {
	background: var(--wpcrm-bg);
	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
	margin: 0;
	min-height: 100vh;
}

#wpcrm-app {
	min-height: 100vh;
}

.wpcrm-sidebar {
	width: 260px;
	min-width: 260px;
	background: linear-gradient(180deg, var(--wpcrm-sidebar-bg), #2a2050);
	position: sticky;
	top: 0;
	height: 100vh;
	/* NOTE: do not set overflow:hidden here — it clips the user dropdown
	   menu (Sign out / Edit Profile) when it pops open, and can clip the
	   active nav-link highlight too. The inner .wpcrm-nav-scroll handles
	   its own scrolling independently; this element doesn't need to. */
}

/* Belt-and-suspenders: WPCRM_Dashboard::maybe_disable_admin_bar() already
   turns the WP admin toolbar off on these pages (the real fix — the
   toolbar eats ~32-46px at the top, and height:100vh above doesn't know
   that, so it pushes the sidebar's bottom content below the fold). This is
   just a fallback in case something else on the site forces the toolbar
   back on with a higher-priority 'show_admin_bar' filter. */
body.admin-bar .wpcrm-sidebar { height: calc(100vh - 32px); }
@media screen and (max-width: 782px) {
	body.admin-bar .wpcrm-sidebar { height: calc(100vh - 46px); }
}

.wpcrm-brand-logo-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border-radius: 10px; /* matches .nav-link.active */
	padding: 12px;
	width: 100%;
	flex: 1;
}

.wpcrm-brand-logo {
	max-height: 40px;
	max-width: 100%;
	object-fit: contain;
}

.wpcrm-nav-scroll {
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden; /* prevents a horizontal scrollbar; does not affect the (now inset) active-state highlight */
	min-height: 0; /* required for flex children to actually shrink/scroll */
}

.wpcrm-sidebar-footer {
	flex-shrink: 0;
}
.wpcrm-sidebar-footer strong {
	max-width: 150px;
	display: inline-block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	vertical-align: middle;
}

.wpcrm-sidebar .nav-link {
	color: rgba(255,255,255,.75);
	border-radius: 10px;
	margin-bottom: 4px;
	font-weight: 500;
}

.wpcrm-sidebar .nav-link:hover {
	background: rgba(255,255,255,.08);
	color: #fff;
}

.wpcrm-sidebar .nav-link.active {
	background: var(--wpcrm-primary);
	color: #fff;
}

.wpcrm-main {
	min-height: 100vh;
	width: 100%;
}

.wpcrm-topbar {
	background: #fff;
	border-bottom: 1px solid #eceef5;
	position: sticky;
	top: 0;
	z-index: 20;
}

.wpcrm-card {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 16px rgba(20,20,50,.06);
	border: none;
}

.wpcrm-stat-card {
	border-radius: 16px;
	padding: 20px;
	color: #fff;
	background: linear-gradient(135deg, var(--wpcrm-primary), var(--wpcrm-primary-dark));
}

.wpcrm-status-badge {
	padding: 4px 12px;
	border-radius: 20px;
	font-size: .75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.status-new { background:#e7f1ff; color:#1a56db; }
.status-scheduled { background:#fef3c7; color:#92400e; }
.status-quote { background:#e0e7ff; color:#4338ca; }
.status-credit { background:#fee2e2; color:#991b1b; }
.status-progress { background:#dcfce7; color:#166534; }
.status-complete { background:#d1fae5; color:#065f46; }
.status-declined { background:#fee2e2; color:#7f1d1d; }

.wpcrm-table thead th {
	border-bottom: 2px solid #eceef5;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #8890a6;
}

.wpcrm-item-row td { vertical-align: middle; }

.wpcrm-pipeline {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.wpcrm-pipeline .step {
	flex: 1;
	min-width: 90px;
	text-align: center;
	padding: 8px 4px;
	border-radius: 8px;
	background: #f0f1f8;
	font-size: .75rem;
	font-weight: 600;
	color: #a3a8bd;
}
.wpcrm-pipeline .step.active {
	background: var(--wpcrm-primary);
	color: #fff;
}
.wpcrm-pipeline .step.done {
	background: #dcfce7;
	color: #166534;
}
