/* ক্লায়েন্ট ডেস্ক (CRM) — fully self-contained styles, independent of office.css */

.crm-body {
	--crm-forest: #0B2E18;
	--crm-forest-2: #12502A;
	--crm-green: #198030;
	--crm-green-bright: #1E8E3E;
	--crm-green-deep: #146C2E;
	--crm-grad: linear-gradient(135deg, #1E8E3E 0%, #146C2E 100%);
	--crm-grad-dark: linear-gradient(135deg, #0B2E18 0%, #12502A 55%, #1A6B35 100%);
	--crm-bg: #F4F2EA;
	--crm-panel: #FFFFFF;
	--crm-text: #17271C;
	--crm-muted: #677567;
	--crm-border: #E3DFD2;
	--crm-red: #C8202B;
	--crm-plots:
		repeating-linear-gradient(115deg, rgba(255,255,255,0.045) 0 1.5px, transparent 1.5px 44px),
		repeating-linear-gradient(28deg, rgba(255,255,255,0.035) 0 1.5px, transparent 1.5px 68px);
	--crm-shadow: 0 1px 2px rgba(20, 40, 22, 0.04), 0 6px 18px rgba(20, 40, 22, 0.06);
	--crm-shadow-hover: 0 10px 28px rgba(20, 40, 22, 0.12);

	font-family: var(--font-bn, 'Hind Siliguri', sans-serif);
	background: var(--crm-bg);
	background-image: radial-gradient(circle at 100% 0%, rgba(34, 160, 69, 0.08), transparent 40%);
	background-attachment: fixed;
	color: var(--crm-text);
	margin: 0;
}

.crm-body * { box-sizing: border-box; }
.crm-body a { color: inherit; }

/* ---------- Login / public inquiry shell ---------- */

.crm-login-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: var(--crm-grad-dark);
	background-image:
		radial-gradient(circle at 78% 30%, rgba(200, 32, 43, 0.45) 0 90px, transparent 160px),
		var(--crm-plots),
		var(--crm-grad-dark);
}

.crm-login-card {
	background: var(--crm-panel);
	border-radius: 20px;
	padding: 38px 32px;
	max-width: 420px;
	width: 100%;
	text-align: center;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
	border-top: 5px solid var(--crm-red);
}

.crm-login-logo { margin: 0 auto 16px; display: block; }

.crm-login-card h1 {
	font-size: 23px;
	color: var(--crm-forest);
	margin: 0 0 6px;
}

.crm-login-sub {
	color: var(--crm-muted);
	font-size: 14px;
	margin: 0 0 22px;
}

.crm-login-forgot, .crm-login-back {
	font-size: 13px;
	margin-top: 14px;
}
.crm-login-forgot a, .crm-login-back a { color: var(--crm-forest-2); }

.crm-login-submit { width: 100%; justify-content: center; }

.crm-notice {
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 16px;
	text-align: left;
}

.crm-notice--error {
	background: #FEECEE;
	color: #B4233A;
	border: 1px solid #F8C9D0;
}

.crm-notice--ok {
	background: #E2EFE5;
	color: #0E5E2C;
	border: 1px solid #BFE3C8;
	font-weight: 600;
}

.crm-notice--warn {
	background: #FFF7E6;
	color: #92560A;
	border: 1px solid #F6DDA6;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
.crm-notice--warn a { color: #146C2E; text-decoration: underline; }

.crm-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px; height: 1px;
	overflow: hidden;
}

/* ---------- Form fields (shared) ---------- */

.crm-field, .crm-entry-form .crm-field {
	text-align: left;
	margin-bottom: 14px;
}

.crm-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--crm-forest);
	margin-bottom: 5px;
}

