.jms-wrap .jms-card-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 20px 0;
}

.jms-wrap .jms-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
	padding: 16px 20px;
	min-width: 180px;
	flex: 1;
	box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.jms-wrap .jms-card-label {
	display: block;
	font-size: 13px;
	color: #646970;
	margin-bottom: 6px;
}

.jms-wrap .jms-card-value {
	display: block;
	font-size: 24px;
	font-weight: 600;
	color: #1d2327;
}

.jms-wrap .jms-quick-links {
	margin: 20px 0;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.jms-hi-label {
	color: #787c82;
	font-weight: 400;
	font-size: 13px;
}

.jms-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	background: #f0f0f1;
	color: #50575e;
}

.jms-badge-active,
.jms-status-completed,
.jms-stage-converted {
	background: #edfaef;
	color: #1a7f37;
}

.jms-badge-inactive,
.jms-stage-lost {
	background: #fcf0f1;
	color: #b32d2e;
}

.jms-status-pending,
.jms-stage-new {
	background: #fef8ee;
	color: #996800;
}

.jms-status-in_progress,
.jms-stage-contacted {
	background: #e7f2fa;
	color: #135e96;
}

.jms-stage-qualified {
	background: #f1edfb;
	color: #5b3aa8;
}

.jms-priority-high {
	background: #fcf0f1;
	color: #b32d2e;
}

.jms-priority-medium {
	background: #fef8ee;
	color: #996800;
}

.jms-priority-low {
	background: #f0f0f1;
	color: #50575e;
}

.jms-overdue {
	color: #b32d2e;
	font-weight: 600;
}

/* =========================================================
   JMS Universe — Dashboard 2.0
   ========================================================= */

.jms-dashboard .jms-hero {
	background: linear-gradient(135deg, #1d2b53 0%, #2271b1 100%);
	border-radius: 8px;
	padding: 28px 32px;
	margin: 16px 0 24px;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

.jms-dashboard .jms-hero-eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.5px;
	opacity: 0.75;
	margin-bottom: 6px;
}

.jms-dashboard .jms-hero h1 {
	color: #fff;
	margin: 0 0 6px;
	font-size: 26px;
	line-height: 1.2;
}

.jms-dashboard .jms-hero p {
	margin: 0;
	opacity: 0.9;
	font-size: 14px;
}

.jms-dashboard .jms-hero-date {
	font-size: 14px;
	background: rgba(255,255,255,0.15);
	padding: 8px 16px;
	border-radius: 20px;
	white-space: nowrap;
}

/* ===== Welcome chips + theme toggle (Command Center upgrade) ===== */
.jms-welcome-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}
.jms-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(255,255,255,0.18);
	backdrop-filter: blur(4px);
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 500;
}
.jms-hero-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}
.jms-theme-toggle-btn {
	background: rgba(255,255,255,0.18);
	border: none;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	font-size: 16px;
	cursor: pointer;
	transition: transform .2s, background .2s;
}
.jms-theme-toggle-btn:hover {
	background: rgba(255,255,255,0.3);
	transform: rotate(20deg);
}
.jms-growth-pill {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}
.jms-growth-up   { background: #edfaef; color: #00a32a; }
.jms-growth-down { background: #fcf0f1; color: #d63638; }

/* ===== Dark Mode (scoped to dashboard root, toggled via JS) ===== */
body.jms-theme-dark #jms-dashboard-root {
	background: #1a1d23;
	padding: 16px;
	border-radius: 10px;
	color: #e2e4e7;
}
body.jms-theme-dark #jms-dashboard-root .jms-panel,
body.jms-theme-dark #jms-dashboard-root .jms-card,
body.jms-theme-dark #jms-dashboard-root .jms-zone-card,
body.jms-theme-dark #jms-dashboard-root .jms-compare-card,
body.jms-theme-dark #jms-dashboard-root .jms-filter-bar {
	background: #242832;
	border-color: #343843;
	color: #e2e4e7;
}
body.jms-theme-dark #jms-dashboard-root .jms-card-value,
body.jms-theme-dark #jms-dashboard-root .jms-panel h2,
body.jms-theme-dark #jms-dashboard-root .jms-zone-name,
body.jms-theme-dark #jms-dashboard-root strong {
	color: #f0f1f3;
}
body.jms-theme-dark #jms-dashboard-root .jms-card-label,
body.jms-theme-dark #jms-dashboard-root .jms-card-sub,
body.jms-theme-dark #jms-dashboard-root .jms-meta-small,
body.jms-theme-dark #jms-dashboard-root .description {
	color: #9499a3;
}
body.jms-theme-dark #jms-dashboard-root .jms-filter-pill {
	background: #2e323d;
	color: #e2e4e7;
}
body.jms-theme-dark #jms-dashboard-root .jms-bar-track,
body.jms-theme-dark #jms-dashboard-root .jms-trend-bar-wrap {
	background: #2e323d;
}
body.jms-theme-dark #jms-dashboard-root .jms-compare-winner {
	background: #1d3a25;
	border-color: #00a32a;
}
body.jms-theme-dark #jms-dashboard-root a {
	color: #6cb4f0;
}

