/* ============================================
   VALUETHICS - White & Blue Theme | Poppins
   ============================================ */
   /* DEFAULT (acts like ELSE) */
/* DEFAULT (acts like ELSE) */
#analyticsFrame { 
    height: calc(100vh - 180px) !important;
}

/* IF screen <= 1510px */
@media (max-width: 1510px) {
    html {
        zoom: 0.8;
    }
    
    .sidebar {
        height: 120vh !important;
    }
    
    #analyticsFrame { 
        height: calc(100vh - 30px) !important;
    }
}
:root {
    --blue-50:  #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;

    --primary:      #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light:#dbeafe;

    --white:   #ffffff;
    --gray-50: #f8fafc;
    --gray-100:#f1f5f9;
    --gray-200:#e2e8f0;
    --gray-300:#cbd5e1;
    --gray-400:#94a3b8;
    --gray-500:#000000;
    --gray-600:#000000;
    --gray-700:#000000;
    --gray-800:#000000;
    --gray-900:#000000;

    --sidebar-width: 260px;
    --navbar-height: 64px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:    0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,.07), 0 4px 6px -2px rgba(0,0,0,.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.08), 0 10px 10px -5px rgba(0,0,0,.04);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 { font-family: 'Poppins', sans-serif; font-weight: 600; }
.fw-600 { font-weight: 600; }

/* ── TOP NAVBAR ── */
.top-navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    height: var(--navbar-height);
    box-shadow: var(--shadow-sm);
    z-index: 1050;
}

.sidebar-toggle-btn {
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 8px;
    padding: 6px 10px;
    transition: all .2s;
}
.sidebar-toggle-btn:hover {
    background: var(--blue-50);
    border-color: var(--blue-300);
    color: var(--primary);
}

.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--blue-700));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 18px;
}
.brand-text {
    font-size: 1.15rem;
    color: var(--gray-800);
    letter-spacing: -0.3px;
}
.brand-text strong { color: var(--primary); font-weight: 700; }
.navbar-brand:hover { opacity: .85; }
.navbar-brand { text-decoration: none; }

.risk-badge-nav {
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.nav-username {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
}

/* Avatar Button */
.avatar-btn {
    padding: 0;
    border: none;
    background: transparent;
}
.avatar-btn::after { display: none; }
.avatar-initials {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--blue-700));
    border-radius: 50%;
    color: white;
    font-size: 15px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.avatar-btn:hover .avatar-initials {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37,99,235,.4);
}

/* Avatar Dropdown */
.avatar-dropdown {
    min-width: 240px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 8px;
    margin-top: 8px !important;
}
.dropdown-header-item { padding: 4px 4px 0; }
.avatar-lg {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--blue-700));
    border-radius: 50%;
    color: white;
    font-size: 18px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.role-badge {
    background: var(--blue-50);
    color: var(--primary);
    border: 1px solid var(--blue-200);
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    padding: 1px 6px;
}
.avatar-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    transition: background .15s;
}
.avatar-dropdown .dropdown-item:hover { background: var(--blue-50); color: var(--primary); }
.avatar-dropdown .dropdown-item.active { background: var(--blue-50); color: var(--primary); }
.avatar-dropdown .dropdown-item.text-danger { color: #dc3545 !important; }
.avatar-dropdown .dropdown-item.text-danger:hover { background: #fff5f5; }

/* ── SIDEBAR ── */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1040;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--shadow);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 4px; }

.sidebar-inner { padding: 16px 12px; }

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gray-400);
    padding: 8px 12px 4px;
}

.sidebar-menu { margin: 0; }
.sidebar-menu > li { margin-bottom: 2px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--gray-600);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
    white-space: nowrap;
}
.sidebar-link i:first-child { font-size: 16px; flex-shrink: 0; }
.sidebar-link:hover {
    background: var(--blue-50);
    color: var(--primary);
}
.sidebar-link.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.sidebar-link.text-danger-link { color: #ef4444; }
.sidebar-link.text-danger-link:hover { background: #fff5f5; color: #dc2626; }

.sidebar-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
}

/* Submenu */
.submenu-arrow { font-size: 12px; transition: transform .25s; }
.has-submenu.open > .sidebar-link .submenu-arrow { transform: rotate(180deg); }

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    padding-left: 16px;
}
.has-submenu.open > .submenu { max-height: 300px; }

.submenu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 8px;
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}
.submenu-link:hover { color: var(--primary); background: var(--blue-50); }
.submenu-link.active { color: var(--primary); font-weight: 600; }

/* Sidebar collapsed */
.sidebar-collapsed .sidebar { transform: translateX(-100%); }
.sidebar-collapsed .main-wrapper { margin-left: 0; }

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1039;
}
.sidebar-overlay.active { display: block; }

/* ── MAIN WRAPPER ── */
.main-wrapper {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    transition: margin-left .3s cubic-bezier(.4,0,.2,1);
    min-height: calc(100vh - var(--navbar-height));
}
.page-content { padding: 28px 24px; }

/* ── CARDS ── */
.card {
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    background: var(--white);
}
.card-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    border-radius: 14px 14px 0 0 !important;
    padding: 16px 20px;
}
.card-body { padding: 20px; }

/* ── PAGE HEADER ── */
.page-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}
.page-header h1 { font-size: 1.5rem; color: var(--gray-900); margin: 0; }
.page-header p { color: var(--gray-500); margin: 4px 0 0; font-size: 13.5px; }

