﻿/* Root variables */
:root {
    --primary: #11BF2B;
    --primary-dark: #03300C;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --bg-light: #f9fafb;
    --success: #11BF2B;
    --error: #ef4444;
}

/* Datatable positive/negative colors */

/* For sharesTable */
#sharesTable tbody tr td.positive {
    color: var(--success) !important;
}

#sharesTable tbody tr td.negative {
    color: var(--error) !important;
}
#sharesTable thead tr th {
    padding: 5px 30px 5px 0px !important;
}


/* For portfolioChangesTable */
#portfolioChangesTable tbody tr td.positive {
    color: var(--success) !important;
}

#portfolioChangesTable tbody tr td.negative {
    color: var(--error) !important;
}

/* For sectorDistributionTable */
.data-table-border {
    color: var(--success) !important;
    border: 1px solid rgba(85, 86, 90, 0.12);
    border-radius: 4px;
    background: #fff;
    overflow: hidden; /* radius korunsun */
}

    .data-table-border.dataTable thead > tr > th:first-child,
    .data-table-border.dataTable tbody > tr > td:first-child {
        background-color: transparent !important;
    }

#sectorDistributionTable tbody tr td.positive {
    color: var(--success) !important;
}

#sectorDistributionTable tbody tr td.negative {
    color: var(--error) !important;
}

#sectorDistributionTable th:first-child,
#sectorDistributionTable td:first-child {
    width: 300px; /* istediğin genişlik */
    min-width: 300px; /* gerekirse sabitle */
    max-width: 300px; /* overflow istemezsen */
}

/* For fundsTable (in modals) */
#fundsTable tbody tr td.positive {
    color: var(--success) !important;
}

#fundsTable tbody tr td.negative {
    color: var(--error) !important;
}

/* Root variables for reference (already defined in your CSS) */
:root {
    --success: #11BF2B;
    --error: #ef4444;
}
/* Base Layout */
.distribution-container {
    display: flex;
    gap: 32px;
    margin-top: 24px;
}

.sector-column {
    height: 400px;
    padding: 0;
    padding-bottom: 24px;
    width: 100%;
    margin: 0;
}

/* CSS'e bu kuralları ekleyelim */
.highcharts-title {
    display: none !important;
}

.highcharts-credits {
    display: none !important;
}

#mainSectorChart, #subSectorChart {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.highcharts-treemap-series .highcharts-point {
    stroke: white;
    stroke-width: 2px;
}

.highcharts-treemap-series .highcharts-data-label text {
    fill: white;
    text-shadow: none;
}

.highcharts-treemap-series .highcharts-point {
    stroke: #E5E7EB; /* Border rengi */
    stroke-width: 2px; /* Border kalınlığı */
}

    .highcharts-treemap-series .highcharts-point:hover {
        stroke-width: 2px;
        stroke: #E5E7EB;
    }

.highcharts-treemap-series .highcharts-point-select {
    fill: #EFFEF1 !important;
    stroke: #E5E7EB;
    stroke-width: 2px;
}

/* View Controls */
.view-toggle {
    display: flex;
    gap: 8px;
}

.view-button {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .view-button.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

/* Sector Information */
.sector-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.sector-ratio {
    font-size: 12px;
    font-weight: 500;
    color: #5F5F5F;
}

/* Market Share Analysis */
.market-share-analysis {
    margin-top: 48px;
}

.donut-chart-container {
    position: relative;
    margin: 0 auto;
}

#marketShareChart {
    min-width: 260px;
    min-height: 260px;
    width: 100%;
    height: 100%;
}

#indexAnalysisChart {
    min-width: 260px;
    min-height: 260px;
    width: 100%;
    height: 100%;
}

