.heading h2 {
    margin: 0;
    display: inline-block;
}
.toggle-icon {
    cursor: pointer;
    font-size: 1.4rem;
    user-select: none;
    transition: transform 0.2s;
    padding: 1rem;
}

.stockTable {
    max-width: 100%;
    overflow-x: auto;
}

.overflow_x {
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

#stock_table_ztk_yx {
    width: 90% ;
    max-width: 100vw ;
}

.stockTable table {
    border-collapse: collapse;
    min-width: 100%;
    width: auto;
    background-color: #FFFFFF;
    border: 1px solid #dfdfdf;
    overflow-x: auto;
    table-layout: fixed;
}

.tableHeader {
    background-color: #eeeeee;
    position: sticky;
    top: 0;
}

.toggle-btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.4;
    color: #2c6fbb;
    border: 1px solid #a0c4e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none;
}

table td small {
    background-color: white;
    border-radius: 5px;
    color: orange;
    padding: 0 3px;
}

#table_ztk {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFFFFF;
    border: 1px solid #dfdfdf;
    table-layout: fixed;
}

.stockTable td,
.stockTable th {
    text-align: left;
    white-space: nowrap;
    width: 80px;
    padding: 6px 3px;
}

#table_ztk td,
#table_ztk th {
    text-align: right;
    white-space: nowrap;
    width: 80px;
    padding: 6px 3px;
}

#table_ztk td {
    padding: 3px 1.7rem 3px 2px;
}

.stockTable th {
    font-size: 13px;
    background-color: #eee;
    padding: 6px 3px;
    line-height: 1.3;
}

.stockTable tr {
    border-bottom: 1px solid whitesmoke;
}

.sorted {
    font-weight: bold;
    color: red;
}

.sortable {
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
}

.th-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sort-icon {
    font-size: 14px;
    color: red;
}

.sort-icon.inactive {
    color: #ccc;
}

.stock-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    white-space: nowrap;
}

.stock-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.stock-link:hover {
    text-decoration: underline;
}

.stock-link .stock-code {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.stock-tags {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
}

.lhb-tag {
    color: orange;
    font-size: 12px;
    font-weight: bold;
}

.lhb-tag a {
    color: inherit;
    text-decoration: none;
}

.lhb-tag a:hover {
    text-decoration: underline;
}

.tag-type {
    font-size: 11px;
    color: #666;
}

#table_ztk thead th {
    position: sticky;
    top: 10.5rem;
    box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.1);
}

#table_strategy_stocks th {
    white-space: normal;
}

.first-col {
    width: 60px;
    max-width: 120px;
}

.normal-col {
    text-align: right;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    padding: 6px 4px;
    min-width: 80px;
}

.stockTable td:nth-child(1),
.stockTable th:nth-child(1) {
    text-align: left;
    overflow: hidden;
    padding-left: 6px !important;
    max-width: 100px;
}

#table_ztk td:nth-child(1),
#table_ztk th:nth-child(1) {
    text-align: left;
    overflow: hidden;
    width: 100px !important;
    max-width: 100px !important;
    padding-left: 6px !important;
    margin-left: -1px;
}

#table_ztk th:nth-child(1) {
    z-index: 2;
}

#table_ztk td:nth-child(1) {
    z-index: 1;
}

.stockTable td {
    line-height: 1.5;
    font-size: 13px;
    color: rgb(102, 102, 102)
}

.stockTable th img {
    width: 10px;
    margin-left: 2px
}

.price_up {
    color: red;
}

.stockTable .price_up {
    color: red;
}

.stockTable .price_down {
    color: green;
}

.price_down {
    color: green;
}

