.invest-growth-calculator {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
    max-width: 100%;
    font-family: 'Segoe UI', Roboto, sans-serif;
    color: #1f2933;
    width: 100%;
    box-sizing: border-box;
}

.invest-growth-calculator *,
.invest-growth-calculator *::before,
.invest-growth-calculator *::after {
    box-sizing: border-box;
}

.invest-growth-calculator__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.invest-growth-calculator__adjustments {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.invest-growth-calculator__adjustment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1f2933;
}

.invest-growth-calculator__adjustment input[type='checkbox'] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.invest-growth-calculator__quick-range {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.invest-growth-calculator__control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.invest-growth-calculator__control label {
    font-size: 14px;
    font-weight: 600;
}

.invest-growth-calculator__control select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    background-color: #ffffff;
    color: #1f2933;
}

.invest-growth-calculator__quick-range-button,
.invest-growth-calculator__action-button {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #1f2933;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.invest-growth-calculator__quick-range-button:hover,
.invest-growth-calculator__action-button:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.invest-growth-calculator__quick-range-button--active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.invest-growth-calculator__toggle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.invest-growth-calculator__action-button {
    border-radius: 12px;
}

.invest-growth-calculator__toggle-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.invest-growth-calculator__toggle {
    border: 1px solid var(--asset-color, #d1d5db);
    background: #ffffff;
    color: #1f2933;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.invest-growth-calculator__toggle:hover:not(:disabled) {
    background: var(--asset-color, #2563eb);
    color: #ffffff;
}

.invest-growth-calculator__toggle:not(.invest-growth-calculator__toggle--inactive) {
    background: var(--asset-color, #2563eb);
    color: #ffffff;
    border-color: var(--asset-color, #2563eb);
    box-shadow: 0 6px 14px rgba(31, 41, 55, 0.12);
}

.invest-growth-calculator__toggle:not(.invest-growth-calculator__toggle--inactive):hover:not(:disabled) {
    filter: brightness(0.95);
}

.invest-growth-calculator__toggle--inactive {
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
}

.invest-growth-calculator__toggle--disabled,
.invest-growth-calculator__toggle:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.invest-growth-calculator__chart-wrapper {
    position: relative;
    width: 100%;
    min-height: 360px;
    margin-bottom: 24px;
}

.invest-growth-calculator__scale-control {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    margin-bottom: 24px;
}

.invest-growth-calculator__scale-label {
    font-size: 14px;
    font-weight: 600;
    color: #1f2933;
}

.invest-growth-calculator__switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 46px;
    height: 26px;
    cursor: pointer;
}

.invest-growth-calculator__switch input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    margin: 0;
}

.invest-growth-calculator__switch-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 9999px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.invest-growth-calculator__switch-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.18);
}

.invest-growth-calculator__switch input:checked + .invest-growth-calculator__switch-slider {
    background: #bae6fd;
    box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.3);
}

.invest-growth-calculator__switch input:checked + .invest-growth-calculator__switch-slider::before {
    transform: translateX(20px);
}

.invest-growth-calculator__switch input:focus-visible + .invest-growth-calculator__switch-slider {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.invest-growth-calculator__summary,
.invest-growth-calculator__annual {
    margin-bottom: 24px;
}

.invest-growth-calculator__bars {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.invest-growth-calculator__bars--hidden {
    display: none;
}

.invest-growth-calculator__bar-chart {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(31, 41, 55, 0.08);
    display: flex;
    flex-direction: column;
}

.invest-growth-calculator__bar-chart-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.invest-growth-calculator__bar-chart canvas {
    width: 100% !important;
    height: 240px !important;
}

@media (max-width: 600px) {
    .invest-growth-calculator__bar-chart canvas {
        height: 200px !important;
    }
}

.invest-growth-calculator__empty-bars {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.invest-growth-calculator__table-title {
    margin: 24px 0 12px;
    font-size: 18px;
}

.invest-growth-calculator__table-title:first-child {
    margin-top: 0;
}

.invest-growth-calculator__table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.invest-growth-calculator__results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 640px;
}

.invest-growth-calculator__results-table th,
.invest-growth-calculator__results-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.invest-growth-calculator__results-table th {
    background: #f9fafb;
    font-weight: 600;
}

.invest-growth-calculator__results-table tbody tr:hover {
    background: #f3f4f6;
}

.invest-growth-calculator__summary-table {
    margin-bottom: 16px;
}

.invest-growth-calculator__summary-table td:first-child {
    font-weight: 600;
}

.invest-growth-calculator__row--selected {
    background: #e0f2fe;
}

@media (max-width: 600px) {
    .invest-growth-calculator {
        padding: 16px;
    }

    .invest-growth-calculator__controls {
        gap: 12px;
    }

    .invest-growth-calculator__control {
        min-width: 0;
        flex: 1 1 140px;
    }

    .invest-growth-calculator__quick-range {
        width: 100%;
    }
}

.invest-growth-calculator__table-scroll {
    width: 100%;
    overflow-x: auto;
}

.invest-growth-calculator__sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
    padding-right: 24px;
}

.invest-growth-calculator__sortable::after {
    content: '\2195';
    font-size: 12px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.invest-growth-calculator__sortable--active::after {
    content: '\2191';
}

.invest-growth-calculator__sortable--active.invest-growth-calculator__sortable--desc::after {
    content: '\2193';
}

.invest-growth-calculator__row--hidden {
    display: none;
}

.invest-growth-calculator__empty {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.invest-growth-calculator__toggle-actions + .invest-growth-calculator__toggle-buttons {
    margin-top: 4px;
}

@media (max-width: 640px) {
    .invest-growth-calculator {
        padding: 16px;
    }

    .invest-growth-calculator__controls {
        flex-direction: column;
        align-items: stretch;
    }

    .invest-growth-calculator__quick-range {
        justify-content: flex-start;
    }

    .invest-growth-calculator__bars {
        grid-template-columns: 1fr;
    }
}