.market-share-chart-container {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.market-share-table-container {
    margin-top: 16px;
}

/* Analysis Header */
.analysis-header {
    display: grid;
    grid-template-columns: 380px auto 380px;
    gap: 24px;
    align-items: start;
}

.asset-header-content {
    display: flex;
    flex-direction: column;
    max-width: 330px;
    justify-content: space-between;
    height: 100%;
}

    .asset-header-content h2 {
        font-size: 20px;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0 0 8px 0;
    }

    .asset-header-content p {
        font-size: 14px;
        color: var(--text-secondary);
        margin: 0;
    }

/* MultiSelect Custom Styles */
.ms-container {
    width: 100% !important;
}

.ms-choice {
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    height: 45px !important;
    line-height: 45px !important;
    padding: 0 15px !important;
    background-color: white !important;
}

    .ms-choice > span {
        padding-left: 0 !important;
    }

.ms-drop {
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    margin-top: 4px !important;
}

    .ms-drop ul {
        padding: 8px !important;
    }

        .ms-drop ul > li label {
            padding: 10px !important;
            border-radius: 8px !important;
            transition: background-color 0.2s !important;
        }

            .ms-drop ul > li label:hover {
                background-color: var(--bg-light) !important;
            }

        .ms-drop ul > li.selected label {
            background-color: var(--bg-light) !important;
        }

/* Chart Controls */
.chart-controls {
    width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.toggle-buttons {
    display: flex;
    background: var(--bg-light);
    padding: 4px;
    border-radius: 32px;
}

.toggle-button {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: none;
    border-radius: 32px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .toggle-button.active {
        background: white;
        color: var(--text-primary);
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .toggle-button:hover:not(.active) {
        color: #374151;
    }

/* Chart Section */
.analysis-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
/* Chart Legend */
.chart-legend {
    display: flex;
    gap: 10px;
    padding: 4px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0px 2px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

    .legend-item:hover {
        background-color: var(--bg-light);
    }

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-text {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* Legend Colors */
.legend-item[data-type="mega"] .legend-dot {
    background-color: var(--primary-dark);
}

.legend-item[data-type="buyuk"] .legend-dot {
    background-color: #126920;
}

.legend-item[data-type="orta"] .legend-dot {
    background-color: var(--primary);
}

.legend-item[data-type="kucuk"] .legend-dot {
    background-color: #43E55A;
}

.legend-item[data-type="mikro"] .legend-dot {
    background-color: #B8FAC1;
}


/* Table Section */
.analysis-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.analysis-table {
    background: white;
    overflow: hidden;
    table-layout: fixed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* tüm satırlardaki .col hücreler default sola hizalı olsun */
.asset-table-content .col {
    text-align: left;
}

/* ilk satır (başlık) hariç diğer satırlardaki, 
   ve ilk sütun (label) hariç tüm .col'ları sağa hizala */
.asset-table-content .asset-table-row:not(:first-child) .col:not(.label) {
    text-align: right;
}

.asset-table-title {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-family: Space Grotesk;
}

.asset-table-content {
    position: relative;
    width: 100%;
}

.asset-table-row {
    display: flex;
    border-bottom: 1px solid var(--border);
}

    .asset-table-row .col {
        flex: 1;
        padding: 16px 20px;
        font-size: 14px;
        color: #374151;
        display: flex;
        align-items: center;
        white-space: nowrap; /* Metni tek satırda tutar */
        overflow: hidden; /* Taşan içeriği gizler */
        text-overflow: ellipsis; /* Taşan metin yerine ... gösterir */
    }

        .asset-table-row .col.label {
            background: var(--bg-light);
            font-weight: 500;
            /* Remove min-width to allow label to adjust */
            flex: 2.2; /* Slightly smaller than other columns */
            border-right: 1px solid var(--border);
            font-family: Space Grotesk;
        }

        .asset-table-row .col.clickable {
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }

            .asset-table-row .col.clickable:hover {
                background-color: var(--bg-light);
                color: var(--text-primary);
            }

            .asset-table-row .col.clickable::after {
                content: '';
                position: absolute;
                bottom: 4px;
                left: 50%;
                transform: translateX(-50%);
                width: 4px;
                height: 4px;
                border-radius: 50%;
                background-color: var(--primary);
                opacity: 0;
                transition: opacity 0.2s;
            }

            .asset-table-row .col.clickable:hover::after {
                opacity: 1;
            }

/* Share Info Section */
/*.shares-stats-summary {
 
    margin: 20px 0;
}

.stats-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: var(--bg-light);
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .stats-item:hover {
        background: #f3f4f6;
    }

.stats-label {
    color: var(--text-secondary);
}

.stats-value {
    font-size: 16px;
    color: var(--text-primary);
}*/
.stats-item {
    display: flex;
    flex-direction: row; /* yan yana */
    align-items: center; /* dikey ortala */
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 8px; /* satırlar arası boşluk */
    gap: 15px;
}

.portfolio-shares-container {
    display: flex;
    flex-direction: row; /* yan yana */
}

.portfolio-shares-container {
    display: flex;
    flex-direction: column; /* kardeşleri alta alta diz */
    gap: 1.5rem; /* bloklar arası boşluk */
}

.shares-top {
    display: flex;
    gap: 1rem;
}

.shares-stats-summary {
    flex: 1;
}

.shares-chart-container {
    flex: 2;
}

/* Güvenlik: bu ikisi tam genişlik alsın */
.shares-top,
.shares-table-wrapper,
.share-detail-modal {
    width: 100%;
}

.stats-label, .stats-value {
    font-family: Space Grotesk;
    font-size: 14px;
    font-weight: 500;
}

.shares-top {
    display: flex;
    gap: 1rem;
    align-items: stretch; /* her iki taraf aynı yüksekliğe eşitlenir */
}

.shares-stats-summary,
.shares-chart-container {
    flex: 1 1 50%;
    width: 50%;
    display: flex;
    flex-direction: column;
}

#topSharesChart {
    flex: 1; /* chart kapsayıcıyı doldursun */
    height: 100%; /* yüksekliği eşitle */
}


/* Fund Link */
.fund-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

    .fund-link:hover {
        color: var(--primary);
        text-decoration: underline;
    }

/* DataTables Search */
.dataTables_filter {
    position: relative;
}

    .dataTables_filter label {
        width: 100%;
    }

    .dataTables_filter input {
        width: 100%;
        border: 1px solid var(--border);
        border-radius: 20px;
        font-size: 16px;
        color: #374151;
        background-color: var(--bg-light);
        padding: 10px 20px;
        transition: all 0.3s ease;
        outline: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

        .dataTables_filter input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 6px rgba(17, 191, 43, 0.5);
            background-color: white;
            transform: scale(1.02);
        }

        .dataTables_filter input::placeholder {
            color: #9CA3AF;
            font-style: italic;
        }

        .dataTables_filter input:hover {
            border-color: #6EE7B7;
            box-shadow: 0 2px 8px rgba(110, 231, 183, 0.3);
            background-color: white;
        }

.index-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 32px;
    background: white;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
}

    .index-select:focus {
        outline: none;
        border-color: #11BF2B;
        box-shadow: 0 0 0 1px #11BF2B;
    }

#indexAnalysisSubCategories {
    margin-bottom: 0.5rem;
}
/* Share Grid */
.shares-chart-container {
    background: white;
    margin-top: 20px;
}

.highcharts-bubble-series .highcharts-point {
    transition: all 0.2s ease;
}

    .highcharts-bubble-series .highcharts-point:hover {
        filter: brightness(1.1);
    }

/* Share Detail Modal */
.share-detail-modal {
    display: none;
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999; /* her zaman en üstte */
}

    .share-detail-modal.active {
        display: flex;
        align-items: center;
        justify-content: center;
        /* z-index burada tekrar yazmana gerek yok, yukarıdaki 9999 zaten geçerli */
    }

.share-detail-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden; /* radius’un bozulmaması için */
    display: flex;
    flex-direction: column;
}

    .share-detail-modal-content .modal-body {
        overflow-y: auto; /* sadece içerik scroll */
        flex: 1;
    }

/* Funds Table */
.funds-table {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.funds-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    background-color: var(--bg-light);
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.funds-table-body {
    max-height: 400px;
    overflow-y: auto;
}

.fund-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

    .fund-row:hover {
        background-color: var(--bg-light);
    }

.fund-col {
    padding: 0 8px;
}

.fund-row:last-child {
    border-bottom: none;
}

/* Share Info and Details */
.share-info {
    position: relative;
}

    .share-info h3 {
        white-space: nowrap;
        display: inline-block;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
    }

.share-code {
    font-size: 12px;
    color: var(--text-secondary);
}

.share-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.share-ratio {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.share-change {
    font-size: 14px;
    font-weight: 500;
}

    .share-change.positive {
        color: var(--success);
    }

    .share-change.negative {
        color: var(--error);
    }

/* Market Share Modal */
.market-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    overflow-y: auto;
}

    .market-share-modal.active {
        display: block;
    }

.asset-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    margin: 2rem auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.asset-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-radius: 8px 8px 0 0;
}

.asset-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

    .modal-close:hover {
        color: var(--text-primary);
    }

/* Market Header */
.market-header {
    margin-bottom: 24px;
}

.market-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.market-type {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.market-stock-count-badge {
    background-color: var(--bg-light);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Market Table */
.market-table {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.market-table-header {
    background-color: var(--bg-light);
    display: grid;
    grid-template-columns: 300px 200px 1fr 1fr;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    z-index: 9;

}

    .market-table-header > div {
        font-weight: 600;
        color: #374151;
        font-size: 16px;
        font-family: Space Grotesk;
       justify-items:flex-start;
    }

   
.market-table-body {
    background: white;
}

.market-table-row {
    display: grid;
    grid-template-columns: 300px 200px 1fr 1fr;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    font-family: nacelle;
    font-weight: 400 !important;
    color: #000 !important;
}

    .market-table-row:last-child {
        border-bottom: none;
    }

    .market-table-row:hover {
        background-color: var(--bg-light);
    }

.market-col-value {
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

    .market-col-value.positive {
        color: var(--success);
    }

    .market-col-value.negative {
        color: var(--error);
    }

/* Stock Icons and Info */
.market-stock-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    border-radius: 6px;
    overflow: hidden;
}

    .market-stock-icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.market-col-code {
    font-weight: 600;
    color: var(--text-primary);
}

.market-col-name {
    color: #374151;
}

.market-col-sector,
.market-col-parent-sector {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Info Banner */
.info-banner-1, .info-banner-2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: #EFFEF1;
    padding: 12px;
    text-align: center;
    color: var(--primary);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 24px;
}

.market-share-wrapper {
    margin-top: 24px;
}

/* Category Filter */
.category-filter-wrapper {
    flex-shrink: 0;
}

.category-filter {
    width: 300px !important;
    margin: 0 !important;
    position: relative;
}

.category-filter-container {
    display: flex;
    width: 100%;
    justify-content: end;
    align-items: end;
}
/*Index Filter*/
.index-filter{
    position:relative;
    margin-top:35px;
}
/* Table Controls */
.table-controls {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 24px;
    padding: 20px 0px;
}

.multi-select .multi-select-header {
    border-radius: 24px !important;
    height: 34px !important;
    min-height: 15px !important;
    padding: 0 !important;
    position: relative; /* absolute çocuk için referans */
}



/* Sayaç: sabit genişlik, dikey ortalı, kaymasın */
.multi-select-header-max {
    position: absolute;
    right: 28px; /* chevron’dan önce dursun (gerekirse ayarla) */
    top: 50%;
    transform: translateY(-50%);
    min-width: 3.5ch; /* “x/y” için sabit alan */
    text-align: center;
    white-space: nowrap; /* satır kaymasın */
    font-variant-numeric: tabular-nums; /* rakamlar eş genişlikte */
    line-height: 1; /* baselin kaynaklı zıplamayı engelle */
    pointer-events: none; /* tıklamayı engellemesin */
}

.sector-group {
    display: grid;
    grid-template-columns: 2fr 3fr; /* 2 + 3 = 5 birim */
    align-items: center; /* dikey ortalama */
    gap: 1rem; /* aradaki boşluk */
}

/* Alt elemanlar varsayılan olarak columnlarına oturacak */
.sector-tabs {
    display: flex;
    gap: 0.5rem;
}

.sector-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}


#portfolioChangesTable {
    position: relative;
}
    /* Portfolio Changes Table */
    #portfolioChangesTable tbody tr {
        background-color: white !important;
        cursor: pointer;
    }

#sharesTableBody tr {
    background-color: white !important;
    overflow-x: auto;
    cursor: pointer;
}

/* Distribution Views */
.distribution-container.grid-view {
    display: none;
}

.distribution-list-view {
    display: block;
}

    .distribution-container.grid-view.active,
    .distribution-list-view.active {
        display: flex;
    }

.distribution-list-view {
    flex-direction: column;
    width: 100%;
}

/* Filters Container */
.filters-container {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}


/* Sector Table */
.sector-table-container {
    position: relative;
}

#sectorDistributionTable {
    width: 100%;
}

.sector-filters {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.filter-groups {
    display: flex;
    gap: 16px;
    position: relative;
}

/* Search Group */
.search-group {
    width: 200px;
}

    .search-group input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid var(--border);
        border-radius: 24px;
        font-size: 14px;
        color: #374151;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 12px center;
        background-size: 16px;
        padding-left: 36px;
    }

        .search-group input::placeholder {
            color: #9CA3AF;
        }

/* Index Select */
#sectorIndexFilter {
    width: 100%;
    height: 100%;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background-color: white;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
}

