/**
 * PathwayAI Pro — Home chrome DNA for every student panel page.
 * Source of truth: assets/home_cinematic.css (dark nav + CTAs).
 *
 * Applies to: page-os-shell student pages + public home.
 * Excludes: Learning World HUD, auth/login, admin-panel-body.
 * Does NOT force transparent cards / particle-only surfaces (those stay home-only).
 */

/* ── Scope helper ── */
body.dark.page-os-shell:not(.learning-world-page):not(.page-learning-world):not(.pathway-auth-page):not(.pathway-login-page):not(.admin-panel-body),
body.dark.page-public-home.home-cinematic {
    --home-chrome-nav-bg: rgba(5, 8, 16, 0.72);
    --home-chrome-nav-border: rgba(59, 130, 246, 0.22);
}

/* ── Topbar — exact home glass ── */
body.dark.page-os-shell:not(.learning-world-page):not(.page-learning-world):not(.pathway-auth-page):not(.pathway-login-page):not(.admin-panel-body) .topbar.topbar-pro,
body.dark.page-os-shell:not(.learning-world-page):not(.page-learning-world):not(.pathway-auth-page):not(.pathway-login-page):not(.admin-panel-body) .topbar,
body.dark.page-public-home.home-cinematic .topbar.topbar-pro,
body.dark.page-public-home.home-cinematic .topbar {
    background: rgba(5, 8, 16, 0.72) !important;
    backdrop-filter: blur(16px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(160%) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.22) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45) !important;
}

/* ── Nav links — home glow pills ── */
body.dark.page-os-shell:not(.learning-world-page):not(.page-learning-world):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-link:not(.nav-link--drawer),
body.dark.page-public-home.home-cinematic .topbar .nav-link:not(.nav-link--drawer) {
    color: rgba(248, 250, 252, 0.88) !important;
    -webkit-text-fill-color: rgba(248, 250, 252, 0.88) !important;
    text-shadow: 0 0 14px rgba(59, 130, 246, 0.35) !important;
    border-radius: 999px !important;
    border: 1px solid transparent !important;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

body.dark.page-os-shell:not(.learning-world-page):not(.page-learning-world):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-link:not(.nav-link--drawer):hover,
body.dark.page-public-home.home-cinematic .topbar .nav-link:not(.nav-link--drawer):hover {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: rgba(37, 99, 235, 0.22) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.35) !important;
}

body.dark.page-os-shell:not(.learning-world-page):not(.page-learning-world):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-link.active:not(.nav-link--drawer),
body.dark.page-os-shell:not(.learning-world-page):not(.page-learning-world):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-dropdown__summary--active,
body.dark.page-public-home.home-cinematic .topbar .nav-link.active:not(.nav-link--drawer) {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: rgba(37, 99, 235, 0.42) !important;
    border-color: rgba(96, 165, 250, 0.5) !important;
    box-shadow: 0 0 26px rgba(59, 130, 246, 0.55) !important;
}

/* Brand */
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .brand,
body.dark.page-public-home.home-cinematic .topbar .brand {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
}

body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .brand small,
body.dark.page-public-home.home-cinematic .topbar .brand small {
    color: rgba(248, 250, 252, 0.75) !important;
    -webkit-text-fill-color: rgba(248, 250, 252, 0.75) !important;
}

/* Language */
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-lang-wrap label,
body.dark.page-public-home.home-cinematic .topbar .nav-lang-wrap label {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.25) !important;
}

body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-lang-select,
body.dark.page-public-home.home-cinematic .topbar .nav-lang-select {
    background: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(96, 165, 250, 0.3) !important;
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
}

