body {
    background:
        radial-gradient(circle at top left, rgba(89, 105, 246, 0.08), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
    color: #0f172a;
}

/* Sidebar Styles */
.sidebar {
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #fff !important;
}

.nav-link {
    color: #333;
    padding: .5rem 1rem;
    margin-bottom: 0.2rem;
    border-radius: 0.25rem;
}

.sidebar-custom .nav {
    gap: 0.18rem;
}

.sidebar-custom .nav-link {
    display: flex;
    align-items: center;

    margin-bottom: 0;

    font-size: 0.94rem;

    line-height: 1.2;

    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-custom .nav-link i {
    width: 1.05rem;
    text-align: center;
    font-size: 0.96rem;
}

.sidebar-custom .nav-link span {
    flex: 1 1 auto;
    display: block;
}

.nav-link:hover {
    background-color: #e9ecef;
    color: #0d6efd;
}

.nav-link.active {
    background-color: #e9ecef;
    color: #0d6efd !important;
    font-weight: 600;
}

/* Global Goal Selector Hover Effect */
.goal-selector-wrapper:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pc-goal-pill .pc-goal-pill-copy {
    min-width: 0;
    text-align: left;
}

.pc-goal-pill .pc-goal-pill-copy small {
    display: block;
    margin-bottom: 1px;
    font-size: 0.56rem;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pc-goal-pill #currentGoalLabel {
    display: block;
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    line-height: 1.1;
}

#globalGoalMenu .dropdown-item {
    padding: 10px 16px;
    font-size: 0.9rem;
    color: #334155;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: all 0.2s;
}

#globalGoalMenu .dropdown-item:hover {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    transform: translateX(4px);
}

#globalGoalMenu .dropdown-item.active {
    background: var(--primary-gradient, linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%));
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}

#globalGoalMenu .dropdown-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 8px 12px;
    font-weight: 700;
}

main {
    background: transparent;
    min-height: calc(100vh - 56px);
}

:root {
    --pc-header-height: 60px;
    --pc-sidebar-width: 108px;
}

body {
    overflow-x: auto;
    min-width: 1100px;
}

body>.container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.container-fluid>.row {
    --bs-gutter-x: 0;
    display: block;
    min-height: calc(100vh - var(--pc-header-height));
    position: relative;
}

.navbar-custom {
    min-height: var(--pc-header-height);
    background: #F5F7FA !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: none !important;
    backdrop-filter: none;
    margin-left: var(--pc-sidebar-width);
    width: calc(100% - var(--pc-sidebar-width));
    background-image: none !important;
}

.navbar-custom .container-fluid {
    padding-left: 1.15rem !important;
    padding-right: 1.35rem !important;
}

.navbar-custom .navbar-brand {
    margin-right: 0;
}

.navbar-custom .navbar-brand {
    display: none !important;
}

.navbar-custom .navbar-brand img {
    display: none;
}

.navbar-custom .navbar-brand span {
    color: #1e293b !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.navbar-custom .text-white-50,
.navbar-custom .text-white,
.navbar-custom .btn.btn-link {
    color: #475569 !important;
    text-shadow: none !important;
}

.navbar-custom .vr {
    background-color: rgba(203, 213, 225, 0.9) !important;
}

.navbar-custom .ms-auto {
    width: 100%;
    margin-left: 0 !important;
    justify-content: space-between;
    gap: 0.75rem !important;
}

.pc-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 0 1 auto;
}

.pc-topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    min-width: 0;
}

.pc-shell-title {
    display: none;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
    line-height: 1;
}

.pc-goal-pill {
    display: flex;
    position: relative;
    z-index: 1045;
}

.pc-goal-pill #globalGoalDropdown {
    min-width: 0;
    max-width: 188px;
    border: 0 !important;
    border-radius: 999px !important;
    background: #5969f6 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(89, 105, 246, 0.18) !important;
    padding: 0.2rem 0.82rem 0.2rem 0.26rem !important;
}

.pc-goal-pill #globalGoalDropdown:hover {
    background: #5060ea !important;
    transform: none;
    box-shadow: 0 10px 22px rgba(89, 105, 246, 0.22) !important;
}

.pc-goal-pill .pc-goal-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-right: 0.4rem;
}

.pc-goal-pill .pc-goal-icon i {
    color: #fff;
    font-size: 0.72rem;
}

.pc-goal-pill .pc-goal-pill-copy small,
.pc-goal-pill #currentGoalLabel,
.pc-goal-pill .fa-chevron-down {
    color: #fff !important;
}

.pc-goal-pill .fa-chevron-down {
    font-size: 0.72rem;
    opacity: 0.9;
}

.pc-goal-pill #globalGoalMenu {
    z-index: 1085;
    margin-top: 0 !important;
    left: calc(100% + 12px) !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-10%) !important;
}

.pc-top-vip {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.pc-topbar-actions {
    gap: 0.7rem !important;
}

.pc-topbar-action-link {
    padding: 0.32rem 0.56rem !important;
    font-size: 0.72rem;
    gap: 0.32rem !important;
    line-height: 1;
}

.pc-topbar-action-link .small {
    font-size: 0.72rem;
    font-weight: 700;
}

.nav-feedback-btn.pc-topbar-action-link {
    padding: 0.34rem 0.62rem !important;
}

.pc-version-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.58rem;
    border-radius: 999px;
    border: 1px solid #ffe0b2;
    background: #fff3e0;
    color: #f57c00;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.pc-version-pill.is-icon-only {
    gap: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
}

.pc-version-pill.is-icon-only #top-vip-pill-text {
    display: none;
}

.pc-top-vip-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(245, 124, 0, 0.18);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    color: #334155;
    z-index: 30;
}