/* Sector Tabs */
.sector-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.sector-tab {
    padding: 12px 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    position: relative;
}

    .sector-tab.active {
        color: var(--text-primary);
        font-weight: 500;
    }

        .sector-tab.active:after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            width: 100%;
            height: 2px;
            background: var(--text-primary);
        }

    .sector-tab:focus {
        outline: none;
    }

/* Sector Name Cell */
.sector-name-cell {
    position: relative;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

    .sector-name-cell:hover {
        background-color: var(--bg-light);
        color: var(--primary);
    }

    .sector-name-cell:after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 8px;
        right: 8px;
        height: 1px;
        background-color: var(--primary);
        transform: scaleX(0);
        transition: transform 0.2s ease;
    }

    .sector-name-cell:hover:after {
        transform: scaleX(1);
    }

/* Change Type Select */
.change-type-select {
    width: 250px;
    padding: 8px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    background-color: white;
    cursor: pointer;
}

    .change-type-select:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 1px var(--primary);
    }

/* Table Filters */
.table-filters {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 32px;
    padding: 20px 0px;
}

/* Load More Button */
.show-more-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 16px;
}

/* Animation */
@keyframes modalSlideIn {
    from {
        transform: translate(0, -10px);
        opacity: 0;
    }

    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    .analysis-header {
        grid-template-columns: 250px auto 250px;
    }
}

