/* ═══════════════════════════════════════════════════════════
   ensiklopedia UI — DQLab Theme
   Modern, clean, purposeful. Teal primary, amber accent.
   ═══════════════════════════════════════════════════════════ */

/* ── RESET ── */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
a {
	color: inherit;
	text-decoration: none;
}

/* ── TOKENS ── */
:root {
	/* Surface */
	--bg: #f0f4f3;
	--surface: #ffffff;
	--surface2: #e8f5f3;
	--border: #e0e8e7;
	--border2: #b2d8d3;

	/* Typography */
	--text: #111827;
	--muted: #4b5563;
	--subtle: #9ca3af;

	/* DQLab Teal */
	--p: #009688;
	--p-dark: #00695c;
	--p-light: #4db6ac;
	--p-dim: rgba(0, 150, 136, 0.08);
	--p-glow: rgba(0, 150, 136, 0.18);

	/* DQLab Amber */
	--a: #ffc107;
	--a-dark: #e65100;
	--a-dim: rgba(255, 193, 7, 0.12);

	/* Source colors */
	--excel: #5c6bc0;
	--mysql: #fb8c00;
	--r: #1976d2;
	--python: #7b1fa2;

	/* Code */
	--code-bg: #0d1117;
	--code-text: #cdd9e5;

	/* Radius */
	--r-sm: 6px;
	--r-md: 10px;
	--r-lg: 14px;
	--r-xl: 18px;
}

/* ── BASE ── */
body {
	font-family:
		system-ui,
		-apple-system,
		"Segoe UI",
		sans-serif;
	background: var(--bg);
	color: var(--text);
	font-size: 14px;
	line-height: 1.6;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════
   HEADER
   ════════════════════════════════════════ */
.gl-header {
	position: sticky;
	top: 0;
	z-index: 200;
	height: 54px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
}
.gl-header__inner {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 24px;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

/* Logo */
.gl-header__logo {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}
.gl-header__logo img {
	height: 28px;
	display: block;
}
.gl-header__divider {
	width: 1px;
	height: 20px;
	background: var(--border2);
	margin: 0 2px;
}
.gl-header__product {
	font-size: 13px;
	font-weight: 700;
	color: var(--p-dark);
	letter-spacing: -0.2px;
}
.gl-header__product span {
	font-weight: 400;
	color: var(--subtle);
	margin-left: 2px;
}

/* Header right */
.gl-header__right {
	display: flex;
	align-items: center;
	gap: 5px;
}
.gl-header__user {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--muted);
	background: var(--surface2);
	border: 1px solid var(--border2);
	border-radius: var(--r-md);
	padding: 5px 12px;
	/* max-width: 180px; */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.gl-header__user svg {
	flex-shrink: 0;
	color: var(--p);
}

.gl-header__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 600;
	border-radius: var(--r-md);
	padding: 6px 14px;
	cursor: pointer;
	transition: all 0.15s;
	white-space: nowrap;
	border: 1.5px solid transparent;
}
.gl-header__btn--primary {
	background: var(--p);
	color: #fff;
	border-color: var(--p);
}
.gl-header__btn--primary:hover {
	background: var(--p-dark);
	border-color: var(--p-dark);
	box-shadow: 0 4px 12px var(--p-glow);
}
.gl-header__btn--ghost {
	color: var(--p-dark);
	border-color: var(--border2);
	background: transparent;
}
.gl-header__btn--ghost:hover {
	background: var(--p-dim);
	border-color: var(--p);
}

/* ════════════════════════════════════════
   SHELL
   ════════════════════════════════════════ */
.gl-shell {
	display: flex;
	min-height: calc(100vh - 54px);
}
.gl-shell__main {
	flex: 1;
	min-width: 0;
}

/* Sidebar hidden by default */
.gl-sidebar {
	width: 230px;
	min-width: 230px;
	background: var(--surface);
	border-right: 1px solid var(--border);
	height: calc(100vh - 54px);
	position: sticky;
	top: 54px;
	overflow-y: auto;
	flex-shrink: 0;
	display: none;
}
.gl-sidebar.visible {
	display: flex;
	flex-direction: column;
}

/* ════════════════════════════════════════
   PAGE
   ════════════════════════════════════════ */
.gl-page {
	max-width: 1120px;
	margin: 0 auto;
	padding: 20px 16px 52px;
}
.gl-page--detail {
	max-width: 860px;
}

/* ── TOP BAR ── */
.gl-topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.gl-topbar__right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	flex-wrap: wrap;
}

.gl-title {
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -0.4px;
	color: var(--text);
	line-height: 1.2;
}
.gl-subtitle {
	font-size: 16px;
	/* color: var(--subtle); */
	margin-top: 4px;
}

.gl-count-badge {
	font-size: 12px;
	font-weight: 500;
	color: var(--subtle);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 100px;
	padding: 2px 10px;
	margin-left: 8px;
	vertical-align: middle;
}

.gl-list-info {
	font-size: 12px;
	color: var(--subtle);
	margin-bottom: 16px;
}

/* ── BREADCRUMB ── */
.gl-breadcrumb {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12.5px;
	color: var(--subtle);
	flex-wrap: wrap;
	margin-bottom: 6px;
}
.gl-breadcrumb a {
	color: var(--p);
	font-weight: 500;
}
.gl-breadcrumb a:hover {
	text-decoration: underline;
}
.gl-breadcrumb__sep {
	color: var(--border2);
	font-size: 11px;
}
.gl-breadcrumb__current {
	color: var(--muted);
}

