.box-content .tab-content > div:last-child {
    padding-bottom: 20px !important;
}
#stock-ticker .symbol-stats h1 {
    font-size: 24px;
    margin-bottom: 0px;
    line-height: 32px;
}
#stock-ticker .symbol-stats h2 {
    line-height: 22px;
}
#stock-ticker .symbol-stats .symbol-info span.symbol-exchange {
    line-height: 28px;
}
#performance-chart, #assets-chart, #nav-ccq-chart {
    background-color: var(--bg-box-white);
    width: 100%;
    height: 500px;
    padding: var(--padding-box-chart);
    border-radius: 6px;
}
#chart-industries, #chart-holder {
    display: block;
    width: 100%;
    height: 220px;
    margin: -15px auto 5px auto;
}
.info-profile h4 {
    font-size: 18px;
    color: var(--text-main);
}
#stock-ticker .symbol-profile .profile-item {
    width: 100%;
}
#stock-ticker .symbol-profile .profile-link {
    font-size: 16px;
}
#stock-ticker .symbol-chart .time-chart {
    top: 56px;
}
.same-list .same-item button {
    font-size: 16px;
    width: 220px;
    white-space: normal;
}
.same-item button a {
    color: var(--text-main);
    font-weight: 500;
    text-decoration: none;
    transition: all ease-in-out 0.3s;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-align: start;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}
.same-item button a:hover {
    color: #f5a504;
}
.same-item button p:last-child {
    color: var(--text-main);
    font-weight: 500;
}
.funds-performance .save-chart, .funds-assets .save-chart, .symbol-chart .save-chart {
    position: absolute;
    right: 20px;
    z-index: 100;
    cursor: pointer;
}
.funds-performance .save-chart {
    top: 86px;
    margin-right: var(--margin-time-chart);
}
.funds-assets .save-chart, .symbol-chart .save-chart {
    top: 60px;
    margin-right: var(--margin-time-chart);
}
.funds-assets .save-chart {
    margin: var(--margin-time-chart);
}
/* =====================
   FUND INFO SIDEBAR
===================== */
.fund-fee-table {
    border: 1px solid var(--border-main);
    border-radius: 8px;
    overflow: hidden;
}
.fund-fee-table .fee-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--border-main);
    padding: 5px 10px;
}
.fund-fee-table .fee-row {
    padding: 5px 10px;
    margin-top: 0 !important;
    border-top: 1px solid var(--border-main);
    font-size: 13px;
}
.fund-fee-table .fee-row .label {
    color: var(--text-muted);
    font-size: 14px !important;
}
.fund-fee-table .fee-row .value {
    font-weight: 500;
    color: var(--text-main);
}
.fund-strategy .fee-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.fund-strategy .strategy-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
    max-height: 120px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    transition: max-height 0.3s ease, -webkit-mask-image 0.3s ease, mask-image 0.3s ease;
    cursor: pointer;
}
.fund-strategy .strategy-text.expanded {
    max-height: 1000px;
    -webkit-mask-image: none;
    mask-image: none;
}
.fund-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.fund-docs .doc-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-main);
    background: var(--border-main);
    border: 1px solid var(--border-main);
    border-radius: 6px;
    padding: 5px 10px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.fund-docs .doc-link:hover {
    background: var(--bg-hover, rgba(0,0,0,0.06));
    color: #f5a504;
}
body.dark-mode .fund-docs .doc-link:hover {
    background: rgba(255,255,255,0.08);
}