@media (max-width: 1200px) {
    .analysis-header {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .asset-header-content {
        max-width: 100%;
    }

    .chart-controls {
        width: 100%;
    }

    .market-table-header,
    .market-table-row {
        grid-template-columns: 60px 100px 1fr 150px 1fr;
    }

    .market-col-parent-sector {
        display: none;
    }
}

@media (max-width: 1024px) {
    .distribution-container {
        flex-direction: column;
    }

    .chart-controls {
        flex-direction: column;
        gap: 16px;
        align-items: center;
        width: 100%;
    }

    .toggle-buttons {
        width: 100%;
        max-width: 300px;
    }

    .category-filter {
        flex: 1;
    }

    .analysis-tables {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .chart-controls {
        flex-direction: column;
    }

    .analysis-tables {
        grid-template-columns: 1fr;
    }

    .toggle-buttons {
        width: 100%;
        max-width: none;
    }

    .chart-legend {
        justify-content: center;
    }

    .market-table-header,
    .market-table-row {
        grid-template-columns: 60px 100px 1fr 150px;
    }

    .market-col-sector {
        display: none;
    }

    .asset-table-row .col {
        padding: 12px 16px;
        font-size: 13px;
    }

    .filter-groups {
        flex-direction: column;
        width: 100%;
    }

    .search-group {
        width: 100%;
    }

    .stats-card {
        grid-template-columns: 1fr;
    }

    .sector-filters {
        flex-direction: column;
    }

    .table-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .change-type-select {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .asset-modal-content {
        width: 95%;
        margin: 1rem auto;
    }

    .market-table-header,
    .market-table-row {
        grid-template-columns: 60px 80px 1fr 120px;
        padding: 8px;
        font-size: 0.875rem;
    }

    .modal-body {
        padding: 16px;
    }

    .share-card {
        margin: 0;
    }

    .chart-legend {
        flex-direction: column;
        align-items: center;
    }

    .stats-item {
        padding: 12px;
    }

    .stats-label {
        font-size: 13px;
    }

    .stats-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {

    .market-share-chart-container {
        padding: 16px;
    }

    .modal-content {
        width: 95%;
        margin: 16px;
    }

    .view-toggle {
        flex-direction: column;
        width: 100%;
    }

    .view-button {
        width: 100%;
        text-align: center;
    }

    .analysis-header {
        padding: 16px;
    }

    .chart-controls {
        padding: 16px;
    }

    .toggle-buttons {
        flex-direction: column;
    }

    .toggle-button {
        width: 100%;
        text-align: center;
    }

    .chart-legend {
        padding: 16px;
        gap: 12px;
    }

    .dataTables_filter input {
        font-size: 14px;
        padding: 8px 16px;
    }

    .market-table-header,
    .market-table-row {
        grid-template-columns: 60px 1fr;
    }

    .market-col-sector,
    .market-col-parent-sector,
    .market-col-value {
        display: none;
    }
}

/* Print styles */
@media print {
    .view-toggle,
    .chart-controls,
    .show-more-btn,
    .modal-close {
        display: none !important;
    }

    .market-share-chart-container {
        break-inside: avoid;
    }

    .analysis-tables {
        break-inside: avoid;
    }
}


.shares-table-wrapper .sector-filters {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.shares-table-wrapper .filter-groups {
    display: flex;
    gap: 16px;
}

.shares-table-wrapper .search-group {
    width: 160px;
    border-radius: 24px;
}

    .shares-table-wrapper .search-group input {
        width: 100%;
        height: 34px;
        padding: 8px 12px;
        border: 1px solid var(--border);
        border-radius: 24px;
        font-size: 14px;
        color: #374151;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 12px center;
        background-size: 16px;
        padding-left: 36px;
    }

        .shares-table-wrapper .search-group input::placeholder {
            color: #9CA3AF;
        }


.portfolio-changes-table-wrapper {
    margin-top: -6%;
}

.portfolio-filters {
    display: flex;
    justify-content: end;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.change-type-wrapper {
    flex: 1;
}

.portfolio-filters .search-group {
    width: 250px;
}

    .portfolio-filters .search-group input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid var(--border);
        border-radius: 32px;
        font-size: 14px;
        color: #374151;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 12px center;
        background-size: 16px;
        padding-left: 36px;
        height: 34px;
    }

        .portfolio-filters .search-group input::placeholder {
            color: #9CA3AF;
        }

/* Adjust change type select for better alignment */
.change-type-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 32px;
    height: 34px;
    font-size: 14px;
    color: #374151;
    background-color: white;
    cursor: pointer;
}

/* Report Date Container */
.report-date-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 66px;
    top: 5px;
    padding: 1.25rem;
    background-color: #EFFEF1;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

    .report-date-container:hover {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        border-color: var(--primary);
    }

/* Current Report Date */
.current-report-date {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 400;
    font-size: 14px;
}

    .current-report-date span {
        font-size: 14px;
        font-weight: 400;
        color: var(--text-primary);
    }

        .current-report-date span.font-semibold {
            font-weight: 600;
        }

#currentReportDate {
    color: var(--primary);
    font-weight: 400;
    font-size: 14px;
}

/* Date Selector */
.date-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .date-selector label {
        font-size: 0.875rem;
        color: var(--text-primary);
        font-weight: 600;
    }

#reportDateSelect {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background-color: white;
    font-size: 0.875rem;
    color: var(--text-primary);
    min-width: 200px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

    #reportDateSelect:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(17, 191, 43, 0.1);
    }

    #reportDateSelect:hover {
        border-color: var(--primary);
    }

    /* Loading State */
    #reportDateSelect option[value=""] {
        color: var(--text-secondary);
    }