/* Progress + soft CTAs — home blue */
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-cta:not(.nav-cta--ghost),
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-cta--soft,
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar form.logout-inline button.nav-cta:not(.nav-cta--ghost),
body.dark.page-public-home.home-cinematic .topbar .nav-cta:not(.nav-cta--ghost),
body.dark.page-public-home.home-cinematic .topbar .nav-cta--soft,
body.dark.page-public-home.home-cinematic .topbar form.logout-inline button.nav-cta:not(.nav-cta--ghost) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e3a8a 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid rgba(96, 165, 250, 0.45) !important;
    box-shadow: 0 8px 26px rgba(37, 99, 235, 0.55) !important;
    text-shadow: none !important;
    border-radius: 999px !important;
}

/* Logout ghost — outline, not filled blue */
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-cta--ghost,
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar form.logout-inline button.nav-cta.nav-cta--ghost,
body.dark.page-public-home.home-cinematic .topbar .nav-cta--ghost,
body.dark.page-public-home.home-cinematic .topbar form.logout-inline button.nav-cta.nav-cta--ghost {
    background: transparent !important;
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    border: 1px solid rgba(148, 163, 184, 0.42) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-radius: 999px !important;
}

body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-cta:not(.nav-cta--ghost):hover,
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-cta--soft:hover,
body.dark.page-public-home.home-cinematic .topbar .nav-cta:not(.nav-cta--ghost):hover,
body.dark.page-public-home.home-cinematic .topbar .nav-cta--soft:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.65) !important;
}

body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-cta--ghost:hover,
body.dark.page-public-home.home-cinematic .topbar .nav-cta--ghost:hover {
    background: rgba(37, 99, 235, 0.16) !important;
    border-color: rgba(96, 165, 250, 0.5) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: none !important;
}

/* Admin summary — home-visible, not gold legacy */
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-dropdown--admin-end .nav-dropdown__summary--admin,
body.dark.page-public-home.home-cinematic .topbar .nav-dropdown--admin-end .nav-dropdown__summary--admin {
    background: rgba(37, 99, 235, 0.24) !important;
    border: 1px solid rgba(147, 197, 253, 0.42) !important;
    color: #e8efff !important;
    -webkit-text-fill-color: #e8efff !important;
    text-shadow: none !important;
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.28) !important;
}

body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-dropdown--admin-end .nav-dropdown__summary--admin:hover,
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .topbar .nav-dropdown--admin-end[open] .nav-dropdown__summary--admin,
body.dark.page-public-home.home-cinematic .topbar .nav-dropdown--admin-end .nav-dropdown__summary--admin:hover,
body.dark.page-public-home.home-cinematic .topbar .nav-dropdown--admin-end[open] .nav-dropdown__summary--admin {
    background: rgba(37, 99, 235, 0.38) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: rgba(96, 165, 250, 0.55) !important;
}

/* Kill legacy gold active on admin summary (styles.css) */
body.dark.page-os-shell:not(.admin-panel-body) .nav-dropdown--admin .nav-dropdown__summary--admin.nav-dropdown__summary--active,
body.dark.page-public-home.home-cinematic .nav-dropdown--admin .nav-dropdown__summary--admin.nav-dropdown__summary--active {
    background: rgba(37, 99, 235, 0.42) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.45) !important;
}

/* Page-context action — home primary CTA */
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) .page-context-action,
body.dark.page-os-shell:not(.learning-world-page):not(.pathway-auth-page):not(.admin-panel-body) a.page-context-action.nav-cta--soft,
body.dark.page-public-home.home-cinematic .page-context-action {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 48%, #1e40af 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid rgba(96, 165, 250, 0.5) !important;
    box-shadow:
        0 12px 32px rgba(37, 99, 235, 0.55),
        0 0 22px rgba(59, 130, 246, 0.38) !important;
    text-shadow: none !important;
    border-radius: 999px !important;
}

/* Dropdown panel stays solid (home + panel) */
body.dark.page-os-shell:not(.learning-world-page):not(.admin-panel-body) .nav-dropdown__panel .nav-link--drawer,
body.dark.page-public-home.home-cinematic .nav-dropdown__panel .nav-link--drawer {
    text-shadow: none !important;
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    min-height: 40px !important;
}
