/* Frontend Public Styles - Multi-Person Support */
.grk-ob-front {
	position: relative;
	width: 100%;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

/* Native Diagram Mode (Seamless & Borderless Integration) */
.grk-ob-front.grk-ob-mode-native {
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	overflow-x: auto !important;
	overflow-y: visible !important;
	height: auto !important;
	display: block !important;
	-webkit-overflow-scrolling: touch;
	padding: 15px 0;
}

.grk-ob-front.grk-ob-mode-native .grk-ob-viewport {
	overflow: visible !important;
	cursor: default !important;
	display: flex !important;
	justify-content: center !important;
	width: 100% !important;
	box-sizing: border-box;
}

.grk-ob-front.grk-ob-mode-native .grk-ob-stage-scaler {
	position: relative !important;
	margin: 0 auto !important;
	overflow: visible !important;
	flex-shrink: 0;
}

.grk-ob-front.grk-ob-mode-native .grk-ob-stage {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	margin: 0 !important;
	transform-origin: top left !important;
}

.grk-ob-front.grk-ob-mode-native .grk-ob-ftoolbar {
	display: none !important;
}

/* Canvas Mode: Scaler does not intervene */
.grk-ob-front.grk-ob-mode-canvas .grk-ob-stage-scaler {
	display: contents !important;
}

.grk-ob-front.fullscreen {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	z-index: 999999 !important;
	border-radius: 0 !important;
}

.grk-ob-ftoolbar {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 10;
	background: #ffffff;
	padding: 4px;
	border-radius: 6px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	display: flex;
	gap: 4px;
}

.grk-ob-fbtn {
	background: transparent;
	border: none;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
	border-radius: 4px;
	color: #475569;
	font-weight: 600;
	transition: background 0.2s, color 0.2s;
}

.grk-ob-fbtn:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.grk-ob-viewport {
	flex: 1;
	position: relative;
	overflow: hidden;
	cursor: grab;
}

.grk-ob-viewport:active {
	cursor: grabbing;
}

.grk-ob-stage {
	position: absolute;
	transform-origin: 0 0;
}

.grk-ob-lines {
	position: absolute;
	top: 0;
	left: 0;
	width: 7000px;
	height: 7000px;
	pointer-events: none;
}

.grk-ob-lines .ln {
	fill: none;
	stroke: #94a3b8;
	stroke-width: 2px;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.grk-ob-lines .ln.dashed {
	stroke-dasharray: 6, 4;
}

.grk-ob-lines .ln.dotted {
	stroke-dasharray: 3, 3;
}

/* Multi-Person Card in Frontend */
.grk-ob-card {
	position: absolute;
	width: 260px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-top: 4px solid #1e3a8a;
	border-radius: 8px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
	overflow: hidden;
	transition: box-shadow 0.2s, transform 0.2s;
}

.grk-ob-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.12);
}

.grk-ob-card-header {
	padding: 10px 14px;
	background: #f8fafc;
	border-bottom: 1px solid #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.grk-ob-card-title {
	font-weight: 700;
	font-size: 13.5px;
	color: #0f172a;
	line-height: 1.25;
}

.grk-ob-card-count {
	font-size: 11px;
	background: #e0e7ff;
	color: #3730a3;
	padding: 2px 7px;
	border-radius: 12px;
	font-weight: 700;
	flex-shrink: 0;
	margin-left: 8px;
}

.grk-ob-card-body {
	padding: 8px 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* Individual Person Row inside Card */
.grk-ob-person-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 8px;
	border-radius: 6px;
	background: #ffffff;
	border: 1px solid #f1f5f9;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.grk-ob-person-row:hover {
	background: #f8fafc;
	border-color: #cbd5e1;
	transform: translateX(2px);
}

.grk-ob-person-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	background: #e2e8f0;
	flex-shrink: 0;
	border: 1px solid #cbd5e1;
}

.grk-ob-person-noimg {
	background: #e2e8f0;
}

.grk-ob-person-info {
	flex: 1;
	min-width: 0;
}

.grk-ob-person-name {
	font-weight: 600;
	font-size: 13px;
	color: #1e293b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.25;
}