/* ── SEARCH ── */
.gl-search {
	position: relative;
}
.gl-search__icon {
	position: absolute;
	left: 11px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--subtle);
	display: flex;
	pointer-events: none;
}
.gl-search__input {
	width: 260px;
	padding: 8px 12px 8px 35px;
	border: 1.5px solid var(--border);
	border-radius: var(--r-md);
	font-size: 13px;
	background: var(--surface);
	color: var(--text);
	outline: none;
	transition:
		border-color 0.15s,
		box-shadow 0.15s,
		width 0.2s;
}
.gl-search__input::placeholder {
	color: var(--subtle);
}
.gl-search__input:focus {
	border-color: var(--p);
	box-shadow: 0 0 0 3px var(--p-dim);
	width: 300px;
}

/* ── LANG TOGGLE ── */
.gl-lang-toggle {
	display: flex;
	background: var(--bg);
	border: 1.5px solid var(--border);
	border-radius: var(--r-md);
	padding: 3px;
	gap: 2px;
}
.gl-lang-btn {
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 600;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	border-radius: 7px;
	transition:
		background 0.12s,
		color 0.12s;
	border: none;
}
.gl-lang-btn.active {
	background: var(--p);
	color: #fff;
	box-shadow: 0 1px 4px var(--p-glow);
}
.gl-lang-btn:hover:not(.active) {
	color: var(--text);
}

/* ════════════════════════════════════════
   HOME — LANGUAGE CARDS
   ════════════════════════════════════════ */
.gl-section-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--subtle);
	margin-bottom: 14px;
}

.gl-lang-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px;
}

.gl-lang-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: var(--surface);
	border: 1.5px solid var(--border);
	border-radius: var(--r-lg);
	padding: 20px 18px 16px;
	cursor: pointer;
	transition:
		border-color 0.15s,
		box-shadow 0.15s,
		transform 0.12s;
	position: relative;
	overflow: hidden;
}
.gl-lang-card::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--p) 0%, var(--a) 100%);
	opacity: 0;
	transition: opacity 0.2s;
}
.gl-lang-card:hover {
	border-color: var(--p);
	box-shadow: 0 6px 20px var(--p-glow);
	transform: translateY(-2px);
}
.gl-lang-card:hover::after {
	opacity: 1;
}

.gl-lang-card__header {
	display: flex;
	align-items: center;
	gap: 8px;
}
.gl-lang-card__name {
	font-size: 20px;
	font-weight: 700;
	color: var(--text);
}
.gl-lang-card__count {
	font-size: 16px;
	/* color: var(--subtle); */
}
.gl-lang-card__footer {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.gl-lang-card__arrow {
	color: var(--subtle);
	transition:
		transform 0.15s,
		color 0.15s;
}
.gl-lang-card:hover .gl-lang-card__arrow {
	transform: translateX(3px);
	color: var(--p);
}

/* Source dots */
.gl-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex-shrink: 0;
}
.gl-dot--excel {
	background: var(--excel);
}
.gl-dot--mysql {
	background: var(--mysql);
}
.gl-dot--r {
	background: var(--r);
}
.gl-dot--python {
	background: var(--python);
}

/* ════════════════════════════════════════
   BADGES
   ════════════════════════════════════════ */
.gl-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: var(--r-sm);
	font-size: 11px;
	font-weight: 600;
	background: #f3f4f6;
	color: var(--muted);
	white-space: nowrap;
}
.gl-badge--lg {
	font-size: 12px;
	padding: 3px 11px;
}
.gl-badge--excel {
	background: #ede7f6;
	color: #5c6bc0;
}
.gl-badge--mysql {
	background: #fff3e0;
	color: #e65100;
}
.gl-badge--r {
	background: #e3f2fd;
	color: #1565c0;
}
.gl-badge--python {
	background: #f3e5f5;
	color: #6a1b9a;
}
.gl-badge--deprecated {
	background: #fce4ec;
	color: #b71c1c;
}
.gl-badge--version {
	background: #e8f5e9;
	color: #1b5e20;
}
.gl-badge--id {
	background: #fff8e1;
	color: #e65100;
}

/* ── Return type chips ── */
.gl-return-type {
	display: inline-block;
	font-family: "SF Mono", "Fira Code", Consolas, monospace;
	font-size: 11px;
	padding: 1px 7px;
	border-radius: var(--r-sm);
	font-weight: 600;
}
.gl-return--numeric,
.gl-return--int,
.gl-return--integer {
	background: #ede7f6;
	color: #4527a0;
}
.gl-return--float {
	background: #e3f2fd;
	color: #1565c0;
}
.gl-return--text {
	background: #e0f2f1;
	color: #004d40;
}
.gl-return--array,
.gl-return--anyarray {
	background: #fff3e0;
	color: #e65100;
}
.gl-return--boolean {
	background: #fce4ec;
	color: #b71c1c;
}
.gl-return--void {
	background: #f5f5f5;
	color: #757575;
}

/* ── Category pill ── */
.gl-cat-pill-sm {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 100px;
	font-size: 11.5px;
	font-weight: 600;
	border: 1.5px solid var(--border2);
	background: var(--surface2);
	color: var(--p-dark);
}

/* ════════════════════════════════════════
   FUNCTION LIST
   ════════════════════════════════════════ */

