#tm-stocks-final-v5{
    --navy:#0f172a;
    --ink:#111827;
    --muted:#64748b;
    --line:#e2e8f0;
    --soft:#f8fafc;
    --green:#059669;
    --red:#dc2626;
    --blue:#2563eb;
    --white:#fff;

    width:100%;
    margin:0;
    padding:34px 20px 70px;
    box-sizing:border-box;
    background:#f8fafc;
    color:var(--ink);
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

#tm-stocks-final-v5 *{
    box-sizing:border-box;
}

.tm-final-wrap{
    width:100%;
    max-width:1800px;
    margin:0 auto;
}

.tm-final-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:25px;
    margin-bottom:25px;
}

.tm-final-kicker{
    color:#059669;
    font-size:11px;
    font-weight:800;
    letter-spacing:.16em;
    text-transform:uppercase;
    margin-bottom:9px;
}

.tm-final-title{
    margin:0;
    font-size:34px;
    line-height:1.1;
    font-weight:800;
    letter-spacing:-.04em;
}

.tm-final-sub{
    margin:10px 0 0;
    color:#64748b;
    font-size:14px;
}

.tm-final-live{
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px 14px;
    border:1px solid var(--line);
    border-radius:999px;
    background:#fff;
    font-size:12px;
    font-weight:700;
    color:#334155;
}

.tm-live-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:#10b981;
    box-shadow:0 0 0 4px #d1fae5;
}

.tm-final-stats{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:14px;
    margin-bottom:20px;
}

.tm-stat{
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    padding:20px;
    min-height:125px;
}

.tm-stat-label{
    color:#64748b;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.14em;
}

.tm-stat-value{
    margin-top:13px;
    font-size:27px;
    font-weight:800;
    color:#0f172a;
}

.tm-stat-note{
    margin-top:5px;
    color:#94a3b8;
    font-size:12px;
}

.tm-toolbar{
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    padding:14px;
    display:grid;
    grid-template-columns:minmax(260px,1.6fr) minmax(150px,1fr) minmax(150px,1fr) 170px 48px 105px;
    gap:10px;
    margin-bottom:14px;
}

.tm-input,
.tm-select,
.tm-sort-btn,
.tm-refresh{
    height:46px;
    border:1px solid #dbe3ec;
    border-radius:10px;
    background:#fff;
    color:#172033;
    font-size:13px;
    outline:none;
}

.tm-input{
    width:100%;
    padding:0 14px;
}

.tm-input:focus,
.tm-select:focus{
    border-color:#94a3b8;
    box-shadow:0 0 0 3px #f1f5f9;
}

.tm-select{
    padding:0 12px;
}

.tm-sort-btn{
    cursor:pointer;
    font-weight:700;
}

.tm-refresh{
    background:#0f172a;
    color:#fff;
    border-color:#0f172a;
    cursor:pointer;
    font-weight:800;
}

.tm-refresh:hover{
    background:#1e293b;
}

.tm-final-tabs{
    display:flex;
    gap:8px;
    overflow:auto;
    padding-bottom:3px;
    margin-bottom:18px;
    scrollbar-width:none;
}

.tm-final-tabs::-webkit-scrollbar{
    display:none;
}

.tm-tab{
    flex:0 0 auto;
    border:1px solid #dbe3ec;
    background:#fff;
    color:#475569;
    border-radius:999px;
    padding:10px 15px;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
}

.tm-tab.active{
    background:#0f172a;
    border-color:#0f172a;
    color:#fff;
}

.tm-table-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    margin:0 2px 10px;
}

.tm-count{
    font-size:13px;
    color:#64748b;
}

.tm-count strong{
    color:#0f172a;
}

.tm-data-note{
    color:#64748b;
    font-size:12px;
}

.tm-table-shell{
    width:100%;
    overflow:auto;
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    box-shadow:0 5px 20px rgba(15,23,42,.04);
}

.tm-table{
    width:max-content;
    min-width:100%;
    border-collapse:separate;
    border-spacing:0;
    font-size:12px;
}

.tm-table th{
    position:sticky;
    top:0;
    z-index:4;
    background:#f8fafc;
    color:#64748b;
    border-bottom:1px solid var(--line);
    padding:13px 12px;
    white-space:nowrap;
    text-align:right;
    font-size:10px;
    letter-spacing:.08em;
    text-transform:uppercase;
    font-weight:800;
}