/* Responsive Design */
@media (max-width: 768px) {
    .report-date-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .date-selector {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    #reportDateSelect {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .current-report-date {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .report-date-container {
        padding: 1rem;
    }
}

.info-tip {
    display: inline-flex;
    color: var(--primary);
    cursor: help;
    transition: color 0.2s ease;
    margin-left: 8px;
}

    .info-tip:hover {
        color: var(--primary-dark);
    }

table.dataTable thead > tr > th {
    font-size: 14px;
    font-family: Space Grotesk !important;
    font-weight: 500;
    color: #0000008A;
}

table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    color: #000000 !important;
}

table.dataTable tbody > tr > td {
    font-size: 14px;
    font-family: nacelle !important;
    font-weight: 500;
    color: #000000;
    background-color: white;
}

.asset-title-table {
    display: flex;
    align-items: center;
    gap: 16px;
}

.asset-logo-table {
    width: 28px;
    height: 28px;
    border-radius: 30px;
    background-color: #f3f4f6;
}

.asset-name-container-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.asset-company-table {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    margin-bottom: -8px;
}

.asset-company-code-table {
    font-weight: 500;
    font-size: 14px;
    font-family: Space Grotesk;
}

.asset-name-table {
    font-size: 13px;
    font-weight: 400;
    color: #7D8398;
    margin: 0;
}

