.assets {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
}

.assets th, .assets td {
    padding: 12px 8px;
    border: 1px solid #dee2e6;
}

/* Стиль для контейнера иконки и символа */
.symbol-container {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    height: 24px;
    width: 100%;
}

.symbol-container img {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    flex-shrink: 0;
    display: block;
    vertical-align: middle;
}

.symbol-container span {
    line-height: 16px;
    display: block;
    vertical-align: middle;
}

.assets th {
    background-color: #f8f9fa;
    cursor: pointer;
    position: relative;
    padding-right: 20px !important;
}

.assets th:hover {
    background-color: #e9ecef;
}

.assets tr:hover {
    background-color: #f5f5f5;
}

.positive {
    color: green;
}

.negative {
    color: red;
}

.sort-indicator {
    position: absolute;
    right: 5px;
}

.sort-indicator::after {
    content: '↕';
    opacity: 0.3;
}

.sort-asc .sort-indicator::after {
    content: '↑';
    opacity: 1;
}

.sort-desc .sort-indicator::after {
    content: '↓';
    opacity: 1;
}

.symbols-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.symbols-list li {
    display: inline-flex;
    align-items: center;
    margin: 0;
    white-space: nowrap;
    height: 24px;
}

.symbols-list img {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    flex-shrink: 0;
    display: block;
    vertical-align: middle;
}

.symbols-list span {
    line-height: 16px;
    display: block;
    vertical-align: middle;
}

/* Адаптивные стили для мобильных устройств */
@media screen and (max-width: 767px) {
    .assets {
        width: 100%;
        font-size: 16px;
        max-width: 100%;
    }
    
    .assets thead {
        display: none;
    }
    
    .assets, .assets tbody, .assets tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    .assets tr {
        margin-bottom: 8px;
        border: 1px solid #dee2e6;
        padding: 4px;
        background: #fff;
    }
    
    .assets td {
        display: flex;
        padding: 4px 0;
        border: none;
        position: relative;
        text-align: right;
        min-height: 24px;
        align-items: center;
        font-size: 16px;
        justify-content: flex-end;
        width: 100%;
    }
    
    .assets td::before {
        content: attr(data-label);
        position: absolute;
        left: 8px;
        width: 40%;
        text-align: left;
        font-weight: bold;
        font-size: 16px;
    }

    .assets td > * {
        width: 55%;
        text-align: right;
        margin: 0;
    }

    .symbol-container {
        margin: 0;
        justify-content: flex-end;
        height: 24px;
        width: 55%;
    }

    .symbol-container img {
        width: 16px;
        height: 16px;
        margin-right: 4px;
    }
} 

.summary-table {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
    table-layout: fixed;
}

.summary-table th,
.summary-table td {
    padding: 12px 8px;
    border: 1px solid #dee2e6;
    text-align: left;
    width: 50%;
}

/* Адаптивные стили для мобильных устройств */
@media screen and (max-width: 767px) {
    .summary-table {
        width: 100%;
        font-size: 14px;
        max-width: 100%;
        table-layout: fixed;
    }
    
    .summary-table thead {
        display: none;
    }

    .summary-table tr:has(th) {
        display: none;
    }
    
    .summary-table, .summary-table tbody, .summary-table tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    
    .summary-table tr {
        margin-bottom: 8px;
        border: 1px solid #dee2e6;
        padding: 4px;
        background: #fff;
    }
    
    .summary-table td {
        display: flex;
        padding: 4px 0;
        border: none;
        position: relative;
        text-align: right;
        min-height: 24px;
        align-items: center;
        font-size: 14px;
        justify-content: flex-end;
        width: 100%;
    }
    
    .summary-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 8px;
        width: 60%;
        text-align: left;
        font-weight: bold;
        font-size: 14px;
    }

    .summary-table td > * {
        width: 55%;
        text-align: right;
        margin: 0;
    }
} 

/* Стили для таблицы категорий */
#category-table td:first-child,
#category-table th:first-child {
    width: 20%; /* Категория */
    max-width: 20%;
}

#category-table td:nth-child(2),
#category-table th:nth-child(2) {
    width: 60%; /* Символы */
}

#category-table td:nth-child(3),
#category-table th:nth-child(3) {
    width: 20%; /* Доля % */
}

/* Общие стили для всех колонок */
.assets td,
.assets th {
    text-align: left;
    width: 20%;
}

.assets th {
    font-size: 16px;
}

.assets td {
    font-size: 14px;
}

.summary-table th {
    font-size: 16px;
}

.summary-table td {
    font-size: 14px;
}

/* Стили для таблицы категорий */
#category-table td,
#category-table th {
    text-align: left;
}

/* Стили для таблицы Активы */
#asset-table td:first-child,
#asset-table th:first-child {
    width: 25%; /* Символ */
    max-width: 25%;
}

#asset-table td:nth-child(2),
#asset-table th:nth-child(2) {
    width: 25%; /* Цена $ */
}

#asset-table td:nth-child(3),
#asset-table th:nth-child(3) {
    width: 20%; /* Стоимость $ */
}

#asset-table td:nth-child(4),
#asset-table th:nth-child(4) {
    width: 15%; /* P&L % */
}

#asset-table td:nth-child(5),
#asset-table th:nth-child(5) {
    width: 15%; /* Доля % */
}