/* Category filter pills */
.gl-cat-filter {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--border);
}
.gl-cat-pill {
	padding: 5px 14px;
	border-radius: 100px;
	font-size: 12px;
	font-weight: 500;
	border: 1.5px solid var(--border);
	background: var(--surface);
	color: var(--muted);
	cursor: pointer;
	transition: all 0.12s;
}
.gl-cat-pill:hover {
	border-color: var(--p);
	color: var(--p-dark);
	background: var(--p-dim);
}
.gl-cat-pill.active {
	background: var(--p);
	color: #fff;
	border-color: var(--p);
}

/* Function grid */
.gl-fn-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 10px;
}
.gl-fn-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1.5px solid var(--border);
	border-radius: var(--r-lg);
	padding: 16px 18px;
	cursor: pointer;
	transition:
		border-color 0.15s,
		box-shadow 0.12s,
		transform 0.1s;
	text-decoration: none;
	color: inherit;
	overflow: hidden; /* prevent bleed keluar card */
	min-width: 0; /* penting untuk flex child */
	word-break: break-word;
	overflow-wrap: break-word;
}
.gl-fn-card:hover {
	border-color: var(--p);
	box-shadow: 0 4px 16px var(--p-glow);
	transform: translateY(-1px);
}
.gl-fn-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
	min-width: 0;
}
.gl-fn-card__name {
	font-family: "SF Mono", "Fira Code", Consolas, monospace;
	font-size: 13px;
	font-weight: 700;
	color: var(--p-dark);
	letter-spacing: -0.1px;
	word-break: break-all; /* nama fungsi seperti GET_FORMAT(...) */
	min-width: 0;
}
.gl-fn-card__cat {
	font-size: 10px;
	color: var(--subtle);
	background: var(--bg);
	border-radius: 5px;
	padding: 2px 7px;
	flex-shrink: 0;
	white-space: nowrap;
	border: 1px solid var(--border);
}
.gl-fn-card__desc {
	font-size: 12.5px;
	color: var(--muted);
	line-height: 1.55;
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-bottom: 12px;
	word-break: break-word;
	overflow-wrap: break-word;
}
.gl-fn-card__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: auto;
	padding-top: 8px;
	border-top: 1px solid var(--bg);
}

/* Empty state */
.gl-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 64px 24px;
	color: var(--subtle);
	font-size: 14px;
	text-align: center;
}
.gl-empty svg {
	opacity: 0.4;
}

/* ════════════════════════════════════════
   DETAIL PAGE
   ════════════════════════════════════════ */
.gl-detail {
	background: var(--surface);
	border: 1.5px solid var(--border);
	border-radius: var(--r-xl);
	padding: 36px 40px;
	margin-bottom: 24px;
	position: relative;
	overflow: hidden;
}
/* Gradient bar kiri */
.gl-detail::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: linear-gradient(180deg, var(--p) 0%, var(--a) 100%);
	border-radius: 4px 0 0 4px;
}

.gl-detail__name {
	font-size: 32px;
	font-weight: 800;
	font-family: "SF Mono", "Fira Code", Consolas, monospace;
	letter-spacing: -1px;
	color: var(--p-dark);
	margin-bottom: 12px;
	line-height: 1.1;
}
.gl-detail__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}
.gl-detail__updated {
	font-size: 11.5px;
	color: var(--subtle);
}
.gl-detail__desc {
	font-size: 15px;
	color: var(--muted);
	line-height: 1.75;
	margin-bottom: 16px;
}
.gl-detail__row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}
.gl-detail__label {
	font-size: 12px;
	color: var(--subtle);
	font-weight: 600;
	min-width: 70px;
}
.gl-detail__link {
	font-size: 12px;
	color: var(--p);
	word-break: break-all;
}
.gl-detail__link:hover {
	text-decoration: underline;
}
.gl-detail__divider {
	height: 1px;
	background: var(--border);
	margin: 24px 0;
}

/* Sections */
.gl-section {
	margin-bottom: 32px;
}
.gl-section__title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--p);
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--p-dim);
}

/* ════════════════════════════════════════
   CODE BLOCK
   ════════════════════════════════════════ */
.gl-code-block {
	border-radius: var(--r-md);
	overflow: hidden;
	border: 1px solid #21262d;
	margin-bottom: 12px;
}
.gl-code-block__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 14px;
	background: #161b22;
	border-bottom: 1px solid #21262d;
}
.gl-code-block__lang {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--p-light);
	background: rgba(0, 150, 136, 0.15);
	border: 1px solid rgba(0, 150, 136, 0.3);
	padding: 2px 9px;
	border-radius: var(--r-sm);
}
.gl-code-block__copy {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: #8b949e;
	background: transparent;
	border: 1px solid #30363d;
	border-radius: var(--r-sm);
	padding: 3px 10px;
	cursor: pointer;
	transition: all 0.12s;
}
.gl-code-block__copy:hover {
	background: #21262d;
	color: #cdd9e5;
	border-color: var(--p-light);
}
.gl-code-block__copy.copied {
	color: #56d364;
	border-color: #56d364;
}

.gl-code-block__pre {
	background: var(--code-bg);
	margin: 0;
	padding: 18px 20px;
	overflow-x: auto;
}
.gl-code-block__pre code {
	font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
	font-size: 13px;
	color: var(--code-text);
	line-height: 1.7;
	white-space: pre;
}

/* Syntax colors — Github Dark inspired + teal accent */
.gl-code-block__pre .kw {
	color: #79c0ff;
} /* keywords */
.gl-code-block__pre .fn {
	color: #ffca28;
} /* functions — amber DQLab */
.gl-code-block__pre .str {
	color: #56d364;
} /* strings */
.gl-code-block__pre .num {
	color: #ff9580;
} /* numbers */
.gl-code-block__pre .op {
	color: #4db6ac;
} /* operators — teal DQLab */
.gl-code-block__pre .cm {
	color: #484f58;
	font-style: italic;
} /* comments */

