#main-container {
    padding-bottom: 40px;
}

#set-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 80%;
    max-width: 1100px;
    margin-top: 20px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    box-sizing: border-box;
}

#set-search-icon {
    color: #6b7280;
    flex-shrink: 0;
}

#set-search-input {
    border: none;
    outline: none;
    font-size: 0.9rem;
    width: 100%;
    color: #1e293b;
    background: transparent;
}

#set-search-input::placeholder {
    color: #9ca3af;
}

#set-table {
    width: 80%;
    max-width: 1100px;
    margin-bottom: 24px;
    margin-top: 24px;
    border-radius: 10px;
    overflow: hidden;
}

#pop-delta {
    width: 75%;
    max-width: 900px;
    margin-top: 24px;
    border-radius: 10px;
    overflow: hidden;
}

#set-table tr {
    cursor: pointer;
    height: 38px;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    #set-table {
        width: 95%;
    }
    #pop-delta {
        width: 95%;
    }
    #set-search-wrap {
        width: 95%;
    }
}

@media (max-width: 767px) {
    #set-search-wrap {
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    #set-table {
        width: 100%;
        font-size: 0.8rem;
        table-layout: fixed;
        border-radius: 0;
    }

    #set-table th {
        padding: 7px 4px;
        white-space: normal;
    }

    #set-table td {
        padding: 7px 4px;
        overflow-wrap: break-word;
    }

    /* Hide Variety and Total Graded on mobile */
    #set-table th[data-name="variety"],
    #set-table td.variety,
    #set-table th[data-name="total_graded"],
    #set-table td.total-graded {
        display: none;
    }

    #set-table th[data-name="number"],   #set-table td.card-number { width: 14%; }
    #set-table th[data-name="name"],     #set-table td.card-name   { width: 26%; }
    #set-table th[data-name="10_price"], #set-table td.psa10-price { width: 20%; }
    #set-table th[data-name="9_price"],  #set-table td.psa9-price  { width: 20%; }
    #set-table th[data-name="raw_price"],#set-table td.raw-price   { width: 20%; }

    #pop-delta {
        width: 100%;
        border-radius: 0;
    }
}

/* ── Pop-delta skeleton ─────────────────────────────────────────────────── */

@keyframes skel-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.skel-line {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 1200px 100%;
    animation: skel-shimmer 1.4s infinite linear;
    border-radius: 4px;
    height: 13px;
}

.skel-pop-title {
    height: 12px;
    width: 45%;
    margin: 0 auto 12px;
}

.skel-pop-table {
    width: 100%;
    border-collapse: collapse;
}

.skel-pop-table thead tr {
    background-color: #1D3557;
}

.skel-pop-table thead th {
    padding: 6px 10px;
}

.skel-pop-table thead th .skel-line {
    background: linear-gradient(90deg, #2d4a6b 25%, #3a5a80 50%, #2d4a6b 75%);
    background-size: 1200px 100%;
    animation: skel-shimmer 1.4s infinite linear;
    height: 11px;
}

.skel-pop-table tbody tr:nth-child(odd) td {
    background-color: #ffffff;
}

.skel-pop-table tbody tr:nth-child(even) td {
    background-color: #f7f9fc;
}

.skel-pop-table tbody td {
    padding: 5px 10px;
    border: 1px solid #e4e4e4;
}

.skel-pop-table tbody td:first-child .skel-line {
    width: 60%;
}

.skel-pop-table tbody td:not(:first-child) .skel-line {
    width: 50%;
    margin: 0 auto;
}

.profit-positive { color: #16a34a; font-weight: 700; }
.profit-negative { color: #dc2626; font-weight: 700; }