/* =====================
   PORTFOLIO METRICS
===================== */
.portfolio-metrics .metric-card {
    background: var(--bg-box-white);
    border: 1px solid var(--border-main);
    border-radius: 10px;
    transition: box-shadow 0.15s ease;
}
.portfolio-metrics .metric-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.portfolio-metrics .metric-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}
.portfolio-metrics .metric-value {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.2;
}
body.dark-mode .portfolio-metrics .metric-card {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
body.dark-mode .portfolio-metrics .metric-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
/* ── Watchlist add buttons (fund-detail specific) ──────────── */
.portfolio-table thead td.sort-col {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.portfolio-table thead td.sort-col svg {
    flex-shrink: 0;
}
.portfolio-table thead td.sort-col.sort-desc svg path:last-child,
.portfolio-table thead td.sort-col.sort-asc svg path:first-child {
    fill: #f4a503;
}
.portfolio-table.is-scrollable {
    cursor: grab;
    user-select: none;
}
.portfolio-table.grabbing {
    cursor: grabbing;
}

.nav-perf-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.nav-perf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    padding: 8px 4px;
    border-radius: 10px;
    background: var(--bg-box-white);
    border: 1px solid var(--border-main);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: default;
}
.nav-perf-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.nav-perf-item.active {
    border-color: #f4a502;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
body.dark-mode .nav-perf-item {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
body.dark-mode .nav-perf-item:hover,
body.dark-mode .nav-perf-item.active {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
/* =====================
   MONTH SELECTOR
===================== */
.portfolio-month-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.btn-month {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-main);
    background: var(--bg-box-white);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    line-height: 1.6;
}
.btn-month:hover {
    border-color: #f4a502;
    color: var(--text-main);
}
.btn-month.active {
    border-color: #f4a502;
    color: var(--text-main);
    background: rgba(244, 165, 2, 0.08);
}
.btn-month:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.nav-perf-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.nav-perf-value {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}
#portfolio-val-main {
    font-size: inherit;
    font-weight: inherit;
}
/* =====================
   SPARKLINE CHART
===================== */
.fund-chart-col {
    width: 32px;
}
.fund-chart-icon-col {
    text-align: center;
    cursor: default;
}
.ratio-chart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #aaa);
    cursor: pointer;
    transition: color 0.15s;
}
.ratio-chart-icon:hover {
    color: #22c55e;
}
#sparkline-tooltip {
    position: fixed;
    z-index: 9999;
    background: var(--bg-box-white, #fff);
    border: 1px solid var(--border-main, #e5e7eb);
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    padding: 10px 12px 8px;
    display: none;
    min-width: 230px;
}
body.dark-mode #sparkline-tooltip {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
.sparkline-title {
    font-size: 11px;
    color: var(--text-muted, #888);
    margin-bottom: 4px;
}
.sparkline-title strong {
    color: var(--text-main, #333);
    font-weight: 600;
}
.sparkline-no-data {
    font-size: 11px;
    color: var(--text-muted, #888);
    padding: 12px 0;
    text-align: center;
}
.sparkline-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px 4px;
    text-align: center;
    color: var(--text-muted, #888);
    min-width: 180px;
}
.sparkline-gate p {
    margin: 0;
    font-size: 12px;
    color: var(--text-main, #444);
    line-height: 1.4;
}
#sparkline-tooltip .sparkline-gate-btn {
    display: inline-block;
    margin-top: 2px;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    background: var(--bg-box-white, #f5f5f5);
    border: 1px solid var(--border-main, #ddd);
    color: var(--text-main, #444);
    transition: background 0.15s, border-color 0.15s;
}
#sparkline-tooltip .sparkline-gate-btn:hover {
    background: var(--border-main, #e8e8e8);
    color: var(--text-main, #444);
}
#sparkline-tooltip .sparkline-gate-btn--upgrade {
    background: #f4a502;
    border-color: #f4a502;
    color: #fff;
}
#sparkline-tooltip .sparkline-gate-btn--upgrade:hover {
    background: #d99000;
    border-color: #d99000;
    color: #fff;
}
@media (max-width: 768px) {
    #stock-ticker .symbol-stats h1 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-clamp: 3;
        box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
@media (max-width: 480px) {
    #stock-ticker .symbol-stats .title {
        margin-bottom: 10px;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    #stock-ticker .symbol-stats h1 {
        font-size: 20px;
        font-weight: 600;
        line-height: 28px;
    }
    #stock-ticker .symbol-stats .symbol-exchange, #stock-ticker .symbol-stats h2 {
        display: none;
    }
    .same-list .same-item button {
        font-size: 15px;
    }
    .portfolio-metrics .metric-value {
        font-size: 15px;
    }
    .nav-perf-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    .nav-perf-item {
        flex: unset;
        min-width: 0;
    }
}