.grk-ob-person-role {
	font-size: 11px;
	color: #64748b;
	line-height: 1.2;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.grk-ob-person-arrow {
	font-size: 16px;
	color: #cbd5e1;
	transition: color 0.15s, transform 0.15s;
}

.grk-ob-person-row:hover .grk-ob-person-arrow {
	color: #2563eb;
	transform: translateX(2px);
}

/* Theme Accents */
.grk-ob-t-corporate-navy .grk-ob-card {
	border-top-color: #1e3a8a;
}
.grk-ob-t-corporate-navy .ln {
	stroke: #1e3a8a;
	opacity: 0.65;
}
.grk-ob-t-corporate-navy .grk-ob-pjabatan {
	background: #dbeafe !important;
	color: #1e40af !important;
}
.grk-ob-t-corporate-navy .grk-ob-colleague-chip.is-active {
	background: #1e40af !important;
	border-color: #1e40af !important;
	color: #ffffff !important;
}

.grk-ob-t-emerald-lsp .grk-ob-card {
	border-top-color: #065f46;
}
.grk-ob-t-emerald-lsp .ln {
	stroke: #065f46;
	opacity: 0.65;
}
.grk-ob-t-emerald-lsp .grk-ob-card-count {
	background: #d1fae5;
	color: #065f46;
}
.grk-ob-t-emerald-lsp .grk-ob-pjabatan {
	background: #d1fae5 !important;
	color: #065f46 !important;
}
.grk-ob-t-emerald-lsp .grk-ob-colleague-chip.is-active {
	background: #059669 !important;
	border-color: #059669 !important;
	color: #ffffff !important;
}

.grk-ob-t-modern-slate .grk-ob-card {
	border-top-color: #334155;
}
.grk-ob-t-modern-slate .ln {
	stroke: #334155;
	opacity: 0.65;
}
.grk-ob-t-modern-slate .grk-ob-card-count {
	background: #f1f5f9;
	color: #334155;
}
.grk-ob-t-modern-slate .grk-ob-pjabatan {
	background: #f1f5f9 !important;
	color: #334155 !important;
}
.grk-ob-t-modern-slate .grk-ob-colleague-chip.is-active {
	background: #334155 !important;
	border-color: #334155 !important;
	color: #ffffff !important;
}

/* Modal Popup */
body.grk-ob-modal-open {
	overflow: hidden !important;
}

.grk-ob-overlay {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	background: rgba(15, 23, 42, 0.72) !important;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 999999 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	padding: 20px;
	box-sizing: border-box;
}

.grk-ob-overlay.show {
	opacity: 1 !important;
	visibility: visible !important;
}

.grk-ob-popup {
	background: #ffffff;
	width: 100%;
	max-width: 500px;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
	position: relative;
	transform: translateY(20px) scale(0.96);
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	max-height: 85vh;
	overflow: hidden;
	box-sizing: border-box;
	margin: auto;
}

.grk-ob-overlay.show .grk-ob-popup {
	transform: translateY(0) scale(1);
}

.grk-ob-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: #f1f5f9;
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 20px;
	color: #64748b;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	line-height: 1;
	transition: all 0.2s;
}

.grk-ob-close:hover {
	background: #e2e8f0;
	color: #0f172a;
	transform: scale(1.08);
}

.grk-ob-phd {
	display: flex;
	align-items: center;
	padding: 24px 24px 18px;
	border-bottom: 1px solid #f1f5f9;
	background: linear-gradient(to bottom, #f8fafc, #ffffff);
	flex-shrink: 0;
}

.grk-ob-ppw {
	flex-shrink: 0;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background: #f1f5f9;
	margin-right: 18px;
	border: 3px solid #ffffff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.grk-ob-pdef-icon {
	display: block;
}

.grk-ob-pimg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.grk-ob-pinfo {
	flex: 1;
	min-width: 0;
}

.grk-ob-pname {
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 6px;
	line-height: 1.25;
}

.grk-ob-pbadges-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.grk-ob-pbadge {
	display: inline-block;
	background: #e0f2fe;
	color: #0284c7;
	font-size: 11.5px;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 20px;
}

.grk-ob-prole {
	background: #f1f5f9;
	color: #475569;
}

/* Colleague switcher bar in Modal */
/* Colleague switcher bar in Modal */
.grk-ob-colleagues-bar {
	background: #f8fafc;
	padding: 10px 24px;
	border-bottom: 1px solid #f1f5f9;
	display: flex;
	align-items: center;
	gap: 8px;
	overflow-x: auto;
	flex-shrink: 0;
}

.grk-ob-colleagues-lbl {
	font-size: 11px;
	font-weight: 700;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	flex-shrink: 0;
}

.grk-ob-colleagues-list {
	display: flex;
	gap: 6px;
}

.grk-ob-colleague-chip {
	padding: 4px 10px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 15px;
	font-size: 11.5px;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.15s;
}

.grk-ob-colleague-chip:hover {
	border-color: #2563eb;
	color: #2563eb;
}

.grk-ob-colleague-chip.is-active {
	background: #2563eb;
	color: #ffffff;
	border-color: #2563eb;
}

.grk-ob-pbody {
	padding: 20px 24px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	flex: 1;
}

.grk-ob-psec {
	margin-bottom: 16px;
}
.grk-ob-psec:last-child {
	margin-bottom: 0;
}

.grk-ob-psec h4 {
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #94a3b8;
	margin: 0 0 6px;
	font-weight: 700;
}

.grk-ob-psec p {
	font-size: 13.5px;
	color: #475569;
	line-height: 1.6;
	margin: 0;
}

.grk-ob-pcerts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.grk-ob-pcert {
	background: #f1f5f9;
	color: #475569;
	border: 1px solid #cbd5e1;
	font-size: 11.5px;
	padding: 3px 8px;
	border-radius: 4px;
	font-weight: 500;
}

.grk-ob-pfoot {
	padding: 14px 24px;
	background: #f8fafc;
	border-top: 1px solid #f1f5f9;
	flex-shrink: 0;
}

.grk-ob-pacts {
	display: flex;
	gap: 10px;
}

.grk-ob-abtn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 14px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 6px;
	transition: all 0.2s;
	text-align: center;
}

.grk-ob-awa {
	background: #25D366;
	color: #ffffff;
}
.grk-ob-awa:hover {
	background: #20bd5a;
	color: #ffffff;
}

.grk-ob-aem {
	background: #e2e8f0;
	color: #334155;
}
.grk-ob-aem:hover {
	background: #cbd5e1;
	color: #1e293b;
}
