: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; }
}

/* Phase 6 — permission-aware lead management. */
.rjcrm-module-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 16px;
}
.rjcrm-module-actions__copy { display: grid; gap: 4px; min-width: 0; }
.rjcrm-module-actions__copy strong { color: var(--rjcrm-navy-900); font-size: 13px; }
.rjcrm-module-actions__copy span { color: var(--rjcrm-muted); font-size: 11px; line-height: 1.5; }
.rjcrm-lead-filter-panel { margin-bottom: 16px; }
.rjcrm-lead-filters { display: grid; gap: 14px; }
.rjcrm-lead-filter-search { max-width: 620px; }
.rjcrm-lead-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rjcrm-lead-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rjcrm-control-with-icon { position: relative; }
.rjcrm-control-with-icon .rjcrm-control { padding-left: 38px; }
.rjcrm-control-with-icon__icon { position: absolute; z-index: 1; left: 12px; top: 50%; transform: translateY(-50%); color: #8594a3; pointer-events: none; }
.rjcrm-control-with-icon__icon .rjcrm-icon { width: 17px; height: 17px; }
.rjcrm-lead-table { min-width: 1320px; }
.rjcrm-lead-table th:last-child,
.rjcrm-lead-table td:last-child { text-align: right; }
.rjcrm-lead-table-loading { padding: 12px 4px; }
.rjcrm-lead-id { color: var(--rjcrm-navy-800); font-size: 12px; }
.rjcrm-lead-customer { display: grid; gap: 3px; min-width: 150px; }
.rjcrm-lead-customer strong { color: var(--rjcrm-text); font-size: 12px; }
.rjcrm-lead-customer small { max-width: 210px; overflow: hidden; color: var(--rjcrm-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.rjcrm-nowrap { white-space: nowrap; }
.rjcrm-pagination__button:disabled { opacity: .45; cursor: not-allowed; }
.rjcrm-modal__dialog--wide { width: min(920px, calc(100% - 36px)); }
.rjcrm-modal__subtitle { margin: 4px 0 0; color: var(--rjcrm-muted); font-size: 11px; line-height: 1.45; }
.rjcrm-lead-editor .rjcrm-modal__body { max-height: calc(100dvh - 190px); overflow-y: auto; }
.rjcrm-form-section { padding: 0 0 22px; margin: 0 0 22px; border-bottom: 1px solid #edf1f4; }
.rjcrm-form-section:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.rjcrm-form-section__heading { margin-bottom: 13px; }
.rjcrm-form-section__heading h3 { margin: 0; color: var(--rjcrm-navy-900); font-size: 13px; letter-spacing: -.01em; }
.rjcrm-field-error { min-height: 15px; color: var(--rjcrm-danger); font-size: 10px; line-height: 1.35; }
.rjcrm-lead-editor-loading { display: grid; gap: 12px; padding: 12px 0 22px; }
.rjcrm-lead-editor-loading[hidden] { display: none !important; }
.rjcrm-lead-editor [data-lead-form-fields][hidden] { display: none !important; }
.rjcrm-lead-editor .rjcrm-control:disabled,
.rjcrm-lead-editor .rjcrm-select:disabled,
.rjcrm-lead-editor .rjcrm-textarea:disabled { background: #f3f5f7; color: #7f8b97; cursor: not-allowed; }

@media (max-width: 1260px) {
	.rjcrm-lead-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.rjcrm-lead-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rjcrm-module-actions { align-items: flex-start; }
}

@media (max-width: 680px) {
	.rjcrm-module-actions { flex-direction: column; align-items: stretch; }
	.rjcrm-module-actions .rjcrm-button { align-self: flex-start; }
	.rjcrm-lead-filter-grid { grid-template-columns: 1fr; }
	.rjcrm-lead-filter-search { max-width: none; }
	.rjcrm-modal__dialog--wide { width: calc(100% - 20px); }
	.rjcrm-lead-editor .rjcrm-modal__body { max-height: calc(100dvh - 170px); padding-inline: 15px; }
	.rjcrm-lead-editor .rjcrm-modal__header,
	.rjcrm-lead-editor .rjcrm-modal__footer { padding-inline: 15px; }
	.rjcrm-lead-editor .rjcrm-modal__footer { position: sticky; bottom: 0; background: #fff; }
}
/* Phase 7 — lead detail, notes and activity timeline. */
.rjcrm-detail-skeleton{display:grid;gap:14px}.rjcrm-detail-back{margin-bottom:14px}.rjcrm-detail-hero{margin-bottom:18px;padding:20px;border:1px solid var(--rjcrm-border);border-radius:16px;background:#fff;box-shadow:var(--rjcrm-shadow-sm)}.rjcrm-detail-hero__main{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.rjcrm-eyebrow{display:block;margin-bottom:4px;color:var(--rjcrm-muted);font-size:11px;font-weight:700}.rjcrm-detail-hero h1{margin:0;color:var(--rjcrm-navy-900);font-size:28px}.rjcrm-detail-chips,.rjcrm-detail-contact-row,.rjcrm-detail-meta{display:flex;flex-wrap:wrap;gap:8px}.rjcrm-detail-contact-row{margin-top:16px}.rjcrm-detail-meta{margin-top:14px;color:var(--rjcrm-muted);font-size:11px;gap:16px}.rjcrm-contact-link{display:inline-flex;align-items:center;gap:7px;padding:8px 10px;border:1px solid var(--rjcrm-border);border-radius:10px;background:#fff;color:var(--rjcrm-text-soft);font-size:11px;font-weight:700;text-decoration:none}.rjcrm-contact-link .rjcrm-icon{width:16px;height:16px}.rjcrm-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px;align-items:start}.rjcrm-detail-main,.rjcrm-detail-side{display:grid;gap:18px}.rjcrm-detail-section{margin:0}.rjcrm-detail-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.rjcrm-detail-field{display:grid;gap:4px;min-width:0}.rjcrm-detail-field span{color:var(--rjcrm-muted);font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.rjcrm-detail-field strong{color:var(--rjcrm-text);font-size:12px;line-height:1.5;word-break:break-word}.rjcrm-note-form{display:grid;gap:10px;margin-bottom:16px}.rjcrm-note-list{display:grid;gap:10px}.rjcrm-note{padding:13px;border:1px solid var(--rjcrm-border);border-radius:12px;background:#fbfcfd}.rjcrm-note__head{display:flex;justify-content:space-between;gap:10px}.rjcrm-note__head strong{font-size:11px}.rjcrm-note__head span{color:var(--rjcrm-muted);font-size:10px}.rjcrm-note p{margin:8px 0 10px;white-space:pre-wrap;color:var(--rjcrm-text-soft);font-size:12px;line-height:1.55}.rjcrm-quick-contact{display:grid;gap:8px}.rjcrm-quick-contact .rjcrm-button{justify-content:flex-start}.rjcrm-timeline{display:grid}.rjcrm-timeline-item{position:relative;display:grid;grid-template-columns:16px 1fr;gap:10px;padding-bottom:16px}.rjcrm-timeline-item:before{content:"";position:absolute;left:5px;top:12px;bottom:0;width:1px;background:var(--rjcrm-border)}.rjcrm-timeline-item:last-child:before{display:none}.rjcrm-timeline-item__dot{position:relative;z-index:1;width:11px;height:11px;margin-top:3px;border:3px solid #dbe7ef;border-radius:50%;background:var(--rjcrm-navy-800)}.rjcrm-timeline-item time{color:var(--rjcrm-muted);font-size:10px}.rjcrm-timeline-item p{margin:4px 0 0;color:var(--rjcrm-text-soft);font-size:11px;line-height:1.5}.rjcrm-button--ghost{border-color:transparent;background:transparent;color:var(--rjcrm-navy-800)}
@media(max-width:1100px){.rjcrm-detail-grid{grid-template-columns:1fr}.rjcrm-detail-side{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.rjcrm-detail-hero{padding:15px}.rjcrm-detail-hero__main{flex-direction:column}.rjcrm-detail-hero h1{font-size:23px}.rjcrm-detail-fields{grid-template-columns:1fr}.rjcrm-detail-side{grid-template-columns:1fr}.rjcrm-contact-link{width:100%;justify-content:flex-start}}

/* Phase 8 — assignment, availability and notifications. */
.rjcrm-module-actions__buttons{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.rjcrm-table-actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap}.rjcrm-notification-badge{position:absolute;top:-4px;right:-4px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border:2px solid #fff;border-radius:999px;background:#b83a3a;color:#fff;font-size:9px;font-weight:800;line-height:1}.rjcrm-topbar__notification{position:relative}.rjcrm-profile-availability{display:grid;gap:7px;padding:12px 14px;border-top:1px solid var(--rjcrm-border)}.rjcrm-profile-availability label{color:var(--rjcrm-text-soft);font-size:11px;font-weight:800}.rjcrm-profile-availability small{color:var(--rjcrm-muted);font-size:10px;line-height:1.4}.rjcrm-select--compact{min-height:36px;font-size:11px}.rjcrm-assignment-agent-status{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 16px}.rjcrm-assignment-agent-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid var(--rjcrm-border);border-radius:999px;background:#f7f9fb;color:var(--rjcrm-muted);font-size:10px;font-weight:700}.rjcrm-assignment-agent-chip__dot{width:7px;height:7px;border-radius:50%;background:#aab5bf}.rjcrm-assignment-agent-chip.is-available{border-color:#cbe5d8;background:#f3faf6;color:#24704b}.rjcrm-assignment-agent-chip.is-available .rjcrm-assignment-agent-chip__dot{background:#2f8a61}.rjcrm-assignment-actions{flex-wrap:wrap}.rjcrm-assignment-history{display:grid;gap:10px}.rjcrm-assignment-history__item{padding:11px 12px;border:1px solid var(--rjcrm-border);border-radius:11px;background:#fbfcfd}.rjcrm-assignment-history__line{display:grid;gap:3px}.rjcrm-assignment-history__line strong{color:var(--rjcrm-text);font-size:11px}.rjcrm-assignment-history__line span{color:var(--rjcrm-muted);font-size:9px;text-transform:capitalize}.rjcrm-assignment-history__item p{margin:7px 0 0;color:var(--rjcrm-text-soft);font-size:10px;line-height:1.5;white-space:pre-wrap}.rjcrm-empty-copy,.rjcrm-muted{margin:0;color:var(--rjcrm-muted);font-size:11px;line-height:1.5}.rjcrm-notification-list{display:grid;gap:9px}.rjcrm-notification-item{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:13px 14px;border:1px solid var(--rjcrm-border);border-radius:12px;background:#fff}.rjcrm-notification-item.is-unread{border-color:#bdd4e6;background:#f7fbfe;box-shadow:inset 3px 0 0 #315f87}.rjcrm-notification-item__copy{display:grid;gap:4px;min-width:0}.rjcrm-notification-item__copy strong{color:var(--rjcrm-navy-900);font-size:12px}.rjcrm-notification-item__copy p{margin:0;color:var(--rjcrm-text-soft);font-size:11px;line-height:1.45}.rjcrm-notification-item__copy time{color:var(--rjcrm-muted);font-size:9px}.rjcrm-notification-item__actions{display:flex;flex-wrap:wrap;gap:6px;flex:0 0 auto}.rjcrm-detail-hero__actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
@media(max-width:680px){.rjcrm-module-actions__buttons{width:100%}.rjcrm-module-actions__buttons .rjcrm-button{flex:1 1 auto;justify-content:center}.rjcrm-table-actions{min-width:220px}.rjcrm-notification-item{align-items:flex-start;flex-direction:column}.rjcrm-notification-item__actions{width:100%}.rjcrm-notification-item__actions .rjcrm-button{flex:1 1 auto}.rjcrm-assignment-actions .rjcrm-button{flex:1 1 140px}.rjcrm-detail-hero__actions{width:100%;justify-content:flex-start}}


/* Phase 9 follow-ups */
.rjcrm-followups-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.rjcrm-followups-tabs .is-active{background:#0b315f;color:#fff;border-color:#0b315f}.rjcrm-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:end}.rjcrm-filter-actions{display:flex;align-items:end;padding-bottom:2px}.rjcrm-table-actions{display:flex;gap:8px;flex-wrap:wrap}.rjcrm-table-sub{font-size:12px;color:var(--rjcrm-muted,#6b7280);margin-top:3px}.rjcrm-pagination{display:flex;justify-content:flex-end;align-items:center;gap:12px;padding-top:16px}.rjcrm-detail-hero__actions{flex-wrap:wrap}@media(max-width:900px){.rjcrm-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.rjcrm-filter-grid{grid-template-columns:1fr}.rjcrm-followups-tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.rjcrm-followups-tabs .rjcrm-button{flex:0 0 auto}.rjcrm-pagination{justify-content:space-between}.rjcrm-table-actions{min-width:170px}}

.rjcrm-notification-menu{position:relative}.rjcrm-notification-dropdown{position:absolute;right:0;top:calc(100% + 10px);width:min(380px,calc(100vw - 24px));background:#fff;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 18px 45px rgba(15,23,42,.16);padding:12px;z-index:60}.rjcrm-notification-dropdown__head{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:4px 4px 10px}.rjcrm-notification-dropdown__head a{font-size:13px}.rjcrm-notification-dropdown__item{display:flex;flex-direction:column;gap:4px;padding:10px;border-radius:10px;color:inherit;text-decoration:none}.rjcrm-notification-dropdown__item:hover,.rjcrm-notification-dropdown__item:focus{background:#f8fafc}.rjcrm-notification-dropdown__item span{font-size:13px;color:#64748b}.rjcrm-notification-dropdown__empty{padding:16px 8px;color:#64748b;font-size:13px}

/* Phase 10 — bookings, sales and payments. */
.rjcrm-filter-grid--booking{grid-template-columns:2fr repeat(5,minmax(0,1fr));}.rjcrm-booking-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.rjcrm-booking-form-grid .rjcrm-form-group:has(.rjcrm-textarea){grid-column:1/-1}.rjcrm-checkbox-field{align-content:end}.rjcrm-checkbox-row{display:flex;align-items:center;gap:9px;min-height:42px;padding:0 2px}.rjcrm-checkbox{width:17px;height:17px}.rjcrm-form-stack{display:grid;gap:12px}.rjcrm-booking-money-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.rjcrm-booking-money-grid .rjcrm-detail-field{padding:13px;border:1px solid var(--rjcrm-border);border-radius:12px;background:#fbfcfd}.rjcrm-booking-money-grid .rjcrm-detail-field strong{font-size:14px}.rjcrm-empty-state--compact{padding:18px}.rjcrm-booking-detail .rjcrm-table td,.rjcrm-bookings-app .rjcrm-table td{vertical-align:middle}.rjcrm-booking-detail [data-payment-status],.rjcrm-booking-detail [data-booking-status]{text-transform:capitalize}.rjcrm-booking-editor .rjcrm-modal__body,[data-booking-edit-modal] .rjcrm-modal__body{max-height:calc(100dvh - 180px);overflow:auto}.rjcrm-booking-filters{margin-bottom:18px}
@media(max-width:1250px){.rjcrm-filter-grid--booking{grid-template-columns:repeat(3,minmax(0,1fr))}.rjcrm-booking-money-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.rjcrm-booking-form-grid,.rjcrm-filter-grid--booking,.rjcrm-booking-money-grid{grid-template-columns:1fr}.rjcrm-booking-form-grid .rjcrm-form-group:has(.rjcrm-textarea){grid-column:auto}.rjcrm-bookings-app .rjcrm-table-wrap,.rjcrm-booking-detail .rjcrm-table-wrap{overflow-x:auto}.rjcrm-bookings-app .rjcrm-table,.rjcrm-booking-detail .rjcrm-table{min-width:920px}}

/* Phase 11 — live dashboards and reporting. */
.rjcrm-dashboard-skeleton{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.rjcrm-dashboard-skeleton[hidden],.rjcrm-dashboard-live [hidden],.rjcrm-reports-app [hidden]{display:none!important}.rjcrm-stat-grid--dashboard,.rjcrm-stat-grid--reports{grid-template-columns:repeat(4,minmax(0,1fr))}.rjcrm-dashboard-grid--reports{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.rjcrm-report-bars{display:grid;gap:12px}.rjcrm-report-bar{display:grid;gap:6px}.rjcrm-report-bar__head{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--rjcrm-text-soft);font-size:11px}.rjcrm-report-bar__head span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rjcrm-report-bar__head strong{color:var(--rjcrm-navy-900);font-size:11px}.rjcrm-report-bar__track{height:8px;overflow:hidden;border-radius:999px;background:#eef2f5}.rjcrm-report-bar__fill{display:block;height:100%;border-radius:999px;background:#315f87;min-width:3px}.rjcrm-dashboard-list{display:grid;gap:8px}.rjcrm-dashboard-list__item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 11px;border:1px solid var(--rjcrm-border);border-radius:11px;background:#fbfcfd;color:inherit;text-decoration:none}.rjcrm-dashboard-list__item:hover,.rjcrm-dashboard-list__item:focus{border-color:#cbd8e2;background:#f7fafc}.rjcrm-dashboard-list__copy{display:grid;gap:3px;min-width:0}.rjcrm-dashboard-list__copy strong{overflow:hidden;color:var(--rjcrm-text);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.rjcrm-dashboard-list__copy small{color:var(--rjcrm-muted);font-size:9px}.rjcrm-dashboard-performance{margin-top:16px}.rjcrm-report-table{min-width:980px}.rjcrm-report-filters{margin-bottom:16px}.rjcrm-report-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.rjcrm-report-basis{margin-bottom:16px;padding:14px 16px;border:1px solid #dbe6ee;border-radius:12px;background:#f7fafc}.rjcrm-report-basis strong{display:block;color:var(--rjcrm-navy-900);font-size:12px}.rjcrm-report-basis ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 20px;margin:9px 0 0;padding-left:18px;color:var(--rjcrm-muted);font-size:10px;line-height:1.45}.rjcrm-report-performance-panel{margin-top:16px}.rjcrm-report-export-note{margin-top:16px}.rjcrm-stat-grid--reports{margin-bottom:16px}
@media(max-width:1260px){.rjcrm-stat-grid--dashboard,.rjcrm-stat-grid--reports,.rjcrm-dashboard-skeleton{grid-template-columns:repeat(2,minmax(0,1fr))}.rjcrm-report-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.rjcrm-dashboard-grid--reports{grid-template-columns:1fr}.rjcrm-report-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rjcrm-report-basis ul{grid-template-columns:1fr}}
@media(max-width:560px){.rjcrm-stat-grid--dashboard,.rjcrm-stat-grid--reports,.rjcrm-dashboard-skeleton,.rjcrm-report-filter-grid{grid-template-columns:1fr}.rjcrm-report-table{min-width:940px}.rjcrm-report-basis{padding:12px}}

/* Phase 12 — Meta / Facebook Lead Ads integration settings. */
.rjcrm-settings-app{display:grid;gap:16px}.rjcrm-meta-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.rjcrm-meta-status-card{min-height:150px}.rjcrm-meta-status-card__value{font-size:20px;line-height:1.15;overflow-wrap:anywhere}.rjcrm-meta-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,360px);gap:16px;align-items:start}.rjcrm-meta-side{display:grid;gap:16px}.rjcrm-meta-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.rjcrm-meta-clear-secret{min-height:auto;margin-top:2px;color:var(--rjcrm-muted);font-size:10px}.rjcrm-meta-endpoints{display:grid;gap:10px;margin:4px 0}.rjcrm-meta-endpoint{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 13px;border:1px solid var(--rjcrm-border);border-radius:12px;background:#f8fafc}.rjcrm-meta-endpoint>div:first-child{display:grid;gap:5px;min-width:0}.rjcrm-meta-endpoint span{color:var(--rjcrm-muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}.rjcrm-meta-endpoint code{display:block;max-width:100%;overflow-wrap:anywhere;color:var(--rjcrm-navy-900);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:10px;line-height:1.55}.rjcrm-meta-endpoint__actions{display:flex!important;grid-template-columns:none!important;gap:6px!important;flex:0 0 auto}.rjcrm-meta-mapping{min-height:250px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:11px;line-height:1.55}.rjcrm-meta-supported-fields{display:flex;flex-wrap:wrap;gap:6px;margin-top:5px}.rjcrm-meta-form-actions{display:flex;justify-content:flex-end;padding-top:4px}.rjcrm-meta-checklist{display:grid;gap:10px;margin:0;padding-left:20px;color:var(--rjcrm-text-soft);font-size:11px;line-height:1.55}.rjcrm-meta-checklist li::marker{color:#315f87;font-weight:800}.rjcrm-meta-logs-panel{margin-top:16px}.rjcrm-meta-log-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.rjcrm-meta-log-table{min-width:1050px}.rjcrm-meta-log-table td{vertical-align:top}.rjcrm-meta-error-copy{max-width:320px;color:var(--rjcrm-danger);font-size:10px;line-height:1.45;overflow-wrap:anywhere}.rjcrm-settings-app [data-meta-content][hidden],.rjcrm-settings-app [data-meta-status-loading][hidden]{display:none!important}.rjcrm-settings-app .rjcrm-skeleton--card{min-height:150px;border-radius:14px}.rjcrm-settings-app input:disabled,.rjcrm-settings-app textarea:disabled,.rjcrm-settings-app select:disabled{background:#f3f5f7;color:#7f8b97;cursor:not-allowed}.rjcrm-settings-app button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:1180px){.rjcrm-meta-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rjcrm-meta-layout{grid-template-columns:1fr}.rjcrm-meta-side{grid-template-columns:1fr}}
@media(max-width:720px){.rjcrm-meta-status-grid,.rjcrm-meta-form-grid{grid-template-columns:1fr}.rjcrm-meta-form-grid .rjcrm-form-group--full{grid-column:auto}.rjcrm-meta-endpoint{align-items:flex-start;flex-direction:column}.rjcrm-meta-endpoint__actions{width:100%;flex-wrap:wrap}.rjcrm-meta-form-actions{justify-content:stretch}.rjcrm-meta-form-actions .rjcrm-button{width:100%;justify-content:center}.rjcrm-meta-log-controls{width:100%}.rjcrm-meta-log-controls .rjcrm-select{flex:1 1 180px}.rjcrm-meta-log-table{min-width:980px}}

/* Phase 13: security/audit log */
.rjcrm-filter-grid--audit{grid-template-columns:repeat(4,minmax(0,1fr));}.rjcrm-audit-filters{margin-bottom:16px}.rjcrm-audit-loading{display:grid;gap:10px}.rjcrm-audit-table{min-width:1120px}.rjcrm-audit-table td{vertical-align:top}.rjcrm-audit-context{max-width:430px;white-space:normal;overflow-wrap:anywhere;color:var(--rjcrm-text-soft);font-size:10px;line-height:1.5}.rjcrm-badge--neutral{background:#f1f5f9;color:#334155;border:1px solid #dbe3eb}.rjcrm-audit-app [hidden]{display:none!important}@media(max-width:1100px){.rjcrm-filter-grid--audit{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.rjcrm-filter-grid--audit{grid-template-columns:1fr}.rjcrm-audit-table{min-width:980px}}


/* Phase 14 — final responsive, accessibility and performance polish. */
.rjcrm-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
.rjcrm-skip-link {
	position: fixed;
	left: 16px;
	top: 12px;
	z-index: 10000;
	transform: translateY(-160%);
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--rjcrm-navy-950);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	box-shadow: var(--rjcrm-shadow);
	transition: transform .15s ease;
}
.rjcrm-skip-link:focus { transform: translateY(0); outline: 3px solid #8cb7dc; outline-offset: 3px; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid #2f6f9f;
	outline-offset: 2px;
}
.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-color: #2f6f9f; }

.rjcrm-input,
.rjcrm-control,
.rjcrm-select,
.rjcrm-textarea { max-width: 100%; }
input[type="date"],
input[type="datetime-local"],
input[type="time"] { min-width: 0; width: 100%; }
textarea { resize: vertical; }

.rjcrm-table-wrap {
	max-width: 100%;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-gutter: stable;
	border-radius: 12px;
}
.rjcrm-table-wrap:focus-visible { outline: 3px solid #2f6f9f; outline-offset: 3px; }
.rjcrm-table th { white-space: nowrap; }
.rjcrm-table td { overflow-wrap: anywhere; }
.rjcrm-table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.rjcrm-modal { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.rjcrm-modal__dialog {
	width: min(640px, calc(100vw - 24px));
	max-height: min(90dvh, 900px);
	overflow: hidden;
}
.rjcrm-modal__dialog--wide { width: min(940px, calc(100vw - 24px)); }
.rjcrm-modal__body { overflow-y: auto; overscroll-behavior: contain; }
.rjcrm-modal__header,
.rjcrm-modal__footer { flex: 0 0 auto; }
.rjcrm-modal__footer { position: sticky; bottom: 0; background: #fff; }

.rjcrm-alert[role="alert"], .rjcrm-alert[role="status"] { scroll-margin-top: calc(var(--rjcrm-topbar-height) + 16px); }
.rjcrm-status-chip, .rjcrm-badge { font-weight: 750; }

@media (hover: none), (pointer: coarse) {
	.rjcrm-icon-button { width: 44px; height: 44px; }
	.rjcrm-button { min-height: 44px; }
	.rjcrm-nav__link { min-height: 48px; }
	.rjcrm-checkbox input, .rjcrm-checkbox { min-width: 18px; min-height: 18px; }
}

@media (max-width: 960px) {
	.rjcrm-sidebar { visibility: hidden; }
	.rjcrm-sidebar.is-open { visibility: visible; }
	.rjcrm-app-layout { grid-template-columns: minmax(0, 1fr); }
	.rjcrm-app-main { width: 100%; min-width: 0; }
	.rjcrm-topbar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-inline: 16px; }
	.rjcrm-topbar__center { display: none; }
	.rjcrm-content { width: 100%; max-width: 100%; padding-inline: 16px; }
	.rjcrm-page-header { align-items: flex-start; }
	.rjcrm-panel__header { align-items: flex-start; }
}

@media (max-width: 720px) {
	:root { --rjcrm-topbar-height: 66px; }
	.rjcrm-content { padding: 18px 12px 28px; }
	.rjcrm-page-header { margin-bottom: 14px; }
	.rjcrm-page-header h1 { font-size: clamp(22px, 7vw, 28px); }
	.rjcrm-panel { border-radius: 12px; }
	.rjcrm-panel__header { gap: 10px; padding: 15px; flex-wrap: wrap; }
	.rjcrm-panel__body { padding: 15px; }
	.rjcrm-toolbar,
	.rjcrm-lead-filter-actions,
	.rjcrm-modal__footer,
	.rjcrm-detail-hero__actions { gap: 8px; flex-wrap: wrap; }
	.rjcrm-toolbar .rjcrm-button,
	.rjcrm-lead-filter-actions .rjcrm-button { flex: 1 1 140px; }
	.rjcrm-modal__header { padding: 15px; }
	.rjcrm-modal__body { padding: 15px; }
	.rjcrm-modal__footer { padding: 12px 15px; }
	.rjcrm-modal__footer .rjcrm-button { flex: 1 1 130px; }
	.rjcrm-detail-grid { grid-template-columns: 1fr !important; }
	.rjcrm-detail-side { min-width: 0; }
	.rjcrm-detail-hero { padding: 16px; }
	.rjcrm-detail-hero__main { align-items: flex-start; flex-direction: column; }
	.rjcrm-detail-fields { grid-template-columns: 1fr !important; }
	.rjcrm-pagination { gap: 8px; flex-wrap: wrap; }
	.rjcrm-pagination__pages { max-width: 100%; overflow-x: auto; }
	.rjcrm-notification-dropdown { position: fixed; left: 12px; right: 12px; top: calc(var(--rjcrm-topbar-height) + 8px); width: auto; max-height: calc(100dvh - var(--rjcrm-topbar-height) - 24px); overflow: auto; }
}

@media (max-width: 430px) {
	.rjcrm-topbar { padding-inline: 10px; }
	.rjcrm-topbar__title span { display: none; }
	.rjcrm-topbar__title strong { max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.rjcrm-profile__copy { display: none; }
	.rjcrm-content { padding-inline: 10px; }
	.rjcrm-stat-grid,
	.rjcrm-stat-grid--dashboard,
	.rjcrm-stat-grid--reports,
	.rjcrm-dashboard-skeleton { grid-template-columns: 1fr !important; }
	.rjcrm-stat-card { min-height: 118px; }
	.rjcrm-filter-grid,
	.rjcrm-report-filter-grid,
	.rjcrm-filter-grid--booking,
	.rjcrm-filter-grid--audit,
	.rjcrm-booking-form-grid,
	.rjcrm-meta-form-grid { grid-template-columns: 1fr !important; }
	.rjcrm-button { padding-inline: 13px; }
	.rjcrm-auth-shell { padding: 18px 12px; }
	.rjcrm-auth-card { padding: 24px 18px; }
}

@media (max-width: 360px) {
	.rjcrm-topbar__actions { gap: 5px; }
	.rjcrm-topbar__title strong { max-width: 105px; }
	.rjcrm-content { padding-inline: 8px; }
	.rjcrm-panel__header, .rjcrm-panel__body { padding-inline: 12px; }
	.rjcrm-modal { padding-inline: 8px; }
	.rjcrm-modal__dialog, .rjcrm-modal__dialog--wide { width: calc(100vw - 16px); }
}

@media (max-width: 320px) {
	.rjcrm-topbar__title { display: none; }
	.rjcrm-topbar { grid-template-columns: auto 1fr; }
	.rjcrm-topbar__actions { min-width: 0; }
	.rjcrm-profile__trigger { padding-inline: 4px; }
	.rjcrm-content { padding-inline: 6px; }
}

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

@media print {
	.rjcrm-sidebar, .rjcrm-topbar, .rjcrm-drawer-overlay, .rjcrm-skip-link { display: none !important; }
	.rjcrm-app-layout { display: block; }
	.rjcrm-content { padding: 0; }
}

/* Keep core alerts/actions reachable on small screens. */
@media (max-width: 720px) {
	.rjcrm-topbar__notification { display: inline-grid; }
	.rjcrm-mobile-menu { display: inline-grid; }
}

/* Phase 14.5 — Team and CRM user management */
.rjcrm-team-app{display:grid;gap:16px}.rjcrm-stat-grid--team{grid-template-columns:repeat(4,minmax(0,1fr))}.rjcrm-team-controls{margin-top:0}.rjcrm-team-filter-grid{display:grid;grid-template-columns:minmax(220px,2fr) repeat(3,minmax(150px,1fr)) auto;gap:12px;align-items:end}.rjcrm-team-search{min-width:0}.rjcrm-team-table-body{padding-top:0}.rjcrm-team-loading{display:grid;gap:10px;padding-top:16px}.rjcrm-team-table{min-width:1180px}.rjcrm-team-table td{vertical-align:middle}.rjcrm-team-person{display:flex;align-items:center;gap:10px;min-width:220px}.rjcrm-team-person>span:last-child{display:grid;gap:3px;min-width:0}.rjcrm-team-person strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--rjcrm-text)}.rjcrm-team-person small{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--rjcrm-muted);font-size:10px}.rjcrm-team-avatar{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:50%;background:#eaf1f6;color:var(--rjcrm-navy-900);font-size:11px;font-weight:850;letter-spacing:.02em}.rjcrm-team-last-login{display:block;min-width:135px;color:var(--rjcrm-text-soft);font-size:10px;line-height:1.45}.rjcrm-team-table .rjcrm-table-actions{display:flex;gap:6px;min-width:220px}.rjcrm-team-user-grid{align-items:start}.rjcrm-team-active-field{grid-column:1/-1;padding:13px;border:1px solid var(--rjcrm-border);border-radius:12px;background:#fafcfd}.rjcrm-field-help{display:block;margin-top:5px;color:var(--rjcrm-muted);font-size:9px;line-height:1.45}.rjcrm-field-error{display:block;min-height:14px;margin-top:4px;color:var(--rjcrm-danger);font-size:9px;font-weight:700}.rjcrm-team-modal-error{margin-top:14px}.rjcrm-team-user-grid [hidden]{display:none!important}.rjcrm-team-user-grid .is-readonly input{background:#f3f5f7;color:#687684}.rjcrm-team-app [hidden]{display:none!important}
@media(max-width:1180px){.rjcrm-stat-grid--team{grid-template-columns:repeat(2,minmax(0,1fr))}.rjcrm-team-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rjcrm-team-search{grid-column:1/-1}.rjcrm-team-filter-grid .rjcrm-filter-actions{align-self:end}}
@media(max-width:620px){.rjcrm-stat-grid--team,.rjcrm-team-filter-grid,.rjcrm-team-user-grid{grid-template-columns:1fr!important}.rjcrm-team-search{grid-column:auto}.rjcrm-team-active-field{grid-column:auto}.rjcrm-team-controls .rjcrm-panel__header>.rjcrm-button{width:100%;justify-content:center}.rjcrm-team-filter-grid .rjcrm-filter-actions{display:flex;width:100%}.rjcrm-team-filter-grid .rjcrm-filter-actions .rjcrm-button{flex:1 1 0}.rjcrm-team-table{min-width:1080px}}

/* Phase 15 authorized export controls */
.rjcrm-report-export-panel{margin-top:16px}.rjcrm-report-export-actions{display:flex;gap:9px;flex-wrap:wrap}.rjcrm-report-export-actions .rjcrm-button{justify-content:center}@media(max-width:620px){.rjcrm-report-export-actions{display:grid;grid-template-columns:1fr}.rjcrm-report-export-actions .rjcrm-button{width:100%}}

/* Meta Lead Ads audit/fix: diagnostics, subscription and historical sync */
.rjcrm-meta-header-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.rjcrm-meta-subscription-state{padding:11px 12px;border:1px solid var(--rjcrm-border);border-radius:10px;background:#f8fafc;color:var(--rjcrm-text-soft);font-size:11px;line-height:1.5;margin-bottom:10px}.rjcrm-meta-history-panel{margin-top:16px}.rjcrm-meta-history-controls{display:grid;grid-template-columns:minmax(240px,1fr) auto;gap:12px;align-items:end}.rjcrm-meta-history-progress{margin-top:14px;padding:14px;border:1px solid var(--rjcrm-border);border-radius:12px;background:#f8fafc}.rjcrm-meta-history-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:8px}.rjcrm-meta-history-metric{display:grid;gap:3px;padding:10px;border:1px solid var(--rjcrm-border);border-radius:10px;background:#fff}.rjcrm-meta-history-metric strong{font-size:17px;color:var(--rjcrm-navy-900)}.rjcrm-meta-history-metric span{font-size:10px;color:var(--rjcrm-muted);text-transform:uppercase;font-weight:800;letter-spacing:.03em}.rjcrm-meta-forms-table{min-width:640px}.rjcrm-meta-history-panel .rjcrm-table-wrap{margin-top:14px}.rjcrm-meta-history-panel [data-meta-history-error],.rjcrm-meta-logs-panel [data-meta-log-error]{margin-bottom:12px}
@media(max-width:820px){.rjcrm-meta-header-actions{width:100%;justify-content:flex-start}.rjcrm-meta-history-controls{grid-template-columns:1fr}.rjcrm-meta-history-controls .rjcrm-button{width:100%;justify-content:center}.rjcrm-meta-history-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:430px){.rjcrm-meta-header-actions .rjcrm-button{width:100%;justify-content:center}.rjcrm-meta-history-summary{grid-template-columns:1fr}}
.rjcrm-settings-app .rjcrm-alert[hidden],.rjcrm-settings-app [data-meta-history-progress][hidden],.rjcrm-settings-app [data-meta-forms-wrap][hidden]{display:none!important}

/* CRM configurable branding — safe attachment images keep their natural aspect ratio. */
.rjcrm-brand__custom-main,
.rjcrm-brand__custom-compact {
	display: none;
	align-items: center;
	min-width: 0;
}
.rjcrm-brand__custom-main img,
.rjcrm-brand__custom-compact img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: left center;
}
.rjcrm-brand--has-main .rjcrm-brand__custom-main { display: inline-flex; }
.rjcrm-brand--has-main .rjcrm-brand__fallback-mark,
.rjcrm-brand--has-main .rjcrm-brand__fallback-text { display: none; }
.rjcrm-brand--auth.rjcrm-brand--has-main .rjcrm-brand__custom-main {
	width: min(270px, 70vw);
	height: 64px;
}
.rjcrm-brand--auth.rjcrm-brand--has-main .rjcrm-brand__custom-main img { object-position: left center; }
.rjcrm-brand--topbar { display: none; }
