:root {
	--rjcrm-navy-950: #071a2f;
	--rjcrm-navy-900: #0b2748;
	--rjcrm-navy-800: #123b66;
	--rjcrm-navy-700: #1b4f80;
	--rjcrm-gold-600: #b98629;
	--rjcrm-gold-500: #c79835;
	--rjcrm-bg: #f5f7fa;
	--rjcrm-surface: #ffffff;
	--rjcrm-surface-subtle: #f9fafb;
	--rjcrm-surface-muted: #f1f4f7;
	--rjcrm-text: #152536;
	--rjcrm-text-soft: #425466;
	--rjcrm-muted: #718096;
	--rjcrm-border: #dde4eb;
	--rjcrm-border-strong: #cbd5df;
	--rjcrm-focus: rgba(18, 59, 102, 0.12);
	--rjcrm-success: #247451;
	--rjcrm-success-bg: #eef9f3;
	--rjcrm-warning: #94691d;
	--rjcrm-warning-bg: #fff8e8;
	--rjcrm-danger: #a33b3b;
	--rjcrm-danger-bg: #fff3f3;
	--rjcrm-info: #245f91;
	--rjcrm-info-bg: #eef6fc;
	--rjcrm-radius-sm: 10px;
	--rjcrm-radius: 14px;
	--rjcrm-radius-lg: 16px;
	--rjcrm-shadow-sm: 0 1px 2px rgba(15, 35, 55, 0.04), 0 5px 18px rgba(15, 35, 55, 0.04);
	--rjcrm-shadow: 0 14px 38px rgba(15, 35, 55, 0.07);
	--rjcrm-sidebar-width: 264px;
	--rjcrm-topbar-height: 76px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--rjcrm-bg); }