.tm-table th:first-child,
.tm-table td:first-child{
    text-align:left;
    position:sticky;
    left:0;
    z-index:5;
    background:#fff;
}

.tm-table th:first-child{
    background:#f8fafc;
    z-index:7;
}

.tm-table td{
    padding:13px 12px;
    border-bottom:1px solid #eef2f7;
    white-space:nowrap;
    text-align:right;
    color:#1e293b;
    background:#fff;
}

.tm-table tbody tr:hover td{
    background:#f8fafc;
}

.tm-symbol{
    font-weight:900;
    color:#0f172a;
}

.tm-company{
    text-align:left!important;
    min-width:230px;
}

.tm-company-name{
    font-weight:700;
    color:#172033;
}

.tm-company-meta{
    margin-top:3px;
    font-size:10px;
    color:#94a3b8;
}

.tm-up{
    color:var(--green)!important;
    font-weight:800;
}

.tm-down{
    color:var(--red)!important;
    font-weight:800;
}

.tm-neutral{
    color:#64748b!important;
}

.tm-signal{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:5px 8px;
    border-radius:7px;
    background:#f1f5f9;
    color:#475569;
    font-size:10px;
    font-weight:800;
}

.tm-signal.positive{
    background:#ecfdf5;
    color:#047857;
}

.tm-signal.negative{
    background:#fef2f2;
    color:#b91c1c;
}

.tm-signal.warning{
    background:#fffbeb;
    color:#b45309;
}

.tm-loading{
    padding:80px 25px;
    text-align:center;
    color:#64748b;
}

.tm-spinner{
    width:30px;
    height:30px;
    border:3px solid #e2e8f0;
    border-top-color:#0f172a;
    border-radius:50%;
    animation:tmspin .8s linear infinite;
    margin:0 auto 15px;
}

@keyframes tmspin{
    to{transform:rotate(360deg)}
}

.tm-error{
    padding:40px;
    text-align:center;
    color:#b91c1c;
    background:#fff;
}

.tm-pagination{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    margin-top:20px;
}

.tm-page{
    min-width:40px;
    height:38px;
    padding:0 12px;
    border:1px solid #dbe3ec;
    border-radius:9px;
    background:#fff;
    cursor:pointer;
    font-weight:700;
    color:#475569;
}

.tm-page.active{
    background:#0f172a;
    border-color:#0f172a;
    color:#fff;
}

.tm-page:disabled{
    opacity:.45;
    cursor:not-allowed;
}

.tm-mobile-list{
    display:none;
}

.tm-mobile-card{
    background:#fff;
    border:1px solid var(--line);
    border-radius:15px;
    padding:16px;
    margin-bottom:10px;
}

.tm-mobile-top{
    display:flex;
    justify-content:space-between;
    gap:12px;
}

.tm-mobile-symbol{
    font-size:17px;
    font-weight:900;
}

.tm-mobile-name{
    margin-top:3px;
    font-size:12px;
    color:#64748b;
}

.tm-mobile-price{
    text-align:right;
    font-size:17px;
    font-weight:900;
}

.tm-mobile-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:8px;
    margin-top:15px;
}

.tm-mobile-item{
    padding:10px;
    border-radius:9px;
    background:#f8fafc;
}

.tm-mobile-label{
    font-size:9px;
    color:#94a3b8;
    text-transform:uppercase;
    font-weight:800;
}

.tm-mobile-value{
    margin-top:4px;
    font-size:12px;
    font-weight:800;
}

@media(max-width:1100px){
    .tm-final-stats{
        grid-template-columns:repeat(3,1fr);
    }

    .tm-toolbar{
        grid-template-columns:1fr 1fr 1fr;
    }
}

@media(max-width:700px){
    #tm-stocks-final-v5{
        padding:20px 12px 50px;
    }

    .tm-final-head{
        display:block;
    }

    .tm-final-title{
        font-size:27px;
    }

    .tm-final-live{
        margin-top:15px;
        width:max-content;
    }

    .tm-final-stats{
        grid-template-columns:repeat(2,1fr);
    }

    .tm-stat{
        padding:15px;
        min-height:105px;
    }

    .tm-stat-value{
        font-size:22px;
    }

    .tm-toolbar{
        grid-template-columns:1fr;
    }

    .tm-table-shell{
        display:none;
    }

    .tm-mobile-list{
        display:block;
    }

    .tm-data-note{
        display:none;
    }

    .tm-table-head{
        margin-top:8px;
    }
}
