/* ==========================================================================
   Gopath Student Dashboard (v2.1) — cards, rows, slider, CYO, footer.
   Uses the portal theme tokens from gep-theme.css so light/dark both work.
   ========================================================================== */

#gep-page-wrapper .gh-home {
	--gh-accent: var(--gep-c-accent, #4f46e5);
	--gh-accent-2: #7c3aed;
	--gh-ok: #059669;
	--gh-bad: #dc2626;
	--gh-radius: 16px;
	--gh-gap: 16px;
	max-width: 1280px;
	margin: 0 auto;
	padding: 18px 20px 40px;
	color: var(--gep-c-text);
	box-sizing: border-box;
}
#gep-page-wrapper .gh-home *, #gep-page-wrapper .gh-home *::before, #gep-page-wrapper .gh-home *::after { box-sizing: border-box; }
.gh-muted { color: var(--gep-c-text-muted) !important; }
.gh-empty { padding: 28px; text-align: center; color: var(--gep-c-text-muted); background: var(--gep-c-surface); border: 1px dashed var(--gep-c-border-strong); border-radius: var(--gh-radius); }

/* ── Fixed header (sticky) + logo + live search ─────────────────────────── */
#gep-page-wrapper .gep-dashboard-header {
	position: sticky !important;
	top: 0 !important;
	z-index: 900 !important;
	gap: 14px;
}
.gh-header-logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.gh-header-logo img { height: 34px; width: auto; max-width: 140px; object-fit: contain; display: block; }
.gep-header-search { position: relative; }
.gep-header-search form { position: relative; }
.gh-search-results {
	position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 280px;
	max-height: min(70vh, 460px); overflow-y: auto;
	background: var(--gep-c-surface); color: var(--gep-c-text);
	border: 1px solid var(--gep-c-border-strong); border-radius: 14px;
	box-shadow: 0 16px 40px rgba(15, 23, 42, .18); z-index: 950; padding: 6px;
}
.gh-search-results[hidden] { display: none !important; }
.gh-search-group { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gep-c-text-faint); padding: 8px 10px 4px; }
.gh-search-item { display: block; padding: 9px 10px; border-radius: 10px; color: var(--gep-c-text) !important; text-decoration: none !important; font-weight: 600; font-size: 14px; }
.gh-search-item:hover, .gh-search-item.is-active { background: var(--gep-c-surface-3); }
.gh-search-empty { padding: 14px; color: var(--gep-c-text-muted); font-size: 14px; }
@media (max-width: 640px) {
	.gh-header-logo img { height: 28px; max-width: 96px; }
	.gh-search-results { position: fixed; top: 58px; left: 8px; right: 8px; min-width: 0; }
}

/* ── Sections ───────────────────────────────────────────────────────────── */
.gh-section { margin: 0 0 30px; }
.gh-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.gh-section-title { margin: 0 !important; font-size: 20px !important; font-weight: 800 !important; line-height: 1.3; color: var(--gep-c-text) !important; }
.gh-section-sub { margin: 4px 0 0 !important; font-size: 13px; color: var(--gep-c-text-muted) !important; }
.gh-section-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.gh-arrow {
	width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--gep-c-border-strong);
	background: var(--gep-c-surface); color: var(--gep-c-text); font-size: 20px; line-height: 1; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.gh-arrow:hover { border-color: var(--gh-accent); color: var(--gh-accent); }
.gh-viewall { font-weight: 700; font-size: 14px; color: var(--gh-accent) !important; text-decoration: none !important; white-space: nowrap; padding: 6px 4px; }
.gh-viewall:hover { text-decoration: underline !important; }