/* ════════════════════════════════════════
   DETAIL SECTIONS
   ════════════════════════════════════════ */

/* Args table */
.gl-args-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	border-radius: var(--r-md);
	overflow: hidden;
	border: 1.5px solid var(--border);
}
.gl-args-table th {
	text-align: left;
	padding: 9px 14px;
	background: var(--surface2);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--p-dark);
	border-bottom: 1.5px solid var(--border2);
}
.gl-args-table td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
}
.gl-args-table tr:last-child td {
	border-bottom: none;
}
.gl-args-table td:first-child {
	width: 170px;
	white-space: nowrap;
}
.gl-args-table td code {
	font-family: "SF Mono", Consolas, monospace;
	font-size: 12px;
	color: var(--p-dark);
	background: var(--surface2);
	border: 1px solid var(--border2);
	padding: 1px 7px;
	border-radius: 5px;
}
.gl-args-table td:last-child {
	color: var(--muted);
	line-height: 1.6;
}

/* Return box */
.gl-return-box {
	background: var(--surface2);
	border: 1.5px solid var(--border2);
	border-left: 4px solid var(--p);
	border-radius: var(--r-md);
	padding: 12px 16px;
	font-size: 13px;
	color: var(--p-dark);
	line-height: 1.6;
}

/* Details text */
.gl-details-text {
	font-size: 13.5px;
	color: var(--muted);
	line-height: 1.75;
}

/* Examples */
.gl-example {
	border: 1.5px solid var(--border);
	border-radius: var(--r-md);
	padding: 16px 18px;
	margin-bottom: 10px;
	background: var(--surface);
}
.gl-example__title {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
}
.gl-example__desc {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.6;
	margin-bottom: 10px;
}

/* See also */
.gl-see-also {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}
.gl-see-also__tag {
	background: var(--bg);
	border: 1.5px solid var(--border);
	border-radius: var(--r-sm);
	padding: 4px 12px;
	font-size: 12px;
	font-family: "SF Mono", Consolas, monospace;
	color: var(--muted);
	transition:
		border-color 0.12s,
		color 0.12s;
}
.gl-see-also__tag:hover {
	border-color: var(--p);
	color: var(--p-dark);
}

/* ════════════════════════════════════════
   LOGIN BANNER
   ════════════════════════════════════════ */
.gl-login-banner {
	display: flex;
	align-items: center;
	gap: 14px;
	background: linear-gradient(135deg, var(--surface2) 0%, #fff8e1 100%);
	border: 1.5px solid var(--border2);
	border-left: 4px solid var(--p);
	border-radius: var(--r-lg);
	padding: 14px 18px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}
.gl-login-banner__icon {
	color: var(--p);
	flex-shrink: 0;
	display: flex;
}
.gl-login-banner p {
	flex: 1;
	font-size: 13px;
	color: var(--muted);
	min-width: 180px;
}
.gl-login-banner strong {
	color: var(--p-dark);
}
.gl-login-banner__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 700;
	background: var(--p);
	color: #fff;
	border-radius: var(--r-md);
	padding: 7px 16px;
	white-space: nowrap;
	transition:
		background 0.15s,
		box-shadow 0.15s;
}
.gl-login-banner__btn:hover {
	background: var(--p-dark);
	box-shadow: 0 4px 12px var(--p-glow);
}

/* ════════════════════════════════════════
   ERROR STATE
   ════════════════════════════════════════ */
.gl-error-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 64px 24px;
	background: var(--surface);
	border: 2px dashed var(--border2);
	border-radius: var(--r-xl);
}
.gl-error-state__icon {
	color: var(--a-dark);
	opacity: 0.7;
	margin-bottom: 18px;
}
.gl-error-state__title {
	font-size: 17px;
	font-weight: 700;
	margin-bottom: 8px;
}
.gl-error-state__desc {
	font-size: 13.5px;
	color: var(--muted);
	line-height: 1.7;
	max-width: 360px;
	margin-bottom: 24px;
}
.gl-error-state__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
	margin-bottom: 20px;
}
.gl-error-state__detail {
	margin-top: 8px;
	font-size: 12px;
	color: var(--subtle);
	max-width: 480px;
	text-align: left;
}
.gl-error-state__detail summary {
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--muted);
	margin-bottom: 8px;
	cursor: pointer;
}
.gl-error-state__detail summary::before {
	content: "▶";
	font-size: 9px;
	transition: transform 0.2s;
}
.gl-error-state__detail[open] summary::before {
	transform: rotate(90deg);
}
.gl-error-state__detail code {
	display: block;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
	padding: 8px 12px;
	font-family: "SF Mono", Consolas, monospace;
	font-size: 11.5px;
	color: var(--muted);
	word-break: break-all;
}