.view-toggle2 {
    padding: 8px;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
}

    .view-toggle2:hover {
        background: #f3f4f6;
        color: #111827;
        transform: scale(1.05);
    }

.asset-allocation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}


.select-container {
    position: relative;
    width: 200px;
}


.select-label {
    position: absolute;
    left: 0px;
    top: -15px;
    padding: 0 8px;
    font-size: 12px;
    color: #82918e;
    background: #ffffff;
    border-radius: 8px;
    font-family: nacelle;
}

.category-select-label {
    position: absolute;
    left: 0px;
    top: -15px;
    padding: 0 8px;
    font-size: 12px;
    color: #82918e;
    background: #ffffff;
    border-radius: 8px;
    font-family: nacelle;
}

.select-trigger {
    width: 100%;
    padding: 2% 7%;
    font-size: 14px;
    font-weight: 500;
    color: #2d3436;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: 34px;
}


.select-arrow {
    position: absolute;
    right: 20px;
    top: 54%;
    transform: translateY(-50%);
}

    .select-arrow::before {
        content: '';
        display: block;
        width: 10px;
        height: 10px;
        border-right: 2.5px solid #000000;
        border-bottom: 2.5px solid #000000;
        transform: rotate(45deg);
        transition: transform 0.3s ease;
    }

.select-dropdown {
    position: absolute;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow: hidden;
}

.select-container.active .select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-container.active .select-arrow::before {
    transform: rotate(225deg);
}

.select-option {
    padding: 14px 20px;
    font-size: 14px;
    color: #2d3436;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 34px;
}

    .select-option:hover {
        background: linear-gradient(to right, #f8f9fa, #f1f3f5);
        color: #00b894;
        padding-left: 24px;
    }

    .select-option.selected {
        background: linear-gradient(to right, #f1f3f5, #e9ecef);
        color: #00b894;
        font-weight: 500;
    }

@media (max-width: 768px) {
    .select-container {
        width: 90%;
        max-width: 320px;
    }
}