/* Horizontal row: exactly 3 cards visible on desktop, swipe for more */
.gh-row {
	display: grid; grid-auto-flow: column;
	grid-auto-columns: calc((100% - 2 * var(--gh-gap)) / 3);
	gap: var(--gh-gap); overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 2px 2px 10px;
	scrollbar-width: thin;
}
.gh-row > * { scroll-snap-align: start; min-width: 0; }
.gh-row-single { grid-auto-columns: minmax(0, 520px); }
.gh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gh-gap); }
@media (max-width: 1024px) {
	.gh-row { grid-auto-columns: calc((100% - var(--gh-gap)) / 2); }
	.gh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	#gep-page-wrapper .gh-home { padding: 12px 12px 90px; --gh-gap: 12px; }
	.gh-row { grid-auto-columns: 80%; }
	.gh-row-single { grid-auto-columns: 100%; }
	.gh-grid { grid-template-columns: 1fr; }
	.gh-arrow { display: none; }
	.gh-section-title { font-size: 17px !important; }
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.gh-card {
	display: flex; flex-direction: column; background: var(--gep-c-surface);
	border: 1px solid var(--gep-c-border); border-radius: var(--gh-radius);
	overflow: hidden; box-shadow: var(--gep-c-shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	height: 100%;
}
.gh-card:hover { transform: translateY(-3px); border-color: var(--gh-accent); }
.gh-card-thumb {
	position: relative; display: flex; align-items: center; justify-content: center;
	aspect-ratio: 16 / 8; background: linear-gradient(135deg, #eef2ff, #f5f3ff);
	text-decoration: none !important; overflow: hidden;
}
:root[data-gep-theme="dark"] .gh-card-thumb { background: linear-gradient(135deg, #1e1b4b, #2e1065); }
@media (prefers-color-scheme: dark) { :root:not([data-gep-theme="light"]) .gh-card-thumb { background: linear-gradient(135deg, #1e1b4b, #2e1065); } }
.gh-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gh-card-icon { font-size: 40px; }
.gh-badge { position: absolute; top: 10px; left: 10px; background: var(--gh-ok); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; }
.gh-badge-owned { background: var(--gh-accent); }
.gh-card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.gh-card-title { margin: 0 !important; font-size: 16px !important; font-weight: 700 !important; line-height: 1.35 !important; color: var(--gep-c-text) !important;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gh-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: 13px; }
.gh-card-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--gep-c-text-muted); font-weight: 600; }
.gh-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--gep-c-border); }
.gh-card-price { font-size: 13px; min-width: 0; }
.gh-price { font-size: 18px; font-weight: 800; color: var(--gep-c-text); }
.gh-free, .gh-owned { color: var(--gh-ok) !important; font-size: 16px; }
.gh-mrp { color: var(--gep-c-text-faint); font-size: 13px; }
.gh-off { color: var(--gh-ok); font-weight: 800; font-size: 12px; }
.gh-card-special { border: 2px solid #f59e0b; }

/* Buttons */
.gh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 9px 16px; border-radius: 10px; border: 0; cursor: pointer;
	background: linear-gradient(135deg, var(--gh-accent), var(--gh-accent-2)); color: #fff !important;
	font-weight: 700; font-size: 14px; text-decoration: none !important; white-space: nowrap; line-height: 1.2;
	transition: filter .15s ease, transform .15s ease;
}
.gh-btn:hover { filter: brightness(1.08); }
.gh-btn:disabled, .gh-btn-disabled { background: var(--gep-c-surface-3) !important; color: var(--gep-c-text-faint) !important; cursor: not-allowed; }
.gh-btn-buy { background: linear-gradient(135deg, #059669, #10b981); }
.gh-btn-ghost { background: transparent; color: var(--gh-accent) !important; border: 1px solid var(--gh-accent); }
.gh-btn-block { width: 100%; margin-top: 6px; }
.gh-btn-lg { padding: 13px 22px; font-size: 16px; }

/* ── Slider ─────────────────────────────────────────────────────────────── */
.gh-slider { position: relative; margin: 0 0 22px; border-radius: 20px; overflow: hidden; background: var(--gep-c-surface-3); aspect-ratio: 3 / 1; }
@media (max-width: 640px) { .gh-slider { aspect-ratio: 16 / 8; border-radius: 14px; } }
.gh-slides { position: relative; width: 100%; height: 100%; }
.gh-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; text-decoration: none !important; display: block; }
.gh-slide.is-active { opacity: 1; visibility: visible; }
.gh-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gh-slide-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 24px 20px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); display: flex; flex-direction: column; gap: 4px; }
.gh-slide-text strong { font-size: clamp(18px, 2.4vw, 28px); font-weight: 800; color: #fff; }
.gh-slide-text span { font-size: 14px; color: rgba(255,255,255,.9); }
.gh-slide-text-solid { inset: 0; justify-content: center; background: linear-gradient(135deg, var(--gep-c-accent, #4f46e5), #7c3aed); }
.gh-slider-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); color: #fff; font-size: 24px; cursor: pointer; z-index: 2; }
.gh-prev { left: 12px; } .gh-next { right: 12px; }
.gh-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.gh-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255,255,255,.55); cursor: pointer; transition: width .2s; }
.gh-dots button.is-active { width: 22px; background: #fff; }

/* ── Welcome ────────────────────────────────────────────────────────────── */
.gh-welcome { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 24px; }
.gh-welcome h1 { margin: 0 0 4px !important; font-size: clamp(22px, 3vw, 30px) !important; font-weight: 800 !important; color: var(--gep-c-text) !important; }
.gh-welcome p { margin: 0 !important; color: var(--gep-c-text-muted) !important; }
.gh-welcome-stats { display: flex; gap: 10px; }
.gh-welcome-stats a:not(.gh-btn) { display: flex; flex-direction: column; padding: 10px 16px; border-radius: 12px; background: var(--gep-c-surface); border: 1px solid var(--gep-c-border); text-decoration: none !important; color: var(--gep-c-text) !important; }
.gh-welcome-stats strong { font-size: 18px; }
.gh-welcome-stats span { font-size: 12px; color: var(--gep-c-text-muted); font-weight: 600; }

/* ── Resume ─────────────────────────────────────────────────────────────── */
.gh-resume { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--gh-radius); background: var(--gep-c-surface); border: 1px solid var(--gep-c-border); box-shadow: var(--gep-c-shadow); }
.gh-resume-main { flex: 1 1 320px; min-width: 0; }
.gh-resume-main h3 { margin: 6px 0 10px !important; font-size: 18px !important; font-weight: 800 !important; color: var(--gep-c-text) !important; }
.gh-pill { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 3px 10px; border-radius: 99px; background: #fef3c7; color: #92400e; }
.gh-progress { height: 8px; background: var(--gep-c-surface-3); border-radius: 99px; overflow: hidden; }
.gh-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gh-accent), var(--gh-accent-2)); border-radius: 99px; }
.gh-resume-meta { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--gep-c-text-muted); }
.gh-resume-meta strong { color: var(--gep-c-text); }
.gh-resume-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Results ────────────────────────────────────────────────────────────── */
.gh-result .gh-muted { margin: 0; font-size: 13px; }
.gh-score { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; background: var(--gep-c-surface-2); border-radius: 12px; text-align: center; }
.gh-score strong { font-size: 18px; color: var(--gep-c-text); }
.gh-score span { font-size: 12px; color: var(--gep-c-text-muted); margin-left: 2px; }
.gh-score small { display: block; font-size: 11px; color: var(--gep-c-text-faint); font-weight: 700; text-transform: uppercase; }
.gh-result-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 13px; font-weight: 600; color: var(--gep-c-text-muted); }
.gh-result-stats .ok { color: var(--gh-ok); }
.gh-result-stats .bad { color: var(--gh-bad); }