body {
	margin: 0;
	min-height: 100vh;
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--rjcrm-text);
	background: var(--rjcrm-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
body.rjcrm-scroll-locked { overflow: hidden; }
button,
input,
select,
textarea { font: inherit; }
button { color: inherit; }
a { color: var(--rjcrm-navy-800); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.rjcrm-icon { width: 20px; height: 20px; display: block; flex: 0 0 auto; }

/* Authentication screens retained from Phase 4. */
.rjcrm-auth-page {
	background:
		radial-gradient(circle at 12% 12%, rgba(199, 152, 53, 0.08), transparent 26rem),
		linear-gradient(180deg, #f9fbfd 0%, var(--rjcrm-bg) 100%);
}
.rjcrm-auth-shell {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 32px 20px;
}
.rjcrm-auth-card {
	width: min(100%, 450px);
	background: var(--rjcrm-surface);
	border: 1px solid var(--rjcrm-border);
	border-radius: var(--rjcrm-radius-lg);
	box-shadow: var(--rjcrm-shadow);
	padding: 34px;
}
.rjcrm-brand {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	color: var(--rjcrm-navy-900);
}
.rjcrm-brand__mark {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: var(--rjcrm-navy-900);
	color: #fff;
	box-shadow: 0 8px 20px rgba(11, 39, 72, 0.16);
}
.rjcrm-brand__mark svg { width: 25px; height: 25px; }
.rjcrm-brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.rjcrm-brand__text strong { font-size: 15px; letter-spacing: -0.01em; }
.rjcrm-brand__text small { margin-top: 4px; color: var(--rjcrm-muted); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.rjcrm-auth-heading { margin: 34px 0 25px; }
.rjcrm-auth-heading h1 { margin: 0; color: var(--rjcrm-navy-900); font-size: clamp(27px, 4vw, 34px); line-height: 1.15; letter-spacing: -0.035em; }
.rjcrm-auth-heading p { margin: 10px 0 0; color: var(--rjcrm-muted); font-size: 14px; line-height: 1.65; }
.rjcrm-form { display: grid; gap: 18px; }
.rjcrm-field { display: grid; gap: 8px; color: var(--rjcrm-text); font-size: 13px; font-weight: 650; }
.rjcrm-input-wrap { position: relative; display: block; }
.rjcrm-input-wrap input {
	width: 100%;
	height: 48px;
	border: 1px solid var(--rjcrm-border);
	border-radius: 12px;
	background: #fff;
	color: var(--rjcrm-text);
	padding: 0 46px 0 43px;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.rjcrm-input-wrap input:focus { border-color: #6f8ca8; box-shadow: 0 0 0 4px var(--rjcrm-focus); }
.rjcrm-input-icon { position: absolute; left: 14px; top: 50%; width: 19px; height: 19px; color: #8b98a6; transform: translateY(-50%); pointer-events: none; }
.rjcrm-password-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #7e8b98;
	transform: translateY(-50%);
	cursor: pointer;
}
.rjcrm-password-toggle:hover,
.rjcrm-password-toggle:focus-visible { background: #f1f5f8; color: var(--rjcrm-navy-900); outline: none; }
.rjcrm-password-toggle svg { width: 20px; height: 20px; }
.rjcrm-form-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; }
.rjcrm-checkbox { display: inline-flex; align-items: center; gap: 8px; color: var(--rjcrm-muted); cursor: pointer; }
.rjcrm-checkbox input { width: 16px; height: 16px; accent-color: var(--rjcrm-navy-900); }
.rjcrm-auth-footer { margin: 18px 0 0; color: #82909d; font-size: 12px; }
.rjcrm-back-link { display: inline-block; margin-top: 22px; font-size: 13px; font-weight: 650; }
.rjcrm-notice { margin: -6px 0 20px; border: 1px solid; border-radius: 11px; padding: 11px 13px; font-size: 13px; line-height: 1.5; }
.rjcrm-notice--error { border-color: #efd1d1; background: var(--rjcrm-danger-bg); color: var(--rjcrm-danger); }
.rjcrm-notice--success { border-color: #cae9d8; background: var(--rjcrm-success-bg); color: var(--rjcrm-success); }

/* Reusable buttons and icon controls. */
.rjcrm-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	border: 1px solid transparent;
	border-radius: 11px;
	padding: 0 17px;
	font-weight: 700;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .12s ease;
}
.rjcrm-button:hover { text-decoration: none; transform: translateY(-1px); }
.rjcrm-button:focus-visible,
.rjcrm-icon-button:focus-visible,
.rjcrm-nav__link:focus-visible,
.rjcrm-profile__trigger:focus-visible,
.rjcrm-dropdown-menu__item:focus-visible {
	outline: 3px solid var(--rjcrm-focus);
	outline-offset: 2px;
}
.rjcrm-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.rjcrm-button--primary { background: var(--rjcrm-navy-900); color: #fff; box-shadow: 0 8px 20px rgba(11, 39, 72, .12); }
.rjcrm-button--primary:hover { background: var(--rjcrm-navy-950); color: #fff; }
.rjcrm-button--secondary { border-color: var(--rjcrm-border); background: #fff; color: var(--rjcrm-navy-900); }
.rjcrm-button--secondary:hover { border-color: var(--rjcrm-border-strong); background: var(--rjcrm-surface-subtle); }
.rjcrm-button--danger { background: var(--rjcrm-danger); color: #fff; }
.rjcrm-button--ghost { background: transparent; color: var(--rjcrm-text-soft); }
.rjcrm-button--small { min-height: 36px; padding: 0 13px; font-size: 12px; }
.rjcrm-icon-button {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--rjcrm-border);
	border-radius: 11px;
	background: #fff;
	color: var(--rjcrm-text-soft);
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.rjcrm-icon-button:hover { background: var(--rjcrm-surface-subtle); color: var(--rjcrm-navy-900); border-color: var(--rjcrm-border-strong); }

/* Authenticated application shell. */
.rjcrm-app-page { overflow-x: hidden; }
.rjcrm-app-layout {
	min-height: 100vh;
	display: grid;
	grid-template-columns: var(--rjcrm-sidebar-width) minmax(0, 1fr);
	background: var(--rjcrm-bg);
}
.rjcrm-sidebar {
	position: sticky;
	top: 0;
	height: 100vh;
	z-index: 40;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-right: 1px solid var(--rjcrm-border);
	min-width: 0;
}
.rjcrm-sidebar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--rjcrm-topbar-height);
	padding: 14px 18px;
	border-bottom: 1px solid var(--rjcrm-border);
}
.rjcrm-sidebar__brand-link { display: inline-flex; min-width: 0; text-decoration: none; }
.rjcrm-sidebar__brand-link:hover { text-decoration: none; }
.rjcrm-sidebar__close { display: none; }
.rjcrm-nav { flex: 1; overflow-y: auto; padding: 18px 12px; scrollbar-width: thin; }
.rjcrm-nav__list { list-style: none; display: grid; gap: 4px; margin: 0; padding: 0; }
.rjcrm-nav__link {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 9px 12px;
	border-radius: 11px;
	color: #566575;
	font-size: 13px;
	font-weight: 650;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.rjcrm-nav__link:hover { background: #f5f8fb; color: var(--rjcrm-navy-900); text-decoration: none; }
.rjcrm-nav__link.is-active { background: #edf3f8; color: var(--rjcrm-navy-900); }
.rjcrm-nav__link.is-active .rjcrm-nav__icon { color: var(--rjcrm-navy-800); }
.rjcrm-nav__icon { display: grid; place-items: center; width: 22px; color: #7d8b99; }
.rjcrm-nav__icon .rjcrm-icon { width: 19px; height: 19px; }
.rjcrm-sidebar__footer { padding: 14px; border-top: 1px solid var(--rjcrm-border); }
.rjcrm-sidebar__secure { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 11px; background: #f7f9fb; color: var(--rjcrm-text-soft); }
.rjcrm-sidebar__secure-mark { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--rjcrm-success); box-shadow: 0 0 0 4px rgba(36, 116, 81, .1); }
.rjcrm-sidebar__secure span:last-child { display: grid; gap: 2px; }
.rjcrm-sidebar__secure strong { font-size: 12px; }
.rjcrm-sidebar__secure small { color: var(--rjcrm-muted); font-size: 11px; }
.rjcrm-app-main { min-width: 0; }
.rjcrm-topbar {
	position: sticky;
	top: 0;
	z-index: 30;
	display: grid;
	grid-template-columns: minmax(180px, 1fr) minmax(280px, 520px) minmax(180px, 1fr);
	align-items: center;
	gap: 22px;
	min-height: var(--rjcrm-topbar-height);
	padding: 12px 24px;
	background: rgba(255, 255, 255, .98);
	border-bottom: 1px solid var(--rjcrm-border);
}
.rjcrm-topbar__left,
.rjcrm-topbar__actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rjcrm-topbar__actions { justify-content: flex-end; }
.rjcrm-mobile-menu { display: none; }
.rjcrm-topbar__title { display: grid; min-width: 0; }
.rjcrm-topbar__title > span { color: var(--rjcrm-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.rjcrm-topbar__title > strong { margin-top: 2px; overflow: hidden; color: var(--rjcrm-navy-900); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.rjcrm-topbar__center { min-width: 0; }
.rjcrm-global-search { position: relative; display: flex; align-items: center; width: 100%; }
.rjcrm-global-search input {
	width: 100%;
	height: 42px;
	padding: 0 104px 0 40px;
	border: 1px solid var(--rjcrm-border);
	border-radius: 11px;
	background: #f8fafc;
	color: var(--rjcrm-text-soft);
	outline: none;
}
.rjcrm-global-search input::placeholder { color: #95a0ac; }
.rjcrm-global-search__icon { position: absolute; left: 13px; width: 18px; height: 18px; color: #8693a0; }
.rjcrm-global-search__hint { position: absolute; right: 10px; padding: 4px 7px; border: 1px solid var(--rjcrm-border); border-radius: 7px; background: #fff; color: var(--rjcrm-muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.rjcrm-topbar__notification { position: relative; }
.rjcrm-profile { position: relative; }
.rjcrm-profile__trigger {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	max-width: 245px;
	padding: 5px 8px 5px 5px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	cursor: pointer;
}
.rjcrm-profile__trigger:hover { background: var(--rjcrm-surface-subtle); }
.rjcrm-avatar {
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--rjcrm-navy-900);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .02em;
}
.rjcrm-avatar--large { width: 44px; height: 44px; font-size: 13px; }
.rjcrm-profile__copy { display: grid; min-width: 0; text-align: left; }
.rjcrm-profile__copy strong { overflow: hidden; color: var(--rjcrm-text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.rjcrm-profile__copy small { overflow: hidden; margin-top: 2px; color: var(--rjcrm-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rjcrm-profile__chevron { width: 16px; height: 16px; color: var(--rjcrm-muted); }
.rjcrm-dropdown-menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 80;
	width: min(290px, calc(100vw - 28px));
	padding: 8px;
	border: 1px solid var(--rjcrm-border);
	border-radius: 13px;
	background: #fff;
	box-shadow: 0 18px 45px rgba(15, 35, 55, .13);
}
.rjcrm-dropdown-menu[hidden] { display: none !important; }
.rjcrm-profile-card { display: flex; align-items: center; gap: 11px; padding: 8px; }
.rjcrm-profile-card > div { display: grid; min-width: 0; }
.rjcrm-profile-card strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.rjcrm-profile-card small { overflow: hidden; margin-top: 3px; color: var(--rjcrm-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rjcrm-dropdown-menu__separator { height: 1px; margin: 6px 0; background: var(--rjcrm-border); }
.rjcrm-dropdown-menu__item { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 8px 9px; border-radius: 9px; color: var(--rjcrm-text-soft); font-size: 12px; font-weight: 650; text-decoration: none; }
.rjcrm-dropdown-menu__item:hover { background: var(--rjcrm-surface-subtle); text-decoration: none; }
.rjcrm-dropdown-menu__item--danger { color: var(--rjcrm-danger); }
.rjcrm-dropdown-menu__item .rjcrm-icon { width: 18px; height: 18px; }
.rjcrm-content { width: 100%; max-width: 1680px; margin: 0 auto; padding: 28px clamp(18px, 2.4vw, 36px) 48px; outline: none; }
.rjcrm-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.rjcrm-page-header h1 { margin: 0; color: var(--rjcrm-navy-900); font-size: clamp(23px, 3vw, 29px); line-height: 1.15; letter-spacing: -.025em; }
.rjcrm-page-header p { max-width: 720px; margin: 7px 0 0; color: var(--rjcrm-muted); font-size: 13px; line-height: 1.55; }
.rjcrm-drawer-overlay { display: none; }

/* Panels, statistics and dashboard shell. */
.rjcrm-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.rjcrm-stat-card,
.rjcrm-panel {
	background: var(--rjcrm-surface);
	border: 1px solid var(--rjcrm-border);
	border-radius: var(--rjcrm-radius);
	box-shadow: var(--rjcrm-shadow-sm);
}
.rjcrm-stat-card { min-width: 0; padding: 18px; }
.rjcrm-stat-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.rjcrm-stat-card__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #eef3f8; color: var(--rjcrm-navy-800); }
.rjcrm-stat-card__icon .rjcrm-icon { width: 19px; height: 19px; }
.rjcrm-stat-card__value { display: block; color: var(--rjcrm-navy-950); font-size: 28px; line-height: 1; letter-spacing: -.03em; }
.rjcrm-stat-card__label { display: block; margin-top: 7px; color: var(--rjcrm-text-soft); font-size: 13px; font-weight: 700; }
.rjcrm-stat-card small { display: block; margin-top: 8px; color: var(--rjcrm-muted); font-size: 11px; line-height: 1.4; }
.rjcrm-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .7fr); gap: 16px; margin-top: 16px; }
.rjcrm-panel { min-width: 0; padding: 19px; }
.rjcrm-panel--wide { min-width: 0; }
.rjcrm-panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.rjcrm-panel__header h2 { margin: 0; color: var(--rjcrm-navy-900); font-size: 16px; letter-spacing: -.01em; }
.rjcrm-panel__header p { margin: 5px 0 0; color: var(--rjcrm-muted); font-size: 12px; line-height: 1.5; }
.rjcrm-status-list { list-style: none; display: grid; gap: 0; margin: 0; padding: 0; }
.rjcrm-status-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px solid #edf1f4; font-size: 12px; }
.rjcrm-status-list li:last-child { border-bottom: 0; }
.rjcrm-status-list strong { color: var(--rjcrm-muted); font-size: 11px; }
.rjcrm-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #b3bec9; }
.rjcrm-status-dot.is-ready { background: var(--rjcrm-success); }
.rjcrm-placeholder-panel { min-height: 390px; display: grid; place-items: center; }

/* Tables. */
.rjcrm-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--rjcrm-border); border-radius: 12px; background: #fff; -webkit-overflow-scrolling: touch; }
.rjcrm-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 12px; }
.rjcrm-table th,
.rjcrm-table td { padding: 12px 14px; border-bottom: 1px solid #edf1f4; text-align: left; vertical-align: middle; }
.rjcrm-table th { background: #f8fafb; color: #617080; font-size: 10px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.rjcrm-table tbody tr:last-child td { border-bottom: 0; }
.rjcrm-table tbody tr:hover td { background: #fbfcfd; }
.rjcrm-table tbody tr:hover .rjcrm-empty-state { background: #fff; }

/* Badges and status chips. */
.rjcrm-badge,
.rjcrm-status-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	min-height: 25px;
	padding: 4px 8px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 750;
	line-height: 1.2;
	white-space: nowrap;
}
.rjcrm-badge--neutral,
.rjcrm-status-chip--neutral { border-color: #e2e7ec; background: #f5f7f9; color: #667585; }
.rjcrm-badge--info,
.rjcrm-status-chip--info { border-color: #d5e7f5; background: var(--rjcrm-info-bg); color: var(--rjcrm-info); }
.rjcrm-badge--success,
.rjcrm-status-chip--success { border-color: #d0ebdc; background: var(--rjcrm-success-bg); color: var(--rjcrm-success); }
.rjcrm-badge--warning,
.rjcrm-status-chip--warning { border-color: #f0dfb5; background: var(--rjcrm-warning-bg); color: var(--rjcrm-warning); }
.rjcrm-badge--danger,
.rjcrm-status-chip--danger { border-color: #efd0d0; background: var(--rjcrm-danger-bg); color: var(--rjcrm-danger); }

/* Form system for future CRM modules. */
.rjcrm-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rjcrm-form-group { display: grid; gap: 7px; min-width: 0; }
.rjcrm-form-group--full { grid-column: 1 / -1; }
.rjcrm-form-label { color: var(--rjcrm-text-soft); font-size: 12px; font-weight: 700; }
.rjcrm-form-help { color: var(--rjcrm-muted); font-size: 11px; line-height: 1.45; }
.rjcrm-control,
.rjcrm-select,
.rjcrm-textarea {
	width: 100%;
	border: 1px solid var(--rjcrm-border);
	border-radius: 10px;
	background: #fff;
	color: var(--rjcrm-text);
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.rjcrm-control,
.rjcrm-select { min-height: 42px; padding: 0 12px; }
.rjcrm-textarea { min-height: 104px; padding: 11px 12px; resize: vertical; }
.rjcrm-control:focus,
.rjcrm-select:focus,
.rjcrm-textarea:focus { border-color: #6f8ca8; box-shadow: 0 0 0 4px var(--rjcrm-focus); }
.rjcrm-control[aria-invalid="true"],
.rjcrm-select[aria-invalid="true"],
.rjcrm-textarea[aria-invalid="true"] { border-color: #d08a8a; }
.rjcrm-check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.rjcrm-check { display: inline-flex; align-items: center; gap: 7px; color: var(--rjcrm-text-soft); font-size: 12px; }
.rjcrm-check input { width: 16px; height: 16px; accent-color: var(--rjcrm-navy-900); }

/* Filters and pagination. */
.rjcrm-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--rjcrm-border); border-radius: 12px; background: #fff; }
.rjcrm-filter-search { flex: 1 1 230px; min-width: 0; }
.rjcrm-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.rjcrm-pagination__meta { color: var(--rjcrm-muted); font-size: 11px; }
.rjcrm-pagination__pages { display: flex; gap: 6px; }
.rjcrm-pagination__button { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--rjcrm-border); border-radius: 9px; background: #fff; color: var(--rjcrm-text-soft); font-size: 11px; font-weight: 700; }
.rjcrm-pagination__button.is-active { border-color: var(--rjcrm-navy-900); background: var(--rjcrm-navy-900); color: #fff; }

/* Empty, alert, error and success states. */
.rjcrm-empty-state { display: grid; place-items: center; max-width: 530px; margin: 0 auto; padding: 54px 22px; text-align: center; }
.rjcrm-empty-state--compact { padding: 30px 18px; }
.rjcrm-empty-state__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 13px; border-radius: 13px; background: #eef3f8; color: var(--rjcrm-navy-800); }
.rjcrm-empty-state__icon .rjcrm-icon { width: 23px; height: 23px; }
.rjcrm-empty-state h2,
.rjcrm-empty-state strong { color: var(--rjcrm-navy-900); }
.rjcrm-empty-state h2 { margin: 0; font-size: 18px; }
.rjcrm-empty-state strong { font-size: 13px; }
.rjcrm-empty-state p { margin: 7px 0 14px; color: var(--rjcrm-muted); font-size: 12px; line-height: 1.55; }
.rjcrm-alert { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; margin-bottom: 18px; padding: 11px 12px; border: 1px solid; border-radius: 11px; font-size: 12px; line-height: 1.45; }
.rjcrm-alert__icon { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: currentColor; }
.rjcrm-alert__body { min-width: 0; }
.rjcrm-alert__close { width: 30px; height: 30px; margin: -5px -5px -5px 0; border: 0; background: transparent; color: currentColor; }
.rjcrm-alert__close .rjcrm-icon { width: 16px; height: 16px; }
.rjcrm-alert--success { border-color: #cce8d9; background: var(--rjcrm-success-bg); color: var(--rjcrm-success); }
.rjcrm-alert--error { border-color: #edcccc; background: var(--rjcrm-danger-bg); color: var(--rjcrm-danger); }
.rjcrm-alert--warning { border-color: #efddb0; background: var(--rjcrm-warning-bg); color: var(--rjcrm-warning); }
.rjcrm-alert--info { border-color: #d4e5f2; background: var(--rjcrm-info-bg); color: var(--rjcrm-info); }

/* Loading and skeleton states. */
.rjcrm-skeleton { position: relative; overflow: hidden; min-height: 14px; border-radius: 7px; background: #e9eef3; }
.rjcrm-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: rjcrm-skeleton 1.35s infinite; }
.rjcrm-skeleton--title { width: 44%; height: 20px; }
.rjcrm-skeleton--line { width: 100%; }
.rjcrm-skeleton--short { width: 62%; }
.rjcrm-loading-stack { display: grid; gap: 10px; }
@keyframes rjcrm-skeleton { to { transform: translateX(100%); } }

/* Generic modal and secondary drawer patterns for future modules. */
.rjcrm-modal,
.rjcrm-panel-drawer { position: fixed; inset: 0; z-index: 100; }
.rjcrm-modal[hidden],
.rjcrm-panel-drawer[hidden] { display: none !important; }
.rjcrm-modal__backdrop,
.rjcrm-panel-drawer__backdrop { position: absolute; inset: 0; background: rgba(7, 26, 47, .42); }
.rjcrm-modal__dialog { position: relative; width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 56px); margin: 28px auto; overflow: auto; border: 1px solid var(--rjcrm-border); border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(7, 26, 47, .22); }
.rjcrm-modal__header,
.rjcrm-modal__body,
.rjcrm-modal__footer { padding: 18px 20px; }
.rjcrm-modal__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rjcrm-border); }
.rjcrm-modal__header h2 { margin: 0; font-size: 17px; }
.rjcrm-modal__footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--rjcrm-border); }
.rjcrm-panel-drawer__panel { position: absolute; top: 0; right: 0; width: min(480px, 92vw); height: 100%; overflow: auto; background: #fff; box-shadow: -18px 0 60px rgba(7, 26, 47, .16); }

@media (max-width: 1180px) {
	.rjcrm-topbar { grid-template-columns: minmax(160px, .8fr) minmax(220px, 420px) minmax(160px, .8fr); gap: 14px; padding-inline: 18px; }
	.rjcrm-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rjcrm-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
	:root { --rjcrm-topbar-height: 68px; }
	.rjcrm-app-layout { display: block; }
	.rjcrm-sidebar {
		position: fixed;
		left: 0;
		top: 0;
		width: min(var(--rjcrm-sidebar-width), 86vw);
		height: 100dvh;
		z-index: 90;
		transform: translateX(-105%);
		box-shadow: 18px 0 55px rgba(7, 26, 47, .16);
		transition: transform .2s ease;
	}
	.rjcrm-sidebar.is-open { transform: translateX(0); }
	.rjcrm-sidebar__close { display: inline-grid; }
	.rjcrm-drawer-overlay {
		position: fixed;
		inset: 0;
		z-index: 85;
		background: rgba(7, 26, 47, .42);
	}
	.rjcrm-drawer-overlay:not([hidden]) { display: block; }
	.rjcrm-topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
	.rjcrm-mobile-menu { display: inline-grid; }
	.rjcrm-topbar__center { grid-column: 1 / -1; grid-row: 2; }
	.rjcrm-topbar { padding-block: 10px; }
	.rjcrm-global-search { max-width: none; }
	.rjcrm-content { padding-top: 22px; }
}

@media (max-width: 680px) {
	.rjcrm-auth-shell { justify-content: flex-start; padding: 24px 14px; }
	.rjcrm-auth-card { margin-top: 28px; padding: 26px 20px; border-radius: 14px; }
	.rjcrm-auth-heading { margin-top: 28px; }
	.rjcrm-form-row { align-items: flex-start; flex-direction: column; gap: 12px; }
	.rjcrm-topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; padding-inline: 12px; }
	.rjcrm-topbar__title > span { display: none; }
	.rjcrm-topbar__title > strong { font-size: 14px; }
	.rjcrm-topbar__notification { display: none; }
	.rjcrm-profile__copy,
	.rjcrm-profile__chevron { display: none; }
	.rjcrm-profile__trigger { min-height: 40px; padding: 0; }
	.rjcrm-profile__trigger:hover { background: transparent; }
	.rjcrm-avatar { width: 38px; height: 38px; }
	.rjcrm-global-search input { height: 40px; padding-right: 12px; }
	.rjcrm-global-search__hint { display: none; }
	.rjcrm-content { padding: 20px 13px 34px; }
	.rjcrm-page-header { margin-bottom: 17px; }
	.rjcrm-page-header h1 { font-size: 23px; }
	.rjcrm-stat-grid { grid-template-columns: 1fr; gap: 11px; }
	.rjcrm-stat-card { padding: 16px; }
	.rjcrm-panel { padding: 15px; }
	.rjcrm-panel__header { align-items: stretch; flex-direction: column; }
	.rjcrm-panel__header .rjcrm-button { align-self: flex-start; }
	.rjcrm-form-grid { grid-template-columns: 1fr; }
	.rjcrm-form-group--full { grid-column: auto; }
	.rjcrm-pagination { align-items: flex-start; flex-direction: column; }
	.rjcrm-modal__dialog { width: calc(100% - 20px); margin: 10px auto; max-height: calc(100dvh - 20px); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