/* ════════════════════════════════════════
   SCROLLBAR
   ════════════════════════════════════════ */
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}
::-webkit-scrollbar-track {
	background: transparent;
}
::-webkit-scrollbar-thumb {
	background: var(--border2);
	border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
	background: var(--p-light);
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 768px) {
	.gl-page {
		padding: 20px 16px 52px;
	}
	.gl-topbar {
		flex-direction: column;
		gap: 14px;
	}
	.gl-topbar__right {
		width: 100%;
	}
	.gl-search,
	.gl-search__input {
		width: 100%;
	}
	.gl-search__input:focus {
		width: 100%;
	}
	.gl-fn-grid {
		grid-template-columns: 1fr;
	}
	.gl-lang-grid {
		grid-template-columns: 1fr 1fr;
	}
	.gl-detail {
		padding: 22px 20px;
	}
	.gl-detail__name {
		font-size: 24px;
	}
	.gl-header__hint {
		display: none;
	}
	.gl-header__btn {
		padding: 6px 11px;
		font-size: 12px;
	}
}
@media (max-width: 480px) {
	.gl-lang-grid {
		grid-template-columns: 1fr;
	}
	.gl-header__user {
		display: none;
	}
}

/* ════════════════════════════════════════
   LIST PAGE — SIDEBAR LAYOUT
   ════════════════════════════════════════ */

.gl-page--list {
	max-width: 1120px;
	margin: 0 auto;
}

/* ── LAYOUT WRAPPER ── */
.gl-list-layout {
	display: block; /* default: no sidebar */
}
.gl-list-layout--has-sidebar {
	display: grid;
	grid-template-columns: 220px 1fr;
	grid-template-areas: "sidebar content";
	gap: 0;
	align-items: start;
	position: relative;
}

/* ── CAT SIDEBAR ── */
.gl-cat-sidebar {
	grid-area: sidebar;
	position: sticky;
	top: calc(54px + 16px); /* header height + gap */
	max-height: calc(100vh - 54px - 32px);
	overflow-y: auto;
	background: var(--surface);
	border: 1.5px solid var(--border);
	border-radius: var(--r-lg);
	padding: 0 0 8px 0;
	flex-shrink: 0;
	margin-right: 20px;
}

.gl-cat-sidebar__header {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px 12px;
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	background: var(--surface);
	z-index: 1;
	border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.gl-cat-sidebar__header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.gl-cat-sidebar__title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: var(--p);
}
.gl-cat-sidebar__close {
	display: none; /* hidden desktop */
	background: none;
	border: none;
	color: var(--subtle);
	cursor: pointer;
	padding: 2px;
	border-radius: 5px;
	line-height: 1;
}
.gl-cat-sidebar__close:hover {
	color: var(--text);
	background: var(--bg);
}

/* ── VERSION ROW — di dalam header sidebar kategori ──
   Selector versi dokumentasi (mis. Python 3.9 / 3.11) sengaja
   ditaruh menempel di bawah judul kategori, dalam kartu kecil
   ber-tint teal, supaya user langsung sadar "pindah versi" itu
   berbeda dari "pindah fungsi" (daftar di bawahnya), tapi tetap
   satu konteks navigasi yang sama. */
.gl-cat-sidebar__version-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	/* background: var(--p-dim);
	border: 1px solid var(--border2);
	border-radius: var(--r-md);
	padding: 6px 8px; */
}
.gl-cat-sidebar__version-row_mobile {
	display: none;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.gl-cat-sidebar__version-label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--p-dark);
	flex-shrink: 0;
}
.gl-cat-sidebar__version-row .gl-version-select__input {
	font-size: 12px;
	flex: 1;
	min-width: 0;
}

/* ── CATEGORY NAV ITEMS ── */
.gl-cat-nav {
	display: flex;
	flex-direction: column;
	padding: 8px 8px;
	gap: 2px;
}
.gl-cat-nav__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	border-radius: var(--r-md);
	padding: 8px 10px;
	cursor: pointer;
	transition:
		background 0.12s,
		color 0.12s;
	color: var(--muted);
	font-size: 13px;
}
.gl-cat-nav__item:hover {
	background: var(--p-dim);
	color: var(--p-dark);
}
.gl-cat-nav__item.active {
	background: var(--p-dim);
	color: var(--p-dark);
	font-weight: 600;
}
.gl-cat-nav__item.active .gl-cat-nav__count {
	background: var(--p);
	color: #fff;
}
.gl-cat-nav__name {
	flex: 1;
	text-align: left;
	font-size: 12.5px;
	line-height: 1.4;
}
.gl-cat-nav__count {
	font-size: 11px;
	font-weight: 600;
	background: var(--bg);
	border: 1px solid var(--border);
	color: var(--subtle);
	border-radius: 100px;
	padding: 1px 7px;
	flex-shrink: 0;
	transition:
		background 0.12s,
		color 0.12s;
}

/* ── LIST CONTENT ── */
.gl-list-content {
	grid-area: content;
	min-width: 0;
}

/* ── LIST BAR ── */
.gl-list-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}
.gl-active-cat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	background: var(--p-dim);
	color: var(--p-dark);
	border: 1.5px solid var(--border2);
	border-radius: 100px;
	padding: 3px 10px 3px 12px;
}
.gl-active-cat__clear {
	display: inline-flex;
	align-items: center;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--p);
	padding: 0;
	font-size: 14px;
	line-height: 1;
}
.gl-active-cat__clear:hover {
	color: var(--p-dark);
}

/* ── FILTER TOGGLE (mobile) ── */
.gl-filter-toggle {
	display: none;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	background: var(--surface);
	border: 1.5px solid var(--border2);
	border-radius: var(--r-md);
	padding: 6px 12px;
	cursor: pointer;
	color: var(--p-dark);
	position: relative;
	transition:
		background 0.12s,
		border-color 0.12s;
}
.gl-filter-toggle:hover {
	background: var(--p-dim);
	border-color: var(--p);
}
.gl-filter-toggle__badge {
	position: absolute;
	top: -5px;
	right: -5px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--p);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ── OVERLAY (mobile) ── */
