.investi-top-active__toolbar {
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: visible;
    overflow-y: visible;
    gap: 14px;
}

.investi-top-active__chart {
    overflow: visible;
}

.investi-top-active__chart-shell {
    padding-bottom: 12px;
}

.investi-top-active__toolbar-main {
    display: inline-flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.investi-top-active__toolbar .investi-chart-toolbar__group--actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.investi-top-active__chart .investi-date-wrapper {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    padding-left: 0;
    min-width: 0;
    justify-content: flex-end;
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
}

@media (max-width: 767px) {
    .investi-top-active__toolbar {
        justify-content: flex-start;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .investi-top-active__toolbar-main {
        flex: 0 0 auto;
    }

    .investi-top-active__chart .investi-date-wrapper {
        flex: 1 1 100%;
        width: 100%;
        margin-left: 0;
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .investi-top-active__chart .investi-chart-date-field {
        flex: 1 1 140px;
        min-width: 0;
    }

.investi-top-active__chart-shell {
    padding-bottom: 18px;
  }
}

.investi-top-active {
    display: flex;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 40px;
}

.investi-top-active__chart {
    flex: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.investi-top-active__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 6px;
}

.investi-top-active__title {
    margin: 0;
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--heading-color);
}

.investi-top-active__meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.investi-top-active__label {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.investi-top-active__perf {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-color);
}

.investi-top-active__chart-stage {
    width: 100%;
    height: 380px;
    position: relative;
}

.investi-top-active__type-switch .investi-btn {
    min-height: 38px;
    padding: 8px 16px;
    border-radius: 999px;
}

.investi-top-active__type-switch .investi-btn.active {
    border-color: transparent;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent-color) 18%, transparent);
}

.investi-top-active__chart .investi-chart-toolbar .range-btn.active,
.investi-top-active__chart .investi-controls-row--compact .range-btn.active,
.investi-top-active__chart .investi-chart-toolbar .investi-btn.active {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.investi-top-active__sidebar {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--glass-border);
    padding-left: 20px;
}

.investi-top-active__sidebar-title {
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.investi-top-active__list {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: stretch;
    overflow: hidden;
    flex-grow: 1;
    padding-right: 5px;
    scrollbar-width: thin;
    gap: 8px;
}

.top-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 0;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.2s ease;
    color: var(--text-color);
}

.top-item:hover {
    background: var(--hover-bg);
    border-color: var(--accent-color);
}

.top-item.selected {
    border-left: none;
    background: var(--hover-bg);
}

[data-mode="dark"][data-theme="liquid-glass"] .top-item.selected {
    background: color-mix(in srgb, var(--accent-color) 80%, var(--hover-bg)) !important;
}

.top-item.selected .top-item__price,
.top-item.selected .top-item__change {
    color: #fff !important;
}

.top-item.selected .top-item__name {
    color: var(--text-secondary) !important;
}

[data-mode="dark"] .top-item.selected {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--accent-color) 16%, rgba(17, 24, 39, 0.96)),
        color-mix(in srgb, var(--accent-color) 8%, rgba(17, 24, 39, 0.9))
    );
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.34);
}

.top-item__identity {
    min-width: 0;
    flex: 1;
    padding-right: 12px;
}

.top-item__symbol,
.top-item__price {
    font-weight: 800;
    font-size: 1.16em;
    color: var(--text-color);
    margin-bottom: 2px;
}

.top-item__name {
    font-size: 0.85em;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-item__quote {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    flex-shrink: 0;
    padding-right: 10px;
}

.top-item__change {
    font-size: 0.92em;
    font-weight: 700;
}

.top-item__link {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        color 0.2s ease,
        text-shadow 0.2s ease,
        opacity 0.2s ease,
        box-shadow 0.2s ease;
    transform-origin: center;
}

.top-item:hover .top-item__link,
.top-item__link:hover,
.top-item__link:focus-visible {
    background: color-mix(in srgb, var(--card-bg) 88%, white 12%);
    border-color: color-mix(in srgb, var(--accent-color) 26%, var(--border-color));
    color: var(--accent-text-color);
    transform: translate(1px, -1px);
    text-shadow: 0 0 14px color-mix(in srgb, var(--accent-color) 30%, transparent);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--shadow-color) 14%, transparent);
    outline: none;
}

