.sector-snap-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sector-snap-row {
    display: grid;
    grid-template-columns: 180px 1fr 72px;
    align-items: center;
    gap: 10px;
}
.sector-snap-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--navy-mid);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sector-snap-name:hover { color: var(--amber); }
.sector-snap-track {
    position: relative;
    height: 10px;
    background: #f0f2f5;
    border-radius: 99px;
    overflow: hidden;
}
.sector-snap-bar {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 99px;
    width: 0;
    transition: width .6s ease;
}
.sector-snap-bar.pos { background: linear-gradient(90deg, #28a745, #48d368); left: 50%; }
.sector-snap-bar.neg { background: linear-gradient(90deg, #e84040, #dc3545); right: 50%; }
.sector-snap-pct {
    font-size: .82rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}
@media (max-width: 576px) {
    .sector-snap-row { grid-template-columns: 130px 1fr 62px; }
}

/* Home page DataTables (Most Active, Top Gainers, Biggest Decliners, Top
   Crypto, Recently Delisted) — same white/bold header on navy gradient as
   the "Latest price targets" table (#dtBasicExample in style.css).
   No padding-top here (unlike #dtBasicExample): these tables render with
   dom: 't' (no search/length toolbar above them), so top padding just
   left an empty gap between the colored section header and the navy
   thead instead of separating it from a toolbar that no longer exists. */
.home-dt thead {
    color: #fff;
    font-weight: 700;
    background-image: linear-gradient(var(--navy-deep), var(--navy-mid));
    border-bottom: 2px solid var(--navy-mid) !important;
}
.home-dt th {
    font-size: 15px;
    font-weight: 700;
    vertical-align: middle;
}
.home-dt tr {
    text-align: left;
    vertical-align: middle;
}

/* Home page Market Heatmap Card */
.home-heatmap-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.home-heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-heatmap-header h3 {
    color: #e0e0e0;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.home-heatmap-header p {
    color: #888888;
    font-size: 12px;
    margin: 4px 0 0 0;
}

.home-heatmap-header .btn {
    background-color: #667eea;
    color: white;
    border: none;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.home-heatmap-header .btn:hover {
    background-color: #7c8ff0;
    color: white;
}

.home-heatmap-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 4px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.heatmap-loading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #888888;
    font-size: 12px;
    padding: 20px;
}

.home-stock-tile {
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    min-height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.home-stock-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    z-index: 0;
    transition: opacity 0.2s;
}

.home-stock-tile:hover::before {
    opacity: 1;
}

.home-stock-tile:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.home-stock-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-stock-symbol {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.home-stock-change {
    font-size: 9px;
    font-weight: 600;
    opacity: 0.95;
}

.home-stock-tile.gain {
    background: linear-gradient(135deg, #26a69a 0%, #1b8a7d 100%);
}

.home-stock-tile.loss {
    background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
}

.home-stock-tile.neutral {
    background: linear-gradient(135deg, #757575 0%, #5a5a5a 100%);
}

@media (max-width: 768px) {
    .home-heatmap-card {
        padding: 12px;
    }

    .home-heatmap-container {
        max-height: 250px;
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }

    .home-stock-tile {
        min-height: 45px;
        font-size: 10px;
    }
}