.gl-sidebar-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 299;
	backdrop-filter: blur(2px);
}
.gl-sidebar-overlay.active {
	display: block;
}

/* Scrollbar sidebar */
.gl-cat-sidebar::-webkit-scrollbar {
	width: 4px;
}
.gl-cat-sidebar::-webkit-scrollbar-track {
	background: transparent;
}
.gl-cat-sidebar::-webkit-scrollbar-thumb {
	background: var(--border2);
	border-radius: 2px;
}

/* ════════════════════════════════════════
   RESPONSIVE — LIST PAGE
   ════════════════════════════════════════ */
@media (max-width: 860px) {
	/* Sidebar jadi drawer dari bawah */
	.gl-list-layout--has-sidebar {
		display: block; /* kembali single column */
	}

	.gl-filter-toggle {
		display: inline-flex;
	}
	.gl-cat-sidebar__version-row_mobile {
		display: inline-flex;
	}

	.gl-version-select_mobile {
		display: inline-flex;
	}

	.gl-cat-sidebar {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		top: auto;
		max-height: 75vh;
		border-radius: var(--r-xl) var(--r-xl) 0 0;
		border: none;
		border-top: 1.5px solid var(--border);
		box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
		z-index: 300;
		transform: translateY(100%);
		transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
		margin-right: 0;
		/* grid: sticky → fixed override */
		top: auto !important;
		max-height: 75vh !important;
		overflow-y: auto;
	}
	.gl-cat-sidebar.open {
		transform: translateY(0);
	}
	.gl-cat-sidebar__close {
		display: flex;
	}

	/* Nav horizontal scroll di mobile */
	.gl-cat-nav {
		flex-direction: row;
		flex-wrap: wrap;
		padding: 12px 10px;
		gap: 6px;
	}
	.gl-cat-nav__item {
		flex: 0 0 auto;
		width: auto;
		border: 1.5px solid var(--border);
		border-radius: 100px;
		padding: 6px 14px;
		font-size: 12.5px;
	}
	.gl-cat-nav__item.active {
		border-color: var(--p);
	}
	.gl-cat-nav__count {
		display: none;
	} /* sembunyikan count di chip mobile */
}

@media (max-width: 640px) {
	.gl-fn-grid {
		grid-template-columns: 1fr;
	}
	.gl-search__input {
		width: 100%;
	}
	.gl-search__input:focus {
		width: 100%;
	}
}

/* ═══════════════════════════════════════════════════════════
   HOME PAGE — ADDITIONS
   ═══════════════════════════════════════════════════════════ */

.gl-display-lang {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 18px;
}
.gl-display-lang__label {
	font-size: 11.5px;
	color: var(--subtle);
	font-weight: 500;
}
.gl-lang-toggle--sm {
	transform: scale(0.92);
	transform-origin: right center;
	opacity: 0.85;
}
.gl-lang-toggle--sm:hover {
	opacity: 1;
}

.gl-topbar--hero {
	margin-bottom: 20px;
}
.gl-topbar--hero .gl-title {
	font-size: 24px;
}

.gl-hero-search {
	position: relative;
	margin-bottom: 28px;
}
.gl-search--hero {
	width: 100%;
}
.gl-search__input--hero {
	width: 100%;
	padding: 13px 44px 13px 42px;
	font-size: 14.5px;
	border-radius: var(--r-lg);
	border: 1.5px solid var(--border2);
	box-shadow: 0 2px 10px rgba(0, 105, 92, 0.06);
}
.gl-search--hero .gl-search__icon {
	left: 15px;
}
.gl-search--hero .gl-search__icon svg {
	width: 17px;
	height: 17px;
}
.gl-search__input--hero:focus {
	width: 100%;
	box-shadow: 0 0 0 4px var(--p-dim);
}

.gl-hero-search__spinner {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 15px;
	height: 15px;
	border: 2px solid var(--border2);
	border-top-color: var(--p);
	border-radius: 50%;
	animation: gl-spin 0.6s linear infinite;
}
@keyframes gl-spin {
	to {
		transform: translateY(-50%) rotate(360deg);
	}
}

.gl-search-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: var(--surface);
	border: 1.5px solid var(--border2);
	border-radius: var(--r-lg);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
	overflow: hidden;
	z-index: 150;
}
.gl-search-dropdown__list {
	max-height: 320px;
	overflow-y: auto;
}
.gl-search-dropdown__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	font-size: 13.5px;
	color: var(--text);
	border-bottom: 1px solid var(--bg);
	transition: background 0.1s;
}
.gl-search-dropdown__item:last-child {
	border-bottom: none;
}
.gl-search-dropdown__item:hover,
.gl-search-dropdown__item.active {
	background: var(--p-dim);
}
.gl-search-dropdown__item-name {
	font-family: "SF Mono", "Fira Code", Consolas, monospace;
	font-weight: 600;
	color: var(--p-dark);
	flex: 1;
}
.gl-search-dropdown__item-meta {
	font-size: 11px;
	color: var(--subtle);
	flex-shrink: 0;
}
.gl-search-dropdown__empty {
	padding: 16px 16px 4px;
	font-size: 13px;
	color: var(--subtle);
	text-align: center;
	line-height: 1.6;
}
.gl-search-dropdown__hint {
	font-size: 11.5px;
	color: var(--subtle);
}
.gl-search-dropdown__fallback {
	padding: 4px 0 8px;
}
.gl-search-dropdown__seeall {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--p-dark);
	background: var(--surface2);
	border-top: 1px solid var(--border);
}
.gl-search-dropdown__seeall:hover {
	background: var(--p-dim);
}