[data-theme="liquid-glass"] .top-item {
    padding: 12px 14px;
    background: color-mix(in srgb, var(--surface-1) 80%, transparent);
    border: 1px solid var(--border-color);
    color: var(--button-text);
}

[data-theme="liquid-glass"] .top-item:hover {
    background: color-mix(in srgb, var(--accent-color) 5%, var(--surface-1));
    border-color: color-mix(in srgb, var(--accent-color) 40%, var(--border-color));
}

[data-theme="liquid-glass"] .top-item.selected {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, #ffffff 28%, #7ab9ff 72%) 0%,
        color-mix(in srgb, #ffffff 18%, #74a9da 82%) 55%,
        color-mix(in srgb, #ffffff 22%, #6faee8 78%) 100%
    );
    color: var(--heading-color) !important;
    border-color: color-mix(in srgb, var(--accent-color) 42%, rgba(255, 255, 255, 0.4));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent-color) 22%, transparent);
}

[data-theme="liquid-glass"] .top-item.selected .top-item__price,
[data-theme="liquid-glass"] .top-item.selected .top-item__change {
    color: #fff !important;
}

[data-theme="liquid-glass"] .top-item.selected .top-item__name {
    color: color-mix(in srgb, var(--heading-color) 68%, white 32%) !important;
}

[data-mode="dark"][data-theme="liquid-glass"] .top-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cccccc;
}

[data-mode="dark"][data-theme="liquid-glass"] .top-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-mode="dark"][data-theme="liquid-glass"] .top-item.selected {
    background: color-mix(in srgb, var(--accent-color) 10%, rgba(255, 255, 255, 0.08)) !important;
    border-color: color-mix(in srgb, var(--accent-color) 28%, rgba(255, 255, 255, 0.14));
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34);
}

[data-mode="dark"][data-theme="liquid-glass"] .top-item.selected .top-item__price,
[data-mode="dark"][data-theme="liquid-glass"] .top-item.selected .top-item__change {
    color: #ffffff !important;
}

[data-mode="dark"][data-theme="liquid-glass"] .top-item.selected .top-item__name {
    color: rgba(255, 255, 255, 0.82) !important;
}

@media (max-width: 1023px) {
    .investi-top-active {
        flex-direction: column;
        gap: 16px;
    }

    .investi-top-active__sidebar {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--glass-border);
        padding-top: 20px;
    }
}

@media (max-width: 767px) {
    .investi-top-active {
        margin-bottom: 24px;
    }

    .investi-top-active__chart {
        padding: 18px 16px;
    }

    .investi-top-active__header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .investi-top-active__title {
        font-size: 1.24rem;
    }

    .investi-top-active__type-switch {
        width: 100%;
    }

    .investi-top-active__type-switch .investi-btn {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
    }

    .investi-top-active__chart-stage {
        height: 340px;
    }

    .investi-top-active__sidebar {
        padding-top: 16px;
    }

    .investi-top-active__sidebar-title {
        margin-bottom: 12px;
        font-size: 0.74rem;
    }

    .investi-top-active__list {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding-right: 0;
    }

    .top-item {
        width: 100%;
        max-width: none;
        gap: 10px;
        padding: 12px 12px 10px;
        margin-bottom: 0;
        border-radius: 14px;
        box-sizing: border-box;
    }

    .top-item__identity {
        padding-right: 6px;
    }

    .top-item__symbol,
    .top-item__price {
        font-size: 0.98rem;
        margin-top: 1px;
    }

    .top-item__name,
    .top-item__change {
        font-size: 0.78rem;
    }

    .top-item__link {
        font-size: 14px;
    }
}