.pc-top-vip-popover[hidden] {
    display: none !important;
}

.pc-top-vip-popover__title {
    font-size: 0.76rem;
    font-weight: 800;
    color: #f57c00;
    margin-bottom: 4px;
}

.pc-top-vip-popover__desc {
    font-size: 0.78rem;
    line-height: 1.5;
    color: #64748b;
}

.pc-top-vip-popover__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 10px;
    color: #2563eb;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
}

.pc-user-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-left: 0.72rem;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.pc-user-meta {
    display: block;
    text-align: right;
    line-height: 1.15;
}

.pc-user-meta .pc-user-name {
    color: #1e293b;
    font-size: 0.72rem;
    font-weight: 700;
    max-width: 160px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pc-user-meta .pc-user-sub {
    color: #94a3b8;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-top: 0.1rem;
}

.navbar.navbar-custom,
.navbar.navbar-custom * {
    color-scheme: light;
}

.navbar-custom button[title="Logout"],
.navbar-custom .text-end,
.navbar-custom .ms-auto>.vr {
    display: none !important;
}

#sidebarMenu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    flex: 0 0 var(--pc-sidebar-width) !important;
    max-width: var(--pc-sidebar-width) !important;
    width: var(--pc-sidebar-width) !important;
    height: 100vh;
    min-height: 100vh;
    background: #fff !important;
    border-right: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: none;
    margin-top: 0;
    padding: calc(var(--pc-header-height) + 0.9rem) 0 1.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 1031;
}

#sidebarMenu::-webkit-scrollbar {
    display: none;
}

#sidebarMenu .position-sticky {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    top: 0 !important;
    height: auto !important;
    min-height: 0;
    width: 100%;
    max-height: 600px;
    margin: 0 auto;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
    mask-image: linear-gradient(to bottom, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}

#sidebarMenu .position-sticky::-webkit-scrollbar {
    width: 6px;
}

#sidebarMenu .position-sticky::-webkit-scrollbar-track {
    background: transparent;
}

#sidebarMenu .position-sticky::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.18) 0%, rgba(100, 116, 139, 0.48) 100%);
    border-radius: 999px;
}

#sidebarMenu .position-sticky::after {
    content: "";
    position: sticky;
    bottom: 0;
    display: block;
    width: 100%;
    height: 28px;
    margin-top: -28px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.96) 72%, #fff 100%);
}

#sidebarMenu .sidebar-heading,
#sidebarMenu .sidebar-divider,
#sidebarMenu a[href^="mailto:"] {
    display: none !important;
}

#sidebarMenu .nav.flex-column {
    width: 100%;
    align-items: center;
    gap: 0;
}

#sidebarMenu .nav-item {
    width: 100%;
    display: flex;
    justify-content: center;
}

.sidebar-custom .nav-link {
    flex-direction: column;
    justify-content: center;
    gap: 0;
    width: 100%;
    padding: 0;
    border-radius: 0;
    text-align: center;
    color: #94a3b8;
    background: transparent;
    font-weight: 500;
    min-height: 46px;
}

.sidebar-custom .nav-link .nav-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.1rem;
    margin: 0;
    color: inherit;
    background: transparent;
    transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-custom .nav-link .nav-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-custom .nav-link>span:last-child {
    display: block !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.05 !important;
    color: inherit !important;
    letter-spacing: 0;
    max-width: 48px;
    margin: 0 auto;
    white-space: normal;
    flex: 0 0 auto;
}

.sidebar-custom .nav-link:hover {
    color: #64748b;
    transform: none;
}

.sidebar-custom .nav-link:hover .nav-icon {
    background: #f8fafc;
    color: #64748b;
}

.sidebar-custom .nav-link.active {
    background: transparent;
    box-shadow: none;
    color: #5969f6 !important;
}

.sidebar-custom .nav-link.active .nav-icon {
    background: #f1f5f9;
    color: #5969f6;
    box-shadow: none;
}

.sidebar-custom .nav-link.active>span:last-child {
    font-weight: 700 !important;
    color: #5969f6 !important;
}

main.col {
    display: block;
    flex: none !important;
    width: calc(100% - var(--pc-sidebar-width)) !important;
    max-width: calc(100% - var(--pc-sidebar-width)) !important;
    min-width: 0;
    margin-left: var(--pc-sidebar-width);
    min-height: calc(100vh - var(--pc-header-height));
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* Onboarding Modal Styles */
.help-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.help-modal.active {
    display: flex;
    opacity: 1;
}

.help-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: hidden;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.help-modal.active .help-content {
    transform: translateY(0);
}

.help-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.help-close:hover {
    color: #333;
}

.onboarding-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.onboarding-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

/* Scrollable content wrapper */
.onboarding-content-wrapper {
    overflow-y: auto;
    flex: 1;
    margin: 20px 0;
    padding-right: 10px;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e9ecef;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: #0d6efd;
    transform: scale(1.2);
}

/* Feedback Modal */
.feedback-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.feedback-header {
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    text-align: center;
    position: relative;
}

.feedback-body {
    padding: 30px;
    text-align: center;
}

.feedback-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.feedback-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.qr-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.qr-img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-feedback-btn {
    background: linear-gradient(90deg, #FF512F 0%, #DD2476 100%);
    border: none;
    color: white !important;
    font-weight: 500;
    padding: 0.4rem 0.8rem !important;
    border-radius: 50px;
    font-size: 0.85rem;
    box-shadow: 0 4px 6px rgba(221, 36, 118, 0.3);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(221, 36, 118, 0.4);
    color: white !important;
}

.nav-entry-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #2563eb;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