.gl-popular {
	margin-bottom: 28px;
}
.gl-popular__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.gl-popular__chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 14px;
	border-radius: 100px;
	border: 1.5px solid var(--border);
	background: var(--surface);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--muted);
	transition:
		border-color 0.12s,
		color 0.12s,
		background 0.12s;
}
.gl-popular__chip:hover {
	border-color: var(--p);
	color: var(--p-dark);
	background: var(--p-dim);
}
.gl-popular__chip-name {
	font-family: "SF Mono", "Fira Code", Consolas, monospace;
}

.gl-lang-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 7px;
	flex-shrink: 0;
}
.gl-lang-card__icon--excel {
	background: #ede7f6;
	color: #5c6bc0;
}
.gl-lang-card__icon--mysql {
	background: #fff3e0;
	color: #e65100;
}
.gl-lang-card__icon--r {
	background: #e3f2fd;
	color: #1565c0;
}
.gl-lang-card__icon--python {
	background: #f3e5f5;
	color: #6a1b9a;
}

.gl-lang-card--top {
	border-color: var(--p);
	box-shadow: 0 4px 16px var(--p-glow);
}
.gl-lang-card__top-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #fff;
	background: var(--p);
	padding: 3px 9px;
	border-radius: 100px;
}

@media (max-width: 768px) {
	.gl-display-lang {
		justify-content: flex-start;
	}
	.gl-search__input--hero {
		font-size: 14px;
		padding: 11px 40px 11px 38px;
	}
	.gl-topbar--hero .gl-title {
		font-size: 20px;
	}
}

.gl-search__kbd {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-family: "SF Mono", Consolas, monospace;
	font-size: 11px;
	font-weight: 600;
	color: var(--subtle);
	background: var(--bg);
	border: 1px solid var(--border2);
	border-radius: 5px;
	padding: 2px 7px;
	pointer-events: none;
}
@media (max-width: 768px) {
	.gl-search__kbd {
		display: none;
	}
}

.gl-recent {
	margin-bottom: 28px;
}
.gl-recent__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}
.gl-recent__clear {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--subtle);
	background: none;
	border: none;
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 5px;
	transition: color 0.12s;
}
.gl-recent__clear:hover {
	color: var(--p-dark);
	background: var(--p-dim);
}

#js-top-loading-bar {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0%;
	background: linear-gradient(90deg, var(--p) 0%, var(--a) 100%);
	z-index: 999;
	opacity: 0;
	transition:
		width 0.3s ease,
		opacity 0.2s;
}
#js-top-loading-bar.loading {
	width: 80%;
	opacity: 1;
	transition:
		width 6s cubic-bezier(0.1, 0.5, 0.1, 1),
		opacity 0.2s;
}

/* ── LIST PAGE — empty search state fallback ── */
.gl-error-state__fallback {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--border);
	width: 100%;
	max-width: 480px;
}
.gl-error-state__fallback-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--subtle);
	margin-bottom: 12px;
	text-align: center;
}
.gl-error-state__fallback .gl-popular__chips {
	justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   SEARCH RESULTS PAGINATION
   ═══════════════════════════════════════════════════════════ */

.gl-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
}

.gl-pagination__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--p-dark);
	background: var(--surface);
	border: 1.5px solid var(--border2);
	border-radius: var(--r-md);
	padding: 7px 14px;
	cursor: pointer;
	transition:
		background 0.12s,
		border-color 0.12s,
		color 0.12s;
	white-space: nowrap;
}
.gl-pagination__btn:hover:not(.disabled) {
	background: var(--p-dim);
	border-color: var(--p);
}
.gl-pagination__btn.disabled {
	color: var(--subtle);
	border-color: var(--border);
	background: var(--bg);
	cursor: not-allowed;
	pointer-events: none;
	opacity: 0.6;
}

.gl-pagination__pages {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0 4px;
}
.gl-pagination__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--muted);
	background: transparent;
	border: 1.5px solid transparent;
	border-radius: var(--r-md);
	cursor: pointer;
	transition:
		background 0.12s,
		color 0.12s,
		border-color 0.12s;
}
.gl-pagination__page:hover:not(.active) {
	background: var(--p-dim);
	color: var(--p-dark);
	border-color: var(--border2);
}
.gl-pagination__page.active {
	background: var(--p);
	color: #fff;
	box-shadow: 0 1px 4px var(--p-glow);
	cursor: default;
}
.gl-pagination__ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 32px;
	color: var(--subtle);
	font-size: 13px;
	user-select: none;
}

@media (max-width: 480px) {
	.gl-pagination {
		gap: 4px;
	}
	.gl-pagination__btn span:last-child {
		display: none;
	}
	.gl-pagination__btn {
		padding: 7px 10px;
	}
	.gl-pagination__page {
		min-width: 28px;
		height: 28px;
		font-size: 12px;
	}
}

/* ═══════════════════════════════════════════════════════════
   LAZY CATEGORY LOADING — /ensiklopedia/language/{slug}
   ═══════════════════════════════════════════════════════════ */

.gl-fn-card--skeleton {
	cursor: default;
	pointer-events: none;
	gap: 8px;
}
.gl-fn-card--skeleton:hover {
	border-color: var(--border);
	box-shadow: none;
	transform: none;
}