.crm-field input,
.crm-field select,
.crm-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1.5px solid var(--crm-border);
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	background: #FDFCF8;
	color: var(--crm-text);
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.crm-field input:focus,
.crm-field select:focus,
.crm-field textarea:focus {
	outline: none;
	background: #fff;
	border-color: var(--crm-green-bright);
	box-shadow: 0 0 0 4px rgba(34, 160, 69, 0.15);
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border-radius: 10px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-sm { padding: 7px 13px; font-size: 13px; }

.btn-primary {
	background: var(--crm-grad);
	color: #fff;
	box-shadow: 0 4px 14px rgba(25, 128, 48, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(25, 128, 48, 0.45); transform: translateY(-1px); }

.btn-outline {
	background: #fff;
	border-color: var(--crm-border);
	color: var(--crm-forest);
}
.btn-outline:hover { border-color: var(--crm-green-bright); color: var(--crm-green); }

.btn-danger-outline {
	color: #D0263F;
	border-color: #F8CDD4;
}
.btn-danger-outline:hover { background: #FEECEE; border-color: #F1A3B0; color: #B4233A; }

/* ---------- Dashboard shell ---------- */

.crm-shell {
	display: flex;
	min-height: 100vh;
}

.crm-sidebar {
	width: 240px;
	flex-shrink: 0;
	background: var(--crm-grad-dark);
	background-image: var(--crm-plots), var(--crm-grad-dark);
	color: #fff;
	padding: 20px 14px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	box-shadow: 4px 0 24px rgba(20, 40, 22, 0.18);
}

/* The logo is dark-on-transparent, so it sits on a white pill to stay legible on the dark sidebar. */
.crm-sidebar-logo {
	display: block;
	background: #fff;
	border-radius: 12px;
	padding: 8px 12px;
	width: 100%;
	height: auto;
	max-width: 190px;
	margin-bottom: 10px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.crm-sidebar-tag {
	display: inline-block;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #FFFFFF;
	background: var(--crm-red);
	border-radius: 999px;
	padding: 3px 12px;
	margin: 0 0 22px;
}

.crm-sidebar nav ul { list-style: none; margin: 0; padding: 0; }

.crm-sidebar nav a {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 13px;
	border-radius: 11px;
	color: rgba(255,255,255,0.78);
	text-decoration: none;
	font-size: 14px;
	margin-bottom: 4px;
	transition: background .15s ease, color .15s ease, transform .15s ease;
}

.crm-sidebar nav a:hover { background: rgba(255,255,255,0.1); color: #fff; transform: translateX(2px); }
.crm-sidebar nav a.is-active {
	background: #fff;
	color: var(--crm-forest);
	font-weight: 700;
	box-shadow: inset 4px 0 0 var(--crm-red), 0 6px 18px rgba(0, 0, 0, 0.2);
}

.crm-menu-toggle {
	display: none;
	position: fixed;
	top: 14px;
	left: 14px;
	z-index: 20;
	background: var(--crm-forest);
	border: none;
	border-radius: 10px;
	width: 42px;
	height: 42px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.crm-menu-toggle span { width: 18px; height: 2px; background: #fff; border-radius: 2px; }

.crm-main { flex: 1; min-width: 0; }

.crm-topbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 14px;
	padding: 12px 28px;
	background: rgba(255,255,255,0.85);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--crm-border);
	position: sticky;
	top: 0;
	z-index: 10;
}

.crm-bell {
	position: relative;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: #EFEDE4;
	color: var(--crm-forest);
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.crm-bell:hover { background: #E5F3E8; color: var(--crm-green); }
.crm-bell.has-alerts { background: #FDE7EC; color: #E11D48; }
.crm-bell.has-alerts svg { animation: crm-ring 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes crm-ring {
	0%, 80%, 100% { transform: rotate(0); }
	84% { transform: rotate(14deg); }
	88% { transform: rotate(-12deg); }
	92% { transform: rotate(8deg); }
	96% { transform: rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) { .crm-bell.has-alerts svg { animation: none; } }
.crm-bell__count {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	display: grid;
	place-items: center;
	border-radius: 999px;
	background: #E11D48;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	border: 2px solid #fff;
}

.crm-topbar-user {
	font-size: 13px;
	color: var(--crm-forest);
	background: #EAF5EC;
	border-radius: 999px;
	padding: 6px 14px;
}

.crm-content { padding: 26px 28px 40px; }

/* Page header as a gradient banner — the one bold color block per page. */
.crm-pagehead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
	flex-wrap: wrap;
	background: var(--crm-grad-dark);
	background-image:
		radial-gradient(circle at 78% 50%, rgba(200, 32, 43, 0.5) 0 40px, rgba(200, 32, 43, 0.1) 41px 92px, transparent 93px),
		var(--crm-plots),
		var(--crm-grad-dark);
	border-radius: 18px;
	border-bottom: 4px solid var(--crm-red);
	padding: 22px 26px;
	box-shadow: 0 10px 30px rgba(20, 40, 22, 0.18);
}

.crm-pagehead h1 { margin: 0 0 4px; font-size: 22px; color: #fff; }
.crm-pagehead p { margin: 0; font-size: 13px; color: rgba(255,255,255,0.75); }
.crm-pagehead .btn-primary { background: #fff; color: var(--crm-forest); box-shadow: 0 6px 18px rgba(0,0,0,0.2); }
.crm-pagehead .btn-outline { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); color: #fff; }

.crm-flash {
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 16px;
}
.crm-flash--ok { background: #E5F3E8; color: #146C2E; }
.crm-flash--error { background: #FEECEE; color: #B4233A; }

.crm-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	color: var(--crm-forest);
	margin: 32px 0 14px;
}
.crm-section-title::before {
	content: "";
	width: 5px;
	height: 20px;
	border-radius: 4px;
	background: linear-gradient(180deg, #198030 0 55%, var(--crm-red) 55% 100%);
	flex-shrink: 0;
}
.crm-section-title:first-child { margin-top: 0; }

/* ---------- Idle-file alert ---------- */

.crm-idle {
	--idle: #A36A00;
	--idle-soft: #FFF7E6;
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-left: 5px solid var(--idle);
	border-radius: 16px;
	padding: 16px 18px;
	margin-bottom: 24px;
	box-shadow: var(--crm-shadow);
}
.crm-idle--alert { --idle: #E11D48; --idle-soft: #FDE7EC; }
.crm-idle--ok { --idle: #0E5E2C; --idle-soft: #E2EFE5; }
.crm-idle--ok .crm-idle__head { margin-bottom: 0; }
.crm-idle__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.crm-idle__icon {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	border-radius: 12px;
	background: var(--idle-soft);
	color: var(--idle);
}
.crm-idle--alert .crm-idle__icon { animation: crm-pulse 1.8s ease-in-out infinite; }
@keyframes crm-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.35); }
	50% { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); }
}
@media (prefers-reduced-motion: reduce) { .crm-idle--alert .crm-idle__icon { animation: none; } }
.crm-idle__head strong { display: block; font-size: 15.5px; color: var(--crm-forest); }
.crm-idle__head span { font-size: 13px; color: var(--crm-muted); }

.crm-idle__list { list-style: none; margin: 0; padding: 0; }
.crm-idle__list li {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	gap: 12px;
	align-items: center;
	padding: 9px 0;
	border-top: 1px solid var(--crm-border);
	font-size: 13.5px;
}
.crm-idle__days {
	min-width: 62px;
	text-align: center;
	font-weight: 700;
	font-size: 12.5px;
	border-radius: 999px;
	padding: 3px 10px;
}
.crm-idle__days--warn { background: #FBF1DC; color: #8A5A00; }
.crm-idle__days--alert { background: #FDE7EC; color: #BE123C; }
.crm-idle__main strong { color: var(--crm-forest); margin-right: 6px; }
.crm-idle__main em { display: block; font-style: normal; font-size: 12px; color: var(--crm-muted); }
.crm-idle__who { font-size: 12.5px; color: var(--crm-forest); background: #EFEDE4; border-radius: 999px; padding: 3px 10px; }
.crm-idle__who--none { background: #FDE7EC; color: #BE123C; font-weight: 600; }

.crm-nav-badge {
	margin-left: auto;
	min-width: 22px;
	height: 22px;
	display: grid;
	place-items: center;
	padding: 0 6px;
	border-radius: 999px;
	background: #E11D48;
	color: #fff;
	font-size: 11.5px;
	font-weight: 700;
	box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
}

/* ---------- Stat tiles ---------- */

.crm-stats-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
}
.crm-stats-grid--wrap { grid-template-columns: repeat(6, 1fr); }

/* Each tile gets its own accent (by position) so the row reads at a glance. */
.crm-stats-grid > :nth-child(6n+1) { --tile: #198030; --tile-soft: #E5F3E8; }
.crm-stats-grid > :nth-child(6n+2) { --tile: #C8202B; --tile-soft: #FBE6E6; }
.crm-stats-grid > :nth-child(6n+3) { --tile: #5E7D1E; --tile-soft: #EEF3DF; }
.crm-stats-grid > :nth-child(6n+4) { --tile: #A36A00; --tile-soft: #FBF1DC; }
.crm-stats-grid > :nth-child(6n+5) { --tile: #8A4B22; --tile-soft: #F5E9DF; }
.crm-stats-grid > :nth-child(6n+6) { --tile: #0E5E2C; --tile-soft: #E2EFE5; }

.crm-stat-tile {
	--tile: var(--crm-green);
	--tile-soft: #E5F3E8;
	position: relative;
	overflow: hidden;
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-top: 4px solid var(--tile);
	border-radius: 14px;
	padding: 18px 18px 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-decoration: none;
	box-shadow: var(--crm-shadow);
	transition: transform .15s ease, box-shadow .15s ease;
}
.crm-stat-tile::after {
	content: "";
	position: absolute;
	right: -22px;
	top: -22px;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	background: var(--tile-soft);
}
.crm-stat-tile:hover { box-shadow: var(--crm-shadow-hover); transform: translateY(-3px); }

.crm-stats-grid > .crm-stat-tile--warn { --tile: #E11D48; --tile-soft: #FDE7EC; }
.crm-stat-tile--sm { padding: 14px 16px 12px; }

.crm-stat-tile__num {
	position: relative;
	z-index: 1;
	font-size: 28px;
	font-weight: 800;
	line-height: 1.1;
	color: var(--tile);
}
.crm-stat-tile--sm .crm-stat-tile__num { font-size: 24px; }
.crm-stat-tile__label { position: relative; z-index: 1; font-size: 12.5px; font-weight: 500; color: var(--crm-muted); }

/* ---------- Work-type cards ---------- */

.crm-work-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.crm-work-grid > :nth-child(6n+1) { --tile: #198030; --tile-soft: #E5F3E8; }
.crm-work-grid > :nth-child(6n+2) { --tile: #C8202B; --tile-soft: #FBE6E6; }
.crm-work-grid > :nth-child(6n+3) { --tile: #5E7D1E; --tile-soft: #EEF3DF; }
.crm-work-grid > :nth-child(6n+4) { --tile: #A36A00; --tile-soft: #FBF1DC; }
.crm-work-grid > :nth-child(6n+5) { --tile: #8A4B22; --tile-soft: #F5E9DF; }
.crm-work-grid > :nth-child(6n+6) { --tile: #0E5E2C; --tile-soft: #E2EFE5; }

.crm-work-card {
	--tile: var(--crm-green);
	--tile-soft: #E5F3E8;
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-radius: 16px;
	padding: 0 18px 16px;
	text-decoration: none;
	color: inherit;
	display: block;
	overflow: hidden;
	box-shadow: var(--crm-shadow);
	transition: transform .15s ease, box-shadow .15s ease;
}
.crm-work-card:hover { box-shadow: var(--crm-shadow-hover); transform: translateY(-3px); }
.crm-work-card h3 {
	margin: 0 -18px 10px;
	padding: 13px 18px;
	font-size: 14.5px;
	color: var(--tile);
	background: var(--tile-soft);
	border-bottom: 1px solid var(--crm-border);
	display: flex;
	align-items: center;
	gap: 8px;
}
.crm-work-card h3::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--tile);
	box-shadow: 0 0 0 4px rgba(255,255,255,0.7);
}
.crm-work-card__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	padding: 6px 0;
	border-top: 1px solid var(--crm-border);
	color: var(--crm-muted);
}
.crm-work-card__row:first-of-type { border-top: none; }
.crm-work-card__row strong {
	min-width: 30px;
	text-align: center;
	color: var(--crm-forest);
	background: #F2F0E7;
	border-radius: 999px;
	padding: 1px 10px;
}

/* ---------- Money summary (work types) ---------- */

.crm-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	margin: 32px 0 14px;
}
.crm-section-head .crm-section-title { margin: 0; }
.crm-period { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crm-period select, .crm-period input {
	padding: 7px 10px;
	border: 1.5px solid var(--crm-border);
	border-radius: 9px;
	background: #fff;
	font-family: inherit;
	font-size: 13px;
}

.crm-money-strip {
	/* Same 5-column grid as the lead summary tiles above, so every edge lines up. */
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
	margin-bottom: 16px;
}
.crm-money-strip__title {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	padding: 16px 18px;
	border-radius: 14px;
	color: #fff;
	background: var(--crm-grad-dark);
	background-image: var(--crm-plots), var(--crm-grad-dark);
	box-shadow: var(--crm-shadow);
}
.crm-money-strip__title strong { font-size: 16px; }
.crm-money-strip__title span { font-size: 12px; color: rgba(255,255,255,0.78); }
.crm-money {
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-top: 4px solid var(--m);
	border-radius: 14px;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	box-shadow: var(--crm-shadow);
}
.crm-money span { font-size: 12.5px; font-weight: 500; color: var(--crm-muted); }
.crm-money strong { font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--m); }
.crm-money--in { --m: #198030; }
.crm-money--out { --m: #8A4B22; }
.crm-money--profit { --m: #0E5E2C; }
.crm-money--profit.is-loss, .crm-money--due { --m: #C8202B; }
.crm-money-note { margin: -6px 0 14px; font-size: 12.5px; color: #8A5A00; }

.crm-work-card__money {
	margin-top: 10px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}
.crm-work-card__money span {
	display: flex;
	flex-direction: column;
	gap: 1px;
	font-size: 11.5px;
	color: var(--crm-muted);
	background: var(--tile-soft);
	border-radius: 10px;
	padding: 6px 10px;
}
.crm-work-card__money strong { font-size: 13.5px; color: var(--tile); }
.crm-work-card__money .is-due strong, .crm-work-card__money .is-loss strong { color: #C8202B; }

/* ---------- Finance placeholder ---------- */

.crm-finance-placeholder {
	background: var(--crm-grad-dark);
	color: #fff;
	border-radius: 14px;
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.crm-finance-placeholder p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,0.85); }
.crm-finance-placeholder svg { color: var(--crm-green-bright); flex-shrink: 0; }

/* ---------- Chips ---------- */

.crm-chip {
	display: inline-block;
	padding: 3px 11px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: #EFEDE4;
	color: #4F5A4C;
	white-space: nowrap;
}
.crm-chip--new { background: #EEF3DF; color: #4D6B14; }
.crm-chip--contacted { background: #FBF1DC; color: #8A5A00; }
.crm-chip--need_understood { background: #F5E9DF; color: #8A4B22; }
.crm-chip--proposal_discussed { background: #FFEDD5; color: #C2410C; }
.crm-chip--confirmed { background: #E2EFE5; color: #146C2E; }
.crm-chip--later { background: #EFEDE4; color: #4F5A4C; }
.crm-chip--unreachable { background: #FDE7EC; color: #BE123C; }
.crm-chip--cancelled { background: #EFEDE4; color: #677567; }

/* ---------- Filters / table ---------- */

.crm-filters {
	display: flex;
	gap: 10px;
	margin-bottom: 16px;
	flex-wrap: wrap;
	align-items: center;
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-radius: 14px;
	padding: 12px;
	box-shadow: var(--crm-shadow);
}
.crm-filters input[type="search"] {
	flex: 1;
	min-width: 200px;
	padding: 9px 12px 9px 36px;
	border: 1.5px solid var(--crm-border);
	border-radius: 10px;
	background: #FDFCF8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
}
.crm-filters select,
.crm-filters input[type="date"] {
	padding: 9px 12px;
	border: 1.5px solid var(--crm-border);
	border-radius: 10px;
	background: #FDFCF8;
	font-family: inherit;
}
.crm-filters input:focus,
.crm-filters select:focus {
	outline: none;
	border-color: var(--crm-green-bright);
	box-shadow: 0 0 0 4px rgba(34, 160, 69, 0.15);
}

.crm-table-wrap {
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-radius: 14px;
	overflow-x: auto;
	box-shadow: var(--crm-shadow);
}

.crm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.crm-table th, .crm-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid var(--crm-border);
	white-space: nowrap;
}
.crm-table th {
	background: #F3F1E8;
	color: #4F5A4C;
	font-weight: 700;
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.crm-table tbody tr { transition: background .12s ease; }
.crm-table tbody tr:nth-child(even) { background: #FBFAF5; }
.crm-table tbody tr:hover { background: #F1F8EF; }
.crm-table tr:last-child td { border-bottom: none; }
.crm-table td a:not(.btn) { color: var(--crm-green); font-weight: 600; text-decoration: none; }
.crm-table td a:not(.btn):hover { text-decoration: underline; }
.crm-table__notes { font-size: 12px; color: var(--crm-muted); white-space: normal; }
.crm-table .crm-status-select { padding: 5px 8px; font-size: 12.5px; }

.crm-empty {
	color: var(--crm-muted);
	font-size: 14px;
	padding: 22px;
	text-align: center;
	background: var(--crm-panel);
	border: 1.5px dashed var(--crm-border);
	border-radius: 14px;
}

.crm-pagination { display: flex; gap: 6px; margin-top: 16px; }
.crm-pagination a {
	padding: 6px 12px;
	border-radius: 8px;
	border: 1px solid var(--crm-border);
	background: #fff;
	text-decoration: none;
	color: var(--crm-forest);
	font-size: 13px;
}
.crm-pagination a.is-active { background: var(--crm-grad); color: #fff; border-color: transparent; font-weight: 600; }

/* ---------- Category control list ---------- */

.crm-list-count { font-size: 13px; color: var(--crm-muted); background: #EFEDE4; border-radius: 999px; padding: 4px 12px; }
.crm-table .is-num { text-align: right; }
.crm-table--control td { vertical-align: middle; }
.crm-cell-client strong { display: block; color: var(--crm-forest); font-weight: 600; }
.crm-cell-client small { font-size: 12px; color: var(--crm-muted); }
/* Right-aligned so এডিট / ডিলিট line up whether or not a row has the আদায়/খরচ button. */
.crm-table .crm-cell-actions { white-space: nowrap; text-align: right; }
.crm-cell-actions .btn + .btn, .crm-cell-actions .btn + .crm-inline-delete { margin-left: 6px; }
.crm-inline-delete { display: inline; }
.crm-cell-actions .crm-inline-delete + .crm-inline-delete { margin-left: 6px; }
.crm-bin-note { margin: 0 0 14px; font-size: 13px; color: var(--crm-muted); }
.crm-bin-by { display: block; font-size: 12px; color: var(--crm-muted); }
.crm-amt-in { color: #198030; font-weight: 600; }
.crm-amt-out { color: #8A4B22; font-weight: 600; }
.crm-amt-due { color: #C8202B; font-weight: 700; }
.crm-amt-paid { color: #146C2E; font-weight: 600; font-size: 12.5px; background: #E5F3E8; border-radius: 999px; padding: 2px 10px; }
.crm-amt-extra { color: #4D6B14; font-size: 12.5px; }
.crm-amt-warn { color: #8A5A00; font-size: 12.5px; }
.crm-amt-muted { color: var(--crm-muted); }
.crm-btn-pay { background: #E5F3E8; color: #146C2E; border-color: #BFE3C8; }
.crm-btn-pay:hover { background: #198030; color: #fff; }

.crm-table tbody tr.crm-pay-row,
.crm-table tbody tr.crm-pay-row:hover { background: #F1F8EF; }
.crm-pay-row td { white-space: normal; padding-top: 4px; }
.crm-pay-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crm-pay-form__who { font-size: 13px; color: var(--crm-forest); margin-right: 6px; }
.crm-pay-form input, .crm-pay-form select {
	padding: 7px 10px;
	border: 1.5px solid var(--crm-border);
	border-radius: 9px;
	background: #fff;
	font-family: inherit;
	font-size: 13px;
	min-width: 0;
}
.crm-pay-form [name="amount"] { width: 130px; font-weight: 700; }
.crm-pay-form [name="note"] { flex: 1; min-width: 140px; }

/* ---------- Entry form ---------- */

.crm-entry-form {
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-top: 4px solid var(--crm-green-bright);
	border-radius: 16px;
	padding: 24px;
	max-width: 820px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px;
	box-shadow: var(--crm-shadow);
}
.crm-field--full { grid-column: 1 / -1; }
.crm-entry-form button { grid-column: 1 / -1; justify-self: start; }

/* Sectioned entry form (e.g. নামজারি): each section is its own titled block. */
.crm-entry-form--sections { display: block; max-width: 900px; }
.crm-fieldset {
	border: 1px solid var(--crm-border);
	border-radius: 14px;
	padding: 18px 18px 6px;
	margin: 0 0 18px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px;
	background: #FDFCF8;
}
.crm-fieldset legend {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 8px;
	font-size: 15px;
	font-weight: 700;
	color: var(--crm-forest);
}
.crm-fieldset legend span {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--crm-grad);
	color: #fff;
	font-size: 12.5px;
}
/* Two short fields sharing one grid cell (e.g. সোর্স + মৌজা). */
.crm-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; min-width: 0; }

.crm-field__hint { display: block; margin-top: 4px; font-size: 11.5px; color: var(--crm-muted); }

.crm-calc {
	display: block;
	padding: 10px 12px;
	border-radius: 10px;
	background: #EFEDE4;
	color: var(--crm-forest);
	font-weight: 700;
	font-size: 15px;
	min-height: 42px;
}
.crm-calc.is-due { background: #FDE7EC; color: #BE123C; }
.crm-calc.is-extra { background: #EEF3DF; color: #4D6B14; }
.crm-calc--profit { background: #E2EFE5; color: #0E5E2C; }
.crm-calc--profit.is-loss { background: #FDE7EC; color: #BE123C; }

/* ---------- Entry page: form + "not started" queue ---------- */

.crm-entry-layout {
	display: grid;
	grid-template-columns: minmax(0, 900px) minmax(280px, 1fr);
	gap: 20px;
	align-items: start;
}
.crm-entry-main { min-width: 0; }
.crm-entry-side { position: sticky; top: 84px; }

.crm-queue {
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-top: 4px solid #A36A00;
	border-radius: 16px;
	padding: 16px;
	box-shadow: var(--crm-shadow);
	max-height: calc(100vh - 110px);
	display: flex;
	flex-direction: column;
}
.crm-queue__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.crm-queue__head h3 { margin: 0; font-size: 15.5px; color: var(--crm-forest); }
.crm-queue__head p { margin: 2px 0 0; font-size: 12px; color: var(--crm-muted); }
.crm-queue__count {
	min-width: 38px;
	height: 38px;
	padding: 0 8px;
	display: grid;
	place-items: center;
	border-radius: 12px;
	background: #FBF1DC;
	color: #8A5A00;
	font-size: 18px;
	font-weight: 800;
}
.crm-queue__empty { margin: 4px 0 0; font-size: 13.5px; color: #146C2E; background: #E5F3E8; border-radius: 10px; padding: 10px 12px; }
.crm-queue__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.crm-queue__list li + li { border-top: 1px solid var(--crm-border); }
.crm-queue__list a {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 6px;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
}
.crm-queue__list a:hover { background: #F1F8EF; }
.crm-queue__list li.is-current a { background: #E5F3E8; box-shadow: inset 3px 0 0 var(--crm-green); }
.crm-queue__days {
	flex-shrink: 0;
	min-width: 52px;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	border-radius: 999px;
	padding: 3px 8px;
}
.crm-queue__days--ok { background: #EFEDE4; color: #4F5A4C; }
.crm-queue__days--warn { background: #FBF1DC; color: #8A5A00; }
.crm-queue__days--alert { background: #FDE7EC; color: #BE123C; }
.crm-queue__main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.crm-queue__main strong { font-size: 13.5px; color: var(--crm-forest); }
.crm-queue__main small { font-size: 11.5px; color: var(--crm-muted); }
.crm-queue__main em { font-style: normal; font-size: 11.5px; color: #B4233A; }
.crm-queue__tip { margin: 10px 0 0; font-size: 11.5px; color: var(--crm-muted); }

/* ---------- Lead detail: follow-ups / activity / works ---------- */

.crm-detail-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	max-width: 820px;
	margin-top: 20px;
}

.crm-detail-col {
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-radius: 16px;
	padding: 18px;
	box-shadow: var(--crm-shadow);
}
.crm-detail-col h3 { margin: 0 0 12px; font-size: 14.5px; color: var(--crm-forest); }

.crm-inline-form {
	display: flex;
	gap: 6px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}
.crm-inline-form input,
.crm-inline-form textarea {
	flex: 1;
	min-width: 120px;
	padding: 8px 10px;
	border: 1.5px solid var(--crm-border);
	border-radius: 9px;
	font-family: inherit;
	font-size: 13px;
}
.crm-inline-form textarea { flex-basis: 100%; }

.crm-followup-list, .crm-activity-list, .crm-works-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.crm-followup-list li, .crm-activity-list li, .crm-works-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 0;
	border-top: 1px solid var(--crm-border);
}
.crm-followup-list li:first-child, .crm-activity-list li:first-child, .crm-works-list li:first-child { border-top: none; }
.crm-followup-list li.is-done span:first-child { text-decoration: line-through; color: var(--crm-muted); }
.crm-done-tag { font-size: 11px; font-weight: 600; color: #146C2E; }
.crm-activity-list li {
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding-left: 14px;
	position: relative;
}
.crm-activity-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 14px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--crm-green-bright);
}
.crm-activity-time { font-size: 11px; color: var(--crm-muted); }

.crm-works-box {
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-radius: 16px;
	padding: 18px;
	max-width: 820px;
	margin-top: 16px;
	box-shadow: var(--crm-shadow);
}
.crm-works-box h3 { margin: 0 0 12px; font-size: 14.5px; color: var(--crm-forest); }
.crm-works-box .btn { margin-top: 10px; }

/* ---------- Client WhatsApp notify ---------- */

.crm-notify { max-width: 900px; border-top: 4px solid #D9D4C4; }
.crm-notify.is-ready { border-top-color: #25D366; }
.crm-notify__hint { margin: 0; font-size: 13px; color: var(--crm-muted); }
.crm-notify__hint--warn { color: #8A5A00; }
.crm-notify__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.crm-btn-whatsapp {
	background: #25D366;
	color: #fff;
	box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.crm-btn-whatsapp:hover { background: #1EBE5A; color: #fff; }
.crm-works-box .crm-btn-whatsapp { margin-top: 0; }
.crm-notify__status {
	font-size: 13px;
	font-weight: 600;
	color: #8A5A00;
	background: #FBF1DC;
	border-radius: 999px;
	padding: 5px 12px;
}
.crm-notify__status.is-done { color: #0E5E2C; background: #E2EFE5; }
.crm-notify__label { display: block; font-size: 13px; font-weight: 600; color: var(--crm-forest); margin-bottom: 5px; }
.crm-notify__text {
	width: 100%;
	padding: 10px 12px;
	border: 1.5px solid var(--crm-border);
	border-radius: 10px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.6;
	background: #F6FFF9;
	margin-bottom: 12px;
	resize: vertical;
}
.crm-notify__text:focus { outline: none; border-color: #25D366; box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.15); }
.crm-wa-template { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--crm-border); font-size: 13px; }
.crm-wa-template summary { cursor: pointer; color: var(--crm-green); font-weight: 600; }
.crm-wa-template form { margin-top: 10px; }
.crm-wa-template .crm-notify__text { background: #fff; }
.crm-wa-tokens { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.crm-wa-token {
	border: 1px solid #BFE3C8;
	background: #EAF5EC;
	color: var(--crm-forest);
	border-radius: 999px;
	padding: 4px 10px;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
}
.crm-wa-token small { font-weight: 400; color: var(--crm-muted); }
.crm-wa-token:hover { border-color: var(--crm-green-bright); }

/* ---------- Cash ledger ---------- */


.crm-cash-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 16px;
	align-items: start;
}

.crm-cash-add {
	background: var(--crm-panel);
	border: 1px solid var(--crm-border);
	border-top: 4px solid var(--crm-green-bright);
	border-radius: 16px;
	padding: 18px;
	box-shadow: var(--crm-shadow);
}
.crm-cash-add h3 { margin: 0 0 12px; font-size: 14.5px; color: var(--crm-forest); }
.crm-cash-add form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.crm-cash-add button { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }

.crm-cash-total-row td {
	background: #EAF5EC;
	font-weight: 700;
	color: var(--crm-forest);
	border-top: 2px solid #BFE3C8;
}

.crm-cash-log { margin-top: 16px; }

/* ---------- Per-work accounts ---------- */

.crm-work-accounts { max-width: 1000px; border-top: 4px solid var(--crm-green-deep); }
.crm-acc-summary {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 10px;
	margin-bottom: 16px;
}
.crm-acc-summary > :nth-child(1) { --tile: #4F5A4C; --tile-soft: #EFEDE4; }
.crm-acc-summary > :nth-child(2) { --tile: #0E5E2C; --tile-soft: #E2EFE5; }
.crm-acc-summary > :nth-child(3) { --tile: #C8202B; --tile-soft: #FBE6E6; }
.crm-acc-summary > :nth-child(4) { --tile: #A36A00; --tile-soft: #FBF1DC; }
.crm-acc-summary > :nth-child(5) { --tile: #0E5E2C; --tile-soft: #E2EFE5; }
.crm-acc-summary > :nth-child(6) { --tile: #198030; --tile-soft: #E5F3E8; }
.crm-acc-summary > div {
	background: var(--tile-soft);
	border-radius: 12px;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.crm-acc-summary span { font-size: 11.5px; font-weight: 500; color: var(--crm-muted); }
.crm-acc-summary strong { font-size: 17px; font-weight: 800; color: var(--tile); }
.crm-acc-summary > .is-due { --tile: #E11D48; --tile-soft: #FDE7EC; }

.crm-txn-form {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr 1.2fr 1.6fr 1.3fr auto;
	gap: 6px;
	margin-bottom: 14px;
	padding: 10px;
	background: #F8F6EE;
	border-radius: 12px;
}
.crm-txn-form input, .crm-txn-form select {
	padding: 8px 10px;
	border: 1.5px solid var(--crm-border);
	border-radius: 9px;
	background: #fff;
	font-family: inherit;
	font-size: 13px;
	min-width: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
	.crm-entry-layout { grid-template-columns: 1fr; }
	.crm-entry-side { position: static; order: -1; }
	.crm-queue { max-height: 300px; }
	.crm-stats-grid { grid-template-columns: repeat(3, 1fr); }
	.crm-stats-grid--wrap { grid-template-columns: repeat(3, 1fr); }
	.crm-work-grid { grid-template-columns: repeat(2, 1fr); }
	.crm-money-strip { grid-template-columns: repeat(4, 1fr); }
	.crm-money-strip__title { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
	.crm-stats-grid { grid-template-columns: repeat(2, 1fr); }
	.crm-stats-grid--wrap { grid-template-columns: repeat(2, 1fr); }
	.crm-work-grid { grid-template-columns: 1fr; }
	.crm-money-strip { grid-template-columns: repeat(2, 1fr); }
	.crm-entry-form { grid-template-columns: 1fr; }
	.crm-fieldset { grid-template-columns: 1fr; }
	.crm-detail-grid { grid-template-columns: 1fr; }
	.crm-cash-grid { grid-template-columns: 1fr; }
	.crm-cash-add form { grid-template-columns: 1fr; }
	.crm-acc-summary { grid-template-columns: repeat(2, 1fr); }
	.crm-txn-form { grid-template-columns: 1fr 1fr; }
	.crm-idle__list li { grid-template-columns: auto 1fr; }
	.crm-idle__who, .crm-idle__list .btn { grid-column: 2; justify-self: start; }
}

@media (max-width: 760px) {
	.crm-menu-toggle { display: flex; }
	.crm-sidebar {
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 15;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
	}
	.crm-sidebar.is-open { transform: translateX(0); }
	.crm-topbar { padding-left: 66px; }
	.crm-content { padding: 18px 14px 32px; }
	.crm-pagehead { padding: 18px; }
}

.crm-muted {
	color: var(--crm-muted);
	font-size: 0.82rem;
}

.crm-unassigned {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	background: #fdeceb;
	font-size: 0.8rem;
	font-weight: 600;
	color: #a8271f;
}

.crm-work-card.is-active {
	outline: 2px solid var(--crm-green, #198030);
}

.crm-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; font-size: .88rem; }
.crm-presets a { padding: 4px 12px; border-radius: 999px; border: 1px solid #b8cbbd; background: #fff; color: #14532d; text-decoration: none; font-weight: 600; }
.crm-presets a.is-on, .crm-presets a:hover { background: #14532d; color: #fff; border-color: #14532d; }
.crm-presets small { color: #6b7a75; }

.crm-idle__assign { display: inline-flex; gap: 6px; align-items: center; }
.crm-idle__assign select { padding: 5px 8px; border: 1px solid #d3d9d4; border-radius: 8px; font: inherit; font-size: 13px; background: #fff; max-width: 170px; }
.crm-idle__assign select.is-none { border-color: #FDA4AF; background: #FFF1F3; color: #BE123C; font-weight: 600; }

.crm-team { margin: 0 0 14px; background: #fff; border: 1px solid #dfe6df; border-radius: 12px; padding: 10px 14px; }
.crm-team summary { cursor: pointer; font-weight: 700; color: #14532d; }
.crm-team__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.crm-team__row input[type=text] { flex: 1 1 220px; max-width: 320px; padding: 7px 10px; border: 1px solid #cfd8d2; border-radius: 8px; font: inherit; }
.crm-team__row--add { border-top: 1px dashed #dfe6df; padding-top: 10px; }