/* Breadcrumb */
.breadcrumb { font-size: 12px; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--gray-300); }

/* ── STAT CARDS ── */
.stat-card {
    border-radius: 14px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
}
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--gray-900); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .6px; }

/* ── BUTTONS ── */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 22px;
    transition: all .2s;
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.btn-outline-primary { border-radius: 8px; font-weight: 600; padding: 10px 22px; }

/* ── FORMS ── */
.form-control, .form-select {
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    padding: 10px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    outline: none;
}
.form-label { font-weight: 500; font-size: 13px; color: var(--gray-700); margin-bottom: 6px; }
.input-group-text { border: 1.5px solid var(--gray-200); background: var(--gray-50); font-size: 14px; }
.form-control:focus + .input-group-text,
.input-group:focus-within .input-group-text { border-color: var(--primary); }

/* ── ALERTS ── */
.alert { border-radius: 10px; font-size: 13.5px; font-weight: 500; border: none; }
.alert-danger { background: #fff5f5; color: #c0392b; border-left: 4px solid #e74c3c; }
.alert-success { background: #f0fdf4; color: #166534; border-left: 4px solid #22c55e; }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }
.alert-info { background: var(--blue-50); color: var(--blue-800); border-left: 4px solid var(--primary); }

/* ── AUTH PAGES (Login / Register) ── */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 50%, var(--blue-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(37,99,235,.08) 0%, transparent 70%);
    border-radius: 50%;
}
.auth-page::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(37,99,235,.06) 0%, transparent 70%);
    border-radius: 50%;
}
.auth-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(37,99,235,.12), 0 4px 16px rgba(0,0,0,.06);
    padding: 40px 44px;
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}
.auth-logo {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 28px;
    justify-content: center;
}
.auth-logo-icon {
    width: 46px; height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--blue-700));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 22px;
    box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.auth-logo-text { font-size: 1.4rem; color: var(--gray-800); }
.auth-logo-text strong { color: var(--primary); font-weight: 700; }

.auth-title { font-size: 1.4rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--gray-500); margin-bottom: 28px; }

.divider-text {
    text-align: center;
    position: relative;
    margin: 20px 0;
    color: var(--gray-400);
    font-size: 12px;
    font-weight: 500;
}
.divider-text::before, .divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--gray-200);
}
.divider-text::before { left: 0; }
.divider-text::after  { right: 0; }

.auth-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

/* ── RISK PROFILE ── */
.rp-container { max-width: 760px; margin: 0 auto; }

.rp-progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 28px;
}
.rp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--blue-400));
    border-radius: 10px;
    transition: width .4s ease;
}

.rp-question-card {
    border-radius: 16px;
    padding: 32px;
    border: 1.5px solid var(--gray-200);
    background: var(--white);
    box-shadow: var(--shadow);
    animation: slideInQuestion .35s ease;
}
@keyframes slideInQuestion {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.rp-question-num {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--blue-50);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.rp-question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 24px;
    line-height: 1.5;
}

.rp-options { display: flex; flex-direction: column; gap: 10px; }
.rp-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    background: var(--white);
}
.rp-option:hover { border-color: var(--blue-300); background: var(--blue-50); }
.rp-option.selected {
    border-color: var(--primary);
    background: var(--blue-50);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.rp-option input[type="radio"] { display: none; }
.rp-option-dot {
    width: 20px; height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
}
.rp-option.selected .rp-option-dot {
    border-color: var(--primary);
    background: var(--primary);
}
.rp-option.selected .rp-option-dot::after {
    content: '';
    width: 8px; height: 8px;
    background: white;
    border-radius: 50%;
}
.rp-option-score {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}
.rp-option.selected .rp-option-score { background: var(--primary); color: white; }

/* Risk Result */
.risk-result-card {
    border-radius: 20px;
    padding: 36px;
    text-align: center;
    background: linear-gradient(135deg, var(--blue-50), var(--white));
    border: 1.5px solid var(--blue-200);
}
.risk-result-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    margin: 0 auto 16px;
}
.risk-category-badge {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.risk-score-chip {
    display: inline-block;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 16px;
}

/* Summary table */
.rp-summary-table td { padding: 8px 12px; font-size: 13px; vertical-align: middle; }
.rp-summary-table .q-label { color: var(--gray-500); font-weight: 500; }
.rp-summary-table .q-score { font-weight: 700; color: var(--primary); text-align: center; width: 60px; }

/* ── CHANGE PASSWORD ── */
.cp-card { max-width: 540px; margin: 0 auto; }

/* ── RESPONSIVE ── */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .sidebar-collapsed .sidebar { transform: translateX(-100%); }
}

@media (max-width: 575.98px) {
    .auth-card { padding: 28px 20px; margin: 16px; }
    .page-content { padding: 20px 16px; }
    .rp-question-card { padding: 20px; }
}

/* ── FILTER LABEL ── */
.filter-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

/* ── COMPARE TABLE ── */
.compare-table th, .compare-table td { border-top: 1px solid var(--gray-100); vertical-align: middle; }
.compare-table tr:hover td { background: var(--gray-50); }

/* ── FUND CARD TAG ── */
.fund-card .badge { font-weight: 600; }

/* ── GOAL MODAL ── */
.modal-content { font-family: 'Poppins', sans-serif; }

/* ── RESPONSIVE ── */