/* ── Page heads / misc ──────────────────────────────────────────────────── */
.gh-page-head { margin: 0 0 20px; }
.gh-page-head h1 { margin: 6px 0 4px !important; font-size: clamp(22px, 3vw, 28px) !important; font-weight: 800 !important; color: var(--gep-c-text) !important; }
.gh-back { font-size: 14px; font-weight: 700; color: var(--gh-accent) !important; text-decoration: none !important; }
.gh-date-tag { font-size: 12px; font-weight: 800; color: var(--gep-c-text-muted); margin: 0 0 6px; }
.gh-date-tag.is-today { color: #b45309; }
.gh-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; background: #eef2ff; color: #3730a3; font-weight: 600; margin: 0 0 18px; }
.gh-notice-bad { background: #fef2f2; color: #991b1b; }

/* ── CYO ────────────────────────────────────────────────────────────────── */
.gh-cyo-owned { display: flex; gap: 10px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 4px; }
.gh-cyo-owned-item { flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; background: #ecfdf5; border: 1px solid #a7f3d0; text-decoration: none !important; color: #065f46 !important; font-size: 13px; }
.gh-cyo-owned-item em { font-style: normal; font-weight: 800; }
.gh-pkg-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.gh-pkg .gh-pkg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gh-pkg-stats > div { padding: 10px 12px; background: var(--gep-c-surface); border: 1px solid var(--gep-c-border); border-radius: 12px; }
.gh-pkg-stats dt { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--gep-c-text-faint); }
.gh-pkg-stats dd { margin: 2px 0 0; font-size: 17px; font-weight: 800; color: var(--gep-c-text); }
.gh-pkg-stats dd.ok { color: var(--gh-ok); } .gh-pkg-stats dd.bad { color: var(--gh-bad); }
@media (max-width: 640px) { .gh-pkg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.gh-buy, .gh-builder { background: var(--gep-c-surface); border: 1px solid var(--gep-c-border); border-radius: 18px; padding: 20px; box-shadow: var(--gep-c-shadow); }
.gh-buy fieldset { border: 0; margin: 0 0 18px; padding: 0; }
.gh-buy legend { font-weight: 800; font-size: 15px; margin-bottom: 10px; color: var(--gep-c-text); }
.gh-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.gh-chip input { position: absolute; opacity: 0; pointer-events: none; }
.gh-chip span { display: inline-block; padding: 10px 16px; border-radius: 12px; border: 2px solid var(--gep-c-border-strong); font-weight: 700; cursor: pointer; background: var(--gep-c-surface-2); color: var(--gep-c-text); }
.gh-chip input:checked + span { border-color: var(--gh-accent); background: var(--gh-accent); color: #fff; }
.gh-chip input:focus-visible + span { outline: 3px solid var(--gh-accent); outline-offset: 2px; }
.gh-chip.is-unavailable span { opacity: .45; text-decoration: line-through; }
.gh-buy-foot, .gh-builder-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--gep-c-border); padding-top: 16px; }
.gh-buy-price { font-size: 28px; font-weight: 900; color: var(--gep-c-text); }
.gh-builder-msg { font-weight: 700; font-size: 14px; color: var(--gh-bad); min-height: 20px; flex: 1 1 240px; }
.gh-builder-msg.ok { color: var(--gh-ok); }

.gh-builder-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.gh-builder-head h2 { margin: 0 0 4px !important; font-size: 19px !important; color: var(--gep-c-text) !important; }
.gh-builder-head p { margin: 0; font-size: 13px; max-width: 640px; }
.gh-total { font-size: 30px; font-weight: 900; color: var(--gh-accent); text-align: right; line-height: 1; }
.gh-total small { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--gep-c-text-faint); margin-top: 4px; }
.gh-total.over { color: var(--gh-bad); }
.gh-topic-table { border: 1px solid var(--gep-c-border); border-radius: 14px; overflow: hidden; margin-bottom: 16px; max-height: 60vh; overflow-y: auto; }
.gh-topic-row { display: grid; grid-template-columns: 1fr 90px 140px; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--gep-c-border); }
.gh-topic-row:last-child { border-bottom: 0; }
.gh-topic-headrow { position: sticky; top: 0; z-index: 1; background: var(--gep-c-surface-2); font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--gep-c-text-faint); }
.gh-topic-row.is-sub .gh-topic-name { padding-left: calc(var(--depth, 1) * 18px); font-weight: 500; }
.gh-topic-name { font-weight: 700; min-width: 0; }
.gh-topic-avail { font-weight: 700; color: var(--gep-c-text-muted); }
.gh-topic-row.is-empty { opacity: .5; }
.gh-topic-row input { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--gep-c-field-border); background: var(--gep-c-field); color: var(--gep-c-field-text); font-weight: 700; font-size: 15px; }
.gh-topic-row input.is-invalid { border-color: var(--gh-bad); box-shadow: 0 0 0 2px rgba(220,38,38,.2); }
@media (max-width: 640px) { .gh-topic-row { grid-template-columns: 1fr 64px 90px; padding: 10px; } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.gh-footer { margin-top: 30px; background: var(--gep-c-surface); border-top: 1px solid var(--gep-c-border); color: var(--gep-c-text); }
.gh-footer-inner { max-width: 1280px; margin: 0 auto; padding: 28px 20px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.gh-footer-brand img { height: 38px; width: auto; }
.gh-footer-brand p { color: var(--gep-c-text-muted); font-size: 14px; margin: 10px 0 0; max-width: 420px; }
.gh-footer h4 { margin: 0 0 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--gep-c-text-faint); }
.gh-footer-links { display: flex; flex-direction: column; gap: 6px; }
.gh-footer-links a { color: var(--gep-c-text) !important; text-decoration: none !important; font-weight: 600; font-size: 14px; }
.gh-footer-links a:hover { color: var(--gep-c-accent) !important; }
.gh-footer-social div { display: flex; gap: 10px; flex-wrap: wrap; }
.gh-footer-social a { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--gep-c-surface-3); color: var(--gep-c-text) !important; }
.gh-footer-social a:hover { background: var(--gep-c-accent); color: #fff !important; }
.gh-footer-copy { text-align: center; padding: 12px 20px 16px; font-size: 13px; color: var(--gep-c-text-faint); border-top: 1px solid var(--gep-c-border); }
@media (max-width: 768px) { .gh-footer-inner { grid-template-columns: 1fr 1fr; } .gh-footer-brand { grid-column: 1 / -1; } .gh-footer { padding-bottom: 70px; } }

/* ── Floating WhatsApp ──────────────────────────────────────────────────── */
.gh-wa-float {
	position: fixed; right: 18px; bottom: 18px; z-index: 9990;
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px 12px 12px;
	border-radius: 999px; background: #25d366; color: #fff !important; text-decoration: none !important;
	font-weight: 800; box-shadow: 0 10px 30px rgba(37, 211, 102, .45);
	bottom: max(18px, env(safe-area-inset-bottom));
}
.gh-wa-float:hover { filter: brightness(1.05); transform: translateY(-2px); }
@media (max-width: 640px) { .gh-wa-label { display: none; } .gh-wa-float { padding: 12px; right: 14px; } }

@media (prefers-reduced-motion: reduce) {
	.gh-slide, .gh-card, .gh-row { transition: none !important; scroll-behavior: auto !important; }
}