/* Soft glassmorphism touch on KPI/zone/compare cards */
.jms-card, .jms-zone-card, .jms-compare-card {
	box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	transition: transform .15s, box-shadow .15s;
}
.jms-card:hover, .jms-zone-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Stat cards v2 */
.jms-dashboard .jms-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 14px;
}

.jms-dashboard .jms-card {
	position: relative;
	border-left-width: 4px;
	padding-left: 18px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.jms-dashboard .jms-card-icon {
	position: absolute;
	top: 14px;
	right: 14px;
	font-size: 22px;
	opacity: 0.25;
}

.jms-card-accent-blue   { border-left-color: #2271b1; }
.jms-card-accent-green  { border-left-color: #1a7f37; }
.jms-card-accent-purple { border-left-color: #5b3aa8; }
.jms-card-accent-orange { border-left-color: #b26000; }
.jms-card-accent-teal   { border-left-color: #0d7c87; }
.jms-card-accent-slate  { border-left-color: #50575e; }

.jms-card-sub {
	font-size: 12px;
	color: #787c82;
	margin-top: 2px;
}

.jms-text-danger { color: #b32d2e !important; font-weight: 600; }
.jms-text-right { text-align: right; }

/* Two column layout */
.jms-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-top: 24px;
	align-items: start;
}

@media (max-width: 1100px) {
	.jms-grid-2 { grid-template-columns: 1fr; }
}

.jms-col {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.jms-panel {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 18px 20px;
	box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.jms-panel h2 {
	font-size: 15px;
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid #f0f0f1;
	color: #1d2327;
}

.jms-panel-link {
	display: inline-block;
	margin-top: 12px;
	font-size: 13px;
	text-decoration: none;
	font-weight: 600;
}

.jms-empty {
	color: #787c82;
	font-style: italic;
	font-size: 13px;
}

/* Mini stats row inside panels */
.jms-mini-stats {
	display: flex;
	gap: 10px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.jms-mini-stat {
	flex: 1;
	min-width: 80px;
	background: #f6f7f7;
	border-radius: 4px;
	padding: 10px;
	text-align: center;
}

.jms-mini-stat-value {
	display: block;
	font-size: 20px;
	font-weight: 700;
	color: #1d2327;
}

.jms-mini-stat-label {
	display: block;
	font-size: 11px;
	color: #646970;
	margin-top: 2px;
}

/* Bar list (pipeline) */
.jms-bar-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.jms-bar-label {
	width: 90px;
	font-size: 12px;
	color: #50575e;
	flex-shrink: 0;
}

.jms-bar-track {
	flex: 1;
	background: #f0f0f1;
	border-radius: 4px;
	height: 10px;
	overflow: hidden;
}

.jms-bar-fill {
	height: 100%;
	border-radius: 4px;
	background: #2271b1;
}

.jms-bar-fill.jms-stage-new       { background: #b26000; }
.jms-bar-fill.jms-stage-contacted { background: #135e96; }
.jms-bar-fill.jms-stage-qualified { background: #5b3aa8; }
.jms-bar-fill.jms-stage-converted { background: #1a7f37; }
.jms-bar-fill.jms-stage-lost      { background: #b32d2e; }

.jms-bar-count {
	width: 24px;
	text-align: right;
	font-size: 12px;
	font-weight: 600;
	color: #1d2327;
}

/* Mini table inside panels */
.jms-mini-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.jms-mini-table tr {
	border-bottom: 1px solid #f0f0f1;
}

.jms-mini-table tr:last-child {
	border-bottom: none;
}

.jms-mini-table td {
	padding: 7px 4px;
}

/* Simple list (meetings) */
.jms-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jms-list li {
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.jms-list li:last-child {
	border-bottom: none;
}

.jms-list-meta {
	font-size: 12px;
	color: #787c82;
}

/* Activity timeline */
.jms-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jms-timeline li {
	position: relative;
	padding: 0 0 14px 18px;
	border-left: 2px solid #f0f0f1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.jms-timeline li:last-child {
	padding-bottom: 0;
	border-left-color: transparent;
}

.jms-timeline-dot {
	position: absolute;
	left: -6px;
	top: 2px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #2271b1;
}

.jms-timeline-dot.jms-status-pending {
	background: #b32d2e;
}

.jms-timeline-text {
	font-size: 13px;
	color: #1d2327;
}

.jms-timeline-meta {
	font-size: 11px;
	color: #8c8f94;
}

/* =========================================================
   JMS Universe — Premium Software Look (v1.2)
   ========================================================= */

#wpcontent .jms-wrap,
#wpcontent .jms-wrap * {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.jms-wrap h1, .jms-wrap h2 {
	font-weight: 700;
}

.jms-wrap .wp-heading-inline {
	font-size: 22px;
}

/* Nicer nav tabs */
.jms-wrap .nav-tab-wrapper {
	border-bottom: 2px solid #e2e4e7;
	margin-bottom: 18px;
}

.jms-wrap .nav-tab {
	border: none;
	background: transparent;
	font-weight: 600;
	color: #646970;
	padding: 10px 16px;
}

.jms-wrap .nav-tab-active {
	color: #2271b1;
	border-bottom: 3px solid #2271b1;
	background: transparent;
	box-shadow: none;
}

/* Form section headers */
.jms-form-section-title {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #2271b1;
	margin: 28px 0 8px;
	padding-bottom: 8px;
	border-bottom: 2px solid #eef3f8;
}

.jms-wrap .form-table th {
	font-weight: 600;
	color: #1d2327;
}

.jms-wrap .form-table {
	background: #fff;
	border-radius: 6px;
}

/* Filter row on list screens */
.jms-filter-row {
	display: inline-block;
	margin: 0 8px 8px 0;
}

.jms-filter-row select {
	min-width: 180px;
}

/* Small meta text used in tables */
.jms-meta-small {
	display: block;
	font-size: 11px;
	color: #787c82;
	margin-top: 2px;
}

/* Mini progress bar (used inside list tables) */
.jms-mini-progress {
	width: 100%;
	max-width: 140px;
	height: 8px;
	background: #f0f0f1;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 3px;
}

.jms-mini-progress-fill {
	height: 100%;
	border-radius: 4px;
	background: #2271b1;
}

.jms-mini-progress-fill.jms-stage-new       { background: #b26000; }
.jms-mini-progress-fill.jms-stage-contacted { background: #135e96; }
.jms-mini-progress-fill.jms-stage-converted { background: #1a7f37; }

/* Member meta strip (age / tenure / achievement quick view on edit screen) */
.jms-member-meta-strip {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	background: #f6f8fb;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 14px 20px;
	margin-bottom: 18px;
	font-size: 13px;
}

.jms-member-meta-strip strong {
	color: #2271b1;
	margin-right: 4px;
}

/* Buttons — give primary actions a bit more "software" polish */
.jms-wrap .button-primary {
	background: linear-gradient(135deg, #2271b1, #1a5a8a);
	border-color: #1a5a8a;
	box-shadow: 0 2px 4px rgba(34,113,177,0.25);
	text-shadow: none;
}

.jms-wrap .button-primary:hover {
	background: linear-gradient(135deg, #195a8d, #134766);
}

.jms-wrap .button.button-small {
	padding: 0 8px;
	line-height: 24px;
	height: 26px;
	font-size: 11px;
}

/* Widefat tables polish */
.jms-wrap .wp-list-table {
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #e2e4e7;
}

.jms-wrap .wp-list-table thead th {
	background: #f6f8fb;
	font-weight: 700;
	color: #344054;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.4px;
}

.jms-wrap .wp-list-table tbody tr:hover {
	background: #f9fbfd;
}

/* RBAC - Roles & Access screen */
.jms-rbac-legend {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin: 10px 0 4px;
}

.jms-rbac-pill {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 14px;
	font-size: 12px;
	font-weight: 600;
	background: #f0f0f1;
	color: #50575e;
}

.jms-rbac-pill-full {
	background: #eaf3ff;
	color: #135e96;
}

.jms-rbac-row-form {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.jms-rbac-row-form select {
	max-width: 220px;
}

/* Hero logo */
.jms-hero-logo {
	max-height: 42px;
	margin-bottom: 8px;
	border-radius: 4px;
}

/* Notice Board — full wall view */
.jms-board-wall {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
	margin-top: 18px;
}

.jms-board-card {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 18px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
	position: relative;
}

.jms-board-card-pinned {
	border-color: #f0b429;
	background: #fffbf0;
}

.jms-board-pin {
	position: absolute;
	top: 12px;
	right: 14px;
	font-size: 11px;
	font-weight: 700;
	color: #996800;
}

.jms-board-date {
	font-size: 11px;
	color: #8c8f94;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.jms-board-title {
	margin: 0 0 8px;
	font-size: 16px;
	color: #1d2327;
}

.jms-board-content {
	font-size: 13px;
	color: #3c434a;
	line-height: 1.6;
}

.jms-board-content p:first-child {
	margin-top: 0;
}

.jms-board-meta {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid #f0f0f1;
	font-size: 11px;
	color: #8c8f94;
}

/* Notice Board mini widget (on Dashboard) */
.jms-board-mini {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f1;
	font-size: 13px;
}

.jms-board-mini:last-of-type {
	border-bottom: none;
}

/* Logo uploader */
.jms-logo-uploader {
	background: #f6f8fb;
	border: 1px dashed #c3c9d3;
	border-radius: 8px;
	padding: 14px;
	display: inline-block;
}

/* =========================================================
   Front-end Shortcode Portal [jms_universe]
   ========================================================= */
.jms-frontend-portal {
	display: flex;
	justify-content: center;
	padding: 30px 16px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.jms-frontend-card {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 12px;
	padding: 32px;
	max-width: 380px;
	width: 100%;
	box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.jms-frontend-card-wide {
	max-width: 520px;
}

.jms-frontend-card h2 {
	margin: 0 0 6px;
	font-size: 22px;
	color: #1d2327;
}

.jms-frontend-sub {
	color: #646970;
	font-size: 13px;
	margin: 0 0 18px;
}

.jms-frontend-card label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #344054;
	margin: 12px 0 4px;
}

.jms-frontend-card input[type="text"],
.jms-frontend-card input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
}

.jms-frontend-btn {
	display: inline-block;
	width: 100%;
	text-align: center;
	margin-top: 18px;
	padding: 11px 16px;
	background: linear-gradient(135deg, #2271b1, #1a5a8a);
	color: #fff !important;
	border: none;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none !important;
	box-sizing: border-box;
}

.jms-frontend-btn-secondary {
	display: inline-block;
	width: 100%;
	text-align: center;
	margin-top: 8px;
	padding: 10px 16px;
	background: #f0f0f1;
	color: #344054 !important;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none !important;
	box-sizing: border-box;
}

.jms-frontend-error {
	background: #fcf0f1;
	color: #b32d2e;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 13px;
	margin-bottom: 12px;
}

.jms-frontend-footnote {
	font-size: 11px;
	color: #8c8f94;
	margin-top: 16px;
	text-align: center;
}

.jms-frontend-meta-row {
	display: flex;
	gap: 18px;
	margin: 18px 0;
	flex-wrap: wrap;
}

.jms-frontend-meta-row > div {
	flex: 1;
	min-width: 120px;
}

/* Credentials reveal box (Roles & Access — Create User) */
.jms-credentials-box {
	background: #edfaef;
	border: 1px solid #b7e4c7;
	border-radius: 8px;
	padding: 14px 18px;
	margin: 14px 0;
}

.jms-credentials-row {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	margin-top: 8px;
	font-size: 13px;
}

.jms-credentials-row code {
	background: #fff;
	padding: 2px 8px;
	border-radius: 4px;
	border: 1px solid #d0e9d6;
}

/* =========================================================
   Mobile / Responsive — make it feel like a real app on phones
   ========================================================= */
@media (max-width: 768px) {
	.jms-wrap {
		padding: 0 8px;
	}

	.jms-dashboard .jms-hero {
		flex-direction: column;
		align-items: flex-start;
		padding: 18px 16px;
	}

	.jms-dashboard .jms-hero-date {
		align-self: flex-start;
	}

	.jms-dashboard .jms-card-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.jms-card {
		padding: 12px 14px 12px 16px;
	}

	.jms-card-value {
		font-size: 18px !important;
	}

	.jms-grid-2 {
		grid-template-columns: 1fr;
	}

	.jms-quick-links {
		flex-direction: column;
	}

	.jms-quick-links .button {
		width: 100%;
		text-align: center;
	}

	/* Forms: stack label above field like a native app form */
	.jms-wrap .form-table,
	.jms-wrap .form-table tbody,
	.jms-wrap .form-table tr,
	.jms-wrap .form-table th,
	.jms-wrap .form-table td {
		display: block;
		width: 100% !important;
	}

	.jms-wrap .form-table th {
		padding-bottom: 4px;
		border-bottom: none;
	}

	.jms-wrap .form-table td {
		padding-top: 0;
		padding-bottom: 16px;
	}

	.jms-wrap .form-table input[type="text"],
	.jms-wrap .form-table input[type="email"],
	.jms-wrap .form-table input[type="number"],
	.jms-wrap .form-table input[type="date"],
	.jms-wrap .form-table input[type="time"],
	.jms-wrap .form-table select,
	.jms-wrap .form-table textarea {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	/* Tables: horizontal scroll wrapper instead of squished columns */
	.jms-wrap .wp-list-table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}

	.jms-wrap .wp-list-table thead {
		display: table;
		width: 100%;
	}

	.jms-wrap .wp-list-table tbody {
		display: table;
		width: 100%;
	}

	.jms-mini-table {
		display: block;
		overflow-x: auto;
	}

	.jms-mini-stats {
		flex-wrap: wrap;
	}

	.jms-mini-stat {
		min-width: 70px;
	}

	.nav-tab-wrapper {
		display: flex;
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	.jms-wrap .nav-tab {
		flex-shrink: 0;
	}

	.jms-rbac-row-form {
		flex-direction: column;
		align-items: stretch;
	}

	.jms-rbac-row-form select {
		max-width: 100%;
		width: 100%;
	}

	.jms-board-wall {
		grid-template-columns: 1fr;
	}

	.jms-frontend-card {
		padding: 22px;
	}

	.jms-filter-row {
		display: block;
		width: 100%;
		margin-bottom: 10px;
	}

	.jms-filter-row select {
		width: 100%;
	}
}

@media (max-width: 480px) {
	.jms-dashboard .jms-card-grid {
		grid-template-columns: 1fr;
	}

	.jms-hero h1 {
		font-size: 20px !important;
	}
}

/* Donor PII masking + PIN unlock */
.jms-masked {
	font-family: monospace;
	color: #787c82;
	letter-spacing: 0.5px;
}

.jms-pin-box {
	background: #fef8ee;
	border: 1px solid #f0dcb0;
	border-radius: 6px;
	padding: 10px 14px;
	margin: 12px 0;
	font-size: 13px;
}

.jms-pin-box-unlocked {
	background: #edfaef;
	border-color: #b7e4c7;
}

.jms-pin-box input[type="text"] {
	margin-left: 6px;
}

/* Demo mode badge */
.jms-demo-ribbon {
	display: none; /* intentionally hidden — dummy mode must look indistinguishable from real data */
}

/* System Lock panel — intentionally plain/unobtrusive */
.jms-wrap input[name="lock_code"] {
	letter-spacing: 2px;
}

/* =========================================================
   Chat — WhatsApp-style messenger
   ========================================================= */
.jms-chat-app {
	display: flex;
	height: 70vh;
	min-height: 480px;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	margin-top: 14px;
}

.jms-chat-sidebar {
	width: 280px;
	flex-shrink: 0;
	border-right: 1px solid #e2e4e7;
	background: #f9fafb;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

.jms-chat-sidebar-header {
	padding: 10px 14px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #8c8f94;
	background: #f1f2f4;
	border-bottom: 1px solid #e2e4e7;
}

.jms-chat-list {
	display: flex;
	flex-direction: column;
}

.jms-chat-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	text-decoration: none !important;
	border-bottom: 1px solid #f0f0f1;
	color: #1d2327 !important;
}

.jms-chat-item:hover {
	background: #f0f3f7;
}

.jms-chat-item-active {
	background: #e7f2fa;
}

.jms-chat-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: linear-gradient(135deg, #2271b1, #1a5a8a);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
	flex-shrink: 0;
	text-transform: uppercase;
}

.jms-chat-item-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.jms-chat-item-name {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.jms-chat-item-preview {
	font-size: 11.5px;
	color: #787c82;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.jms-chat-unread-dot {
	background: #1a7f37;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	border-radius: 10px;
	padding: 1px 6px;
	flex-shrink: 0;
}

.jms-chat-thread {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.jms-chat-thread-header {
	padding: 12px 18px;
	border-bottom: 1px solid #e2e4e7;
	font-weight: 700;
	font-size: 14px;
	background: #fff;
}

.jms-chat-empty-state {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #8c8f94;
	font-size: 14px;
}

.jms-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #eef2f5;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.jms-chat-bubble-row {
	display: flex;
	justify-content: flex-start;
}

.jms-chat-bubble-row.jms-chat-bubble-mine {
	justify-content: flex-end;
}

.jms-chat-bubble {
	max-width: 65%;
	background: #fff;
	border-radius: 10px;
	padding: 8px 12px;
	box-shadow: 0 1px 1px rgba(0,0,0,0.06);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.jms-chat-bubble-mine .jms-chat-bubble {
	background: #dcf2dd;
}

.jms-chat-bubble-sender {
	font-size: 11px;
	font-weight: 700;
	color: #2271b1;
}

.jms-chat-bubble-text {
	font-size: 13.5px;
	color: #1d2327;
	white-space: pre-wrap;
	word-break: break-word;
}

.jms-chat-bubble-time {
	font-size: 10px;
	color: #9aa0a6;
	align-self: flex-end;
}

.jms-chat-attachment-image {
	max-width: 220px;
	max-height: 220px;
	border-radius: 6px;
	display: block;
}

.jms-chat-attachment-video {
	max-width: 260px;
	border-radius: 6px;
	display: block;
}

.jms-chat-attachment-audio {
	width: 220px;
}

.jms-chat-attachment-file {
	display: inline-block;
	background: #f0f3f7;
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 12.5px;
	text-decoration: none;
}

.jms-chat-input-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-top: 1px solid #e2e4e7;
	background: #fff;
}

.jms-chat-attach-btn {
	font-size: 18px;
	cursor: pointer;
	flex-shrink: 0;
}

.jms-chat-filename {
	font-size: 11px;
	color: #2271b1;
	max-width: 90px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex-shrink: 0;
}

.jms-chat-textarea {
	flex: 1;
	resize: none;
	border-radius: 18px;
	border: 1px solid #d0d5dd;
	padding: 9px 16px;
	font-size: 13.5px;
	height: 38px;
	line-height: 1.3;
}

.jms-chat-send-btn {
	background: linear-gradient(135deg, #2271b1, #1a5a8a);
	color: #fff;
	border: none;
	border-radius: 18px;
	padding: 9px 18px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	flex-shrink: 0;
}

@media (max-width: 768px) {
	.jms-chat-app {
		flex-direction: column;
		height: auto;
	}
	.jms-chat-sidebar {
		width: 100%;
		max-height: 260px;
		border-right: none;
		border-bottom: 1px solid #e2e4e7;
	}
	.jms-chat-messages {
		max-height: 50vh;
	}
	.jms-chat-bubble {
		max-width: 85%;
	}
}

/* Notification Center */
.jms-notif-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 14px;
}

.jms-notif-row {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 12px 16px;
}

.jms-notif-row-unread {
	border-left: 4px solid #2271b1;
	background: #f6fafe;
}

.jms-notif-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.jms-notif-body {
	flex: 1;
	min-width: 0;
}

.jms-notif-type-badge {
	margin-bottom: 4px;
	background: #f0f0f1;
	color: #50575e;
}

.jms-notif-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
	flex-wrap: wrap;
}

/* Organization Digital Twin */
.jms-twin-layout {
	display: flex;
	gap: 20px;
	margin-top: 16px;
	align-items: flex-start;
}

.jms-twin-tree {
	flex: 1;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 18px;
	max-height: 70vh;
	overflow: auto;
}

.jms-twin-panel {
	width: 320px;
	flex-shrink: 0;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 18px;
	position: sticky;
	top: 40px;
}

.jms-twin-list, .jms-twin-children {
	list-style: none;
	margin: 0;
	padding-left: 22px;
	border-left: 1px dashed #d0d5dd;
}

.jms-twin-root {
	padding-left: 0;
	border-left: none;
}

.jms-twin-node {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	margin: 4px 0;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
	background: #f6f8fb;
	border: 1px solid #e2e8f0;
}

.jms-twin-node:hover {
	background: #eaf3ff;
}

.jms-twin-node-active {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

.jms-twin-toggle {
	font-size: 10px;
	color: #787c82;
}

.jms-twin-node-active .jms-twin-toggle {
	color: #fff;
}

.jms-twin-stat {
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f1;
	font-size: 13.5px;
}

@media (max-width: 900px) {
	.jms-twin-layout {
		flex-direction: column;
	}
	.jms-twin-panel {
		width: 100%;
		position: static;
	}
}

/* ===== Dashboard: Period Filter Bar ===== */
.jms-filter-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 10px 14px;
	margin: 16px 0;
}
.jms-filter-label {
	font-weight: 600;
	margin-right: 4px;
}
.jms-filter-pill {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	background: #f0f0f1;
	color: #1d2327;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	transition: background .15s;
}
.jms-filter-pill:hover {
	background: #e0e0e1;
	color: #1d2327;
}
.jms-filter-pill-active {
	background: #2271b1;
	color: #fff;
}
.jms-filter-current {
	margin-left: auto;
	font-size: 12px;
	color: #646970;
	font-style: italic;
}

/* ===== Dashboard: Leaderboards ===== */
.jms-leaderboard .jms-rank {
	font-weight: 700;
	color: #8c8f94;
	width: 36px;
}
.jms-leaderboard tr:first-child .jms-rank { color: #dba617; }
.jms-leaderboard tr:nth-child(2) .jms-rank { color: #8c8f94; }
.jms-leaderboard tr:nth-child(3) .jms-rank { color: #b26000; }

/* ===== Dashboard: Comparison Tool ===== */
.jms-compare-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 14px 0;
}
.jms-compare-form select {
	min-width: 200px;
}
.jms-compare-grid {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 16px;
	align-items: center;
	margin-top: 18px;
}
.jms-compare-card {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 10px;
	padding: 18px;
	text-align: center;
	transition: border-color .15s, box-shadow .15s;
}
.jms-compare-card h3 {
	margin: 0 0 12px;
	font-size: 16px;
}
.jms-compare-winner {
	border-color: #00a32a;
	box-shadow: 0 0 0 2px rgba(0,163,42,0.15);
	background: #edfaef;
}
.jms-compare-stat {
	display: flex;
	justify-content: space-between;
	padding: 6px 4px;
	border-bottom: 1px solid #e2e4e7;
	font-size: 13px;
}
.jms-compare-stat:last-child { border-bottom: none; }
.jms-compare-vs {
	font-weight: 700;
	color: #8c8f94;
	text-align: center;
	font-size: 15px;
}
@media (max-width: 700px) {
	.jms-compare-grid {
		grid-template-columns: 1fr;
	}
}

/* ===== Dashboard: Zone Performance Cards (replaces cramped inline bar row) ===== */
.jms-zone-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px;
}
.jms-zone-card {
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 10px;
	padding: 14px 16px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.jms-zone-card-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 8px;
}
.jms-zone-name {
	font-weight: 600;
	font-size: 14px;
	color: #1d2327;
}
.jms-zone-pct {
	font-weight: 700;
	font-size: 16px;
}
.jms-zone-amounts {
	display: flex;
	justify-content: space-between;
	margin-top: 8px;
	font-size: 12px;
	color: #50575e;
	flex-wrap: wrap;
	gap: 6px;
}

/* ===== Dashboard: extra colour accents ===== */
.jms-card-accent-pink   { border-left-color: #d6336c; }
.jms-card-accent-cyan   { border-left-color: #0891b2; }
.jms-card-accent-yellow { border-left-color: #ca8a04; }

.jms-section-title-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 24px 0 10px;
}
.jms-section-title-row h2 {
	margin: 0;
}
.jms-stat-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
}
.jms-stat-pill-green  { background: #00a32a; }
.jms-stat-pill-orange { background: #dba617; color:#1d2327; }
.jms-stat-pill-red    { background: #d63638; }
.jms-stat-pill-blue   { background: #2271b1; }
.jms-stat-pill-purple { background: #5b3aa8; }

.jms-mini-table.jms-leaderboard tr:hover {
	background: #f6f7f7;
}
.jms-compare-stat.jms-compare-highlight {
	background: #fff8e5;
	font-weight: 700;
}

/* ===== Dashboard: Donation Trend mini bar chart ===== */
.jms-trend-chart {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px;
	height: 160px;
	padding-top: 10px;
}
.jms-trend-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	height: 100%;
	justify-content: flex-end;
}
.jms-trend-value {
	font-size: 10.5px;
	color: #50575e;
	margin-bottom: 4px;
	white-space: nowrap;
}
.jms-trend-bar-wrap {
	width: 70%;
	height: 100px;
	display: flex;
	align-items: flex-end;
	background: #f6f7f7;
	border-radius: 4px;
	overflow: hidden;
}
.jms-trend-bar {
	width: 100%;
	background: linear-gradient(180deg, #2271b1 0%, #135e96 100%);
	border-radius: 4px 4px 0 0;
	min-height: 4px;
	transition: height .3s;
}
.jms-trend-label {
	font-size: 11px;
	color: #646970;
	margin-top: 6px;
	white-space: nowrap;
}

