/* =========================================================
   IKYBOY LIVE ANALYTICS & GEOGRAPHIC CHOROPLETH SECTION
   Lightweight, Animated, Responsive, Dark/Light Mode Ready
   ========================================================= */
.ib_an_section {
	margin-top: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
}

.ib_an_card {
	background: var(--ib-surface, #ffffff);
	border: 1px solid var(--ib-border, #e2e8f0);
	border-top: 3px solid #0284c7;
	border-radius: 14px;
	padding: 1.45rem;
	box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.1);
}

.ib_an_header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	padding-bottom: 1rem;
	margin-bottom: 1.15rem;
	border-bottom: 2px solid rgba(2, 132, 199, 0.15);
}

.ib_an_title {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #0369a1;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

:root[data-theme="dark"] .ib_an_title {
	color: #38bdf8;
}

.ib_an_subtitle {
	margin: 0.3rem 0 0;
	font-size: 0.84rem;
	color: var(--ib-muted, #64748b);
}

.ib_an_controls {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.ib_an_toggle_group {
	display: inline-flex;
	border: 1px solid var(--ib-border, #cbd5e1);
	border-radius: 8px;
	overflow: hidden;
	background: var(--ib-bg, #f8fafc);
}

.ib_an_toggle_btn {
	appearance: none;
	border: none;
	background: transparent;
	color: var(--ib-text, #334155);
	padding: 0.38rem 0.82rem;
	font-size: 0.78rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.ib_an_toggle_btn.is_active {
	background: #0284c7;
	color: #ffffff;
}

.ib_an_period_badge {
	display: inline-flex;
	align-items: center;
	padding: 0.38rem 0.75rem;
	border-radius: 8px;
	background: #0369a1;
	color: #ffffff;
	font-size: 0.74rem;
	font-weight: 800;
	letter-spacing: 0.05em;
}

.ib_an_kpi_grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.85rem;
	margin-bottom: 1.25rem;
}

.ib_an_kpi {
	background: var(--ib-bg, #f8fafc);
	border: 1px solid var(--ib-border, #e2e8f0);
	border-left: 3.5px solid #0284c7;
	border-radius: 10px;
	padding: 0.85rem 0.95rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ib_an_kpi:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 18px -10px rgba(15, 23, 42, 0.2);
}

.ib_an_kpi.kpi_green { border-left-color: #15803d; }
.ib_an_kpi.kpi_orange { border-left-color: #ea580c; }
.ib_an_kpi.kpi_teal { border-left-color: #0d9488; }
.ib_an_kpi.kpi_purple { border-left-color: #7c3aed; }

.ib_an_kpi_label {
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ib-muted, #64748b);
	margin-bottom: 0.35rem;
}

.ib_an_kpi_val {
	font-size: 1.38rem;
	font-weight: 800;
	color: var(--ib-text, #0f172a);
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ib_an_kpi_sub {
	margin-top: 0.22rem;
	font-size: 0.74rem;
	color: var(--ib-muted, #64748b);
}

.ib_an_chart_wrap {
	position: relative;
	width: 100%;
	min-height: 270px;
	padding: 0.5rem 0.25rem 0.25rem;
}

.ib_an_svg {
	width: 100%;
	height: 270px;
	display: block;
	overflow: visible;
}

.ib_an_grid_line {
	stroke: var(--ib-border, #e2e8f0);
	stroke-dasharray: 3 3;
}

.ib_an_axis_text {
	fill: var(--ib-muted, #64748b);
	font-size: 10.5px;
	font-weight: 600;
}

.ib_an_bar_rect {
	transform-box: fill-box;
	transform-origin: bottom;
	animation: ibBarRise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
	transition: opacity 0.18s ease, filter 0.18s ease;
	cursor: pointer;
}

.ib_an_bar_rect:hover {
	filter: brightness(1.12);
}

@keyframes ibBarRise {
	from { transform: scaleY(0); opacity: 0.4; }
	to { transform: scaleY(1); opacity: 1; }
}

.ib_an_line_path {
	fill: none;
	stroke-width: 2.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 1600;
	stroke-dashoffset: 1600;
	animation: ibLineDraw 0.9s ease forwards;
}

@keyframes ibLineDraw {
	to { stroke-dashoffset: 0; }
}

.ib_an_tooltip {
	position: absolute;
	pointer-events: none;
	z-index: 40;
	background: #0f172a;
	color: #f8fafc;
	border: 1px solid rgba(56, 189, 248, 0.4);
	border-radius: 9px;
	padding: 0.55rem 0.78rem;
	font-size: 0.78rem;
	line-height: 1.45;
	box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
	opacity: 0;
	transform: translate(-50%, -105%);
	transition: opacity 0.15s ease;
	white-space: nowrap;
}

.ib_an_tooltip.is_visible {
	opacity: 1;
}

.ib_an_legend_bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.85rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--ib-border, #e2e8f0);
}

.ib_an_legend_pills {
	display: inline-flex;
	gap: 0.55rem;
	flex-wrap: wrap;
}

.ib_an_pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.3rem 0.72rem;
	border-radius: 6px;
	color: #ffffff;
	font-size: 0.76rem;
	font-weight: 700;
}

.ib_an_pill_blue { background: #0284c7; }
.ib_an_pill_green { background: #15803d; }

.ib_an_source_note {
	font-size: 0.75rem;
	color: var(--ib-muted, #64748b);
}

.ib_geo_grid {
	display: grid;
	grid-template-columns: 1.55fr 1fr;
	gap: 1.15rem;
	align-items: stretch;
}

.ib_geo_panel {
	background: var(--ib-bg, #f8fafc);
	border: 1px solid var(--ib-border, #e2e8f0);
	border-radius: 12px;
	padding: 0.95rem;
	display: flex;
	flex-direction: column;
}

.ib_geo_panel_head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	flex-wrap: wrap;
}

.ib_geo_tag {
	display: inline-flex;
	align-items: center;
	padding: 0.22rem 0.58rem;
	border-radius: 5px;
	background: #0284c7;
	color: #ffffff;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.05em;
}

.ib_geo_hint {
	font-size: 0.76rem;
	color: var(--ib-muted, #64748b);
}

.ib_geo_reset_btn {
	appearance: none;
	border: 1px solid var(--ib-border, #cbd5e1);
	background: var(--ib-surface, #ffffff);
	color: var(--ib-text, #1e293b);
	border-radius: 6px;
	padding: 0.28rem 0.62rem;
	font-size: 0.74rem;
	font-weight: 700;
	cursor: pointer;
}

.ib_geo_reset_btn:hover {
	border-color: #0284c7;
	color: #0284c7;
}

.ib_geo_map_viewport {
	position: relative;
	flex: 1;
	min-height: 295px;
	background: var(--ib-surface, #ffffff);
	border: 1px solid var(--ib-border, #e2e8f0);
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ib_geo_zoom_stack {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 15;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ib_geo_zoom_btn {
	width: 28px;
	height: 28px;
	border: none;
	border-radius: 6px;
	background: #0369a1;
	color: #ffffff;
	font-size: 1rem;
	font-weight: 800;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 10px rgba(2, 6, 23, 0.2);
}

.ib_geo_zoom_btn:hover {
	background: #0284c7;
}

.ib_geo_map_stage {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s ease;
}

.ib_geo_map_stage svg {
	width: 100%;
	height: auto;
	max-height: 300px;
	display: block;
}

.ib_geo_map_stage svg path {
	fill: #dbe5f0;
	stroke: #ffffff;
	stroke-width: 0.55;
	transition: fill 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;
	cursor: pointer;
}

:root[data-theme="dark"] .ib_geo_map_stage svg path {
	fill: #1e293b;
	stroke: #0f172a;
}

.ib_geo_map_stage svg path:hover {
	opacity: 0.88;
	stroke: #f59e0b;
	stroke-width: 1.25;
}

.ib_geo_map_stage svg path.ib_country_selected {
	stroke: #f59e0b !important;
	stroke-width: 1.8 !important;
	filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.55));
}

.ib_geo_scale_bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 0.7rem;
	font-size: 0.73rem;
	color: var(--ib-muted, #64748b);
}

.ib_geo_gradient_wrap {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.ib_geo_gradient_bar {
	width: 90px;
	height: 8px;
	border-radius: 999px;
	background: linear-gradient(90deg, #dbe5f0, #38bdf8, #0284c7, #1e3a8a);
}

.ib_geo_list {
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	flex: 1;
}

.ib_geo_country_item {
	background: var(--ib-surface, #ffffff);
	border: 1px solid var(--ib-border, #e2e8f0);
	border-radius: 9px;
	padding: 0.65rem 0.78rem;
	cursor: pointer;
	transition: border-color 0.18s ease, transform 0.18s ease;
}

.ib_geo_country_item:hover,
.ib_geo_country_item.is_active {
	border-color: #0284c7;
	transform: translateX(3px);
}

.ib_geo_country_row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.4rem;
	font-size: 0.84rem;
	font-weight: 700;
	color: var(--ib-text, #0f172a);
}

.ib_geo_rank {
	color: var(--ib-muted, #64748b);
	font-size: 0.76rem;
	margin-right: 0.35rem;
}

.ib_geo_bar_track {
	width: 100%;
	height: 6px;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.22);
	overflow: hidden;
}

.ib_geo_bar_fill {
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.ib_geo_empty {
	padding: 1.5rem 0.75rem;
	text-align: center;
	font-size: 0.84rem;
	color: var(--ib-muted, #64748b);
	line-height: 1.6;
}

@media (max-width: 960px) {
	.ib_an_kpi_grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ib_geo_grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.ib_an_kpi_grid {
		grid-template-columns: 1fr;
	}
}

/* ib_an_kpi_val_fix: cegah teks seperti Awaiting Data terpotong */
.ib_an_kpi_val {
	font-size: clamp(1.02rem, 1.45vw, 1.32rem);
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	word-break: break-word;
}

/* IKYBOY_DARK_MODE_FIX_START */
:root[data-theme="dark"] .ib_an_card {
	background: #0f172a !important;
	border-color: rgba(148, 163, 184, 0.22) !important;
	border-top-color: #38bdf8 !important;
}

:root[data-theme="dark"] .ib_an_toggle_group {
	background: #131e33 !important;
	border-color: rgba(148, 163, 184, 0.3) !important;
}

:root[data-theme="dark"] .ib_an_toggle_btn {
	color: #cbd5e1 !important;
	background: transparent !important;
}

:root[data-theme="dark"] .ib_an_toggle_btn:hover {
	color: #ffffff !important;
	background: rgba(56, 189, 248, 0.14) !important;
}

:root[data-theme="dark"] .ib_an_toggle_btn.is_active {
	background: #0284c7 !important;
	color: #ffffff !important;
}

:root[data-theme="dark"] .ib_an_kpi {
	background: #131e33 !important;
	border-top-color: rgba(148, 163, 184, 0.22) !important;
	border-right-color: rgba(148, 163, 184, 0.22) !important;
	border-bottom-color: rgba(148, 163, 184, 0.22) !important;
	border-left-color: #38bdf8 !important;
}

:root[data-theme="dark"] .ib_an_kpi.kpi_green { border-left-color: #22c55e !important; }
:root[data-theme="dark"] .ib_an_kpi.kpi_orange { border-left-color: #fb923c !important; }
:root[data-theme="dark"] .ib_an_kpi.kpi_teal { border-left-color: #2dd4bf !important; }
:root[data-theme="dark"] .ib_an_kpi.kpi_purple { border-left-color: #a78bfa !important; }

:root[data-theme="dark"] .ib_an_kpi_label,
:root[data-theme="dark"] .ib_an_kpi_sub,
:root[data-theme="dark"] .ib_an_subtitle,
:root[data-theme="dark"] .ib_an_source_note,
:root[data-theme="dark"] .ib_geo_hint,
:root[data-theme="dark"] .ib_geo_scale_bar,
:root[data-theme="dark"] .ib_geo_empty {
	color: #94a3b8 !important;
}

:root[data-theme="dark"] .ib_an_kpi_val {
	color: #f8fafc !important;
}

:root[data-theme="dark"] .ib_an_grid_line {
	stroke: rgba(148, 163, 184, 0.2) !important;
}

:root[data-theme="dark"] .ib_an_axis_text {
	fill: #94a3b8 !important;
}

:root[data-theme="dark"] .ib_geo_panel {
	background: #131e33 !important;
	border-color: rgba(148, 163, 184, 0.22) !important;
}

:root[data-theme="dark"] .ib_geo_map_viewport {
	background: #0b1324 !important;
	border-color: rgba(148, 163, 184, 0.22) !important;
}

:root[data-theme="dark"] .ib_geo_country_item {
	background: #0f172a !important;
	border-color: rgba(148, 163, 184, 0.22) !important;
}

:root[data-theme="dark"] .ib_geo_country_row {
	color: #f1f5f9 !important;
}

:root[data-theme="dark"] .ib_geo_reset_btn {
	background: #1e293b !important;
	border-color: rgba(148, 163, 184, 0.32) !important;
	color: #e2e8f0 !important;
}

:root[data-theme="dark"] .ib_geo_reset_btn:hover {
	border-color: #38bdf8 !important;
	color: #38bdf8 !important;
}
/* IKYBOY_DARK_MODE_FIX_END */