.gl-skeleton {
	display: block;
	border-radius: 5px;
	background: linear-gradient(
		90deg,
		var(--bg) 25%,
		var(--border) 50%,
		var(--bg) 75%
	);
	background-size: 200% 100%;
	animation: gl-shimmer 1.4s ease-in-out infinite;
}
.gl-skeleton--title {
	width: 60%;
	height: 15px;
}
.gl-skeleton--line {
	width: 100%;
	height: 11px;
	margin-bottom: 6px;
}
.gl-skeleton--chip {
	width: 68px;
	height: 18px;
	border-radius: var(--r-sm);
}

@keyframes gl-shimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gl-skeleton {
		animation: none;
		background: var(--border);
	}
}

.gl-lazy-prompt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 64px 24px;
	color: var(--subtle);
	text-align: center;
}
.gl-lazy-prompt .iconify {
	opacity: 0.5;
}
.gl-lazy-prompt p {
	font-size: 13.5px;
	max-width: 320px;
	line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   DETAIL PAGE — FUNCTION SIDEBAR ("fungsi lain di kategori ini")
   Reuses .gl-cat-sidebar / .gl-cat-nav / .gl-sidebar-overlay /
   .gl-filter-toggle so mobile drawer behavior stays consistent
   with the /ensiklopedia/language/{slug} list page.
   ═══════════════════════════════════════════════════════════ */

.gl-page--detail-wide {
	max-width: 1120px;
}

.gl-detail-layout {
	display: block;
}
.gl-detail-layout--has-sidebar {
	display: grid;
	grid-template-columns: 220px 1fr;
	grid-template-areas: "sidebar content";
	gap: 0;
	align-items: start;
}
.gl-detail-layout--has-sidebar .gl-fn-sidebar {
	grid-area: sidebar;
}

/* Wrapper baru: menaungi count-bar + card detail, duduk di grid-area
   "content". Menggantikan aturan lama yang menaruh grid-area langsung
   di .gl-detail, supaya count-bar ikut sejajar dengan card di kolom
   yang sama. */
.gl-detail-layout--has-sidebar .gl-detail-content {
	grid-area: content;
	max-width: 860px;
	margin: 0 auto;
	width: 100%;
}

/* Total fungsi di kategori ini — tampil di atas .gl-detail,
   diisi via JS begitu sidebar selesai fetch daftar fungsi. */
.gl-fn-count-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--p-dark);
	/* background: var(--p-dim); */
	/* border: 1.5px solid var(--border2); */
	/* border-radius: var(--r-md); */
	/* padding: 8px 14px; */
	margin-bottom: 12px;
}
.gl-fn-count-bar .iconify {
	color: var(--p);
	flex-shrink: 0;
}

.gl-fn-nav__item {
	cursor: pointer;
}
.gl-fn-nav__name {
	font-family: "SF Mono", "Fira Code", Consolas, monospace;
	font-size: 12.5px;
}
.gl-fn-nav__item--skeleton {
	cursor: default;
	pointer-events: none;
	padding: 10px;
}
.gl-fn-sidebar__empty {
	padding: 16px 12px;
	font-size: 12.5px;
	color: var(--subtle);
	text-align: center;
	line-height: 1.6;
}

@media (max-width: 860px) {
	.gl-detail-layout--has-sidebar {
		display: block;
	}
	.gl-detail-layout--has-sidebar .gl-detail-content {
		max-width: none;
		margin: 0;
	}
}

/* ═══════════════════════════════════════════════════════════
   VERSION SELECT — dropdown ganti versi dokumentasi
   Dipakai baik di dalam header sidebar kategori (desktop/mobile
   drawer) maupun sebagai fallback di gl-detail__meta saat fungsi
   tidak punya kategori/sidebar valid.
   ═══════════════════════════════════════════════════════════ */
.gl-version-select {
	display: inline-flex;
	align-items: center;
	width: 86%;
}
.gl-version-select_mobile {
	display: none;
	align-items: center;
}
.gl-version-select__input {
	appearance: none;
	-webkit-appearance: none;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--p-dark);
	background: var(--surface2)
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24'><path fill='%2300695c' d='M7 10l5 5 5-5z'/></svg>")
		no-repeat right 8px center;
	background-size: 12px;
	border: 1.5px solid var(--border2);
	border-radius: var(--r-sm);
	padding: 3px 24px 3px 10px;
	cursor: pointer;
	transition:
		border-color 0.12s,
		background-color 0.12s;
}
.gl-version-select__input_mobile {
	appearance: none;
	-webkit-appearance: none;
	font-size: 13px;
	font-weight: 600;
	color: var(--p-dark);
	background: white
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24'><path fill='%2300695c' d='M7 10l5 5 5-5z'/></svg>")
		no-repeat right 8px center;
	background-size: 12px;
	border: 1.5px solid var(--border2);
	border-radius: var(--r-md);
	padding: 6px 22px 9px 12px;
	cursor: pointer;
	transition:
		border-color 0.12s,
		background-color 0.12s;
}
.gl-version-select__input_mobile:hover {
	border-color: var(--p);
	background-color: var(--p-dim);
}
.gl-version-select__input:hover {
	border-color: var(--p);
	background-color: var(--p-dim);
}
.gl-version-select__input_mobile:focus {
	outline: none;
	border-color: var(--p);
	box-shadow: 0 0 0 3px var(--p-dim);
}
.gl-version-select__input:focus {
	outline: none;
	border-color: var(--p);
	box-shadow: 0 0 0 3px var(--p-dim);
}

@media (max-width: 860px) {
	.gl-cat-sidebar__version-row_mobile {
		display: inline-flex;
	}

	.gl-version-select_mobile {
		display: inline-flex;
	}
}