/* Стили для таблицы платформ */
#platform-table td:first-child,
#platform-table th:first-child {
    width: 20%; /* Платформа */
    max-width: 20%;
}

#platform-table td:nth-child(2),
#platform-table th:nth-child(2) {
    width: 60%; /* Символы */
}

#platform-table td:nth-child(3),
#platform-table th:nth-child(3) {
    width: 20%; /* Доля % */
} 

/* Стили для таблицы транзакций */
#transactions-table {
    font-size: 14px;
}

#transactions-table td:first-child,
#transactions-table th:first-child {
    width: 30%; /* Символ */
    max-width: 30%;
}

#transactions-table td:nth-child(2),
#transactions-table th:nth-child(2) {
    width: 25%; /* Цена входа */
}

#transactions-table td:nth-child(3),
#transactions-table th:nth-child(3) {
    width: 25%; /* Количество */
}

#transactions-table td:nth-child(4),
#transactions-table th:nth-child(4) {
    width: 20%; /* Действие */
}

/* Адаптивные стили для мобильных устройств */
@media screen and (max-width: 767px) {
    #transactions-table {
        display: table;
        width: 100%;
        max-width: 100%;
        font-size: 14px;
        border-collapse: collapse;
    }

    #transactions-table thead {
        display: table-header-group;
    }

    #transactions-table tbody {
        display: table-row-group;
    }

    #transactions-table tr {
        display: table-row;
        margin: 0;
        padding: 0;
    }

    #transactions-table th,
    #transactions-table td {
        display: table-cell;
        padding: 8px 4px;
        text-align: left;
        vertical-align: middle;
        min-height: auto;
        border: 1px solid #dee2e6;
    }

    #transactions-table td::before {
        display: none;
    }

    #transactions-table td > * {
        width: auto;
        text-align: left;
    }

    #transactions-table .symbol-container {
        width: auto;
        justify-content: flex-start;
    }
} 

/* Адаптивные стили для мобильных устройств */
@media screen and (max-width: 767px) {
    /* Общие стили для таблиц платформ и категорий */
    #platform-table,
    #category-table {
        display: table;
        width: 100%;
        max-width: 100%;
        font-size: 14px;
    }

    #platform-table thead,
    #category-table thead {
        display: table-header-group;
    }

    #platform-table tbody,
    #category-table tbody {
        display: table-row-group;
    }

    #platform-table tr,
    #category-table tr {
        display: table-row;
        margin: 0;
        padding: 0;
    }

    #platform-table th,
    #platform-table td,
    #category-table th,
    #category-table td {
        display: table-cell;
        padding: 8px 4px;
        text-align: left;
        vertical-align: middle;
        min-height: auto;
        border: 1px solid #dee2e6;
    }

    #platform-table td::before,
    #category-table td::before {
        display: none;
    }

    #platform-table td > *,
    #category-table td > * {
        width: auto;
        text-align: left;
    }

    /* Стили для списка символов в мобильной версии */
    #platform-table .symbols-list,
    #category-table .symbols-list {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 0;
        margin: 0;
    }

    #platform-table .symbols-list li,
    #category-table .symbols-list li {
        display: inline-flex;
        align-items: center;
        margin: 0;
        padding: 2px 0;
    }

    #platform-table .symbols-list img,
    #category-table .symbols-list img {
        width: 14px;
        height: 14px;
        margin-right: 4px;
    }

    #platform-table .symbols-list span,
    #category-table .symbols-list span {
        font-size: 14px;
    }
} 

/* Адаптивные стили для мобильных устройств */
@media screen and (max-width: 767px) {
    /* Стили для таблицы Активы */
    #asset-table {
        display: table;
        width: 100%;
        max-width: 100%;
        font-size: 14px;
    }

    #asset-table thead {
        display: table-header-group;
    }

    #asset-table tbody {
        display: table-row-group;
    }

    #asset-table tr {
        display: table-row;
        margin: 0;
        padding: 0;
    }

    #asset-table th,
    #asset-table td {
        display: table-cell;
        padding: 8px 4px;
        text-align: left;
        vertical-align: middle;
        min-height: auto;
        border: 1px solid #dee2e6;
    }

    #asset-table td::before {
        display: none;
    }

    #asset-table td > * {
        width: auto;
        text-align: left;
    }

    #asset-table .symbol-container {
        width: auto;
        justify-content: flex-start;
    }

    #asset-table td:first-child,
    #asset-table th:first-child {
        width: 25%; /* Символ */
    }

    #asset-table td:nth-child(2),
    #asset-table th:nth-child(2) {
        width: 25%; /* Цена $ */
    }

    #asset-table td:nth-child(3),
    #asset-table th:nth-child(3) {
        width: 20%; /* Стоимость $ */
    }

    #asset-table td:nth-child(4),
    #asset-table th:nth-child(4) {
        width: 15%; /* P&L % */
    }

    #asset-table td:nth-child(5),
    #asset-table th:nth-child(5) {
        width: 15%; /* Доля % */
    }
} 

/* Мобильные стили */
@media screen and (max-width: 767px) {
    .assets th,
    .summary-table th {
        font-size: 14px;
    }

    .assets td,
    .summary-table td {
        font-size: 12px;
    }

    .assets td::before,
    .summary-table td::before {
        font-size: 14px;
    }
} 