/* ---------- Grid Container ---------- */
.custom-grid {
    border: 1px solid #ddd;
    font-family: sans-serif;

    /* اسکرول بعد از حدود 20 ردیف */
    max-height: 500px;
    overflow-y: auto;
}

/* ---------- Each Row ---------- */
.grid-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

/* ---------- Cells ---------- */
.grid-row > div {
    padding: 10px;
    border-bottom: 1px solid #eee;
    border-left: 1px solid #eee;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* اولین ستون */
.grid-row > div:first-child {
    border-right: 1px solid #eee;
}

/* ---------- Header ---------- */
.grid-header {
    position: sticky;
    top: 0;
    z-index: 2;
}

.grid-header > div {
    background: #f5f5f5;
    font-weight: bold;
}

/* ---------- Icon ---------- */
.grid-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-icon img {
    width: 40px;
    height: 40px !important;
    max-width: none;
    border-radius: 50% !important;
    object-fit: cover;
    border: 1px solid #ddd;
    display: block;
}
/* ---------- Optional Hover ---------- */
.grid-row:not(.grid-header):hover > div {
    background: #fafafa;
    cursor: pointer;
}