.pagination {
    padding: 20px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.pagination button {
    display: inline-block;
    padding: 6px 8px;
    margin-right: 5px;
    font-size: 14px;
    color: #3a3a3a;
    background-color: #F0F0F0;
    border: none;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination button:disabled {
    color: grey;
    color: #D0D0D0;
    cursor: not-allowed;
}

.submit-button {
    color: var(--main-color);
}

.submit-button:hover {
    background-color: var(--main-color);
    color: white;
}

.submit-button:active {
    background-color: #FF7F7F;
}

.date-picker {
    display: flex;
    padding: 3px 5px;
    align-items: center;
    margin: 0 0.5rem;
    border: 1px solid #dfdfdf;
    border-radius: 5px;
    background-color: whitesmoke;
    width: 18rem;
}

.date-picker input[type="date"] {
    flex: 1;
    padding: 2px 0;
    border: none;
    outline: none;
    font-size: 14px;
    width: min-content;
    min-width: auto;
}

.date-picker button {
    padding: 3px 6px;
    margin-left: 6px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    min-width: 40px;
}

.date-picker1 input[type="date"] {
    padding: 5px;
    margin: 0 10px;
    width: 120px;
    background-color: whitesmoke;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

#imageClose {
    color: #eee;
    font-size: 3rem;
    position: absolute;
    right:15px;
    top:10px;
    cursor: pointer;
}

.screenshot {
    width: 30px;
    max-height: 30px;
    object-fit: fill;
    cursor: pointer;
    border-radius: 2px;
    transition: transform 0.2s;
    top: 0;
    left: 0;
}

.screenshot:hover {
    transform: scale(1.1);
}

.modal-content {
    display: block;
    margin: 5% auto;
    max-width: 90%;
    max-height: 90%;
}

.ul-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ul-buttons .button {
    padding: 4px 8px;
    font-size: 12px;
    background-color: whitesmoke;
    cursor: pointer;
    white-space: nowrap;
}

.ul-buttons .button.active {
    background-color: var(--main-color);
    color: white;
}

.long-txt-col {
    min-width: 30rem !important;
    width: 30rem !important;
    text-align: left !important;
    padding-right: 1rem !important;
}

.left-align-col {
    text-align: left !important;
    padding-right: 1rem !important;
}

.txt-huanhang-td {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5rem;
}

#table_ztk_easy {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFFFFF;
    border: 1px solid #dfdfdf;
    table-layout: fixed;
}

#table_ztk_easy td,
#table_ztk_easy th {
    text-align: right;
    white-space: nowrap;
    width: 70px;
    padding: 6px 3px;
}

#table_ztk_easy td {
    padding: 3px 5px;
}
#table_ztk_easy thead th {
    position: sticky;
    top: 10.5rem;
    box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.1);
}

#table_ztk_easy td:nth-child(1),
#table_ztk_easy th:nth-child(1) {
    text-align: left;
    overflow: hidden;
    width: 100px !important;
    max-width: 100px !important;
    padding-left: 6px !important;
}

#table_ztk_easy th:nth-child(1) {
    z-index: 12;
}

#table_ztk_easy td:nth-child(1) {
    z-index: 11;
}


@media (max-width: 991px) {
    #table_ztk_easy thead th {
        top: 10.1rem;
    }
}

@media (max-width: 768px) {
    .date-picker {
        position: fixed !important;
        bottom: 6rem;
        padding: 5px 20%;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
        background: whitesmoke;
        border-top: 1px solid #ddd;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
        justify-content: space-between;
    }

    .date-picker input[type="date"] {
        font-size: 16px;
        padding: 1px 30px;
    }

    .date-picker button {
        font-size: 1.5rem;
        padding: 0.6rem 1.2rem;
    }

    #table_ztk thead th {
        position: sticky;
        top: 10.1rem;
    }

    .table-left-mask {
        position: fixed;
        top: 10rem;
        left: 0;
        width: 2%;
        height: 100%;
        background: white;
        pointer-events: none;
        z-index: 3;
    }

    #stockTable_youzi_lbtd {
        max-height: none;
        height: auto !important;
    }

    .stockTable table {
        border: none;
    }

    .stockTable table th:nth-child(n+2),
    .stockTable table td:nth-child(n+2) {
        min-width: 60px;
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stockTable td:nth-child(1), .stockTable th:nth-child(1) {
        position: -webkit-sticky;
        position: sticky;
        left: 0;
        width: 100px;
        min-width: 100px;
        overflow: hidden;
        background-color: #FFF5EE !important;
    }

    #table_ztk td:nth-child(1), #table_ztk th:nth-child(1) {
        position: -webkit-sticky;
        position: sticky;
        left: 2%;
        width: 100px;
        min-width: 100px;
        overflow: hidden;
        background-color: #FFF5EE !important;
    }

}

.fin-charts {
    padding: 1rem 2%;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

.one-chart {
    width: 95%; 
    height: 520px; 
    margin: 0 auto;
}

@media (max-width: 768px) {
    .fin-charts {
        grid-template-columns: 1fr;
    }
    .one-chart {
        height: auto; 
        aspect-ratio: 3.6 / 3; 
    }
}

